投稿時間:2023-07-06 19:32:35 RSSフィード2023-07-06 19:00 分まとめ(38件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia News] 通勤・通学客でごった返す朝のJR新宿駅で実験する「ラウンドアバウト」とは? https://www.itmedia.co.jp/news/articles/2307/06/news181.html itmedia 2023-07-06 18:42:00
IT ITmedia 総合記事一覧 [ITmedia Mobile] ソラコムが法人/自治体向けに「Starlink」を活用したIoTソリューションを提供 7月6日から https://www.itmedia.co.jp/mobile/articles/2307/06/news163.html ITmediaMobileソラコムが法人自治体向けに「Starlink」を活用したIoTソリューションを提供月日からソラコムは、法人自治体を対象に「SORACOMSTARLINKBUSINESSキット」を月日から提供する。 2023-07-06 18:30:00
IT ITmedia 総合記事一覧 [ITmedia News] ソフトバンクで不当値引き 総務省が行政指導 4カ月超で3020件 https://www.itmedia.co.jp/news/articles/2307/06/news176.html itmedia 2023-07-06 18:15:00
IT ITmedia 総合記事一覧 [ITmedia News] Threads、JASRACと利用許諾契約を結んでいた Twitterとの差別化点に https://www.itmedia.co.jp/news/articles/2307/06/news174.html itmedianewsthreads 2023-07-06 18:10:00
IT 情報システムリーダーのためのIT情報専門サイト IT Leaders SBI生命、コールセンター業務に自然言語検索「Amazon Kendra」を導入、保険商品などの情報入手を容易に | IT Leaders https://it.impress.co.jp/articles/-/25058 SBI生命、コールセンター業務に自然言語検索「AmazonKendra」を導入、保険商品などの情報入手を容易にITLeadersSBI生命保険本社東京都港区は年月日、コールセンター業務を省力化するため、検索エンジンサービス「AmazonKendra」を同年月日に導入したと発表した。 2023-07-06 18:20:00
python Pythonタグが付けられた新着投稿 - Qiita 週一でPython勉強会やってみる⑪ https://qiita.com/Waddy675/items/55790ab63ae8b844a1e4 長続き 2023-07-06 18:49:03
js JavaScriptタグが付けられた新着投稿 - Qiita npm install @mui/stylesでのエラーを解決した話 https://qiita.com/Ryo_Kitamoto/items/88e9d013b6a64235ee8b npminstallmuistyles 2023-07-06 18:39:22
js JavaScriptタグが付けられた新着投稿 - Qiita 【一般】続 YouTube APIを利用したソリューションの構築例 https://qiita.com/Miki_Yokohata/items/802a55d91ec3ed8d3f93 youtubeapi 2023-07-06 18:20:40
Ruby Rubyタグが付けられた新着投稿 - Qiita Rails 注文確認画面でリロードした際のエラー回避 https://qiita.com/takayuki91/items/c7bd999042c351007198 order 2023-07-06 18:27:14
Ruby Railsタグが付けられた新着投稿 - Qiita Rails 注文確認画面でリロードした際のエラー回避 https://qiita.com/takayuki91/items/c7bd999042c351007198 order 2023-07-06 18:27:14
技術ブログ Developers.IO 【7/27(木)】小売業界で勝つためのカスタマーファーストなデータ活用戦略 https://dev.classmethod.jp/news/230727_ft_bq_looker-webinar/ 活用 2023-07-06 09:53:58
技術ブログ Developers.IO วิธีแก้ปัญหา AWS CLI Error「Connect timeout on/Could not connect to the endpoint URL: ~」 https://dev.classmethod.jp/articles/tsnote-thai-awscli-couldnotconnect/ วิธีแก้ปัญหาAWS CLI Error「Connect timeout on Could not connect to the endpoint URL 」ปัญหาที่เกิดขึ้นทำการรันคำสั่งAWS CLI Command แล้วเจอกับError ตามด้านล่างนี้ครับCould not connect to the e 2023-07-06 09:46:44
技術ブログ Developers.IO เมื่อพบข้อผิดพลาด “InvalidClientTokenId” ใน Request ของ AWS CLI มีวิธีแก้ไขอย่างไร https://dev.classmethod.jp/articles/tsnote-thai-aws-cli-invalidclienttokenid-error/ เมื่อพบข้อผิดพลาด“InvalidClientTokenId ในRequest ของAWS CLI มีวิธีแก้ไขอย่างไรปัญหาที่เกิดขึ้นเมื่อเราใช้AWS CLI ทำการRequest ไปยังAPI ของAWS Service เกิดError ตามด้านล่างนี้ขึ้นAn 2023-07-06 09:42:23
技術ブログ Developers.IO 問い合わせ用に用意したSlackワークフローで問い合わせのフィードバックも得られるようにしてみた https://dev.classmethod.jp/articles/gain-feedback-from-support-workflow/ slack 2023-07-06 09:40:37
海外TECH DEV Community What Is GraphQL: Comprehensive Guide https://dev.to/arsalanmee/what-is-graphql-comprehensive-guide-2i1d What Is GraphQL Comprehensive GuideAre you looking for a better way to manage your API requests and responses Do you want a more efficient way to retrieve and manipulate data from your server Look no further than GraphQL In this comprehensive guide we ll take a deep dive into what GraphQL is how it works and why it s quickly becoming a popular alternative to traditional RESTful APIs IntroductionIf you re unfamiliar with GraphQL you might be wondering what all the hype is about GraphQL is a query language for your API It is designed to give you more control over the data you request and the way you receive it Unlike traditional RESTful APIs which require you to make multiple requests to retrieve related data GraphQL allows you to retrieve all the data you need in a single request This not only makes your code more efficient but it also reduces the amount of data you need to send over the network What is GraphQL GraphQL is a query language and runtime for APIs that was developed by Facebook in and released as an open source project in It allows clients to define the structure of the data they need and the server responds with only that data This means that clients can avoid making multiple requests to retrieve related data and can instead retrieve all the data they need in a single request How Does GraphQL Work In this diagram the client sends a GraphQL query or mutation to the server The server parses the query or mutation validates it against the schema and resolves it with data The server then sends a response back to the client with the requested data The GraphQL SchemaAt the heart of GraphQL is the schema which defines the types of data that can be queried and the relationships between them The schema is a hierarchical tree structure that defines the available fields their types and any arguments they take ResolversWhen a client makes a query the server uses resolvers to fetch the requested data Resolvers are functions that are responsible for retrieving data from a data source such as a database or API and returning it in the shape defined by the schema QueriesQueries are requests for data that are made by the client They specify the fields that the client wants to retrieve as well as any arguments that the client wants to pass to the resolver Here s an example GraphQL query query user id name email posts title content comments author text In this example we are querying for a specific user with the ID We want to retrieve the user s name and email as well as all of their posts For each post we also want to retrieve the title content and all of the comments on that post including the author and text of each comment MutationsMutations are similar to queries but instead of retrieving data they modify data on the server They can be used to create update or delete data Advantages of GraphQLIncreased EfficiencyOne of the main advantages of GraphQL is that it allows clients to retrieve all the data they need in a single request This reduces the number of requests that need to be made and the amount of data that needs to be sent over the network More Flexible QueriesWith GraphQL clients have more control over the data they request They can specify exactly which fields they want to retrieve and can even request nested fields This allows for more flexible queries that can adapt to the needs of the client VersioningBecause the schema is the contract between the client and the server changes to the schema can be versioned and communicated to clients This allows for more controlled changes to the API without breaking existing clients Easier to Learn GraphQL has a relatively simple syntax and a small set of core concepts This makes it easier to learn and use compared to other APIs which often require knowledge of multiple technologies and languages Disadvantages of GraphQLSteep Learning CurveAlthough GraphQL is relatively easy to learn it can still have a steep learning curve for developers who are used to working with traditional RESTful APIs This is because GraphQL requires a different way of thinking about API design and development OverheadBecause GraphQL provides so much flexibility it can be more complex and require more overhead to set up compared to traditional RESTful APIs This can be a disadvantage for smaller projects or for teams with limited resources Lack of StandardizationGraphQL is still a relatively new technology and as such there is less standardization in the way it is implemented compared to traditional RESTful APIs This can lead to inconsistencies in the way GraphQL is used across different projects and organizations GraphQL vs RESTGraphQL and REST are two different approaches to building APIs and each has its own advantages and disadvantages REST is a well established standard with a clear set of guidelines and conventions for building APIs GraphQL on the other hand provides more flexibility and allows for more efficient data retrieval How to Implement GraphQLImplementing GraphQL requires setting up a server that supports GraphQL queries and mutations as well as defining a schema that describes the types of data that can be queried There are a number of tools and frameworks available for implementing GraphQL including Apollo Relay and Prisma Best Practices for Using GraphQLSome best practices for using GraphQL include keeping your schema simple and easy to understand minimizing the number of round trips between the client and server and using caching and batching to improve performance Real World ExamplesGraphQL is used by a number of large companies and organizations including GitHub Shopify and The New York Times These companies use GraphQL to improve the performance and efficiency of their APIs and to provide a more flexible and customizable experience for their clients Future of GraphQLGraphQL is still a relatively new technology but its popularity is growing rapidly As more companies adopt GraphQL and more tools and frameworks are developed we can expect to see continued growth and innovation in the GraphQL ecosystem ConclusionGraphQL is a powerful and flexible tool for building APIs that can help you to improve the efficiency and flexibility of your code While it may require a bit of a learning curve it is well worth the investment for teams and projects that need to manage large amounts of data and complex API requests FAQs What are some advantages of using GraphQL over traditional RESTful APIs Some advantages of using GraphQL over traditional RESTful APIs include More efficient data retrieval GraphQL allows you to retrieve only the data you need which can result in faster and more efficient API calls More flexibility GraphQL allows clients to specify exactly what data they need which can be especially useful in situations where different clients have different data requirements Better developer experience With GraphQL developers can easily explore the data available in the API and get immediate feedback on their queries What are some disadvantages of using GraphQL Some disadvantages of using GraphQL include Steep learning curve While GraphQL is relatively easy to learn compared to some other technologies it can still require a significant investment of time and effort to get up to speed Overhead Because GraphQL provides so much flexibility it can be more complex and require more overhead to set up compared to traditional RESTful APIs Lack of standardization Because GraphQL is still a relatively new technology there is less standardization in the way it is implemented compared to traditional RESTful APIs How do I get started with implementing GraphQL in my project To get started with implementing GraphQL in your project you ll need to set up a server that supports GraphQL queries and mutations and define a schema that describes the types of data that can be queried There are a number of tools and frameworks available for implementing GraphQL including Apollo Relay and Prisma Can I use GraphQL with any programming language Yes you can use GraphQL with any programming language Because GraphQL is a query language it can be used with any backend technology that can receive and respond to HTTP requests What are some best practices for using GraphQL in production environments Some best practices for using GraphQL in production environments include Keeping your schema simple and easy to understand Minimizing the number of round trips between the client and server Using caching and batching to improve performance Adding authentication and authorization to your GraphQL API Monitoring and logging your API to identify and address issues quickly 2023-07-06 09:39:26
海外TECH DEV Community Coding Period GSoC'23 | Week 3 + 4 + 5 https://dev.to/prerna0202/coding-period-gsoc23-week-3-4-5-388b Coding Period GSoC x Week Welcome back to another progress update on my Google Summer of Code GSoC journey If you haven t already make sure to catch up on my previous blog posts covering Week and Week In this blog I ll be sharing my accomplishments and developments from Weeks and Work Done th June th July As mentioned in my previous blog I had almost completed the state machine task and the simulator crash recovery task However during third and half of the fourth weeks I had scheduled university exams that required my attention so I couldn t work on the project during that time I had informed my mentors about this in advance Once my exams concluded I resumed working on my project During the last meeting with my mentors just before my exams we discussed making some changes to the simulator crash recovery task Also I identified an issue with the state machine task So I started my work back by addressing these changes and issues and completed the necessary pull requests for both tasks Here are the changes we decided upon Simulator Crash Recovery Task Initially I was calling the autosave function alongside the scheduleBackup function However after discussions we agreed to schedule autosave at specific time intervals So I modified the code accordingly Now we check for any increments in the backups every three seconds If an increment is detected in the length of backups the autosave function is triggered otherwise it is skipped State Machine Task There was an issue where the state would change from normal to an error in real time but to revert from error to normal we had to click on the simulation area which was not an optimal user experience I addressed this issue and now the state revert from error to normal in real time Additionally some suggested changes by mentor were made and pushed After completing these tasks I started working on a new task which involved creating a better system for handling high impedence values In CircuitVerse we have two elements related to high impedence conditions tristate and controlled inverter The controlled inverter was broken initially so first I fixed it Following that I identified and resolved several issues related to the tristate element which involved fixing shortcomings and ensuring proper functionality I verified the changes using Logisim and now both the tristate and controlled inverter are functioning correctly Next I began working on another task which involved exposing helpful functions for debugging circuits I created four functions for this purpose load This function takes circuit data as a parameter and draws the circuit on the canvas removeBugNodes This function removes nodes with bugs from the circuit Next This function takes the circuit to the next state Previous This function takes the circuit to the previous state These functions will greatly aid in debugging circuits I plan to discuss the implementation and explore other helpful functions which we can implement during my upcoming meeting Pull Requests Implemented safe recovery from simulator crashImplemented state machine for simulatorBetter system for high impedence valuesAdded helpful functions for debugging of circuit So What s Next As per my proposal timeline I aim to complete the remaining two tasks before the mid term evaluation I am determined to put in my utmost effort to accomplish these tasks and ensure their completion before the mid term evaluation In the upcoming week my primary focus will be on completing the following tasks Simulation Stack Exceeded Error I plan to develop a solution that allows the identification of components that are being added to the simulation stack an unusually large number of times leading to the error By addressing this issue we can enhance the stability and efficiency of the simulator Identifying and Modifying Selected Components Another task on my agenda is to implement a feature that enables the identification of the currently selected component on the canvas This functionality will empower users to modify the properties of the selected component conveniently within the global scope That concludes my progress update for Weeks and of my GSoC project I will continue to share regular updates on my journey so stay tuned for more 2023-07-06 09:38:12
海外TECH DEV Community Instagram’s Twitter competitor, Threads, is available now! https://dev.to/soumyadeepdey/instagrams-twitter-competitor-threads-is-available-now-aik Instagram s Twitter competitor Threads is available now Introducing Threads The Twitter CompetitorThreads the highly anticipated social media platform has finally arrived as a formidable competitor to Twitter Developed by Meta the parent company of Facebook Threads aims to provide users with a refreshing and dynamic alternative to the existing social media landscape Seamless AccessibilityAccess Threads through its desktop site at Threads net or by downloading the dedicated iOS and Android applications If the app is not immediately visible on iOS or encounters an error try force quitting the App Store and relaunching it A Platform for Meaningful EngagementCreate a personalized profile on Threads to showcase interests and individuality Enjoy the freedom of longer form posts departing from the character limited approach of other platforms Enhanced User EngagementFollow favorite creators friends and influential figures to curate a personalized feed Seamlessly communicate through private conversations and group chats Engage in richer discussions thanks to longer posts Discover Relevant ContentUtilize the powerful search functionality to discover trending topics and conversations Personalized recommendations ensure exposure to content aligned with individual preferences Privacy and ControlComprehensive privacy settings empower users to manage data and choose their audience Meta s commitment to user privacy extends to Threads with stringent measures in place to protect personal information Threads Revolutionizing Social MediaThreads is set to revolutionize the social media landscape by prioritizing meaningful interactions diverse perspectives and a vibrant community It offers a compelling alternative for individuals seeking an engaging platform With Threads users can embark on an exciting journey of discovery connection and self expression In conclusion Threads the new social media platform developed by Meta presents itself as a compelling competitor to Twitter With its emphasis on meaningful interactions enhanced user experience and fostering genuine connections Threads offers a refreshing alternative for individuals seeking a dynamic and engaging social media experience Through its longer form content users can express themselves in more depth enabling richer discussions and thoughtful conversations The robust messaging system facilitates private conversations and group chats encouraging genuine connections and community building Threads powerful search functionality and personalized recommendations ensure users can discover relevant content trending topics and expand their horizons Privacy and control are prioritized with comprehensive settings allowing users to manage their data and choose their audience while stringent measures protect personal information As Threads gains traction and attracts a thriving community it has the potential to revolutionize the social media landscape by prioritizing meaningful interactions diverse perspectives and fostering a vibrant and inclusive online space With Threads users can embark on an exciting journey of discovery connection and self expression 2023-07-06 09:25:47
海外TECH DEV Community 👩🏻‍💻 Favicon Generators https://dev.to/keracudmore/favicon-generators-k45 ‍Favicon Generators What is a Favicon A favicon is a fun little icon that promotes brand recognition and trust in your website It can also help users easily identify your site in their address bar bookmarks or in the sea of tabs they have open A favicon can also indirectly affect your sites SEO Some search engines display the favicon with the search results and having an eye catching favicon could improve your click through rate Adding a favicon to your site doesn t have to be difficult and I ve rounded up sites for you to use to create your next custom favicon Favicon ioThis has been my go to favicon generator due to its ease of use You have a choice between text image or emoji when generating your favicon and they even give you the code to make adding a favicon to your static site a breeze Real Favicon GeneratorConfused about which sizes and devices your favicon covers Well Real Favicon Generator has got you covered Real Favicon Generator have done all the research and testing and will craft the perfect favicon to suit each platform and display a preview for you along with some settings that can be tweaked allowing you to get your favicon right the first time Another really cool feature of Real Favicon Generator is check your favicon This tool allows you to input your site and they will then an analysis of what platforms you have covered and some you may have missed Favicon ccFavicon cc allows you to import an image or paint your own favicon in the style of pixel art or choose from hundreds of user uploaded designs What makes favicon cc interesting is their animation generator which allows you to create an animated pixel art styled favicon Favicons created on favicons cc are currently only available in ico format Favic o maticFavic o matic is a one stop shop that generates the favicon image and code required for your site You can choose to create just an ico file or create all the favicons for different platforms They also have the favic o meter which reads your website URL and lets you know if you re missing any platform specific favicons which would improve user experience Fav farmCreated by the awesome Wes Bos fav farm is the simplest favicon generator but is a perfect tool for adding a quick favicon to your learning projects Wes also shares the code required to use this generator to create a custom cursor Do you have a go to favicon generator that isn t listed above If you do I d love to hear about it in the comments 2023-07-06 09:18:11
海外TECH DEV Community How to Use GitHub Copilot to Become More Productive Developer https://dev.to/farhadi/how-to-use-github-copilot-to-become-more-productive-developer-21pp How to Use GitHub Copilot to Become More Productive Developer There are a number of AI tools for developers emerging on the market But in my mind GitHub Copilot stands above the rest because of its usability seamless IDE integration and remarkable enhancements to developer productivity Copilot offers a variety of AI tools that have radically streamlined my experience as a software developer I ve used it to generate code tests and even simple applications It s also great for debugging refactoring and documenting existing code Weirdly using Copilot has caused me to develop features faster than business stakeholders can review them It s important to note that AI tools including Copilot can be blatantly wrong apologize or not when corrected and then confidently produce the same error But as long as you re aware of the downsides of AI tools and have enough coding knowledge to recognize when they re incorrect you can mitigate them on the path to substantially improved productivity How to Setup GitHub CopilotFor setup and basic usage of Copilot check out the docs You can add on Copilot to an individual or business account and there s a free trial and reasonable pricing after the trial After adding Copilot to your GitHub account you ll want to install the plugins for your IDE and log into GitHub to access Copilot In this article we ll use these Visual Studio Code extensions GitHub ExtensionDescriptionPreviewCopilotAI pair programmer with in IDE code suggestionsNoCopilot NightlyNightly build of Copilot includes latest changesNoCopilot LabsExperimental features in sidebarYesCopilot ChatInteractive chat in sidebar part of Copilot XYesCopilot VoiceVoice assistantYesNotes This info is up to date as the writing of this article but will likely change as GitHub evolves these products I haven t yet received access to Copilot Voice or Copilot X for Pull Requests so my perspective on these are limited and based on GitHub s preview docs PrivacyBefore jumping into some key use cases for Copilot a quick note on privacy Basically if you trust GitHub to host your source code you can likely trust what they do with your Copilot prompts and code snippets See their FAQ docs and Privacy Statement Use Cases for GitHub CopilotThe uses cases for GitHub Copilot are numerous especially when you add in the preview features of Labs Chat and Voice Using Copilot s features can really streamline the development process Here are some great ways to leverage Copilot extensions CategoryExtension s Code GenerationCopilot Copilot Nightly Copilot VoiceExplaining CodeCopilot Labs Copilot Chat Copilot VoiceLanguage TranslationCopilot Labs Copilot ChatDebuggingCopilot Labs Copilot ChatRefactoringCopilot Labs Copilot ChatTest GenerationCopilot Copilot Nightly Copilot Labs Copilot ChatCode ReviewsCopilot ChatVoice Driven DevelopmentCopilot VoiceCode GenerationCopilot is known for its code completion features If it s given a comment in the code or you type the beginnings of a line of code Copilot will suggest a solution that you can accept ignore or explore alternatives It s referred to as ghost text Once you have the Copilot extension installed and you re logged in code completion is as simple as typing instructions and hitting the Tab key once the suggestion comes up A comment prompt in Ruby that Copilot uses to create a method and invocationTaking code completion one step further Copilot Chat can take a single prompt and generate instructions for building an entire application I asked it to create a REST API in Node with CRUD functions for products and it generated functional code Impressive overall Given the same prompt ChatGPT also gave me instructions for how to run the code which was nice Copilot Voice can also write or edit code based on voice commands Most of the time using the keyboard with Copilot code completion is faster than dictating lines of code with Voice But it s compelling to think about using Copilot Voice to create and run code without having to type or stare at a screen Explaining CodeI often have to stare at a screen to figure out what a block of code is doing Sometimes it s legacy code where I don t understand the business context Sometimes it s using a particular library I m not used to Sometimes I curse the person who wrote it even if it s me Below is some code generated by Copilot Chat from my REST API in Node prompt from above app get products id req res gt const id req params id const product products find p gt p id id if product res json product else res status json error Product not found I took this code and fed it into the Explain feature in Copilot Labs Here s the response Here is the explanation for the code above  We define a route with the route path products id The colon in the path indicates that it is a route parameter The value of the route parameter will be available in req params For example if the route path is products id and we make a request to products then the value of req params will be id We get the id from req params and find the product with the given id from the products array If a product with the given id exists we return it Otherwise we send a error response with the error message Product not found This is a pretty straightforward segment of code and the response is clear and straightforward as well It would be easy to add this as documentation in a code comment above the function Another good example is regular expressions I understand how regular expressions work but I don t often have the patience to figure out what a particular regex is doing I fed Copilot Chat this giant regex statement for email validation a z amp a z amp x x xb xc xe xf x x xb xd xf x x xb xc xe xf a z a z a z a z a z a z a z a z x x xb xc xe xf x xa x xf x x xb xc xe xf It explained the regex at a high level indicating it was broken into the local and domain parts representing before and after the sign in an email address Then it described allowable characters in each part Quite helpful  Language TranslationDevelopers are often required to quickly learn new languages and frameworks Copilot Labs and Chat make this pretty easy Here s an array of products in JavaScript and Ruby that was converted by Copilot let products id name Product price id name Product price id name Product price products id name Product price id name Product price id name Product price This is a very simple example so let s try making this into a class and going the other way from Ruby to JavaScript class Product attr reader name price def initialize name price name name price price endendclass Product constructor name price this name name this price price This checks out For good measure I tested TypeScript as well and it worked perfectly too DebuggingThis is a very handy feature You can give Copilot Chat or Labs problematic code or error messages and it will indicate what it thinks the issue is Copilot Labs Fix Bug Brush FeatureI can t tell you how many hairs I ve pulled out because I couldn t find what amounted to a syntax error Copilot s ability to fix bugs just makes me happier and hairier You can also give Copilot Chat an error message with no other prompt and it can tell you the issue I arbitrarily removed a dot from the Node REST API code products productIndex id req body I copied pasted the error message in Chat and it responded with Looking at the code excerpt you provided it seems that the issue is on line where there is a syntax error in the object literal The before req body is causing the error It should be just one dot instead of two This is both correct the line and source of the error and incorrect that it should be only one dot It then gave me a code snippet with three dots which is also correct As I mentioned at the outset you ve gotta double check AI s work Still I m impressed by Copilot s ability to parse an error message describe what it thinks is wrong and suggest a fix RefactoringAnother great use case is refactoring Consider the code below def price with discount price price discount rate endThis simple price calculation doesn t factor in nil values strings that should be numbers or reasonable values for price or discount rate We need the code to do this Ensure price is an integer or float not nil Ensure price is not negativeEnsure discount rate is a float not nil Ensure discount rate is not negative and less than or equal to Copilot Chat handles this with ease def price with discount price discount rate raise ArgumentError Price must be a positive number unless price is a Numeric amp amp price gt raise ArgumentError Discount rate must be a float between and unless discount rate is a Float amp amp discount rate gt amp amp discount rate lt price price discount rate endTest GenerationUsing Copilot to generate tests is technically a subset of Code Generation above but I felt it was so useful it warranted its own mention Generating unit tests for code can be tedious if you re trying to cover happy and sad paths primary use cases and edge cases Our price with discount code above needs test cases to ensure an error is raised if price or discount rate don t meet the requirements In addition we might want to test the following A price without a discount rateA price with a reasonable discount rate for example a discount A price with a discount rate for example if we want to give the product away With these and our previous error cases here s what Copilot Chat generated after a little fine tuning re prompting and switching from Minitest to Rspec RSpec describe Product do describe price with discount do context when given a valid price and discount rate do it returns the price with the discount applied do product Product new Test Product expect product price with discount product price product discount rate to eq end end context when given a nil price do it raises an ArgumentError with an appropriate message do product Product new Test Product nil expect product price with discount product price product discount rate to raise error ArgumentError Price must be a positive number end end context when given a price less than do it raises an ArgumentError with an appropriate message do product Product new Test Product expect product price with discount product price product discount rate to raise error ArgumentError Price must be a positive number end end context when given a nil discount rate do it raises an ArgumentError with an appropriate message do product Product new Test Product nil expect product price with discount product price product discount rate to raise error ArgumentError Discount rate must be a float between and end end context when given a discount rate less than do it raises an ArgumentError with an appropriate message do product Product new Test Product expect product price with discount product price product discount rate to raise error ArgumentError Discount rate must be a float between and end end context when given a discount rate greater than do it raises an ArgumentError with an appropriate message do product Product new Test Product expect product price with discount product price product discount rate to raise error ArgumentError Discount rate must be a float between and end end endendOne test for valid input five for invalid input All six work and I didn t have to write them Code ReviewsOne feature of Copilot X is Copilot for Pull Requests Here are some of the key features Template Expansion Leverage Copilot to fill in your PR template and explain codeGentest Generate tests for your code based on Copilot s analysisGhost Text Receive suggestions while you re typing in the PRVoice Driven DevelopmentFormerly known as Hey Github Copilot Voice allows you to use natural language prompts to interact with your code It looks impressive boasting these capabilities Write Edit Code Use voice controls to trigger Copilot code suggestionsCode Navigation Navigate a file without a keyboard or mouseControl the IDE Trigger any VS Code commandCode Summarization Get summaries of blocks of codeSummaryGitHub is rapidly producing revolutionary developer productivity tools with its suite of Copilot extensions It s increasing my joy in programming and decreasing my time spent on mind numbing tasks I would encourage you to keep track of enhancements to Copilot as they re happening quickly Ignore click bait promises of a x productivity gain but don t ignore the research of Copilot s impact on developer productivity and happiness Spend some time with Copilot tools trying out the use cases above and I think you ll be surprised by its effect on your productivity and happiness 2023-07-06 09:06:47
海外TECH DEV Community Sticky sessions with Apache APISIX - the demo https://dev.to/apisix/sticky-sessions-with-apache-apisix-the-demo-2j8g Sticky sessions with Apache APISIX the demoLast week we described the concept behind sticky sessions you forward a request to the same upstream because there s context data associated with the session on that node However if necessary you should replicate the data to other upstreams because this one might go down In this post we are going to illustrate it with a demo The overall designDesign options are limitless I ll keep myself to a familiar stack the JVM Also as mentioned in the previous post one should only implement sticky sessions with session replication The final design consists of two components an Apache APISIX instance with sticky sessions configured and two JVM nodes running the same application with session replication The application uses the following DependencyDescriptionSpring BootEases the usage of Spring librariesSpring MVCAllows offering HTTP endpointsThymeleafView technologySpring SessionOffers an abstraction over session replicationHazelcast embedded Implements session replicationSpring SecurityBinds an identity to a user sessionThe design looks like the following app and app are two instances of the same app I didn t want to overcrowd the diagram with redundant data The heart of the applicationThe heart of the application is a session scoped bean that wraps a counter which can only be incremented Component SessionScopepublic class Counter implements Serializable private int value public int getValue return value public void incrementValue value Necessary for Hazelcast serialization to workWe can use this bean in the controller Controllerpublic class IndexController private final Counter counter public IndexController Counter counter this counter counter GetMapping public String index Model model counter incrementValue model addAttribute counter counter getValue return index Inject the session scoped bean in the singleton controller thanks to Spring s magicWhen we send a GET request to the root increment the counter value and pass it to the modelFinally we display the bean s value on the Thymeleaf page lt DOCTYPE html gt lt html xmlns th lang en gt lt body gt lt div th text counter gt lt div gt Configuring Spring Session with HazelcastSpring Session offers a filter that wraps the original HttpServletRequest to override the getSession method This method returns a specific Session implementation backed by the implementation configured with Spring Session in our case Hazelcast We need only a few tweaks to configure Spring Session with Hazelcast First annotate the Spring Boot application class with the relevant annotation SpringBootApplication EnableHazelcastHttpSessionpublic class SessionApplication Hazelcast requires a specific configuration as well We can use XML YAML or code Since it s a demo I can choose whatever I want so let s code it Spring Boot requires either an Hazelcast object or a configuration object The latter is enough Beanpublic Config hazelcastConfig var config new Config var networkConfig config getNetworkConfig networkConfig setPort networkConfig getJoin getAutoDetectionConfig setEnabled true var attributeConfig new AttributeConfig setName HazelcastIndexedSessionRepository PRINCIPAL NAME ATTRIBUTE setExtractorClassName PrincipalNameExtractor class getName config getMapConfig HazelcastIndexedSessionRepository DEFAULT SESSION MAP NAME addAttributeConfig attributeConfig addIndexConfig new IndexConfig IndexType HASH HazelcastIndexedSessionRepository PRINCIPAL NAME ATTRIBUTE var serializerConfig new SerializerConfig serializerConfig setImplementation new HazelcastSessionSerializer setTypeClass MapSession class config getSerializationConfig addSerializerConfig serializerConfig return config Choose a random port to avoid port conflictAllow Hazelcast to search for other instances and automagically form a cluster It s going to be necessary when deployed as per our designCopy pasted from the Spring Session documentation Configuring Spring SecurityMost Spring Session examples somehow use Spring Security and though it s not strictly necessary it makes the design easier I want to explain why first One can think about sessions as a gigantic hash table In regular applications the key is the JSESSIONID cookie value the value another hash table of session data However the JSESSIONID is specific to the node The app will give a different JSESSIONID if one uses another node Since the key is different there s no way to access the session data even if the session data is shared across nodes To prevent this loss we need to come up with a different key Spring Security allows using a principal or the login name as the session data key Here s how I set up a basic Spring Security configuration Beanpublic SecurityFilterChain securityFilterChain UserDetailsService service HttpSecurity http throws Exception return http userDetailsService service authorizeHttpRequests authorize gt authorize requestMatchers PathRequest toStaticResources atCommonLocations permitAll anyRequest authenticated formLogin form gt form permitAll defaultSuccessUrl build The default in memory user details service doesn t allow custom user details classes I had to provide my own Allow everybody to access static resources at common locationsAll other requests must be authenticatedAllow everybody to access the authentication formRedirect to the root if successful which maps the above controller Putting our design to the testBeside the counter I want to display two additional pieces of data the hostname and the logged in user For the hostname I add the following method to the controller ModelAttribute hostname private String hostname throws UnknownHostException return InetAddress getLocalHost getHostName Displaying the logged in user requires an additional dependency lt dependency gt lt groupId gt org thymeleaf extras lt groupId gt lt artifactId gt thymeleaf extras springsecurity lt artifactId gt lt dependency gt On the page it s straightforward lt DOCTYPE html gt lt html xmlns th xmlns sec gt lt gt lt body gt lt td sec authentication principal label gt Me lt td gt lt gt Add the sec namespace It s not necessary but may help the IDE to help youRequire the underlying UserDetail implementation to have a getLabel methodLast but not least we need to configure Apache APISIX with sticky sessions as we saw last week routes uri upstream nodes webapp webapp type chash hash on cookie key cookie JSESSIONID ENDHere s the design implemented on Docker Compose services apisix image apache apisix debian volumes apisix config yml usr local apisix conf config yaml ro apisix apisix yml usr local apisix conf apisix yaml ro ports depends on webapp webapp webapp build webapp hostname webapp webapp build webapp hostname webapp Use the previous configuration fileOnly expose the API Gateway to the outside worldSet the hostname to display it on the pageWe can log in using one of the two hard coded accounts I m using john with password john and label John Doe Notice that Apache APISIX sets me on a node and keeps using the same if I refresh We can try to log in with the other account jane jane from a private window and check the counter starts from Now comes the fun part Let s stop the node which should be hosting the session data here webapp and refresh the page docker compose stop webappWe can see exciting things in the logs Apache APISIX can no longer find the webapp so it forwards the request to the other upstream that it knows webapp The request is still authenticated it goes through Spring SecurityThe framework gets the principal out of the requestIt queries Spring SessionAnd gets the correct counter value that Hazelcast replicated from the other nodeThe only side effect is an increased latency because of Apache APISIX timeout It s seconds by default but you can configure it to a lower value if needed When we start webapp again everything works as expected again ConclusionIn this post I described a possible setup for sticky sessions with Apache APISIX and replication involving the Spring ecosystem and Hazelcast Many other options are available depending on your stack and framework of choices The complete source code for this post can be found on GitHub ajavageek sticky sessions apisix To go further Spring Session and Spring Security with HazelcastSpring Session HazelcastOriginally published at A Java Geek on July nd 2023-07-06 09:02:00
海外TECH DEV Community Top 7 Paid Open Source Programs To Apply To in 2023-24 https://dev.to/durgesh4993/top-7-paid-open-source-programs-to-apply-to-in-2023-24-3d5p Top Paid Open Source Programs To Apply To in Open source software is software that is made available to the public Anyone with the correct technical skills can contribute Programmers can access open source code and even no code folks can make contributions to it Open source software gives anyone the opportunity to contribute their knowledge Beginners in tech wanting to get real life experience can also contribute to open source to learn and get the exposure they need There are some programs that use this open source model where people could contribute to open source and get paid for it This article will highlight some of the notable open source programs that pay people to take part in them So if you want to improve your tech experience while also earning a living in the new year look no further This article would be valuable to you The top paid open source programs in no particular order are Google Summer Of Code GSoC Google Season Of DocsOutreachy InternshipHyper ledger Mentorship ProgramMajor League Hacking MLH FellowshipReinforcement Learning Open Source FestThe X Org Endless Vacation Of Code EVoC Google Summer Of CodeThis is an open source program organized by Google where students and non students take part in open source by building either short term or long term projects The organizations that are interested submit their projects to Google and the participants write their proposals to the organizations and reach out to mentors The organizations are the ones who select the participants and Google makes the payment Applications open in December Google pays a minimum of for short term projects for long term projects and a maximum of for short term projects and for long term projects depending on the location of the participants Link Google Season Of DocsThis is an open source program organized by Google for technical writers It follows the same pattern as the Google Summer of Code Qualified participants write for organizations Google pays a minimum of for projects Applications begin around March and the program runs until the end of the year Link OutreachyOutreachy is an open source program that promotes diversity and inclusion Outreachy aims to support people who are underrepresented in their community Their programs include data science cloud computing documentation community management marketing and so on The program is open to students and non students The program runs twice a year from May to August and from December to March Outreachy pays a participant Link Hyper ledger Mentorship ProgramHyper Ledger runs an open source program for blockchain developers Such developers can make contributions to the blockchain and earn money Hyper ledger is under Linux Interested participants apply through the LFX Mentorship platform where hyperledger projects are listed Applications begin around March and the program runs until the end of the year The Linux Foundation pays an unspecified fee to each participant Link Major League Hacking MLH FellowshipThis is a program powered by GitHub It comprises software engineering open source and data management tracks It is a week program where qualified participants engage in a real life software engineering experience while networking with their fellow members Applications for the program begin at the beginning of every year The program makes payments depending on your needs Link Reinforcement Learning Open Source FestThis is a program organized by Microsoft where qualified participants engage in building programs and documentation amongst others The application runs at the beginning of every year It is open to students only They pay for a student The programs run in two batches May to August and September to December Link The X Org Endless Vacation Of Code EVoC This program follows the Google Summer of Code model in accepting participants So these participants have to write a proposal of their ideas pitch it to them and then look for mentors When the mentors accept them they can begin The program runs throughout the year The program pays students only Non students are not paid Link ConclusionThe major goal of open source is to make free contributions but if there is an opportunity to support yourself financially while doing it then it is even better You can apply to these programs if you think you can do it You will never know where it will take you tomorrow 2023-07-06 09:00:36
海外TECH Engadget Threads gained 10 million new users in seven hours https://www.engadget.com/threads-gained-10-million-new-users-in-seven-hours-090838140.html?src=rss Threads gained million new users in seven hoursMeta s Twitter rival Threads just went live and has already exceeded million signups within the first seven hours according to a Thread by CEO Mark Zuckerberg The app is now available globally except in Europe with the rapid signup pace showing Meta s enormous ability to scale up compared to other Twitter rivals like Bluesky ーwhich still requires invite codes nbsp To er mark the occasion Zuckerberg tweeted for the first time in over a decade with the classic Spider Man standoff picture showing that unlike Elon Musk he actually knows how memes work quot million signups in seven hours quot he added on Threads nbsp pic twitter com MbMxUWiQgpーMark Zuckerberg finkd July With Threads Meta is taking on Twitter and alternatives like Mastodon It s under the purview of Instagram CEO Adam Mosseri who is planning to make Threads compatible with ActivityPub That s the source protocol that powers Mastodon and other decentralized services sometimes collectively referred to as the “Fediverse Threads is strongly tied to Instagram and built on the same platform giving Meta an effective way to advertise it Any users who pre ordered the app on iOS received a push notification when Threads went live another move that no doubt boosted signups nbsp The site is not without early teething issues though The biggest complaint is the lack of a chronological following only feed with users stuck with whatever the Threads algorithm decides to push their way quot percent of the posts I see are completely irrelevant to me quot complained one user It also lacks post editing which Facebook and Instagram both have hashtags account switching and more nbsp Mosseri has addressed all those issues posting on Threads that a following only feature is quot on the list quot He said the same about post editing and account switching and added that hashtags will be tappable quot in time quot nbsp EngadgetAnother key problem for many users is the lack of a web version of Threads Much like Instagram was for a long time Threads is read only on browsers with posting limited to the iOS and Android apps Mosseri has yet to address this Finally the design of Threads seems to be a love it or hate it affair with some users finding the layout less intuitive than Twitter Verification remains another key talking point Elon Musk famously changed Twitter s system so that only Twitter Blue subscribers would receive the blue check mark or very notable public figures and news sites That made the experience less enjoyable for many users as it became difficult to tell who was an official athlete celebrity journalist etc nbsp So far only users verified on Instagram and not Facebook have received the blue badge on Threads While Instagram verification is notoriously more difficult to get it s largely held by influencers and creators But Threads is positioned as a discussion site and will likely be focused on news if it s to compete with Twitter so it might make sense to allow Facebook verified users to also be verified on Threads ーor create an all new verification system In any case it s still early days for Threads and the app will no doubt change substantially in the near future It s clear that users have strong opinions ーwhether Meta listens to them or not will be an interesting story over the next few months nbsp nbsp This article originally appeared on Engadget at 2023-07-06 09:08:38
ラズパイ Raspberry Pi Running a workshop with teachers to create culturally relevant Computing lessons https://www.raspberrypi.org/blog/research-teacher-workshop-culturally-relevant-computing-lessons/ Running a workshop with teachers to create culturally relevant Computing lessonsWho chooses to study Computing In England data from GCSE and A level Computer Science entries in shows that the answer is complex Black Caribbean students were one of the most underrepresented groups in the subject while pupils from other ethnic backgrounds such as White British Chinese and Asian Indian were well represented This picture The post Running a workshop with teachers to create culturally relevant Computing lessons appeared first on Raspberry Pi Foundation 2023-07-06 09:52:10
海外科学 NYT > Science U.S. Animal Industries Pose Disease Risks to People, Report Says https://www.nytimes.com/2023/07/06/health/animals-agriculture-disease-spillover.html U S Animal Industries Pose Disease Risks to People Report SaysThe nation uses an enormous number of animals for commercial purposes and regulations do not adequately protect against outbreaks experts concluded 2023-07-06 09:00:32
海外ニュース Japan Times latest articles Kodai Senga strikes out 12 as Mets rally past Diamondbacks https://www.japantimes.co.jp/sports/2023/07/06/baseball/mlb/senga-mets-beat-dbacks/ Kodai Senga strikes out as Mets rally past DiamondbacksNew York Mets rookie Kodai Senga matched his career best of strikeouts while tossing a career high eight innings in his team s victory 2023-07-06 18:04:15
ニュース BBC News - Home Speaking skills key to breaking class barriers - Starmer https://www.bbc.co.uk/news/uk-politics-66113585?at_medium=RSS&at_campaign=KARANGA meals 2023-07-06 09:42:11
ニュース BBC News - Home Wagner boss Prigozhin is in Russia, Belarus ruler Lukashenko says https://www.bbc.co.uk/news/world-europe-66118007?at_medium=RSS&at_campaign=KARANGA petersburg 2023-07-06 09:21:08
ニュース BBC News - Home Several injured after car crashes into primary school in Wimbledon https://www.bbc.co.uk/news/uk-england-london-66120958?at_medium=RSS&at_campaign=KARANGA wimbledon 2023-07-06 09:52:18
ニュース BBC News - Home Captain Sir Tom Moore: NHS charity stresses £38m is not under investigation https://www.bbc.co.uk/news/uk-england-beds-bucks-herts-66111722?at_medium=RSS&at_campaign=KARANGA moore 2023-07-06 09:07:12
ニュース BBC News - Home Currys boss: Smart speaker sales have fallen off a cliff https://www.bbc.co.uk/news/66120000?at_medium=RSS&at_campaign=KARANGA customers 2023-07-06 09:35:54
ニュース BBC News - Home NatWest, Lloyds, Barclays and HSBC to be questioned over savings rates https://www.bbc.co.uk/news/business-66111098?at_medium=RSS&at_campaign=KARANGA rates 2023-07-06 09:21:18
ニュース BBC News - Home Can 'good cop' Janet Yellen help fix US-China relations? https://www.bbc.co.uk/news/business-66083740?at_medium=RSS&at_campaign=KARANGA beijing 2023-07-06 09:23:03
ニュース BBC News - Home Swimmers warned away from popular NI beaches https://www.bbc.co.uk/news/uk-northern-ireland-66117867?at_medium=RSS&at_campaign=KARANGA castlerock 2023-07-06 09:21:08
ニュース Newsweek 「子供たちが気の毒...」プールサイドでBBQを楽しむラテン系家族を「ゴミ」と罵る白人女、暴言映像が物議 https://www.newsweekjapan.jp/stories/lifestyle/2023/07/post-102111.php 「子供たちが気の毒」プールサイドでBBQを楽しむラテン系家族を「ゴミ」と罵る白人女、暴言映像が物議【動画】撮影者ら一同を「ゴミ」呼ばわりし、金切り声でわめく女米コロラド州レイクウッドのプールで撮影された、白人の女が近くでバーベキューをしていたラテン系アメリカ人の家族に暴言を吐く映像がソーシャルメディアを通じて広く拡散され、物議を醸している。 2023-07-06 18:25:00
マーケティング MarkeZine BICP、岩手県住田町に地域のマーケティング支援専門子会社 「ビーアイシーピー・ハナレ」を設立 http://markezine.jp/article/detail/42716 岩手県住田町 2023-07-06 18:30:00
マーケティング MarkeZine 博報堂DYMP、テレビCMの出稿量・タイミングに合わせてAmazonスポンサー広告の入札調整を可能に http://markezine.jp/article/detail/42709 amazon 2023-07-06 18:15:00
IT 週刊アスキー バンダイ、子ども向けスマートシューズ「DIGICALIZED」ゲームアプリで運動習慣をサポート https://weekly.ascii.jp/elem/000/004/144/4144224/ digicalized 2023-07-06 18:45:00
IT 週刊アスキー コンパクト・エフェクターの操作感と高品位なギター・サウンドを実現するマルチ・エフェクター「ME-90」 https://weekly.ascii.jp/elem/000/004/144/4144215/ 月日 2023-07-06 18:30:00

コメント

このブログの人気の投稿

投稿時間: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件)