投稿時間:2022-03-15 00:29:43 RSSフィード2022-03-15 00:00 分まとめ(33件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita テトレーションカオスと戯れる https://qiita.com/stat/items/1ca8793d02e4c1c1bea2 ほかにも無限にべき演算を繰り返しても無限大に発散しないような数はあるでしょうかよりも少し大きいくらいの数なら発散しないかも。 2022-03-14 23:36:29
js JavaScriptタグが付けられた新着投稿 - Qiita 【超簡単】FullCalendar + React で カレンダーを表示 https://qiita.com/cokemaniaIIDX/items/32676eacf4d6f5413d81 2022-03-14 23:35:28
js JavaScriptタグが付けられた新着投稿 - Qiita 初めてQiita APIでデータ取得したら、下衆な探偵になっていた https://qiita.com/7ENDO/items/d4f19a0403f513bd4992 自分の興味に従い、楽しく体感理解真面目に調べるつもりが、野次馬根性にあっさり負ける私が今「ハーフミラー」を使ったメディアアート作品を作っているので、「ハーフミラー」というワードを使った記事を書いている人がどれだけいるのかなと、まずは検索。 2022-03-14 23:06:53
AWS AWSタグが付けられた新着投稿 - Qiita Draw.ioでAWSの構成図を描く https://qiita.com/marcio/items/fe86c0c8749edfd52399 左下のMoreShapesをクリックすると表示するシェイプの設定ができるので、AWSにチェックを入れて保存します。 2022-03-14 23:28:06
golang Goタグが付けられた新着投稿 - Qiita golang template https://qiita.com/ytmycat17yo/items/e0f42b64e1167c7ba7a7 amedefinechildhtmltextend 2022-03-14 23:34:30
Linux CentOSタグが付けられた新着投稿 - Qiita VagrantによるLAMP環境構築 1 https://qiita.com/musou/items/19ec81392461f2ac1165 2022-03-14 23:26:16
技術ブログ Developers.IO Amazon Cognito user poolの外部IdPとしてAzure ADを設定してみた https://dev.classmethod.jp/articles/using-azure-ad-as-an-external-idp-for-amazon-cognito/ activedirectoryazuread 2022-03-14 14:47:40
海外TECH MakeUseOf Top 5 Chrome Extensions for Streaming Netflix, Disney+, and Prime Video https://www.makeuseof.com/chrome-extensions-for-streaming-netflix-disney-prime-video/ chrome 2022-03-14 14:50:57
海外TECH MakeUseOf Want to Send Mail Online? DocuPost Is the Service You Need https://www.makeuseof.com/send-mail-online-docupost/ docupost 2022-03-14 14:37:40
海外TECH MakeUseOf Do You Really Need a VPN on Android? https://www.makeuseof.com/does-android-need-vpn/ android 2022-03-14 14:30:13
海外TECH DEV Community 6- What is Agile Scrum methodology? What are the benefits to software development teams? https://dev.to/hamitseyrek/6-what-is-agile-scrum-methodology-what-are-the-benefits-to-software-development-teams-cb2 What is Agile Scrum methodology What are the benefits to software development teams Will the project reach this date Urgent Agile is the method not applied in companies where the completion time of such projects is valued more than the quality Organizations that can be shaped according to market conditions and are open to change are Agile organizations In traditional companies personnel do not have time to think they have no authority to interpret their own initiative is minimal Because the chain of command is very strict And the company has a manager who knows everything Ideas of employees that can add value to the project or company are not considered This leads to a decrease in motivation over time and eventually the loss of personnel Of course it is not right to expect innovative and high value added projects to emerge in environments where mistakes are not welcomed covered up and is paid for with overtime low promotions or low salary increases Projects like this are always patched or stuffed with irrelevant modules or classes that don t fit making them cluttered and underperforming However in agile companies mistakes are seen as tutorials to take one step further With the experience gained mistakes that can make the project worse later are prevented Agile companies are not a company where personnel performances is measured by what is written in weekly reports Instead they are structures where the employee is valued the impact of the work done is prioritized rather than the size Agile companies are places where leaders who personally take part in projects guide help and motivate work rather than managers who know everything and just say do it This time I started by praising Agile culture which is another very important topic of the Advanced Software Development article series and criticizing the traditional method If I made a mistake support me with your comments Let s correct it together If you ve come this far by reading the series it s fine If you came directly to this article I suggest you read the Advanced Software Development article Now back to our topic what really is Agile Agile is a process that allows a team to manage a project more efficiently by dividing it into several phases Although Agile has been partially implemented in many sectors especially the software industry since the s it was fully defined with the Agile Manifesto published in by a group of developers looking for a new software development method with the effect of the Scrum methodology that emerged towards the end of the s principles for Agile are identified in the Agile Manifesto Customer satisfactionEarly and continuous deliveryBeing open to changeFrequent deliveryBusiness and developer collaborationMotivated individualsFace to face meetingClearly defined transactionsTechnical competenceSimplicitySelf organized teamsEditing mirroring and adjustingYou may have heard the term Agile mostly with scrum methodology So let s explain the term scrum Scrum is one of many types of agile methodology known for breaking down projects into large chunks called sprints It is an Agile method that contains meetings roles and tools to help teams working on complex projects collaborate and better structure and manage workloads Although it is known for its frequent use in the software industry it can actually be used by any team You can apply the scrum methodology even within the family After all every family counts as a small team serving a common purpose Scrum is used to manage complex projects or by companies that are results oriented efficient and focused on innovation Scrum is a very good project management system for customer oriented companies as it is more adaptable to customer preferences thanks to its flexibility Agile Scrum MethodologyThe combination of the Agile philosophy and the scrum framework creates the “Agile Scrum methodology Agile scrum methodology can be used for companies of all sizes Actually agile and scrum are two different methods and can be used separately however the benefits of using them together make this compound structure the most popular of the agile methods While other project management methods often emphasize building an entire product in a single operation from start to finish agile scrum methodology focuses on delivering several iterations of a product to stakeholders to deliver the highest business value in the least amount of time Agile scrum methodology is a project management system based on incremental development Each iteration consists of two to four weekly sprints The goal of each sprint is to establish its specified characteristics and produce a potentially deliverable product Subsequent sprints are adjusted based on stakeholder and customer feedback as more features are added to the product What benefits does the Agile scrum methodology provide Agile scrum methodology has many benefits The biggest benefit is that it is flexible and adaptable In this sprint based method feedback is received from the team and stakeholders after each sprint If there is any problem or change suggestion the scrum team adapts it to reach its target more easily and quickly to the new sprints to be planned This way all stakeholders of the project are happy because they are involved in every stage of project management This increases employee and customer satisfaction as well as increases organizational synergy Compare this situation with situations where you had to make customer annoyance and voiced change requests after most or worse the entire project where stakeholders were not involved Either you compromise the performance and algorithm by making big changes in the project or you start the project from the beginning and cause more costs This situation which is frequently encountered in traditional methods reveals how important the agile scrum methodology is Based on these we can conclude that the agile scrum methodology also reduces costs The benefits it provides to the project in terms of creativity innovation and quality can be counted among the other benefits of agile scrum as ideas are taken from all stakeholders in each sprint There are three basic roles in Agile scrum methodology scrum master product owner and scrum team Everyone is equally dedicated to the project A team working for a single purpose Let s talk briefly about these roles Scrum master The scrum master is the facilitator of the scrum development process It ensures that the scrum rules are implemented as intended as well as holding daily meetings with the scrum team The Scrum master is a leader not a manager Coaches and motivates the team It seeks to remove obstacles to sprints and ensure that the team has the best possible conditions to achieve its goals Product owner The Product Owner is the person who tries to maximize the value of the product This is no easy task It should ensure that the expectations of all stakeholders who use or will use the product are met Accordingly his main task is to set the expectations of the product and manage a scrum backlog which is a detailed and constantly updated to do list for the scrum project He checks that each sprint has achieved its goals and expresses his ideas to the scrum master or the scrum team at sprint meetings where necessary Scrum team A Scrum team is a self organized group of three to nine people who do the work themselves with the business design analytical and development skills to solve problems and produce deliverables This team is responsible for achieving of each sprint To ensure that the scrum principles are properly applied in the Agile scrum methodology there must be a scrum expert in the company or an outside scrum expert consultant For now we have come to the end of another article I also published the th article of the series Now you know how important Agile Scrum methodology is for large scale companies or quality projects that I have mentioned in every article or how much it will contribute to the project I m ending this article here but don t stop here keep researching Moreover You can check the scrum org platform for scrum master trainings and certification In the Advanced Software Development series Previous article What is Continuous Integration and Continuous Delivery Why should it be used Don t forget to like if you think it s useful Always get better 2022-03-14 14:54:36
海外TECH DEV Community Traditional Education vs Self Taught Route in Programming (2022 edition) https://dev.to/bornfightcompany/traditional-education-vs-self-taught-route-in-programming-2022-edition-355n Traditional Education vs Self Taught Route in Programming edition This blog post will be written from the self taught programmer s perspective Backstory after I graduated from college Nutrition I started learning programming in my free time HTML CSS JavaScript and React I was able to land my first job after just months of studying but ever since then I was wondering if I should have went to a Computer Sciences university of some kind Years of College vs Months of Self TaughtCollege gives you a plan it gives you a structured path of learning it gives you dedicated teachers who are teaching you stuff in a particular order but College also gives you an extensive overview of everything that programming has to offer I would probably have to learn plenty of technologies that I would not be interested in many of the subjects that are not directly connected to programming would be hard to pass and if I went to college for years I would lose x more time to get a first real job The good thing about the self taught route is that you can turn your focus completely and solely on technologies that interest you and that you want to master On the other hand there are a lot of questions that are hard to answer if you are on your own where to start from how to distinguish what is crucial to understand if you want to move forward what is not so important why are there so many ways to write things and who should I listen to is this still being used so many questions And that brings us to Imposter SyndromeI am not sure how it goes with the imposter syndrome when you have a computer science degree but when you re a self taught programmer it is very real You will often think that things you don t know are actually some basics that you should have known Also you won t have the strongest programming foundations and because of that you will think there must have been a better way to solve a problem You won t feel as good reviewing a PR or giving advice and you won t feel as competent as people with a computer science degree But it s not always that bad especially because the IT industry is full of very friendly people that are understanding and always willing to help you out Information AvailabilityIt has never been easier or faster to get information you need Because of that more and more people are successful in becoming self taught programmers But that is not necessarily making it easier With so much different information paths and advices it might be overwhelming for people and make them feel uncertain if they are moving in the right direction it may even make them quit Job OpportunitiesThere are so many IT companies in the world and there are more of them each day The amount of code that needs to be taken care of is huge and the amount of code that still needs to be written is even bigger The point is There are not enough developers in this world This fact makes a computer science diploma less important when it comes to landing a job Almost everybody should be able to land a job as a junior developer because there is such a large need for developers right now You need to be a good fit for a company sometimes more important than the actual knowledge and you ll become a master of your craft as you work on a real world problems If I had to do it all over againMany people might say that self taught programmers got it easy by bypassing college but I actually think that it is the harder path If I had to start all over again from high school I would definitely go to a computer science college and earn myself a degree But if I had to do it all over again from the point where I already graduated from Nutrition I think I would choose a self taught route again but this time I would also try to become a part time computer science student to have a structured curriculum and a certainty that I have the necessary foundation ConclusionLike with everything else there are good and bad aspects on both paths Many programmers that I ve met said that everybody is a self taught to a certain extent I agree with that college would give me a wide spectrum of knowledge but when it comes to mastering a craft you have to dig deep on your own By now I was able to progress to a mid level JavaScript developer and at this point I think I have more benefits by working on real world projects so I don t see myself going to college again But if you are in the similar position I hope this post helped you in making your decision 2022-03-14 14:23:30
海外TECH DEV Community What is Ruby and Ruby methods that I found challenging? https://dev.to/diiiiana99/what-is-ruby-and-ruby-methods-that-i-found-challenging-215d What is Ruby and Ruby methods that I found challenging In previous blog postings I discussed how difficult it was for me to understand and apply the material Well in comparison to the others I d say this step was the most difficult This step necessitated a great deal of concentration repetition and most importantly perseverance I m happy to report that I made it through the ordeal and learnt a lot In this blog I will be discussing how Ruby methods are structured and implemented as well as the strategy I followed to better understand them Active Record Methods was the subject on which I spent the most time studying At first I thought that writing these methods would be simple It was in certain circumstances It didn t take me long to figure out simple ways like retrieving an ordered list of instances or finding a single instance by a certain key When I started learning more advanced techniques such as identifying the most popular instance of a class or employing helper methods within other methods I became frustrated That s when I started having problems This strategy was unquestionably difficult to implement appropriately Figuring out what my end result needs to be and then thinking about all of the various steps code it might take to get there was one of the most beneficial abilities I utilized to go through this The helper method I utilized in the most popular method to help me get to my ultimate result is shown here Originally this method was used to determine the number of books written in a given genre The wonderful thing about some of these simple techniques is that they can help simplify the code for more sophisticated ones If you look at the first snip you ll see what I mean In the first line of code you can see how this helper method is used The first line of code is in charge of calculating the total number of books in each genre and returning them as an array in the books total variable The total number of books for each genre instance is calculated using my book count function The second line of code locates the index with the largest books total value and saves it to the idx variable The final line of code loops through the whole array of genre instances and returns the genre that was discovered and saved in the idx variable It s critical to approach these types of approaches line by line paying great attention to what each line will yield and how that will help you get closer to your desired final result Solving them became lot easy once I started thinking about each strategy in this way 2022-03-14 14:23:24
海外TECH DEV Community Custom Dialog with Animation using Jetpack Compose https://dev.to/coder_kumar/custom-dialog-with-animation-using-jetpack-compose-18e0 Custom Dialog with Animation using Jetpack ComposeSource Code 2022-03-14 14:18:30
海外TECH DEV Community Convert Java to Kotlin using the Community Edition of IntelliJ https://dev.to/hannudaniel/convert-java-to-kotlin-using-the-community-edition-of-intellij-527h Convert Java to Kotlin using the Community Edition of IntelliJI m going to convert Java to Kotlin using the Community Edition of IntelliJ We ll look at the differences from the perspective of a Java developer The Java sample is from University of Texas Java samples specifically this one UnsortedHashSet sample Converting Code from Java to KotlinI ll start by creating a new Kotlin project I am creating a new Kotlin file called UnsortedHashSet inside of this new project I am now copy pasting the java code from UnsortedHashSet Java sample into this file This automatically brings up a popup and asks if I want to convert the Java code to Kotlin I obviously click on Yes This code segment is auto created import java util class UnsortedHashSet lt E gt private var size private var con Array lt LinkedList lt E gt gt init con arrayOfNulls lt LinkedList lt gt gt as Array lt LinkedList lt E gt gt fun add obj E Boolean val oldSize size val index Math abs obj hashCode con size if con index null con index LinkedList if con index contains obj con index add obj size if size con size gt LOAD FACTOR LIMIT resize return oldSize size private fun resize val temp UnsortedHashSet lt E gt temp con arrayOfNulls lt LinkedList lt gt gt con size as Array lt LinkedList lt E gt gt for i in con indices if con i null for e in con i temp add e con temp con fun size Int return size companion object private const val LOAD FACTOR LIMIT I adjust the auto generated main function to use the UnsortedHashSet class fun main args Array lt String gt println Hello World var ush UnsortedHashSet lt String gt ush add Hannu Goiss ush add Test Name ush add another name println ush size ush size I execute this and get the following output Hello World ush size Process finished with exit code EXCELLENT The conversion was successful and the code can be executed Java vs KotlinLet s compare the Java amp Kotlin code segments Variable declarationJava code private static final double LOAD FACTOR LIMIT private int size private LinkedList lt E gt con Kotlin code private var size private var con Array lt LinkedList lt E gt gt The converter put the static value at the end companion object private const val LOAD FACTOR LIMIT Observations We don t need the In Kotlin there is a difference between var and val Val is used for the static value Interestingly the converter is later using val for Java variables as well and can to figure out that those contain values that are never changing The ConstructorJava Code public UnsortedHashSet con LinkedList lt E gt new LinkedList Kotlin Code init con arrayOfNulls lt LinkedList lt gt gt as Array lt LinkedList lt E gt gt Observations We could have probably written more compact code Declaring Classes in Kotlin The add functionJava Code public boolean add E obj int oldSize size int index Math abs obj hashCode con length if con index null con index new LinkedList lt E gt if con index contains obj con index add obj size if size con length gt LOAD FACTOR LIMIT resize return oldSize size Kotlin Code fun add obj E Boolean val oldSize size val index Math abs obj hashCode con size if con index null con index LinkedList if con index contains obj con index add obj size if size con size gt LOAD FACTOR LIMIT resize return oldSize size Observations oldSize and index are declared as val and not as var This is good as both values never change The resize functionJava Code private void resize UnsortedHashSet lt E gt temp new UnsortedHashSet lt E gt temp con LinkedList lt E gt new LinkedList con length for int i i lt con length i if con i null for E e con i temp add e con temp con Kotlin Code private fun resize val temp UnsortedHashSet lt E gt temp con arrayOfNulls lt LinkedList lt gt gt con size as Array lt LinkedList lt E gt gt for i in con indices if con i null for e in con i temp add e con temp con Observations the for loop has a different syntax But in general it looks similar arrayOfNulls is definitely something new is an interesting way to access one element in an array the syntax with as is something to get used to The size functionJava Code public int size return size Kotlin Code fun size Int return size Observations This function didn t change much except the slightly different syntax General Observations lines of code reduced to those reductions are mainly due to different syntax for control structures If we would be manually creating this code we could have written much more compact code The syntax is different so it requires some adjustment when creating code But the syntax is so similar that reading the code is easy New concepts like are easy to understand at first glance The following link gives an overview of differences between Kotlin and Java Java vs Kotlin and the issues addressed in Kotlin One key selling point is interoperability When you learn a new programming language never just blindly convert code You might create new issues DON T DO THISBut it s for sure a good way to look at differences and get to know Kotlin I m looking forward to coding in Kotlin 2022-03-14 14:16:04
海外TECH DEV Community Hi everyone! https://dev.to/darklove3135/hi-everyone-100m hi 2022-03-14 14:13:50
海外TECH DEV Community 16 Leading Trends in UX/UI Design You Should Know in 2022 https://dev.to/codicacom/16-leading-trends-in-uxui-design-you-should-know-in-2022-16n5 Leading Trends in UX UI Design You Should Know in The article was initially published on Codica Blog Design in is about taking care of customers their exclusiveness and renouncing the “ideal visual Let s briefly consider new design trends in this article UI design trends VintageThey say that everything new is well forgotten old The features of the vintage style are organically integrated into website design in The furniture brand Sol ace is a very cool example of the implementation of the vintage style DD is used in many fields such as e commerce the fashion industry education culture and more For instance Apple uses D models of its products to show their best sides to future customers The Originals Museum Renault uses D animations to show the automobile from different angles Not perfect illustrationsThese can be hand drawn pictures with natural textures and varying line widths The brand How many plants has successfully realized this trend Another trend is depicting people of different nationalities with different skin colors and body types to highlight that everyone has their own beauty The website Listen to Girls is a great example of the implementation of this trend Neo brutalismBrutalism is a style that breaks the rules with hard fonts big titles and a combination of bright or neon colors It does not seek to be convenient and comfortable Below you can see an example of this style implemented by the MSG brand DissymmetryAsymmetry is not an emerging trend in graphic design and UI but it still is up to date in The Revolt website is an example of how the asymmetry style can look harmonious and clear as a whole Live photosIn real and live photos are one of the keys to attracting leads to your website and enhancing users confidence It s important for customers to be acquainted with the team that stays behind the product and to feel the atmosphere of their workspace Figma is a great example of how to use live photos in website design Minimalistic approachThe more simple and understandable the interface is the more pleasing it is for the users Minimalism in expands the boundaries and becomes bright Now it is not only about monochrome However this direction is still the overall concept of convenience and simplicity The Neuro website is a great example of striking minimalism Scrolling storiesNow you can tell about your product or company using scrolling You can create a website where the basic idea is explained stage by stage when the user scrolls the page The Blue Marine Foundation has effectively used scrollytelling to tell visitors about the ocean problem UX design trends InclusivityInclusivity is all about the individual characteristics of people For instance physical disabilities different races cultural backgrounds age gender etc So all these issues must be considered when making a design The WolmartPetRx website is a good example of an inclusiveness trend It is plugged in a widget that makes the design inclusive So visitors have the opportunity to customize the website according to their preferences VR and AR Augmented Reality AR and Virtual Reality VR connect reality with the digital world The popularity of virtual reality was nourished by the news of Metaverse a new Facebook project Metaverse is a three dimensional world s projection in which a user can make the D version of themselves and meet D models of other users online Super applicationsIn simple words a super application is an app in which many services are integrated For instance messenger social network electronic payments delivery and others Super applications are widespread in Asia The most popular super apps are AliPay and WeChat Audio first applicationsUsing audio only apps is a good opportunity to listen to people on the topic you need without logging in Many enterprises have adopted these apps For instance Spotify launches the live audio app Greenroom Design libraries and systemsSuch tools as Adobe XD Figma and Sketch allow designers to develop uniform components for all pages of an application or site Moreover they can collect these elements into a single library which is accessible to all members of the team So it is a great way for designers to work on the common project even being far from each other CustomizingCustomization enables users to select some design elements themselves For example the user settings of Telegram can be cited Users can change the color theme scale wallpaper language and more Prioritization of page speedOne of the reasons why visitors leave the website is the slow page loading speed Therefore optimizing web pages to speed up their loading is essential A designer needs to develop an interface so as not to hinder the optimization For example it is better to use not many fonts and compress images without losing quality Mobile first approachWith the growing number of mobile device users the mobile first approach in design has become a necessity for developing websites and will remain at the top in the current year Here you can see an example of mobile first design by Airbnb 2022-03-14 14:12:34
海外TECH DEV Community How to connect and query to Postgresql Golang vs Rust? https://dev.to/devlikeyou/how-to-connect-and-query-to-postgresql-golang-vs-rust-3neb How to connect and query to Postgresql Golang vs Rust How to connect to Postgresql Golang vs Rust Programming Languages warHey my friends a new post about this war I don t know which is better but I ll try to figure it out I hope y all enjoy this series Here we go It s regular in the job environment to have to connect to databases in this case we re going to connect with Postgresql You only need to have to install the Postgresql server Docker is good too in my case I had to create a database called test and a table called pokemon pokemon has fields id name type Golang GoFirst you need to install a package called github com lib pq how to install this package Init the package main with the name of the folder go mod init name folderGet the package from the internet go get u github com lib pqThis package is A pure Go Golang Postgres driver for Go s database sql package later we will see how to use it All Go Golang scripts are the package so remember to tell it what package is In this case is the main package mainNow import all packages we need to write this code import database sql Package sql provides a generic interface around SQL or SQL like databases fmt implements formatted I O log implements a simple logging package github com lib pq Why has underscore at first that s because I never had to call this package directly In Go Golang all you define you have to use it this is the reason why I have to use underscore because it s the way to define but never I m going to use it this declaration Define a variable of connection to the database const host localhost port user user password password dbname test Define struct of database table type Pokemon struct ID int Name string Type string Remember it s the main function because is the entry point to run Now I have to define the connection s string I need all variables defined before Open the connection with the method Open from the SQL package with the driver name that I need and the connection s string Validate if the connection has an error If it doesn t error call with defer the method Close from the SQL package psqlInfo fmt Sprintf host s port d user s password s dbname s sslmode disable host port user password dbname db err sql Open postgres psqlInfo if err nil log Fatal err defer db Close If you wonder what does defer does It s simple when all code run the last command will be the one you say in defer It s time to catch a new Pokemon who is this Pokemon I use the struct to define the values that I need to create the register After I create a value with the SQL script to insert returning the id With the method QueryRow It needs the query and the values necessary to insert after that I use the method Scan to add the id to a struct called Pokemon I check if it has an error and print the register myNewPokemon Pokemon Name Metapod Type Bug insertSql INSERT INTO pokemons name type VALUES RETURNING id err db QueryRow insertSql myNewPokemon Name myNewPokemon Type Scan amp myNewPokemon ID if err nil log Fatal err fmt Printf v n myNewPokemon Now It s time to fight Metapod I choose you In this case I need to get one register from the database the steps are similar I declare a variable with the type Struct This is only to show that each register is in different variables I create the SQL script to find it in the database With the method QueryRow it executes the query with the value necessary and with the method Scan it inserts the register in the struct I check if it has an error and print the register var myPokemon Pokemon selectSql SELECT FROM pokemons WHERE id err db QueryRow selectSql myNewPokemon ID Scan amp myPokemon ID amp myPokemon Name amp myPokemon Type if err nil log Fatal err fmt Printf v n myPokemon What is that is Metapod evolving Now it s time to update I declare a variable with the type Struct This is only to show that each register is in different variables I create the SQL script to update the database With the method QueryRow it executes the query with the value necessary and with the method Scan it inserts the register in the struct I check if it has an error and print the register var evolution Pokemon updateSql UPDATE pokemons SET name type WHERE id RETURNING id name type err db QueryRow updateSql Butterfree Bug Flying myPokemon ID Scan amp evolution ID amp evolution Name amp evolution Type if err nil log Fatal err fmt Printf v n evolution Anyone wants this moment but I have to let free my Butterfree He fell in love I have to delete remember the delete methods are so dangerous be careful I declare a variable with the type Struct This is only to show that each register is in different variables I create the SQL script to delete the database With the method QueryRow it executes the query with the value necessary and with the method Scan it inserts the register in the struct I check if it has an error and print the register var byePokemon Pokemon deleteSql DELETE FROM pokemons WHERE id RETURNING id name type err db QueryRow deleteSql evolution ID Scan amp byePokemon ID amp byePokemon Name amp byePokemon Type if err nil log Fatal err fmt Printf v n byePokemon I have good pokemons yet In the end how to show all registers in the database I create the SQL script to read in the database With the method QueryRow it executes the query with the value necessary I check if it has an error I have to close the connection with the method close and I use defer you know why if you don t know why you can read a little higher I declare a variable with the type Struct in this case is an array because I want to show all pokemons I read each row and associate it with other variables in each column with the method Scan I check if it has an error and add the register to the array Print the registers rows err db Query SELECT FROM pokemons if err nil log Fatal err defer rows Close var myPokemons Pokemon for rows Next var pokemon Pokemon err rows Scan amp pokemon ID amp pokemon Name amp pokemon Type if err nil log Fatal err myPokemons append myPokemons pokemon fmt Printf v n myPokemons Here is all my code in Go Golang And now it s our code package mainimport database sql fmt log github com lib pq const host localhost port user user password password dbname test type Pokemon struct ID int Name string Type string func main psqlInfo fmt Sprintf host s port d user s password s dbname s sslmode disable host port user password dbname db err sql Open postgres psqlInfo if err nil log Fatal err defer db Close Create myNewPokemon Pokemon Name Metapod Type Bug insertSql INSERT INTO pokemons name type VALUES RETURNING id err db QueryRow insertSql myNewPokemon Name myNewPokemon Type Scan amp myNewPokemon ID if err nil log Fatal err fmt Printf v n myNewPokemon Read one register var myPokemon Pokemon selectSql SELECT FROM pokemons WHERE id err db QueryRow selectSql myNewPokemon ID Scan amp myPokemon ID amp myPokemon Name amp myPokemon Type if err nil log Fatal err fmt Printf v n myPokemon Update var evolution Pokemon updateSql UPDATE pokemons SET name type WHERE id RETURNING id name type err db QueryRow updateSql Butterfree Bug Flying myPokemon ID Scan amp evolution ID amp evolution Name amp evolution Type if err nil log Fatal err fmt Printf v n evolution Delete var byePokemon Pokemon deleteSql DELETE FROM pokemons WHERE id RETURNING id name type err db QueryRow deleteSql evolution ID Scan amp byePokemon ID amp byePokemon Name amp byePokemon Type if err nil log Fatal err fmt Printf v n byePokemon Read all rows err db Query SELECT FROM pokemons if err nil log Fatal err defer rows Close var myPokemons Pokemon for rows Next var pokemon Pokemon err rows Scan amp pokemon ID amp pokemon Name amp pokemon Type if err nil log Fatal err myPokemons append myPokemons pokemon fmt Printf v n myPokemons RustThe first part is to add all dependencies necessary to execute this code Remember these dependencies should add in the file Cargo toml dependencies serde version features derive framework for serializing and deserializing Rust data structures efficiently and generically postgres A synchronous client for the PostgreSQL database Now I m going to the file main rsFirst call the modules necessary to run this code use serde Serialize use postgres Client NoTls Error Define struct of database table derive This is able to implement a trait which means that how you can see after this line define a structure I know that I need to get this information from a database so to achieve to serializing this information I have to say how to structure with serializing or debug So derive Debug Serialize Serialize I used this to can change the name type to ty and Debug allows me to show variable with this operator If you wonder why did I have to use rename The reason is that type is a reserved keyword then exist two options using rename I like this more using r type can escape reserved keywords derive Debug Serialize struct Pokemon id i name String serde rename type ty String Remember it s the main function because is the entry point to run Now I have to define the connection s string Open the connection with the method connect from the SQL package with the string of connection To “unwrap something in Rust is to say “Give me the result of the computation and if there was an error panic and stop the program let mut client Client connect postgresql user password localhost test NoTls unwrap It s time to catch a new pokemon who is this pokemon I use the struct to define the values that I need to create the register After I create a value with the SQL script to insert returning the id With the method query one need the query and the values necessary to insert after that I use the method get to add the id to the struct called Pokemon Print the register let mut my new pokemon Pokemon id name Squirtle to string ty Water to string let insert sql INSERT INTO pokemons name type VALUES RETURNING id let row client query one insert sql amp amp my new pokemon name amp my new pokemon ty my new pokemon id row get println my new pokemon Now It s time to fight Squirtle I choose you In this case I need to get one register from the database the steps are similar I create the SQL script to find it in the database With the method query one execute the query with the value necessary I declare a variable with the type Struct and with the method get I insert the register in the struct This is only to show that each register is in different variables Print the register let select sql SELECT FROM pokemons WHERE id let row client query one select sql amp amp my new pokemon id let my pokemon Pokemon id row get name row get ty row get println my pokemon What is that is Squirtle evolving Now it s time to update I create two variables with the name and type of this pokemon I create the SQL script to update the database With the method query one execute the query with the value necessary I declare a variable with the type Struct and with the method get I insert the register in the struct This is only to show that each register is in different variables Print the register let pokemon name Wartortle to string let pokemon type Water to string let update sql UPDATE pokemons SET name type WHERE id RETURNING id name type let row client query one update sql amp amp pokemon name amp pokemon type amp my pokemon id let evolution Pokemon id row get name row get ty row get println evolution Anyone wants this moment but I have to let free my Wartortle because is a great leader and the Squirtle squad need one I know the story is not original I have to delete remember the delete methods are so dangerous be careful I create the SQL script to delete the database With the method query one execute the query with the value necessary I declare a variable with the type Struct and with the method get I insert the register in the struct This is only to show that each register is in different variables Print the register let delete sql DELETE FROM pokemons WHERE id RETURNING id name type let row client query one delete sql amp amp evolution id let bye pokemon Pokemon id row get name row get ty row get println bye pokemon I have good pokemons yet In the end how to show all registers in the database I declare a variable with the type Struct in this case is a vector because I want to show all pokemons I create the SQL script to read in the database with the method query execute the query with the value necessary and I go through the rows that get the query I declare a variable with the type Struct and with the method get I insert the register in the struct This is only to show that each register is in different variables With the method push I add to the vector each row Print the registers let mut my pokemons Vec lt Pokemon gt vec for row in client query SELECT FROM pokemons amp unwrap let pokemon Pokemon id row get name row get ty row get my pokemons push pokemon println my pokemons Here is all my code in Rust And now it s our code use serde Serialize use postgres Client NoTls Error derive Debug Serialize struct Pokemon id i name String serde rename type ty String fn main gt Result lt Error gt let mut client Client connect postgresql user password localhost test NoTls unwrap Create let mut my new pokemon Pokemon id name Squirtle to string ty Water to string let insert sql INSERT INTO pokemons name type VALUES RETURNING id let row client query one insert sql amp amp my new pokemon name amp my new pokemon ty my new pokemon id row get println my new pokemon Read let select sql SELECT FROM pokemons WHERE id let row client query one select sql amp amp my new pokemon id let my pokemon Pokemon id row get name row get ty row get println my pokemon Update let pokemon name Wartortle to string let pokemon type Water to string let update sql UPDATE pokemons SET name type WHERE id RETURNING id name type let row client query one update sql amp amp pokemon name amp pokemon type amp my pokemon id let evolution Pokemon id row get name row get ty row get println evolution Delete let delete sql DELETE FROM pokemons WHERE id RETURNING id name type let row client query one delete sql amp amp evolution id let bye pokemon Pokemon id row get name row get ty row get println bye pokemon Read all let mut my pokemons Vec lt Pokemon gt vec for row in client query SELECT FROM pokemons amp unwrap let pokemon Pokemon id row get name row get ty row get my pokemons push pokemon println my pokemons Ok ConclusionStructure It s similar Maybe the principal difference between them it s that Go Golang uses if in each iteration to validate if has an error this is because Go Golang doesn t have exceptions Lines Golang Rust Easy to get information For me It was easier to get information from Go Golang than Rust Execution time In this example the difference is not decisive Would you like that I write more info about the database What would be your first pokemon I hope you enjoy my post and remember that I am just a Dev like you 2022-03-14 14:10:03
海外TECH DEV Community CRUD automation and Low-Code https://dev.to/polterguy/crud-automation-and-low-code-4pac CRUD automation and Low CodeCRUD is probably one of the most boring tasks you can possibly do as a software developer especially if you have a large database with hundreds of tables and you need to create CRUD endpoints wrapping your entire database With Magic you can automatically create CRUD API endpoints in seconds by simply clicking a button Below is a screenshot The process is extremely simply Choose your database configure your endpoints click a button And two seconds later Magic has produced thousands of lines of code for you automatically wrapping every single table inside CRUD HTTP endpoints for you without you having to write a single line of code yourself You can of course configure the process and provide custom authorisation requirements for each endpoint publish socket messages as endpoints are invoked create log entries if you wish etc etc etc Magic also automatically generates join SQL statements for you for referenced tables and you can select which CRUD verbs you want to have Magic create for you on a per table basis Basically you ve got more or less control over the process through checkboxes and a simple to use UI Customising your endpoints with Hyper IDEAfter you re done generating your CRUD HTTP web API you can easily customise your endpoints Magic s output is Hyperlambda which is an easily understood DSL you can edit with Magic s integrated IDE Below is a screenshot of Hyper IDE allowing you to edit your endpoints after the Crudifier is done doing its magic Hyper IDE again is a lightweight web based integrated development environment allowing you to easily edit your code save it for then to immediately see the result Hyper IDE provides syntax highlighting autocomplete and even works perfectly from your phone Although Hyper IDE is best suited for Hyperlambda you can still use it to edit CSS HTML JavaScript TypeScript and most other popular programming languages You can also invoke your endpoints directly from Hyper IDE such as illustrated below Hyper IDE has its own integrated Postman component allowing you to immediately invoke your endpoints as you re editing your code This allows you to immediately see the result of changes to your code providing you with instant feedback reducing the amount of time it takes for you to discover bugs and such in your code Creating HTTP endpoints with SQLEvery now and then you need some sort of KPI and or statistical component in your frontend at which point typically the bulk of your code is SQL With Magic you can easily create HTTP endpoints using nothing but good old fashion SQL Below is a screenshot of the integrated SQL editor where we re creating a fairly complex join SQL statement for then to wrap our SQL inside an HTTP endpoint The following screenshot also illustrates how to allow for your endpoint to take arguments which again becomes parts of your SQL statement to for instance filter your results etc Automatically generate an Angular frontendWhen you re done with generating your backend you can also just as easily create an Angular frontend by simply clicking another button Below is a screenshot of how your end result might end up looking like However you can also test the following automatically generated CRUD app with the username password combination of admin admin Please realise that we started out with nothing but an existing database and we created a CRUD web API in second for then to create the following Angular app in another second All in all we re talking about seconds of coding here and some few minutes to build and deploy our result to a VPS Magic is Open SourceAs a final touch everything we did above is open source and free of charge to use also in your own closed source projects If you re interested in trying it out for yourself you can download Magic below Magic also contains many more components helping you out with your software development efforts ranging from an integrated SQL editor replacing MySQL Workbench integrated audit logging components a Micro Service AppStore etc etc etc What we showed you here was only of the components you find in Magic Magic has components in total I would appreciate it if you gave our project a star on Magic s GitHub project page And of course if you try out Magic we would love to hear what you think about it Download Aista Magic Cloud 2022-03-14 14:07:44
Apple AppleInsider - Frontpage News Daily deals March 14: $70 off Apple Smart Keyboard for iPad, $929 M1 MacBook Air, $50 off Samsung Galaxy Buds Pro & more https://appleinsider.com/articles/22/03/14/daily-deals-march-14-70-off-apple-smart-keyboard-for-ipad-929-m1-macbook-air-50-off-samsung-galaxy-buds-pro-more?utm_medium=rss Daily deals March off Apple Smart Keyboard for iPad M MacBook Air off Samsung Galaxy Buds Pro amp moreMonday s top deals include off Apple s Smart Keyboard for the inch iPad The current MacBook Air with M is also off at Amazon while Samsung Galaxy Buds Pro are off Every day we scour the internet for the best tech deals we can find including discounts on Apple products tech accessories and a variety of other items all in an effort to help you save some cash If an item is out of stock you may still be able to order it for delivery at a later date Many of the discounts are likely to expire soon though so be sure to grab what you can We add new deals every single day Be sure to check here daily even on the weekends to see all the newest deals we ve discovered Read more 2022-03-14 14:37:17
Apple AppleInsider - Frontpage News iPhone SE is powerful & accessible with tired design, early reviews say https://appleinsider.com/articles/22/03/14/iphone-se-is-powerful-accessible-with-tired-design-early-reviews-say?utm_medium=rss iPhone SE is powerful amp accessible with tired design early reviews sayApple s third generation iPhone SE has the A Bionic G and Touch ID for and here s what people are saying about it iPhone SE impressions are inIf you look at the new iPhone SE you ll see an identical design to the iPhone released in Apple does this to keep costs down in its budget iPhone by using older cheaper manufacturing processes and parts Read more 2022-03-14 14:07:45
海外TECH Engadget Ukraine is reportedly using Clearview AI's facial recognition tech https://www.engadget.com/ukraine-russia-clearview-ai-facial-recognition-143456121.html?src=rss Ukraine is reportedly using Clearview AI x s facial recognition techUkraine is now using Clearview AI s facial recognition technology for purposes such as identifying Russian soldiers its CEO claimed Hoan Ton That told Reuters the company offered Ukraine s defense ministry free access to its system following the invasion by Russia According to the report Clearview suggested Ukraine could use the tech to reunite refugees with family members fight misinformation assess at checkpoints whether someone is a person of interest and to identify dead bodies The company hasn t offered its technology to Russia Engadget has contacted the defense ministry for comment Ukraine officials previously suggested they were considering using the tech It s not clear exactly what Ukraine is using the system for Ton That said while noting it shouldn t be used as the sole means of identification He and Clearview advisor Lee Wolosky claimed other Ukraine government agencies plan to start using the tech over the coming days Ton That said Clearview has access to more than billion photos from VKontakte the Russian social media service and more than billion images overall in its database Clearview s controversial tech has come under fire from many quarters over the last few years This month Italy fined the company € million million and ordered it to delete images of Italian nationals The UK provisionally fined Clearview £ million million in November for breaking data protection laws Canada Australia and France are among the countries that have told Clearview to delete images of its residents and citizens It s also facing privacy lawsuits in the US where lawmakers have urged federal agencies to stop using the tech Meta Google Venmo Twitter and other platforms have demanded that Clearview stop scraping images from them as well 2022-03-14 14:34:56
海外TECH Engadget Apple's 16-inch MacBook Pro is $200 less than usual on Amazon https://www.engadget.com/apples-16-inch-macbook-pro-is-200-less-than-usual-on-amazon-140039420.html?src=rss Apple x s inch MacBook Pro is less than usual on AmazonApple s latest MacBook Pros are some of the most powerful laptops you can get right now and they have high price tags to match But if you ve had your eye on the inch model you can grab it for less than usual right now thanks to a new Amazon sale The online retailer has the GB model for and the TB version for both of which are record low prices Buy inch MacBook Pro GB at Amazon Buy inch MacBook Pro TB at Amazon These are the MacBook Pros many have been waiting for not only for their impressive power but also their equally improved connectivity We gave the M Pro and M Max laptops a score of for their excellent performance lovely Liquid Retina XDR Displays great speakers and solid battery lives Both machines blew every Windows machine we reviewed last year out of the water when it came to performance benchmarks and we didn t notice a slow down when the laptops ran in battery power Plus you ll get a lot of use out of them before you need to power up ーthe inch laptop lasted about hours in our testing while the inch model survived for just over hours Power alone makes these laptops solid options for videographers photographers and other creatives but they re made even better by the new ports Apple included on both laptops You re no longer limited to just a few Thunderbolt ports ーboth machines now have a full sized HDMI port a MagSafe power connector three USB C Thunderbolt ports and an SD card slot So while you will still need an adapter if you have USB A accessories hooking the machine up to other peripherals is much easier than it was on previous models They may still be expensive even with this discount but it s hard to beat the latest MacBook Pros if you re looking for a new laptop with as much power as possible plus all of the latest features from Apple Follow EngadgetDeals on Twitter for the latest tech deals and buying advice 2022-03-14 14:00:39
海外科学 NYT > Science Russian Scientists Face Isolation Following Invasion of Ukraine https://www.nytimes.com/2022/03/12/science/physics-cern-russia.html ukraine 2022-03-14 14:56:32
海外科学 NYT > Science How an Electric Truck Factory Became a Lightning Rod in Georgia https://www.nytimes.com/2022/03/14/climate/rivian-georgia-kemp-perdue.html How an Electric Truck Factory Became a Lightning Rod in GeorgiaThe governor hailed the factory as an economic boon that would put Georgia at the vanguard of the green economy Not everyone liked the idea 2022-03-14 14:34:49
海外科学 NYT > Science Which Coronavirus Vaccine Will Work in the Youngest Children? https://www.nytimes.com/2022/03/14/us/politics/coronavirus-vaccine-children-moderna-pfizer.html Which Coronavirus Vaccine Will Work in the Youngest Children Moderna is going head to head with Pfizer BioNTech for the opportunity to vaccinate the youngest children the only Americans still not eligible for shots 2022-03-14 14:57:26
金融 RSS FILE - 日本証券業協会 J-IRISS https://www.jsda.or.jp/anshin/j-iriss/index.html iriss 2022-03-14 15:08:00
金融 金融庁ホームページ 株式会社千葉銀行の産業競争力強化法に基づく事業適応計画の認定について公表しました。 https://www.fsa.go.jp/news/r3/ginkou/20220314/20220314.html 株式会社千葉銀行 2022-03-14 16:00:00
ニュース BBC News - Home Ukraine: Balcony protest at oligarch's mansion continues despite riot police https://www.bbc.co.uk/news/uk-england-london-60736583?at_medium=RSS&at_campaign=KARANGA deripaska 2022-03-14 14:44:12
ニュース BBC News - Home Ukraine war: Silent streets in wiped out Donetsk town https://www.bbc.co.uk/news/world-europe-60739681?at_medium=RSS&at_campaign=KARANGA ukraine 2022-03-14 14:10:08
ニュース BBC News - Home How many refugees have fled Ukraine and where are they going? https://www.bbc.co.uk/news/world-60555472?at_medium=RSS&at_campaign=KARANGA ukraine 2022-03-14 14:50:00
ニュース BBC News - Home Chelsea: Investment firm selling club expects sale could happen this month https://www.bbc.co.uk/sport/football/60738126?at_medium=RSS&at_campaign=KARANGA Chelsea Investment firm selling club expects sale could happen this monthThe American investment firm tasked with selling Chelsea expects a sale could happen by the end of the month after positive conversations with the UK government 2022-03-14 14:09:52
ニュース BBC News - Home 'I don't think it helps being Australian' - England coach Jones shrugs off questions about future https://www.bbc.co.uk/sport/rugby-union/60739236?at_medium=RSS&at_campaign=KARANGA x I don x t think it helps being Australian x England coach Jones shrugs off questions about futureEddie Jones says questions over whether he should remain England head coach after another lacklustre Six Nations campaign are part of the job 2022-03-14 14:45:40

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)