投稿時間:2023-08-01 21:28:26 RSSフィード2023-08-01 21:00 分まとめ(30件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… 楽天モバイル、楽天市場店で「訳あり品 (外装不良)」を販売開始 https://taisy0.com/2023/08/01/174793.html 楽天モバイル 2023-08-01 11:56:27
IT 気になる、記になる… au、22歳以下は「スマホスタートプラン 5G/4G」が1年間月々1,100円割引に https://taisy0.com/2023/08/01/174791.html 本日 2023-08-01 11:32:42
IT ITmedia 総合記事一覧 [ITmedia PC USER] 「バ美肉できます」「光のサプリで“PC=体に悪い”を変えたい」「PC-98が転生しちゃった!?」──新「LAVIE NEXTREME Infinity」を発表したNECPCが楽しそう https://www.itmedia.co.jp/pcuser/articles/2308/01/news166.html ITmediaPCUSER「バ美肉できます」「光のサプリで“PC体に悪いを変えたい」「PCが転生しちゃった」ー新「LAVIENEXTREMEInfinity」を発表したNECPCが楽しそうNECパーソナルコンピュータNECPCが発表した型ノートPC「LAVIENEXTREMEInfinity」には、VTuber関連ソフトのプリインストールや、バイオレットライトLEDなど、ユニークな機能が盛りだくさんだ。 2023-08-01 20:15:00
AWS AWS Database Blog Migrate Microsoft SQL Server to Babelfish for Aurora PostgreSQL with minimal downtime using AWS DMS https://aws.amazon.com/blogs/database/migrate-microsoft-sql-server-to-babelfish-for-aurora-postgresql-with-minimal-downtime-using-aws-dms/ Migrate Microsoft SQL Server to Babelfish for Aurora PostgreSQL with minimal downtime using AWS DMSIn this post we show how you can migrate from Microsoft SQL Server to a Babelfish for Aurora PostgreSQL cluster with minimal downtime using AWS Database Migration Service AWS DMS Customers using Microsoft SQL Server may want to migrate to open source databases like PostgreSQL however the significant effort to required migrate the application itself including … 2023-08-01 11:52:21
js JavaScriptタグが付けられた新着投稿 - Qiita 8/1 Javascript基礎8日目:オブジェクトとアロー関数 https://qiita.com/hvile072500/items/0b6bc6da137d64ab985b script 2023-08-01 20:36:02
AWS AWSタグが付けられた新着投稿 - Qiita AWS認定、アソシエイトコンプリートしました! https://qiita.com/tkapu/items/be9b4b5b5cd0bfdc3291 資格 2023-08-01 20:35:41
Ruby Railsタグが付けられた新着投稿 - Qiita Qiitaの長期インターンに参加して。 https://qiita.com/mugiajinoocha/items/149c2c1b24c0abc9859d qiita 2023-08-01 20:55:30
海外TECH DEV Community Smol AI vs Wasp AI - Which is the Better AI Junior Developer? https://dev.to/wasp/smol-ai-vs-wasp-ai-which-is-the-better-ai-junior-developer-4fcb Smol AI vs Wasp AI Which is the Better AI Junior Developer TL DRAI assisted coding tools are on the rise In this article we take a deep dive into two tools that use similar techniques but are intended for different outcomes Smol AI s “Smol Developer gained a lot of notoriety very quickly by being one of the first such tools on the scene It is a simple set of python scripts that allow a user to build prototype apps using natural language in an iterative approach Wasp s “GPT Web App Generator is more of a newcomer and focuses on building more complex full stack React NodeJS web app prototypes through a simple prompt and fancy UI When comparing the two Smol Developer s strength is its versatility If you want to spend time tinkering and tweaking you can do a lot to your own prompting and even the code in order to get decent results on a broad range of apps On the other hand Wasp AI shines by being specific Because it s only built for generating full stack React NodeJS Prisma Tailwind codebases it does the tweaking and advanced prompting for you and thus it performs much better in generating higher quality content with less effort for a specific use case Will either of these tools completely replace Junior Developers in their current form Of course not But they do allow for rapid prototyping and testing of novel ideas Read on to learn more about how they work which tool is right for the job at hand and how you can use them in your current workflow IntroThe age of AI assisted coding tools is fully upon us GitHub s Copilot might be the go to professional solution but since its release numerous open source solutions have popped up Most of these newer solutions tend towards functioning as an AI Agent going beyond just suggesting the next logical pieces of code within your current file they aim to create simple prototypes of entire apps Some are focused more on scaffolding entire app prototypes from an initial prompt while others function as interactive assistants helping you modify and improve existing codebases Either way they re often being described as “AI Junior Developers because they can take a product requirement i e “prompt and build a pretty good ーbut far from perfect ーfirst iteration saving developers a lot of time This article is going to focus on two tools that aim to build somewhat complex working prototypes from a single prompt Smol AI and Wasp AI We ll test them out by running the same prompts through each and seeing what we get By the end of it you ll have a pretty good understanding of how they work their advantages and disadvantages and what kind of tasks they re best suited for Before We BeginWasp is the only open source completely serverful fullstack React Node framework with a built in compiler and AI assisted features that lets you build your app super quickly We re working hard to help you build performant web apps as easily as possible ーincluding creating content like this which is released weekly We would be super grateful if you could help us out by starring our repo on GitHub …even Ron would star Wasp on GitHub ️Thanks For Your Support The Tools Smol DeveloperSmol AI described as a platform for “model distillation and AI developer agents actually has a few open source tools on offer but Smol Developer is the one we ll be taking a look at It was initially released by Swyx on May th and already has over k GitHub stars It aims to be a generalist prompt based coding assistant run from the command line The developer s job becomes a process of iterative prompting testing and re prompting in order to get the optimal output It is not limited to any language or type of app it can create although simple apps tend to work best Check out this tweet thread below to get a better understanding Detect dark theme var iframe document getElementById tweet if document body className includes dark theme iframe src theme dark Running from the command line Smol AI is essentially a chain of calls to the OpenAI chat completions i e “ChatGpt endpoint via a python script that takes an initial user generated promptcreates a plan based on internal prompts for executing the app with the structure of the entire app each file and its exported variables to be generatedfunction namesgenerates file paths based on the planloops through file paths and generates code for each file based on plan and promptThe generated output can then be evaluated by the developer and the prompt can be iterated on to account for any errors or bugs found during runtime Smol Developer quickly gained notoriety by being one of the first of such tools on the scene in addition to Swyx s prominence within it So if you re curious to see what s being built with it just check out some of the numerous YouTube videos on it One of my personal favorites is AI Jason s exposéand commentary He gives a concise explanation shows you some great tips on how to use Smol Developer effectively and as a Product Designer Manager he gives an interesting perspective on its benefits Smol Developer GitHub Repo Curious to see what the internal system prompt looks like Click Here Wasp s GPT Web App GeneratorIn contrast to Smol Developer Wasp s AI tool GPT Web App Generator is currently an open source web app yes it s a web app that makes web apps Since it s release on the th of July there have been over apps generated with over apps being generated each day Here s a quick minute video showcasing how GPT Web App Generator works So to give a bit of background Wasp is actually a full stack web app framework built around a compiler and config file Using this approach Wasp simplifies the web app creation process by handling boilerplate code for you taking the core app logic written by the developer and connecting the entire stack together from frontend to backend and database management It currently works with React NodeJS Tanstack Query and Prisma taking care of features like Auth Routing Cron Jobs Fullstack Typesafety and Caching This allows developers to focus more on the fun stuff like the app s features instead of spending time on boring configurations Because Wasp uses a compiler and config file to generate the app from this makes it surprisingly well suited for guiding LLMs like ChatGPT towards creating more complex apps with it as it essentially a plan or set of instructions for how to build the app Take this simple example of how you d tell Wasp that you want username and password authentication in your app main wasp fileapp RecipeApp title My Recipes wasp version auth methods usernameAndPassword onAuthFailedRedirectTo login userEntity User entity User psl Data models are defined using Prisma Schema Language id Int id default autoincrement username String unique password String recipes Recipe psl Wasp s config file is like an app outline that the compiler understands and can then use to connect and glue the app together taking care of the boilerplate for you By leveraging the powers of Wasp GPT Web App Generator works by taking a simple user generated prompt via the UIgiving GPT a descriptive example of a Wasp app and config file via internal prompts creating a plan that meets these requirements generating the code for each part of the app according to the planchecking each file for expected errors hallucinations and fixing themIn the end the user can download the codebase as a zipped file and run it locally Simpler apps such as TodoApp or MyPlants tend to work straight out of the box while more complex apps need a bit of finessing to get working Try out the GPT Web App Generator at or via the command line via Wasp s experimental releaseWasp AI Generator GitHub Curious to see what the internal system prompt looks like Click Here Comparison Test Prompt PONG GameTo get a sense for how each coding agent performed I tried out two different prompts on both Smol Developer and Wasp s GPT Web App Generator with only slight modifications to the prompts to fit the requirements of each tool The first prompt was the default prompt that comes hardcoded into Smol Developer s main py script a simple JavaScript HTML CSS Canvas app that is a one player game of PONG The left paddle is controlled by the player following where the mouse goes The right paddle is controlled by a simple AI algorithm which slowly moves the paddle toward the ball at every frame with some probability of error Make the canvas a x black square and center it in the app Make the paddles px long yellow and the ball small and red Make sure to render the paddles and name them so they can controlled in javascript Implement the collision detection and scoring as well Every time the ball bounces off a paddle the ball should move faster Note ️For Wasp s GPT Web App Generator I replaced the first line with “a simple one player game of PONG since Wasp will automatically generate a full stack React NodeJS app Both were able to create a functional PONG game out of the box but only on the second try The first try created decent PONG starters but both had buggy game logic e g computer opponent failed to hit ball or ball would spin off into oblivion I didn t change the prompts at all but just simply ran them a second time each ーand that did the trick For both of the generated apps the game logic was very simple Scores weren t recorded and once a game ended you d have to refresh the page to start a new one Although while Smol Developer only created the game logic GPT Web App Generator created the game logic as well as the logic for authentication creating games and updating a game s score saving it all to the database though the scoring functions weren t being utilized initially To be fair this isn t really a surprise though as these features are baked into the design of Wasp and the Generator On the other hand to get these same features for Smol Developer we d have to elaborate on our prompt giving it explicit instructions to implement them and iterate on it a number of times before landing on an acceptable prototype This is what I attempted to test out with the second prompt Prompt Blog AppThis time for the second app test I used a default prompt featured on the GPT Web App Generator homepage for creating a Blog app A blogging platform with posts and post comments User owns posts and comments and they are saved in the database Everybody can see all posts but only the owner can edit or delete them Everybody can see all the comments App has four pages Home page lists all posts their titles and authors and is accessible by anybody If you click on a post you are taken to the View post page It also has a New post button that only logged in users can see and that takes you to the New post page New post page is accessible only by the logged in users It has a form for creating a new post title content Edit post page is accessible only by the post owner It has a form for editing the post with the id specified in the url View post page is accessible by anybody and it shows the details of the post with the id specified in the url its title author content and comments It also has a form for creating a new comment that is accessible only by the logged in users NoteFor the Smol Developer prompt I added the lines “The app consists of a React client and a NodeJS server Posts are saved in an sqlite database using Prisma ORM As this was a suggested prompt on the GPT Web App Generator page let s start with the Wasp app result first After downloading the generated codebase and running the app I ran into an error Failed to resolve import ext src ViewPost jsx from src router jsx Does the file exist One quick look at the main wasp file revealed that the Generator gave the wrong path to the ViewPost page although it did get all the other Page paths correct highlighted in yellow above Once that path was corrected a working app popped up at localhost Nice The video above was my first time trying out the app and as you can see most of the functionality is there and working correctly ーAuthentication and Authorization and basic CRUD operations Pretty amazing There were still a couple of errors that prevented the app from being fully functional out of the box but they were easy to fix Blog posts on the homepage did not have a link in order to redirect to the their specific post page ーfixable by just wrapping them in lt Link to post post id gt The client was passing the postId as a String instead of an Int to the getPost endpoint ーfixable by wrapping the argument in parseInt postId to convert strings to integers And with those simple fixes we got a fully functioning full stack blog app with authentication database and simple tailwind css styling The best part was that all this took about minutes from start to finish Sweet Note ‍The Generator saves all the apps it creates along with a sharable link so if you want to check out the original generated Blog app code before fixes from above click here The Smol Developer result was also very impressive with a solid ExpressJS server and a lot of React client pages but there were too many complicated errors that prevented me from getting the app started including but not limited to No build tools or configuration filesThe server was importing database models that didn t existThe server was importing but not utilizing Prisma as the ORM to communicate with the DBClient had Auth logic but was not utilizing it to protect pages routesBecause there were too many fundamental issues with the app I went ahead and added some more lines to the bottom of the prompt …Scaffold the app to be able to use Vite as the client s build tool Include a package json file gt with the dependencies and scripts for running the client and server This second attempt produced some of the changes I was looking for like package json files and Vite config files to bootstrap the React app but it still failed to include An index html file Package json files with the correct dependencies being imported from within the client and serverA prisma schema fileA css file although it did include classNames in the jsx code On the other hand the server code albeit much sparser this time did at least import and use Prisma correctly So I went ahead for a third attempt and modified and added the following lines to the bottom of the prompt …Scaffold the app to be able to use Vite as the client s build tool Make sure to include the following package json files for both the server and client Make sure that these files include the gt dependencies being imported in the respective apps an index html file in the client s public folder so that Vite can build the app a prisma schema file with the models and their fields Make sure these are the same models gt being used app wide a css file with styles that match the classNames used in the app With these additions to the prompt the third iteration of the app did in fact include them Well most of them but unfortunately not all of them Now I was getting the css and package json files but no vite config file was created this time even though the instructions for using “Vite as the client s build tool produced one previously Besides that no auth logic was implemented imports were out place or missing and an index jsx file was also nowhere to be found so I decided to stop there I m sure I could have iterated on the prompt enough times until I got closer to a working app but at a generation I didn t feel like racking up more of an OpenAI bill Note Price per generation is another big difference between the Smol AI and Wasp AI Because more work is being done by Wasp s compiler and less by GPT each app costs about to generate although Wasp covers the cost and allows you to use it for free whereas to generate complex full stack apps with Smol Developer can cost upwards of Plus there are plenty of YouTubers who ve created videos about the process of using Smol Developer and it seems they all come to similar conclusions you need to create a very detailed and explicit prompt in order to get a working prototype In fact in AI Jason s Smol AI video above he mentioned that he got the best results out of the box when prompting Smol Developer to write everything to one file only ーof course this limits you to generating simple apps only that are not so easy to continue from manually Thoughts amp Further ConsiderationsAt their core SmolAI and WaspAI function quite similarly by first prompting the LLM to create a plan for the app s architecture and then to execute on that plan file by file But because Smol Developer aims to be able to generate a wider range of apps the expectation is on the Developer or “Prompt Engineer to create a highly detailed explicit prompt which is more akin to a Product Requirement Doc that a Product Designer would write This can take a few iterations to get right and pushes Smol Developer in the direction of “Natural Language Programming tool On the other hand Wasp s GPT Web App Generator has a lot of prompting and programming going on behind the scenes abstracted away from the user and hidden within the Generator s code and Wasp s compiler Wasp comes with a lot of knowledge baked in and already has a good idea of what it wants to build which means the user has less to think about it This means that we re more likely to get a working complex prototype from a short simple prompt but we have less flexibility in the kinds of apps we re able to create ーwe always get a full stack web app In general Wasp is like a junior developer specialized in web dev and has a lot of experience with a specific stack while Smol AI is a junior developer that s a generalist who is more versatile but has less specific knowledge and experience with web dev Smol AIWasp AI‍ Types of AppsVariedFull stack Web Apps Programming LanguagesAll TypesJavaScript TypeScript Complexity of Generated AppSimple to MediumMedium to Complex Price per Generation ーvia OpenAI s API to to   Payment Methodbring your own API keyfree ーpaid for by Wasp DebuggingYes if you re willing to tinkerBuilt in but limited Type of Prompt NeededComplex and detailed or more pages e g an entire Product Requirement Doc Simple paragraphs Intended UserEngineers Product Designers wanting to generate a broad range of simple prototypesWeb Devs Product Designers that want a feature rich full stack web app prototypeOther big differences lie within Error Correction upon Code CreationSmol AI initially had a debugging script but this has temporarily deprecated due to the fact that it expects the entire codebase when debugging and current k and k token context windows are only available in private beta for GPT and Anthropic at the moment Wasp AI has some error correction baked into its process as the structure of a Wasp app is more defined and the range of errors are more predictable Price per app generation via OpenAI s chat completion endpoints Smol AI can cost anywhere from to depending on the complexity of the app Wasp AI costs to  per app when using the default mix of GPT and GPT turbo but Wasp covers the bill here If you choose to run it just with GPT then the cost is x at  to per generation and you have to provide your own API key User InterfaceSmol Developer works through the command line and has minimal logging and process feedbackWasp AI currently uses a clean web app UI with more logging and feedback as well as through the command line without a UI you have to download the experimental Wasp release to do so at this time Overall both solutions produce amazing results allowing solo developers or teams iterate on ideas and generate prototypes faster than before But they still have a lot of room for improvement For example what these tools lack the most at the moment is in interactive debugging and incremental generation It would be great if they could allow the user to generate additional code and fix problems in the codebase on the fly rather than having to go back rewrite the prompt and regenerate an entire new codebase I m not aware of the Smol AI roadmap but seeing that it s received a grant from Vercel s AI accelerator program I m sure we will be seeing development on it continue and the tool improve let me know in the comments if you do have some insight here On the other hand as I m a member of the Wasp team I can confidently say that Wasp will soon be adding the initial generation process and interactive debugging into Wasp s command line interface So I definitely think it s early days and that these tools will continue to progress ーand continue to produce more impressive results Which Tool Should You Use Obviously there can be no clear winner here as the answer to question of which tool you should use as your next “AI Junior Developer depends largely on your goals Are you looking for a tool that can generate a broad range of simple apps And are you interested in learning more about building AI assisted coding tools and natural language programming and don t mind tweaking and tinkering for a while Well then Smol Developer is what you re looking for Do you want to generate a working full stack React Node app prototype with all the bells and whistles as quickly and easily as possible Head straight for Wasp s GPT Web App Generator Help Me Help You If you haven t yet please star us on GitHub especially if you found this useful If you do it helps support us in creating more content like this And if you don t…well we will deal with it I guess ️Thanks For Your Support In general as Jason “AI Jason Zhou said “I m really excited about AI assisted coding tools because if I want to user test a certain product idea I can ask it to build a prototype very very quickly and test with real users Jason makes a great point here that these tools don t really have the capacity to replace Junior Developers entirely in their current capacity although they will surely improve in the future but they do improve the speed and ease with which we can try out novel ideas I personally believe that in the near future we will see more domain specific AI assisted tools like Wasp s GPT Web App Generator because of the performance gains they bring to the end user Code agents that are focused on a niche can produce better results out of the box due to the embedded knowledge In the future I think we can expect a lot of agents that are each tailored towards fulfilling a specific task But don t just take my word for it Go ahead try out Smol Developer and the GPT Web App Generator for yourself and let me know what you think in the comments 2023-08-01 11:59:16
海外TECH DEV Community Henry Fayol’s 14 Principles of Management: A Guide for Students https://dev.to/kuldipsir/henry-fayols-14-principles-of-management-a-guide-for-students-38e4 Henry Fayol s Principles of Management A Guide for Students IntroductionManagement is a fundamental aspect of any organization be it a large corporation or a small team Over the years various management principles have been proposed to guide managers in effectively handling resources and achieving organizational goals One such prominent figure in management theory is Henry Fayol a French industrialist and management theorist He introduced principles of management that are still relevant and widely used today In this blog we will explore as well as online test on Henry Fayol s Principles of Management A Guide for Students in a way that is understandable to primary school students Online TestClick on the below button for online test on Henry Fayol s Principles of Management A Guide for StudentsClick here Division of WorkDefinitionThe division of work refers to the specialization of tasks and responsibilities within an organization It involves breaking down complex tasks into smaller manageable ones ExplanationImagine a football team without any division of work Everyone would be trying to score goals defend the goalpost and handle the ball simultaneously It would be chaos Similarly in an organization when each member has a specific role and responsibility tasks are completed more efficiently Authority and ResponsibilityDefinitionAuthority is the right to make decisions and give orders while responsibility is the obligation to complete tasks successfully ExplanationThink of a classroom where the teacher has the authority to lead the class and students have the responsibility to complete their homework If there were no authority there would be no order and if there were no responsibility tasks would remain unfinished DisciplineDefinitionDiscipline involves obedience to organizational rules respect for authority and adherence to the established processes ExplanationIn a sports team players need to follow the coach s instructions and maintain discipline during training and matches Similarly in an organization discipline ensures that everyone works together harmoniously to achieve common objectives Unity of CommandDefinitionUnity of command means that each employee should have only one direct supervisor or manager ExplanationPicture a ship with multiple captains giving contradictory orders it would never reach its destination In an organization unity of command ensures clear communication and prevents confusion Unity of DirectionDefinitionUnity of direction emphasizes that all members of the organization should be working towards the same goals ExplanationIn a relay race each runner knows the direction they need to follow to pass the baton to the next runner successfully Similarly in an organization unity of direction ensures that everyone is aligned towards the company s objectives Subordination of Individual Interests to the General InterestDefinitionThis principle states that individual interests should never prevail over the interests of the organization as a whole ExplanationImagine a group project where one team member only focuses on their ideas ignoring the project s overall success In an organization prioritizing the collective interest ensures cohesive teamwork and success RemunerationDefinitionRemuneration refers to the fair and adequate compensation given to employees for their work ExplanationIn a game players receive medals or trophies as recognition for their effort and performance Similarly in an organization fair remuneration motivates employees to work harder and boosts their morale CentralizationDefinitionCentralization refers to the concentration of decision making authority at the top levels of management ExplanationImagine a school where every student has the power to decide on the curriculum it would be chaotic In an organization centralization ensures consistent and effective decision making Scalar ChainDefinitionThe scalar chain is the formal line of authority that extends from the top level of management to the lowest ranks ExplanationIn a relay race each runner passes the baton to the next one until the last runner crosses the finish line In an organization the scalar chain ensures a smooth flow of communication and delegation of tasks OrderDefinitionThe order principle stresses the need for a systematic arrangement of resources and employees for the smooth functioning of the organization ExplanationImagine a library without any order in the arrangement of books finding the right book would be a daunting task In an organization proper order ensures efficiency and productivity EquityDefinitionEquity implies fairness and justice in dealing with employees ExplanationIn a game players are expected to follow the rules and referees ensure fairness Similarly in an organization equity fosters a positive work environment and employee satisfaction Stability of Tenure of PersonnelDefinitionStability of tenure refers to providing employees with job security and opportunities for long term employment ExplanationImagine a team where players are constantly changing they would struggle to develop teamwork and chemistry In an organization stability of tenure reduces turnover and allows employees to grow with the company InitiativeDefinitionInitiative encourages employees to come up with new ideas and take action without constant supervision ExplanationIn a creativity competition participants are encouraged to think outside the box and present unique ideas Similarly in an organization initiative drives innovation and improvement Esprit de CorpsDefinitionEsprit de corps refers to the spirit of unity and camaraderie among employees ExplanationIn a team when members cheer for each other and celebrate successes together they create a strong bond In an organization esprit de corps leads to a positive work culture and higher team morale ConclusionHenry Fayol s principles of management provide valuable insights into how organizations can achieve efficiency effectiveness and harmony By understanding and applying these principles managers can create a conducive work environment where employees thrive and the organization prospers These principles are not only applicable in the business world but can also be seen in everyday scenarios making them relevant and understandable to primary school students Remember effective management is the key to unlocking success in any endeavor Henry Fayol Principles of Management Unity of Command Division of Work Scalar Chain Esprit de Corps Authority and Responsibility Discipline in Management Centralization Subordination of Individual Interest to General Interest Order in Management Initiative Equity in Management Stability of Tenure Remuneration Unity of Direction Management by Exception Gang Plank Scalar Principle Administrative Management Organizational Structure Management Theory Fayolism Management Functions Management Practices 2023-08-01 11:43:50
海外TECH DEV Community Building a RESTful API with Node.js: A Step-by-Step Guide https://dev.to/abidullah786/building-a-restful-api-with-nodejs-a-step-by-step-guide-27op Building a RESTful API with Node js A Step by Step Guide IntroductionRESTful APIs are a fundamental part of modern web development enabling communication and data exchange between client applications and servers In this tutorial we will explore how to implement a RESTful API in Node js using Express a popular and lightweight web framework for Node js By the end of this guide you will have a solid understanding of how to build robust and scalable APIs that can handle various CRUD operations PrerequisitesBefore we begin make sure you have the following installed on your machine Node js and npm Node Package Manager A code editor of your choice e g Visual Studio Code Getting Started Step Initialize a New Node js ProjectOpen your terminal or command prompt create a new project folder and navigate into it Use the following command to initialize a new Node js project npm init yThis will create a package json file which will store information about your project and its dependencies Step Install Required DependenciesWe need to install Express a powerful and minimalist web framework to build our API Run the following command to install Express npm install expressAdditionally we will use body parser to parse incoming request bodies and cors to handle Cross Origin Resource Sharing CORS headers npm install body parser cors Step Create the ServerCreate a new file named server js in your project folder This file will serve as the entry point of our API Import required modulesconst express require express const bodyParser require body parser const cors require cors Create an instance of Expressconst app express Middleware setupapp use bodyParser json app use cors Server portconst port process env PORT Start the serverapp listen port gt console log Server is running on port port Step Define API RoutesIn this step we will create routes for handling various API endpoints For demonstration purposes we will create routes to handle CRUD operations for a collection of users Create a new file named users js inside a folder named routes in your project directory This file will contain the API routes related to users const express require express const router express Router Sample user data temporary let users id name John Doe age id name Jane Smith age Add more users as needed Get all usersrouter get users req res gt res json users Get a single user by IDrouter get users id req res gt const id req params const user users find user gt user id parseInt id if user return res status json message User not found res json user Create a new userrouter post users req res gt const name age req body Simple validation if name age return res status json message Name and age are required const newUser id users length name age users push newUser res status json newUser Update an existing user by IDrouter put users id req res gt const id req params const name age req body Simple validation if name age return res status json message Name and age are required const user users find user gt user id parseInt id if user return res status json message User not found user name name user age age res json user Delete a user by IDrouter delete users id req res gt const id req params users users filter user gt user id parseInt id res sendStatus module exports router Step Integrate API Routes with the ServerBack in the server js file we will integrate the users js routes into our Express application const express require express const bodyParser require body parser const cors require cors const app express app use bodyParser json app use cors const port process env PORT Import the users routesconst usersRoutes require routes users Use the users routesapp use api usersRoutes app listen port gt console log Server is running on port port ConclusionIn this tutorial we covered the step by step process of implementing a basic RESTful API in Node js using Express You learned to create and handle HTTP routes for CRUD operations on user data With Express Router the codebase became more organized and maintainable Throughout the development you gained hands on experience in handling HTTP requests error handling data parsing and sending appropriate responses to clients in JSON format Congratulations You have successfully implemented a basic RESTful API in Node js Now it s time to test your API endpoints using tools like Postman cURL or thunder client vs code extension Connect with me on Twitter Linkedinand GitHub to stay updated and join the discussion 2023-08-01 11:40:00
海外TECH DEV Community Powerful Resources Arsenal https://dev.to/jaloplo/powerful-resources-arsenal-14gg Powerful Resources ArsenalWelcome to my curated collection of powerful resources that have been incredibly helpful to me and I hope they will be just as valuable for you too Instead of the usual articles and product pages I ve handpicked a selection of WhatsApp groups and LinkedIn profiles that are true gems in their own right Get ready to embark on a journey of knowledge connection and growth with these unique resources Let s dive in and elevate our experiences together Table of contentsWhatsApp groups of interestLinkedIn ProfilesMicrosoft profilesInfluencers MVP s amp other Microsoft profiles WhatsApp GroupsWelcome to my buzzing hub of Microsoft related WhatsApp groups As a Microsoft enthusiast I ve come across some fantastic communities that cater to various interests If you re into Power Apps Power Automate Power Pages SharePoint Microsoft Teams or simply seeking expert Q amp A you re in for a treat These groups created by passionate individuals offer a treasure trove of knowledge and insights So come join our vibrant community Let s connect learn and grow as we unleash the full potential of Microsoft Ilya FainbergThe Power Platform Club ConnectDynamics ConnectPower Apps ConnectPower Automate ConnectPower Pages ConnectPower BI ConnectPower Virtual Agents ConnectCommunity Support ConnectAmi DiamondSharePoint amp Teams Q amp A ConnectSharePoint community Q amp A ConnectGlobal Microsoft Q amp A ConnectMS Powerplatform Q amp A ConnectSharePoint PowerShell Q amp A Connect LinkedIn ProfilesWelcome to an exclusive compilation of invaluable LinkedIn profiles that promise to elevate your Microsoft experience In the first group immerse yourself in the dynamic world of Power Platform Power Apps Power Automate Viva SharePoint Online Microsoft Teams OneDrive and much more These profiles are a treasure trove of expertise brought to you by seasoned Microsoft professionals who breathe innovation In the second group you ll find an elite gathering of Microsoft MVPs influential personalities and other esteemed profiles delving into a myriad of captivating topics beyond the Microsoft ecosystem From cutting edge technologies to industry insights their wisdom knows no bounds Get ready to expand your network and stay ahead of the curve with these exceptional LinkedIn profiles Let s connect and unlock the full potential of Microsoft together Microsoft Profiles Power PlatformReza Dorrani Principal Program Manager Microsoft Power CAT Content Creator ConnectDaniel Laskewitz Senior Cloud Advocate Power Platform at Microsoft ConnectDavid Warner II Microsoft Community Program Manager PowerPlatform M Platform Community PnP Team Member Office Development MVP Alumni ConnectJack Rowbotham Microsoft Product Marketing Manager Power Platform and Conversational AI ConnectCharles Lamanna Corporate Vice President Business Apps amp Platform at Microsoft ConnectApril Dunnam Principal Power Platform Advocacy Team Leadat Microsoft YouTuber Speaker LinkedIn Learning Course Author Low Code Revolution Host ConnectScott Sewell Principal Program Manager Microsoft Fabric for the Power Platform ConnectIlya Fainberg Speaker Author Sr Program Manager at Microsoft ConnectPhil Topness Principal Program Manager at Microsoft Power Platform Customer Advisory Team Power CAT Connect VivaDan Holme Product leader at Microsoft Viva Engage storyline amp stories personal networks and leader communications ConnectWim Coorevits Product Manager Lead at Microsoft Viva Insights Connect SharePoint Online amp OneDriveVesa Juvonen Principal Product Manager at Microsoft Follow for Microsoft and community topics ConnectJames Eccles Senior Customer Experience Program Manager Microsoft Syntex ConnectJason Moore VP of Product for OneDrive ️ amp Microsoft Lists Deeply in with Files Folders amp Lists ConnectBill Baer Senior Product Manager for Microsoft Search Assistant and Intelligence amp Microsoft Syntex at Microsoft Corporation ConnectStephen Rice Principal Product Manager OneDrive amp SharePoint Microsoft ConnectMark Kashman Senior Product Manager at Microsoft SharePoint ConnectZach Rosenfield Product Executive at Microsoft Enterprise SaaS PaaS Microsoft Syntex SharePoint amp OneDrive Expertise ConnectMarc Mroz Principal Program Manager Lead Office Media Group Microsoft Stream at Microsoft Connect Influencers MVP s amp other Microsoft profilesMichel Mendes Microsoft MVP Business Applications M Apps and Services Senior Consultant at Avanade Microsoft Power Platform SharePoint ConnectMatthew Devaney Microsoft Biz Apps MVP Consultant at Hitachi Solutions Canada ConnectDaniel Christian Lead Infrastructure Engineer Vice President Microsoft MCT amp MVP Speaker amp Blogger ConnectGregory Zelfond SharePoint Consultant Helping Businesses Streamline Collaboration Through Consulting Training and Configuration ConnectShane Young Power Apps and Power Automate MVP for PowerApps ConnectLuise Freese Microsoft amp Power Platform Consultant Changing the world one app at a time ConnectKristine Kolodziejski Microsoft MVP Senior Manager EY Developer UI UX Designer x Microsoft Certified Professional PrinCSS linktr ee kristine ConnectLisa Crosbie Technology Evangelist and Advisor Microsoft Business Applications MVP Content Creator ConnectNacho Cepa Power Platform MVP Tech Lead isolutions YouTube Partner Twitch affiliate Solutions Architect ConnectScott Durow Microsoft Business Applications MVP Co founder amp Technical Architect ProCodeNoCodeUnite ConnectVlad Catrinescu Microsoft MVP MCT Regional Lead Author of courses at Pluralsight and books with Apress ConnectDavid Wyatt Senior Staff Engineer Intelligent Automation Developer ConnectAmi Diamond Microsoft MVP SharePoint Online Microsoft Teams Microsoft Expert at DeePlan formally P Z Projects ConnectRalf Heid CTO at ICT Microsoft Expert Blogger at hubsite com Power Platform SharePoint Viva ConnectJoanne C Klein Advanced Compliance consultant for Microsoft Microsoft MVP Microsoft Partner ConnectDavid Hurtado Torán Innovation amp Technology made easy Innovation Lead at Microsoft ConnectCarlos de Huerta Mezquita Technology Strategy Microsoft Startup Founders Mentor Azure OpenAI Service Champ ConnectJesus Serrano Principal Program Manager Microsoft Sportainment Innovation Lead amp Research International Speaker Connect ContributingThe beauty of this resource collection lies in its collaborative nature and we encourage you to actively participate in its growth Your contributions can make a significant difference in enriching this list further If you have come across remarkable WhatsApp groups that delve into Microsoft s Power Platform Power Apps Power Automate Viva SharePoint Online Microsoft Teams OneDrive or any other relevant topic I want to hear from you Likewise if you know of influential LinkedIn profiles that transcend the Microsoft realm we d love to include them too But that s not all We are open to exploring additional tools and resources that have been valuable to you in your Microsoft journey Whether it s an insightful blog an interactive community forum or any other resource your suggestions will broaden the horizons of our collection To contribute simply leave a comment below this article with your recommendations Your input will not only help fellow enthusiasts but also foster a thriving collaborative community that fuels continuous learning and growth Let s unite our knowledge and passion to create a comprehensive and dynamic resource hub that empowers us all to thrive in the Microsoft world Together we can make a difference DisclaimerThe inclusion of individuals and groups on this list of resources is solely based on publicly available information and my personal experiences If you are mentioned in this compilation and prefer to be removed or have different information displayed please accept my sincere apologies for any inconvenience caused Your privacy and preferences are of utmost importance If you wish to be removed from the list or have any changes made to the information associated with your profile kindly reach out to me directly through Substack LinkedIn or Dev to profiles I will promptly accommodate your request and ensure that the necessary modifications are made accordingly Thank you for your understanding and I truly appreciate your cooperation in keeping this resource list accurate and respectful to everyone s preferences 2023-08-01 11:38:21
海外TECH DEV Community Share / ShareReplay / RefCount https://dev.to/this-is-angular/share-sharereplay-refcount-331j Share ShareReplay  RefCountshare and ShareReplay are two RxJs operators that we always struggle to use correctly We know that we can reach for them when we want to multicast a costly observable or cache a value that will be used at multiple places But what are the key differences between both and what is the refCount flag and how can we leverage its behavior In this article I will try to explain them for you so that you will not need to ask this question again Example I posted the following question on Twitter which unfortunately received zero responses This really highlights the lack of understanding regarding share and shareReplay Detect dark theme var iframe document getElementById tweet if document body className includes dark theme iframe src theme dark The exercice looks like this Component selector app count standalone true imports NgIf AsyncPipe template lt ng container ngIf flag gt count async lt ng container gt lt ng container ngIf flag gt count async lt ng container gt export class CountComponent implements OnInit flag true readonly count interval pipe take shareReplay bufferSize refCount false line readonly count this count pipe take map c gt count c readonly count this count pipe take map c gt count c ngOnInit void setTimeout gt this flag false Note This code snippet is written using Angular but the behavior of both operator is the same outside the framework When the flag is true we subscribe to count and after emissions the observable completes Then after ms the flag is set to false and we subscribe to count which also completes after emissions Both observables are chained with count The goal is to predict the result displayed on the screen after s depending on the operator used in line ShareLet s start with the share operator  The share operator will multicast each value emitted by the source observable which means we won t re execute the source observable for each new subscription Moreover when the count of subscribers drops to the source observable will be unsubscribed Inside this operator we use a Subject as a connector between the source observable and the subscribers This means that every late subscriber will NOT have access to the previously emitted data You should use this operator if you know that you will not use previously emitted data and are only interested in upcoming ones SolutionIf we go back to our exemple count will be triggered when count subscribes to it  After count emits values count completes due to the take operator Consequently count will also complete since the number of subscribers drops to and the inner Subject will reset After ms count starts It will subscribe to count and count will start emitting from the beginning  Since we have a take on the observable the final answer is ShareReplay with refCount trueBoth share and shareReplay operators behave almost the same ShareReplay use share under the hood The crucial difference lies in the connector shareReplay uses a ReplaySubject instead of a Subject This distinction becomes significant when dealing with late subscribers as they will have access to previously emitted data Another difference is the ability to toggle the refCount flag When refCount true it allows unsuscribing from the source observable when the subscriber count drops to The share operator s refCount flag is defaulted to true In this scenario with refCount set to true the source observable will get unsubscribed when the subscriber count drops to SolutionIf we go back to our exemple count will be triggered when count subscribes to it After count emits times count completes due to the take operator Consequently count will also complete since the number of subscribers drops to and the refCount flag is set to true After ms count starts it will subscribe to count again and count will start emitting from the beginning Since we have a take on the observable the final answer is In this example both share and shareReplay bahave exactly the same However we will see more examples below to understand the differences between them ShareReplay with refCount falseAs explained above setting the refCount flag to false will keep the source observable alive even if the subscriber count drops to This is dangerous because if the source observable never completes this can create memory leaks However in some cases you may not want to re execute the source observable if a new subscriber subscribes such as in the case of an HTTP request SolutionIf we go back to our exemple count will be triggered when count subscribes to it After count emits times count completes due to the take operator BUT count will NOT complete and continue to emit a value every s After ms count starts it will subscribe to count and receive the last emitted value which is Since we have a take on the observable the final answer is Note Since all observables completes we don t have any memory leaks issues Example Let s take another example to better understand the difference between share and shareReplay This distinction becomes more evident when we apply the operators to an observable that never completes such as a BehaviorSubject Component selector app root standalone true imports NgIf AsyncPipe template lt ng container ngIf flagFinalize gt lt ng container gt count async lt ng container gt lt ng container ngIf flag gt count async lt ng container gt lt ng container gt lt button click flagFinalize flagFinalize gt FINALIZE lt button gt lt button click subject next subject value gt INCREMENT lt button gt export class AppComponent implements OnInit flag false flagFinalize false subject new BehaviorSubject readonly count this subject pipe tap next t gt console log I get next value of count t complete gt console log complete count finalize gt console log finalize count share readonly count this count pipe tap next t gt console log I get next value of count t complete gt console log complete count finalize gt console log finalize count map c gt count c readonly count this count pipe tap next t gt console log I get next value count t complete gt console log complete count finalize gt console log finalize count map c gt count c ngOnInit void setTimeout gt this flag true This time we are using a BehaviorSubject and we have an INCREMENT button to emit a value to the Subject Additionally we have added a tap operator to log the next complete and finalize events The FINALIZE button allows us to unsubscribe from the count and count observables ScenarioWhen the app is loaded count subscribes to count and after s count also subscribes to count Next we click once on the INCREMENT button and finally we click on the FINALIZE button  Before reading the article further I invite you to try to guess what the behavior of this scenario will be with each operator Once you are done compare your ideas with the solution ShareWhen count subscribes to count the count observable will start emitting values and count will receive the initial value In this scenario count doesn t complete so the number of subscribers will not drop to and count will not complete either After s count starts subscribing to count but since we are using the share operator the inner observable is a Subject which will not replay the previous emitted value Therefore count will not receive any value We now click on the INCREMENT button and both count and count will be notified with the value Finally we click on the FINALIZE button and both count and count will get unsubscribed due to the asyncPipe and finalized Since the share operator unsubscribes the source when all subscribers drop to count will finalize as well ShareReplay with refCount true We replace the share operator with shareReplay bufferSize refCount true same behavior as previouslysame thingAfter s count starts subscribing to count However this time count gets the previous emitted value in our case because shareReplay uses a ReplaySubject as the connector This is the significant difference between both operators and are identical since the refCount flag is set to true ShareReplay with refCount false to is identical to the previous scenario and all differences are seen in point when we unsubscribe from the subscribers When we click on the FINALIZE button count and count will be unsubscribed correctly due to the asyncPipe However count will not finalize because shareReplay will not unsubscribe the inner source and count will continue to exist indefinitely which might cause a memory leak Important note If you have noticed I said that this might cause a memory leak If you lose the reference to your running observable such as when destroying a component a new count observable will be instantiated next time you initialize the particular component This can lead to memory leaks In the above example switching back the flag count and count will resubscribe to the existing observable ShareReplay with refCount set to false is useful when you don t want to re execute a costly observable like an HTTP request You can set your shared observable in a global service and inject it anywhere in your application The instance will never be unsubscribed but when new subscribers subscribe to the observable they will use the existing instance Note We often see the shorthand synthax replaySubject which is the shorthand for replaySubject bufferSize refCount false So you need to be careful about using this synthax You will more often reach for refCount set to true to avoid memory leak issues Example In the last example we will use a source observable that completes similar to an HTTP request To simplify the example we will use the of operator Component selector app root standalone true imports NgIf AsyncPipe template lt ng container gt request async lt ng container gt lt ng container ngIf flag gt request async lt ng container gt export class AppComponent implements OnInit flag false readonly http of trigger http request pipe tap next t gt console log http response t complete gt console log complete http finalize gt console log finalize http share readonly request this http pipe tap next t gt console log request response t complete gt console log complete request finalize gt console log finalize request map c gt request c readonly request this http pipe tap next t gt console log request response t complete gt console log complete request finalize gt console log finalize request map c gt request c ngOnInit void setTimeout gt this flag true ScenarioWhen we load the component we trigger a first HTTP request using the observable http After s we want to get the result of the same request To achieve this we consider using either share or shareReplay operator to cache the result Same exercice as previously I encourage you to think first before reading the solution below Sharerequest subscribes to http which triggers an HTTP call Once the response comes back the HTTP call completes causing http and request to complete as well After s request subscribes to http hoping to get the result of the same HTTP call However since share uses a Subject under the hood nothing is cached and http is re executed resulting in a new HTTP call ShareReplayIn this scenario the refCount doesn t change the behavior since the source observable http completes on its own irrespective of the number of subscribers same as previouslyAfter s request subscribes to http but this time shareReplay uses a ReplaySubject as the connector allowing it to store the last value emitted by http Therefore http doesn t need to be re executed and request received the cached value without triggering a new HTTP call Note Be careful when using shareReplay inside a global service behind a http call Each new subscriber will receive the cached value and the HTTP request will NEVER fire again As a result your data will NEVER get refreshed ConclusionIn summary shareReplay is useful in scenarios where you want to cache and replay the last emitted value of an observable especially in situations like HTTP requests to avoid unnecessary re execution and improve performance But be careful this is useful inside a component scope generally not within the global scope You need to think carefully about the refCount flag when using shareReplay on observables that don t complete on their own share is useful when you want to multicast a long living observable and you don t need to access previously emitted data As you can see understanding exactly how this two operators work under the hood can help you improve your application s performance I hope you now have a better understanding of the differences between share and shareReplay and the importance of the refCount flag With this knowledge you should be able to use them correctly and truly understand what is happening behind the scenes You can find me on Twitter or Github Don t hesitate to reach out to me if you have any questions 2023-08-01 11:32:07
海外TECH DEV Community Bugs, Errors, and Lessons: A Beginner's Debugging Experience https://dev.to/andrewezeani/bugs-errors-and-lessons-a-beginners-debugging-experience-4502 Bugs Errors and Lessons A Beginner x s Debugging ExperienceWhen I began my career as a frontend developer dealing with bugs and errors during the development of my personal projects was my greatest fear The most daunting were those elusive bugs that do not throw any error messages leaving me puzzled and reinforcing my imposter syndrome I found that this was a common feeling among new developers when I spoke with others However I soon realized that dreading these bugs will stunt my growth as a developer and will not make the bugs disappear Instead I overcame my fear by seeing these bugs as opportunities to learn and improve my skills In this article I will share some bugs I encountered how I successfully debugged them and the invaluable lessons I learned throughout the process CSS Styling IssueAfter completing my HTML and CSS lessons on Sololearn I felt confident enough to tackle a simple project A friend suggested Frontend Mentor a platform that takes care of the design and allows you to focus on building projects I registered and chose a simple QR code card component project for beginners I downloaded the necessary file created a new project folder and opened it in VS Code I started by writing the HTML markup and then moved on to the CSS styles That was when I encountered my first bug   the browser was not updating the CSS styles I had written To debug the problem I initially waited for a couple of minutes assuming that my slow computer was responsible for the delay in the browser updates But even after waiting for some time the changes were still not reflected in the browser I then checked if I had used the correct selectors and scanned for any typographical errors in my code but everything seemed fine To troubleshoot further I changed the background colour property of the body element to red saved the changes and checked the browser again There was still no change I confirmed that the body tag was present by looking through the HTML document This left me puzzled I had correctly used the body tag as a selector in the CSS style sheet yet the browser did not reflect the styles What could be the problem I asked myself Was CSS experiencing downtime I pondered I realized the bug was not caused by a CSS downtime when to my surprise the background colour changed to blue when I changed the background colour property of the body tag to blue using inline CSS This piqued my interest I converted the CSS style from an inline to an internal style and this time I opted for a purple background colour Once again the background colour changed to purple Feeling frustrated I took a break from the project While resting I realized I had not checked if I linked my external CSS style sheet to the HTML document I quickly booted up my computer opened VS Code and inspected the HTML document To my surprise I discovered I did not link the CSS style sheet to the HTML document Eager to rectify my mistake I looked through my notebook for the syntax for linking a CSS style sheet to an HTML document I added the code to the HTML document saved it and eagerly checked my browser However the background colour remained purple instead of the expected red from the external style sheet I became confused for a moment and I almost resumed my break Then I realized I had forgotten to remove the internal CSS styles I had previously written Without hesitation I immediately removed the internal CSS from the HTML document The background colour of the webpage finally changed to red in the browser This moment was particularly fulfilling for me as it marked the resolution of my first bug without external help This experience taught me the importance of double checking if the code generated using VS Code Emmet or any other shorthand extensions produces the code I intended Here I used VS Code Emmet to generate the boilerplate code for the HTML document and mistakenly assumed that it also linked my CSS style sheet to the HTML document As a result verifying if the CSS style sheet is linked to the HTML document was not the first step I took leading to this oversight Inaccessible DOM elementsI was working on the FAQ section of a project from Frontend Mentor when I encountered another bug that puzzled me The JavaScript code responsible for the FAQ functionality seemed perfect but when I clicked on the button meant to expand the question panel to reveal the answer there was no response To troubleshoot this issue I carefully checked my code for typographical errors but I couldn t find any I also verified that the CSS selectors used to target the DOM elements in the JavaScript file matched those in the HTML markup To gain more insight I commented out the code within the event listener function and logged a message to the browser when the button is clicked However when I clicked the button and checked the browser console there was no message I tried isolating the problem by verifying if the other sections of the website were responding to interactivity After a quick examination it became apparent that the issue was specific to the FAQ section This discovery left me puzzled To be honest finding the solution to this bug was a coincidence As I carefully reviewed my HTML document I realized I had placed the script tag below other sections but above the FAQ section Remembering what I had consistently done in previous projects I moved the script tag to the bottom of the file just above the closing body tag and then saved the file I then restarted my live server On clicking the button after the page has loaded I found to my surprise the message logged to the console At first I thought the bug was from the live server extension I was using because it was only after the live server extension had been restarted did the message get logged to the console But then I remembered that I had also changed the location of the script tag In order to confirm where the bug originated from I moved the script tag back to its previous location and then I restarted the live server extension When I clicked on the button after the page has loaded there was no message logged to the console I then moved the script tag to the previous location where clicking on the button logged the message to the console but this time I did not restart the live server Upon clicking the button once again the message was now logged to the console That was when I realized that the position of the script tag on the HTML document caused the bug and not the live server extension By resolving this bug I gained valuable knowledge regarding the importance of script tag placement Script tags are typically positioned below all HTML elements within the body tag or in the head tag with the defer attribute if the order of execution is important or an async attribute if it isn t This ensures sequential page loading allowing the JavaScript code to access the fully created DOM elements The initial placement of the script tag before the FAQ section hindered my ability to interact with the DOM elements because the JavaScript file is loaded and executed before the FAQ section DOM elements are created Unexpected Behavior in Product Gallery NavigationI was working on the product gallery page for this project when I encountered unexpected behaviour in the gallery section In desktop view clicking on the main product image opens an overlay with a product gallery which was functioning as intended When the next button or previous button is clicked both the main image in the overlay gallery and the background gallery were supposed to change simultaneously This also worked as expected However I noticed that when I clicked on the next button and then clicked on the previous arrow the displayed image is the next image in the array instead of the previous image But subsequent clicks of the previous button exhibited the expected behaviour Similarly when I clicked on the previous button and then clicked on the next button the displayed image is the previous image in the array instead of the next image However subsequent clicks of the next button produced the expected behaviour You can see a preview of this behaviour below To fix this bug I followed my debugging routine First I checked for any typographical errors in the code but found none Then I examined the functions responsible for handling the behaviour when either the next arrow or previous arrow was clicked searching for any errors During this examination I noticed that both of the functions handle state updates So I decided to take a break and learn more about the useState hook in React I started by watching YouTube videos but I found that the information presented was already familiar to me Therefore I turned to Google and looked for articles specifically about the useState hook in React Personally I preferred articles when learning programming concepts when I can t find a good video tutorial to reading the official documentation I normally find official documentation to be less engaging clear or just written with an assumed minimum technical knowledge After reading a few articles and not discovering anything new or different from what I already knew about the useState hook I finally resorted to reading the official documentation While reading the useState hook section of the official React documentation I found the reason for the bug It turned out that I was setting a new value for the state while simultaneously trying to access that new value In both the showNextImage and the showPreviousImage functions I was updating two states simultaneously where the value of productHeroImage depended on obtaining the updated value of index to work properly The code snippet below taken from theProductImageCarousel jsx file highlights the issue import styles product image carousel css import arrowIcon from assets icon next svg import useAppContext from hooks useAppContext function ProductImageCarousel const setIndex index productImages productHeroImage setProductHeroImage useAppContext const showNextImage gt setIndex prevIndex gt prevIndex setProductHeroImage productImages index img const showPreviousImage gt setIndex prevIndex gt prevIndex setProductHeroImage productImages index img return lt div className hero image container gt lt div className carousel control container gt lt button onClick showPreviousImage gt lt img src arrowIcon alt className arrow prev gt lt button gt lt button onClick showNextImage gt lt img src arrowIcon alt className arrow next gt lt button gt lt div gt lt img src productHeroImage alt gt lt div gt export default ProductImageCarousel Based on my understanding of how the useState hook worked I thought that since the state would be updated before re rendering the setProductHeroImage state updater function would have access to the updated index value just before the re rendering occurred Subsequently it would update its own value causing a re render In this scenario react would re render twice because I changed the state in the function twice However upon reading the official React documentation I learned that React batches state updates and does not immediately re render when it encounters multiple state changes within a function Instead it runs all the code in the function call updates the state changes and then re renders the component and its children After improving my knowledge of how React handles state updates I removed the unnecessary productHeroImage state from the context of my app and instead I displayed the correct image by making sure that the image src is the same as the image path at the current value of index in the productImages array import styles product image carousel css import arrowIcon from assets icon next svg import useAppContext from hooks useAppContext function ProductImageCarousel const setIndex index productImages useAppContext return lt div className hero image container gt lt div className carousel control container gt lt button onClick gt setIndex prevIndex gt prevIndex gt lt img src arrowIcon alt className arrow prev gt lt button gt lt button onClick gt setIndex prevIndex gt prevIndex gt lt img src arrowIcon alt className arrow next gt lt button gt lt div gt lt img src productImages index img alt gt lt picture gt export default ProductImageCarousel The product gallery is now functioning as expected This experience taught me the significance of reading documentation I have learnt to accept the fact that although I enjoy learning new programming concepts via videos and articles they sometimes neglect or briefly explain important information that good documentation provides in detail I now always refer to documentation whenever I need further insights on any programming concept implementation The React docs in particular have captured my attention with their clarity and aesthetically pleasing design making them my go to resource ConclusionThe turning point in my learning journey came when I embraced bugs as learning opportunities instead of something to dread In this article I shared my experiences of encountering and fixing various bugs each contributing to my growth as a developer Now I see error messages as helpful guides that lead me to the source of my problem rather than signboards announcing that I am an imposter Having a change of mindset regarding bugs has made writing code more interesting the satisfaction of fixing each bug serves as a dopamine boost fueling my passion for development If you feel like an imposter when you encounter bugs don t be discouraged It s part of the learning process For every bug you fix your skills improve and your confidence is boosted As you continue on your coding journey remember that continuous learning and practice are essential components for your growth as a developer 2023-08-01 11:24:02
海外TECH DEV Community Building a serverless file manager https://dev.to/aws-builders/building-a-serverless-file-manager-1k01 Building a serverless file managerIn my previous post Serverless and event driven design thinking I used a fictitious service serverless file manager as example In the post we only scratched the surface around the design and building of said service In this post we will go a bit deeper in the design and actually build the service using an serverless and event driven architecture File manager service overviewThe service will store files in S and keep a record of all the files in a DynamoDB table each file belongs to a specific user We also need to keep track of each users total storage size The system overview would look like this with and API exposing functionality to the user and then carry out the work in a serverless and event driven way Required infrastructureTo start with we should create some of the common infrastructure components that are needed in this service We need an S bucket for storing files a custom Eventbridge event bus to act as event broker We will be using both a custom event bus and the default event bus More on that design further down On the S bucket we need to EventBridge notifications We will be using an ApiGateway HTTP API as the front door that clients will interact with EventBridge Type AWS Events EventBus Properties Name Sub Application eventbus FileBucket Type AWS S Bucket Properties BucketEncryption ServerSideEncryptionConfiguration ServerSideEncryptionByDefault SSEAlgorithm AES NotificationConfiguration EventBridgeConfiguration EventBridgeEnabled True BucketName Sub Application files HttpApi Type AWS Serverless HttpApi Properties DefinitionBody Fn Transform Name AWS Include Parameters Location api yaml Inventory table designThe design of the inventory DynamoDB table is fairly easy so let s just have a quick look at it I used a single table design where all different kind of data will live in the same table We need a record of a users all files and a users total storage We will be using a composite primary key consisting of a partition and sort key Since I opted in for a single table design I will name the partition key PK and the sort key SK That way I can store different data without being confused by the attribute name InventoryTable Type AWS DynamoDB Table Properties TableName Sub Application file inventory BillingMode PAY PER REQUEST AttributeDefinitions AttributeName PK AttributeType S AttributeName SK AttributeType S KeySchema AttributeName PK KeyType HASH AttributeName SK KeyType RANGEWhen data is stored PK will be username and SK will be the full file path in case of a file In case of the total storage the SK will have the static value Quota If you want to learn more about DynamoDB and single table design I would recommend The DynamoDB book by Alex DeBrie Cloud designAs I mentioned last time I normally use a simplified version of EventStorming when starting the design During that process four different flows was identified Put Create and Update Fetch List and Delete The Fetch and List flows will actually be synchronous request response design Put will contain both a synchronous request response and asynchronous event design and Delete will be a asynchronous event design In the event design we will be using both commands and events Let s now look at each of the flows and how to implement them Put Create and Update The put flow or create and update is initiated by a client calling the front door API The API will then create a pre signed S url that the client can use to upload the file This part is a classic request response model What is the reason for using pre signed S URL that the client upload to Why not just post the file directly over the API The primary reason is the Amazon API gateway payload quota The max payload size is mb and to support all kinds of files this will become a limitation The second reason would be that the backend logic can create a structure in S and organize files in the structure that is preferred When the client then uploads the file to S this will generate an event the part below the dashed line in the image this will invoke a StepFunction that will update the file inventory and also update the the users total storage We will dive deep into this StepFunction a bit further down We need to hook up an Lambda function to our API Gateway and implement our logic to pre sign the S url CreateFunction Type AWS Serverless Function Properties CodeUri Api Create Handler create handler Policies SCrudPolicy BucketName Ref FileBucket DynamoDBReadPolicy TableName Ref InventoryTable Environment Variables BUCKET Ref FileBucket Events Create Type HttpApi Properties Path files create Method post ApiId Ref HttpApiimport jsonimport botoimport osdef handler event context body json loads event body bucket os environ BUCKET if not body path endswith and len body path gt body path body path fullpath body user body path body name client boto client s response client generate presigned url put object Params Bucket bucket Key fullpath ExpiresIn return url response FetchNow let s look at the Fetch flow basically downloading a file This is implemented as request response as the client need the response with the file back It s not possible to do this in an event driven way Or it would be if you instead send the user a link by e mail to download the file That is a good approach if there need to be some form of processing done before downloading Once again the API will return a pre signed S url that the client can use to download the file A different approach to that would to use the new Lambda streaming response and just use a Lambda Function URL with CloudFront But now we use API Gateway so let s stick to the pre signed url pattern So let s create the Lambda Function and logic that will handle this flow FetchFunction Type AWS Serverless Function Properties CodeUri Api Fetch Handler fetch handler Policies SCrudPolicy BucketName Ref FileBucket Environment Variables BUCKET Ref FileBucket INVENTORY TABLE Ref InventoryTable Events Fetch Type HttpApi Properties Path files fetch Method post ApiId Ref HttpApiimport jsonimport botoimport osdef handler event context body json loads event body bucket os environ BUCKET if not body path endswith and len body path gt body path body path fullpath body user body path body name if check file exists body user fullpath client boto client s response client generate presigned url get object Params Bucket bucket Key fullpath ExpiresIn return url response else return status body File not found def check file exists user path table os environ INVENTORY TABLE dynamodb client boto client dynamodb response dynamodb client query TableName table KeyConditionExpression PK pk AND SK sk ExpressionAttributeValues pk S user sk S path return len response Items gt ListJust as the Fetch flow the List flow is also a classical request response for the same reason the client expect to get a list of files back We will query the file inventory to get the actual list and return it to the client So let s create infrastructure and logic that will handle this flow ListFunction Type AWS Serverless Function Properties CodeUri Api List Handler list handler Policies DynamoDBReadPolicy TableName Ref InventoryTable Environment Variables INVENTORY TABLE Ref InventoryTable Events Fetch Type HttpApi Properties Path files list Method post ApiId Ref HttpApiimport jsonimport botoimport osdef handler event context body json loads event body table os environ INVENTORY TABLE dynamodb client boto client dynamodb response dynamodb client query TableName table KeyConditionExpression PK user AND begins with SK filter ExpressionAttributeValues user S body user filter S f body user body filter file list for item in response Items file Path item Path S replace f body user Size item Size N Etag item Etag S file list append file return file list DeleteIn the delete flow we are starting to touch on a fully event driven flow In this flow the delete command will be directly added onto an EventBridge custom event bus we use the storage first pattern Directly after adding the command to the bus API Gateway will return a HTTP Status OK to the client All the work is then carried out in an asynchronous manner We create an Open API specification to setup the direct integration between ApiGateway and EventBridge When doing that we at the same time need to give ApiGateway permissions to call Eventbridge openapi info title File Management APIpaths files delete post responses default description Send delete command to EventBridge x amazon apigateway integration integrationSubtype EventBridge PutEvents credentials Fn GetAtt ApiRole Arn requestParameters Detail request body DetailType DeleteFile Source FileApi EventBusName Fn GetAtt EventBridge Name payloadFormatVersion type aws proxy connectionType INTERNETx amazon apigateway importexport version ApiRole Type AWS IAM Role Properties AssumeRolePolicyDocument Version Statement Effect Allow Principal Service apigateway amazonaws com Action sts AssumeRole Policies PolicyName ApiDirectWriteEventBridge PolicyDocument Version Statement Action events PutEvents Effect Allow Resource Sub arn aws events AWS Region AWS AccountId event bus EventBridge As shown in the flow chart let s use a StepFunction to delete the file from S By doing that we can actually delete the file without writing a single line of code instead we use the StepFunction built in support calling AWS services DeleteStateMachineStandard Type AWS Serverless StateMachine Properties DefinitionUri Events Delete StateMachine delete asl yaml Tracing Enabled true DefinitionSubstitutions InventoryTable Ref InventoryTable FileBucket Ref FileBucket Policies Statement Effect Allow Action logs Resource SCrudPolicy BucketName Ref FileBucket DynamoDBCrudPolicy TableName Ref InventoryTable Events Delete Type EventBridgeRule Properties EventBusName Ref EventBridge InputPath detail Pattern source FileApi detail type DeleteFileComment Delete FileStartAt Get Path LengthStates Get Path Length Type Pass Parameters user user path path name name length States ArrayLength States StringSplit path Next Does path need an update Does path need an update Type Choice Choices And Not Variable path StringMatches Variable length NumericGreaterThan Next Update Path Default Create Full Path Update Path Type Pass Parameters user user path States Format path name name Next Create Full Path Create Full Path Type Pass Parameters User user Path path Name name FullPath States Format user path name Next Find Item Find Item Type Task Next File Exists Parameters TableName InventoryTable KeyConditionExpression PK pk AND SK sk ExpressionAttributeValues pk S User sk S FullPath ResultPath ItemQueryResult Resource arn aws states aws sdk dynamodb query File Exists Type Choice Choices Variable ItemQueryResult Count NumericGreaterThan Comment Delete File Next DeleteObject Default File Not Found DeleteObject Type Task Parameters Bucket FileBucket Key FullPath Resource arn aws states aws sdk s deleteObject Next The End File Not Found Type Pass Next The End The End Type Pass End true Update inventoryThe update inventory StepFunction is invoked by the default event bus when files are added updated or deleted from S This functionality is responsible for keeping a correct inventory of all files and to keep track of how much storage space a user has allocated It will be run in an asynchronous and event driven way one thing to remember is that the inventory become eventually consistent So a list directly after a put might not return the newly added file As seen we use a choice state to determine either Put or Delete path in the flow and also if it s a new or updated file This way it s possible to isolate the logic to different flows making updating and debugging easier Throughout the entire flow I only use service or SDK integration and StepFunctions built in intrinsic functions Not a single Lambda function is used StepFunctions is a very powerful low code service Comment Update File InventoryStartAt OperationStates Operation Type Choice Choices Variable reason StringEquals PutObject Next Put Flow Comment PutObject Variable reason StringEquals DeleteObject Next Delete Flow Comment DeleteObject Default Unknown Operation Put Flow Type Pass Parameters User States ArrayGetItem States StringSplit object key Bucket bucket name Path object key Size object size Etag object etag Reason reason ResultPath Next Find Item Find Item Type Task Next What to do Parameters TableName InventoryTable KeyConditionExpression PK pk AND SK sk ExpressionAttributeValues pk S User sk S Path ResultPath ItemQueryResult Resource arn aws states aws sdk dynamodb query What to do Type Choice Choices And Variable ItemQueryResult Count NumericGreaterThan Not Variable Reason StringMatches DeleteObject Comment Update File Next Update Object Flow And Variable ItemQueryResult Count NumericLessThanEquals Not Variable Reason StringMatches DeleteObject Next New Object Flow Comment New File And Variable Reason StringMatches DeleteObject Variable ItemQueryResult Count NumericGreaterThan Next Delete Object Flow Comment Delete File Default Unknown Operation Delete Object Flow Type Pass Parameters User User Bucket Bucket Path Path Reason Reason DeletionType DeletionType Count ItemQueryResult Count OldItemSize ItemQueryResult Items Size N OldItemEtag ItemQueryResult Items Etag S OldItemUser ItemQueryResult Items User S OldItemPath ItemQueryResult Items Path S OldItemBucket ItemQueryResult Items Bucket S ResultPath Next Set Delete File Diff Set Delete File Diff Type Pass Parameters Size States Format OldItemSize ResultPath Diff Next Delete Item Delete Item Type Task Resource arn aws states dynamodb deleteItem Parameters TableName InventoryTable Key PK S User SK S Path ResultPath null Next Update User Quota Update Object Flow Type Pass Parameters User User Bucket Bucket Path Path Size Size Etag Etag Reason Reason Count ItemQueryResult Count OldItemSize ItemQueryResult Items Size N OldItemEtag ItemQueryResult Items Etag S OldItemUser ItemQueryResult Items User S OldItemPath ItemQueryResult Items Path S OldItemBucket ItemQueryResult Items Bucket S ResultPath Next Calculate Update File Diff Calculate Update File Diff Type Pass Parameters Size gt States MathAdd States StringToJson States Format Size States StringToJson States Format OldItemSize ResultPath Diff Next Update Item Update Item Type Task Resource arn aws states dynamodb updateItem Parameters TableName InventoryTable Key PK S User SK S Path UpdateExpression SET Size size Etag etag ExpressionAttributeValues size N States Format Size etag S Etag ResultPath null Next Update User Quota Update User Quota Type Task Resource arn aws states dynamodb updateItem ResultPath null Parameters TableName InventoryTable Key PK S User SK S Quota UpdateExpression ADD TotalSize size ExpressionAttributeValues size N States Format Diff Size End true Unknown Operation Type Pass Next The End Delete Flow Type Pass Parameters User States ArrayGetItem States StringSplit object key Bucket bucket name Path object key Reason reason DeletionType deletion type Next Find Item The End Type Pass End true New Object Flow Type Pass Next Set Add File Diff Set Add File Diff Type Pass Parameters Size Size ResultPath Diff Next Add New Item Add New Item Type Task Resource arn aws states dynamodb putItem Parameters TableName InventoryTable Item PK S User SK S Path User S User Path S Path Bucket S Bucket Size N States Format Size Etag S Etag ResultPath null Next Update User Quota Patterns and best practices usedIn the design I used a couple of common patterns let s take a look at them Event bus designSince we rely on events from S we must use the default event bus for that All AWS services send their events to the default bus We post our application specific events to an custom event bus When using EventBridge as your event broker this is best practice we leave the default bus to AWS service events and use one or more custom buses for our application events Storage firstAlways aim to use the storage first pattern This will ensure that data and messages are not lost You can read more about storage first in my post Serverless patterns CRUD patternThe CRUD pattern is primarily used in the Update Inventory StepFunction and by utilizing the powerful choice state we can route different operations down different paths This will give an easy to overview method handling it will also be so much easier to debug in case of a failure You can read more details in my previous blog Or you can watch James Beswick talk about building serverless espresso at re Invent Use JSONAlways create your commands and events in JSON Why JSON is widely supported by AWS services SQS SNS EventBridge can apply powerful logic based on JSON formatted data Don t use yaml Protobuf xml or any other format Final WordsThis was a quick walkthrough of the service used in my blog around Serverless and event driven design thinking You can get the entire source code from Github The source code for the entire setup is available in my GitHub repo Serverless File ManagerDon t forget to follow me on LinkedIn and Twitter for more content and read rest of my Blogs 2023-08-01 11:16:45
海外TECH DEV Community 🚀 9 open-source libraries YOU HAVE to contribute to in 2023 🔥 https://dev.to/github20k/9-open-source-libraries-you-have-to-contribute-to-in-2023-4071 open source libraries YOU HAVE to contribute to in Every week I discover more and more awesome libraries that s not getting enough attention It s time for everybody to know about them Do you want me to show your library Add it to GitHubk IdurarIDURAR is Open Source ERP CRM Invoice Inventory Accounting HR Ant design frameworkBuild with Mern stack Node js Express js MongoDb React jsRedux state managerCheck the library here FeaturevisorFeaturevisor is a solution for managing your feature flags experiments and remote config Comprehensive solution for handling feature flags experiments and remote configuration Git based workflow utilizing YAMLs for configuration storage and pull requests for seamless collaboration Generates datafiles JSON files to store feature configurations allowing easy access for applications Check the library here TwentyTwenty is an open source user focused CRM offering transparency extensibility and self hosted data management solutions Add filter sort edit and track customersCreate one or several opportunities for each companyRich notes and soon tasks that are displayed in a timelineNavigate quickly through the app using keyboard shortcuts and searchCheck the library here CirrusA component and utility centric SCSS framework designed for rapid prototyping Use beautiful pre built components to bootstrap your next project and utility classes to polish your final design Beautiful Components Beautifully designed components come right out of the box for rapid prototyping Sass First Forget bundling tons of JavaScript with each component All styles require no JS for interactions functionality see Modals Dropdowns etc Configuration at its Core Add additional components remove utility classes disable features etc Cirrus takes a generative approach to building your stylesheets Lightweight A large amount of features with a minimal footprint Responsive Fully responsive by design Vscode Extension Support Install it here Playground Try out whatever experiment you want with Cirrus here Check the library here FormbricksFormbricks is your go to solution for in product micro surveys that will supercharge your product experience Use micro surveys to target the right users at the right time without making surveys annoying Create in product surveys with our no code editor with multiple question typesChoose from a variety of best practice templatesLaunch and target your surveys to specific user groups without changing your application codeCreate shareable link surveysInvite your team members to collaborate on your surveysIntegrate Formbricks with Slack Posthog Zapier and moreAll open source transparent and self hostableCheck the library here NovuThe open source notification infrastructure for developersSingle API for all messaging providers In App Email SMS Push Chat Easily manage notifications over multiple channelsEquipped with a CMS for advanced layouts and design managementBuilt in protection for missing variables Coming Soon Easy to set up and integrateDebug and analyze multi channel messages in a single dashboardEmbeddable notification center with real time updatesCommunity drivenCheck the library here Apprise APIApprise allows you to send a notification to almost all of the most popular notification services available to us today such as Telegram Discord Slack Amazon SNS Gotify etc Take advantage of Apprise through your network with a user friendly API Send notifications to more than services An incredibly lightweight gateway to Apprise A production ready micro service at your disposal Apprise API was designed to easily fit into existing and new eco systems that are looking for a simple notification solution Check the library here PreevyPreevy is a powerful Command Line Interface CLI tool designed to simplify the process of creating ephemeral preview environments With Preevy you can easily provision a preview environment for any Docker Compose application in the cloud It supports various platforms including affordable VMs from AWS Lightsail Google Cloud and Microsoft Azure or any Kubernetes cluster Allow anyone to try your product revision on any device Designers can verify implementation independently minimizing interruptions Use external test agents against preview environments Preview environments for your team Share unique versions of your product for presentations examples or tests Check the library here AptabaseAptabase is an open source alternative to Firebase Analytics We have ultra lightweight SDKs for frameworks such as Swift React Native Electron Flutter Tauri and even game engines like Unreal Engine Extensive list of SDK Swift Flutter Electron Kotlin and many others Privacy First complying fully with GDPR CCPA and PECR regulations Built in and user friendly dashboard enabling you to gain insights effortlessly Check the library here Let s connect on Twitter See you next time 2023-08-01 11:01:18
Apple AppleInsider - Frontpage News TD Cowen raises AAPL target to $220 as iPhone demand in China, India grows https://appleinsider.com/articles/23/08/01/td-cowen-raises-aapl-target-to-220-as-iphone-demand-in-china-india-grows?utm_medium=rss TD Cowen raises AAPL target to as iPhone demand in China India growsTD Cowen has increased its price target for Apple to with iPhone shipments to emerging markets a bright spot in the upcoming Q financial results Apple is announcing its Q quarterly results on Thursday and continuing with analyst tradition TD Cowen has issued its own predictions for Apple s financial status In Tuesday s note seen by AppleInsider TD Cowen models Apple as reporting revenues that are down year on year which will be in line with Wall Street forecasts Like other analysts Cowen believes the September quarter will do better with a year on year increase of as a guide Read more 2023-08-01 12:00:11
Apple AppleInsider - Frontpage News Ingenious hack powers M1 Mac mini with Ethernet cable https://appleinsider.com/articles/23/08/01/ingenious-hack-powers-m1-mac-mini-with-ethernet-cable?utm_medium=rss Ingenious hack powers M Mac mini with Ethernet cableA hardware hacker has modified a Mac mini so that it doesn t necessarily need an AC power connection and instead can run on the Power over Ethernet protocol Mac mini hacked with Power over EthernetIvan Kuleshov on Twitter teased the project on Twitter over the weekend He has delved into more details since Read more 2023-08-01 11:42:04
Apple AppleInsider - Frontpage News Winners of the 2022 iPhone Photography Awards announced https://appleinsider.com/articles/23/08/01/winners-of-the-2022-iphone-photography-awards-announced?utm_medium=rss Winners of the iPhone Photography Awards announcedThe th annual iPhone Photography Awards contest has been won by an image of an exuberant boy shot on an iPhone Pro Detail from the grand prize winning photograph Heroe by Ivan SilvaAs it has since just about the launch of the original iPhone the iPhone Photography Awards IPPA have been celebrating the best in photographic imagery from around the world Photographers have to enter in specified categories but the only stipulation is that the images must be taken with some model of iPhone Read more 2023-08-01 11:16:49
Apple AppleInsider - Frontpage News LG Display gets iPhone 15 Pro OLED approval as Samsung sees shipments rise https://appleinsider.com/articles/23/08/01/lg-display-gets-iphone-15-pro-oled-approval-as-samsung-sees-shipments-rise?utm_medium=rss LG Display gets iPhone Pro OLED approval as Samsung sees shipments riseLG Display has finally received approval to produce OLED screens for the iPhone with rival Samsung expecting to benefit from higher shipments for iPhone ProEarlier in July LG Display reportedly had problems producing OLED panels for use in the iPhone Pro as well as issues with a new manufacturing process After seemingly resolving problems Apple is now willing to take shipments from LG Display once again Read more 2023-08-01 11:12:46
Apple AppleInsider - Frontpage News What analysts expect from Apple's Q3 2023 earnings report https://appleinsider.com/articles/23/07/30/what-analysts-expect-from-apples-q3-2023-earnings-report?utm_medium=rss What analysts expect from Apple x s Q earnings reportApple s third fiscal quarter results will be issued on August accompanied by the usual call with analysts Here s what to expect from the results and what Wall Street thinks of the iPhone maker Apple confirmed its quarterly results will be released on August back on July As is typical for the event it will be followed by a call hosted by CEO Tim Cook and CFO Luca Maestri with the results released at around PM ET and the call itself starting from PM ET Some Apple guidance Read more 2023-08-01 11:53:48
海外TECH Engadget The best Bluetooth trackers for 2023 https://www.engadget.com/best-bluetooth-tracker-140028377.html?src=rss The best Bluetooth trackers for If you ve ever been derailed from an on time departure by a set of lost keys or misplaced wallet you ll benefit from a Bluetooth tracker These small gadgets attach to your stuff and use your smartphone to keep tabs on where they are There aren t a ton of players in the field yet but we tested out some of the most popular options to find our top picks and help you decide which is the best Bluetooth tracker for you What to look for in a Bluetooth trackerBluetooth trackers are small discs or cards that rely on short range low energy wireless signals to communicate with your smartphone Attach one to your stuff and if it s in range your phone can “ring the chip so you can find it These tracking devices offer other features like separation alerts to tell you when you ve left a tagged item behind or where a lost item was last detected Some can even tap into a larger network of smartphones to track down your device when you re out of range Depending on what you want the tracker to do there are a few specs to look for when deciding which to get Device compatibilityLike most things from the folks in Cupertino AirTags only work with products in the Apple ecosystem The company has opened up access to its Find My network to third party manufacturers including Chipolo though Its One Spot and Card Spot finders work with Apple s large tracking network but only pair with Apple devices Chipolo s classic trackers will work with either Android or Apple devices as will Tile trackers Finding networkCrowd sourced finding capabilities are what make headlines with stories about recovering stolen equipment or tracking lost luggage across the globe Using anonymous signals that ping other people s devices these Bluetooth tracking devices can potentially tell you where a tagged item is even if your smartphone is out of Bluetooth range Apple s Find My network is by far the largest with over a billion iPhones in service all running Apple s Find My app by default So unless an iPhone user opts out their phone silently acts as a location detector for any nearby AirTags While Android phones outnumber iPhones globally they don t have a similar unified network yet During this year s I O conference Google announced upcoming upgrades to its Find My Device network starting with better anti stalking measures some of which it recently debuted The complete roll out of the FindMy rivaling network has been delayed until the end of this year We know of a few trackers that will take advantage of the new system and once they re available we ll test them out and update this guide In the meantime Tile offers the second largest finding grid with every smartphone that runs the Tile app acting as incognito locators After Life acquired Tile the million users of that app were added to the million existing Tile users creating a sizable network In our tests AirTags offered nearly real time location data and were quickest to find items abandoned in spots around Albuquerque including a bar bookstore and coffee shop in Nob Hill along with various outdoor hangouts on UNM s campus Bluetooth tracking Tiles were able to locate our lost items most of the time though not with the same pin point accuracy as AirTags Chipolo s Spot trackers operate on the same Find My network and perform on par with the AirTags Chipolo s classic trackers on the other hand don t have much of a crowd sourced network to speak of Yet as we used the trackers the size of the finding network started to feel less important in the face of typical everyday use cases It was their ability to out perform in every other way that boosted Chipolo s classic trackers to the top of our list Amy Skorheim EngadgetSeparation alertsHere s where a tracker s day to day utility really shines A separation alert lets you know when you ve traveled too far from your tagged items which is useful if you want to make sure your laptop bag or jacket or umbrella always comes with you when you leave the house These notifications work when you re out and about too If you ve got a tracker in your wallet and walk out of a restaurant without it the separation alert should kick in resulting in fewer lost items This feature also tells you where your tagged item and phone were last paired allowing you to retrace your steps if you happen to miss the alert Each tracker handles left behind items differently Both AirTags and Chipolo include the feature by default Tile trackers require a yearly subscription to enable the alerts currently per year Both AirTags and Tiles allow you to turn off separation alerts at certain locations meaning you can set your home as a “safe place where items can be left behind but alerts will still trigger elsewhere Chipolo doesn t offer safe locations but you can toggle out of range alerts on a per item basis In our tests the Chipolo sent an alert after we got between and feet away from our tagged item AirTags alerted us between the and foot mark And Tiles sent a notification after about an average of feet Tile notifications were not consistent on an iPhone but worked well when operating with an Android phone Connectivity volume and designThe feature you may use most often is the simple “find my keys function If you have your phone but no idea where your tagged keys are you can tap a button in the tracker s app to make the tracker ring Tile and Chipolo classic trackers will also let you double click the device itself to make your phone ring but AirTags and Chipolos running on the Find My app don t offer this feature The volume of the tracker may determine whether you can find an item buried in your couch cushions or in a noisy room AirTags have a reputation for being on the quiet side and that aligned with what we saw measuring roughly decibels Chipolo s keychain style tags both the Apple only version and the device agnostic version and the Tile Slim wallet tracker were the loudest measuring between and decibels Design will determine what you can attach the tracker to AirTags are small smooth discs that have no way of securing to anything without accessories which are numerous but that is an additional cost to consider Both Chipolo and Tile offer trackers with holes that easily attach to your key ring and both companies also offer card shaped versions designed to fit in your wallet Batteries are replaceable for AirTags Chipolo One and Tile Pro Tile Mate and all card shaped trackers don t have replaceable batteries which means you ll have to replace the entire unit whenever it dies Pebblebee trackers are rechargeable We re currently testing them and will update this guide to share how they stack up Stalking and stealingAirTags have recently gotten a lot of attention for bad actors planting them on people in order to stalk them While this fact may not influence your buying decision any discussion of Bluetooth trackers should note what steps Apple Google and Tile have taken to address the issue If an AirTag is detected moving with you and apart from its owner the device will ring to alert you of its presence Whether you have an iPhone or an Android phone as long as you have location services and Bluetooth turned on you ll automatically get an alert with no further steps required Tile offers a similar feature through its standard app and it doesn t require a Tile account to search for suspicious nearby trackers Recently Tile launched a feature called Anti Theft Mode which enables you to render one of its trackers undetectable by others That means if someone steals your tagged item they won t be able to use the anti stalking features to find its precise location and disable the tracker Of course that potentially makes a Tile easier to use as a stalking device so in order to enable the feature you have to verify your ID and agree to a million penalty for misuse In general a Bluetooth tracker may or may not be the best option for combating theft Anecdotal stories abound in which people have recovered stolen goods using a tracker ーbut other tales are more cautionary Apple still doesn t promote its trackers or finding networks as a way to deal with theft GPS trackers on the other hand are typically marketed for just that purpose How we testedBefore deciding on which trackers to test we researched the field looking at user reviews on Amazon Best Buy and other retailers along with discussions on sites like Reddit We also checked out what other publications had to say on the matter before narrowing down our picks to Apple AirTag Tile and Chipolo trackers Here s the full list of every tracker we tested Apple AirTagTile MateTile ProTile SlimChipolo Card SpotChipolo One SpotChipolo OneChipolo CardAfter acquiring the trackers I tested each one over the course of a few weeks using both an iPhone and a Samsung Galaxy S Ultra I recreated likely user experiences such as losing and leaving items behind at home and out in the city I planted trackers at different spots near downtown Albuquerque mostly concentrated in and around the University of New Mexico and the surrounding neighborhood of Nob Hill Each test was performed multiple times both while walking and driving and I used the measure distance feature on Google Maps to track footage for alerts I paid attention to how easy the app was to use how reliable the phone to tracker connection was and any other perks and drawbacks that came up during regular use Best Overall Chipolo OneHands on testing is great at smashing assumptions and that s what happened with the Chipolo One This tracker s crowd sourced finding network cannot compare with Apple s AirTag or Tile In fact when I left the Chipolo for hours just outside the busy student union at UNM I was never alerted that a member of the Chipolo community had detected my item But as I used it and pictured how most people would use a tracker on a daily basis the device proved its worth and earned its spot on my keyring The One is a small and colorful plastic disc with a hole It works with both Apple and Android devices and requires an app which is simple to use and easily pairs new trackers The app and tracking experience on an iPhone and a Galaxy phone were nearly identical working equally well on both platforms It rang the loudest of all the trackers so lost items were quickly found around the house Unlike other trackers there was never a delay between pressing the Ring to Find button and hearing the trill The ring delay for AirTag was never more than a few seconds and Tiles would generally connect and ring after no more than ten seconds While that s not a deal breaking delay it could add to the stress of rushing out the door Where the Chipolo One truly set itself apart was with its separation alerts I would only get a half to two blocks away or an average of feet before getting an alert asking if I d forgotten an item Neither AirTag nor Tile ever beat Chipolo to the punch The alerts were consistent whether I was forgetting an item at home at a coffee shop or inside my car As far as losing stuff out in the wild it will get you back to the spot where your phone and tracker were last paired That means if you miss an alert or don t have them turned on Chipolo will give you directions via your maps app and take you right to where you left your item In one test I had a friend hide the tracker nearby when I wasn t looking I left the area and returned hours later using the last location information to lead me within a few feet of the tracker s precise location Ringing the tracker then made it easy to find Of course if someone walks off with your tracked item the Chipolo will be harder pressed to help you out If you re concerned about lost luggage when you travel or if you worry you may lose things on trains or buses this isn t the tracker for you because of its much smaller finding network But if you re looking for a dead simple way to find your keys and make sure your jacket leaves the bar when you do the Chipolo One is hard to beat Best for iPhones AirTagAirTags work with iOS Find My app so they don t require any additional downloads If you ve used the Find My app before you ll likely understand how this works These are the quietest of the trackers we tested and each time you press the Play Sound button the tags only ring for seven seconds You ll need to keep pressing if you don t find your item right away and AirTags can t be used to ring your phone As for separation alerts AirTags were consistent always delivering a “left behind alert when I traveled about feet away or about three square blocks without an item You can turn off separation alerts for any given tracker as well as designate certain locations such as your home or workplace as exceptions for the notifications One feature that AirTags have that no other tag offers is the ability to tap into the ultra wideband UWB wireless protocol This allows you to play a fun game of hot and cold with an item when it s within about feet of your iPhone Directional arrows and a diminishing distance meter on your iPhone s screen point you to an item without having to ring it This worked reliably about percent of the time in my tests sometimes it was just easier to ring the item when the directional finding couldn t keep a lock on the tracker UWB is supported by iPhone models and later and while newer Galaxy and Pixel phones also support UWB no Android compatible tracker has yet been released In Tile announced one that would but has since missed its promised release window of “early AirTag s ability to locate a lost item out in the city is almost eerie I had someone who was not carrying an iPhone take my bike with a tracker hidden under the seat to a location a little over a half mile away I set out a few minutes later and toggled on Notify When Found in the Find My app Within three minutes I received a notification that the bike had been “seen near an address Tapping on Directions navigates to Apple Maps which took me to a spot about feet from the bike Had it been obscured from view I could have then used the Find Nearby button to activate the UWB locating features Ringing the tag was too quiet to hear on the sidewalk If you want the same scary precise community finding features but with a louder ring and a hole in the tracker the Chipolo One Spot is a solid option It doesn t offer UWB capabilities however and the separation alerts are the same as with AirTags letting you get feet away before a ping versus an average of feet with our top rec Chipolo One classic Best for Android Tile ProTile will work with either Android or Apple devices but the experience is much better on Android Certain connectivity issues and a lack of alerts that plagued the iPhone experience did not show up in tests with the Galaxy phone One caveat to note is that Tile requires a subscription to enable separation alerts Tile Premium goes for per month or per year and includes location history and item reimbursement of up to on items that you register with the company they ll also send out a fresh battery once a year Tile stands out as the only tracker company offering reimbursement ーeven without a subscription they ll pay out up to for items that you register with them The Tile Pro is a key fob shaped device with a metal keychain hole that feels sturdy The Pro s ring was just a few decibels quieter than the Tile Mate versus decibels but the connectivity range was better with the Pro and it was more accurate in finder network tests On top of that this is the only current Tile device with a replaceable battery which lasts about one year For the lost item tests I had a friend take the Pro to random locations After turning on the Notify When Found feature an alert would arrive between five and ten minutes later saying my lost item was “found by the community The map details were typically accurate within about feet or so though it occasionally thought the Tile was at a business next door to where it actually was Without the UWB feature precision finding of an item was trickier In one test the tracker ended up in a noisy pub While the directions pointed me to the right location it would have been difficult to find the item if I hadn t spotted my friend as the ring function was useless among the din Best wallet tracker Tile SlimThe Tile Slim is louder than both the Pro and the Mate and nearly equals the loudest tracker we tested the Chipolo One It works with both Android and Apple devices and its thick credit card shape fits in the slots of a typical wallet though it often won t connect when inside an RFID blocking wallet The separation alerts you ll get if you pay for a Tile subscription activate at about the same distance as the Tile Pro letting you get around feet away before pinging you about a left behind item When using an iPhone with Tile trackers separation alerts rarely came and connectivity between the phone and tracker was spotty at best even in close proximity If you use an iPhone the Chipolo Card Spot is equally loud runs on Apple s vast Find My network and consistently gives you a left behind alert at around feet This article originally appeared on Engadget at 2023-08-01 11:46:00
海外TECH Engadget Google is looking to 'supercharge' Assistant with AI https://www.engadget.com/google-is-looking-to-supercharge-assistant-with-ai-113516175.html?src=rss Google is looking to x supercharge x Assistant with AIThe ongoing race to expand generative AI technology is reaching digital assistants ーone of many people s first introductions to an AI companion Such is the case with Google which is working on a revamp for its Assistant that will include generative AI powered technology according in an internal email obtained by Axios nbsp Google Assistant s vice president Peeyush Ranjan and product director Duke Dukellis explained their rationale to staffers stating quot As a team we need to focus on delivering high quality critical product experiences for our users We ve also seen the profound potential of generative AI to transform people s lives and see a huge opportunity to explore what a supercharged Assistant powered by the latest LLM technology would look like quot Notably the email revealed that Google is already working on doing this for mobile devices There s no timeline set for when Google will integrate this technology into its smart home devices or for that matter exactly what these new updates will look like The company might utilize Bard its AI chatbot to converse with Assistant users or try something completely original Whatever Google employees are working on it s causing some internal reconfiguration such as combining the Surfaces and Services teams into one The company is also letting go of a quot small quot number of employees but didn t disclose the exact amount This article originally appeared on Engadget at 2023-08-01 11:35:16
海外TECH Engadget The Morning After: Water-soluble circuit boards could have a huge impact on e-waste https://www.engadget.com/the-morning-after-water-soluble-circuit-boards-could-have-a-huge-impact-on-e-waste-111536730.html?src=rss The Morning After Water soluble circuit boards could have a huge impact on e wasteGerman semiconductor maker Infineon Technologies announced it s making printed circuit boards PCBs that dissolve in water Sourced from UK startup Jiva Materials the plant based Soluboard could provide a new way for the tech industry to reduce electronic waste Jiva s biodegradable PCB is made of natural fibers and a halogen free polymer with a much lower carbon footprint A team at the University of Washington College of Engineering and Microsoft Research created a mouse using a Soluboard PCB as its core The researchers found the Soluboard dissolved in hot water in under six minutes The process also makes retrieving the valuable metals attached to it easier “After it dissolves we re left with the chips and circuit traces which we can filter out said UW assistant professor Vikram Iyer who worked on the mouse project It s early days for the technology And maybe I m a Debby downer and clumsy but it could increase the drama of me spilling coffee on my laptop Mat Smith​​You can get these reports delivered daily direct to your inbox Subscribe right here ​​The biggest stories you might have missedThe best eco friendly phone cases for Mazda stops selling its only EV in the US This free plugin uses AI to generate music samples from text promptsUber safety driver involved in fatal self driving car crash pleads guiltyAmazon s Amp tries to reinvent radio as an appOver a year since launching invite only it goes mainstream EngadgetLast spring Amazon launched its live audio streaming platform Amp The pitch was reinventing radio with “an infinite dial of shows With no need to buy songs or flirt with the DMCA users could make a playlist go live talk between tracks follow the chat and even invite callers It s finally available on Android Unlike Clubhouse which enjoyed an early surge of popularity Amp has largely gone under the radar since launch “The thing we re maniacally focused on every day is making sure that the product is right before stepping out in bigger and bigger fashion said Amp co founder Matt Sandler Can it grow Continue reading BitDo launches a Nintendo inspired mechanical keyboardThe device offers customizable switches and layouts bitdoBitDo announced a new mechanical keyboard inspired by Nintendo s NES and Famicom consoles from the s The Retro Mechanical Keyboard works in wired wireless modes supports custom key mapping and includes two giant red buttons because why not Pre orders are open now with the accessory costing and should begin shipping on August th Continue reading Elon Musk s X Corp sues anti hate group over its researchIt accused the Center for Countering Digital Hate of a scare campaign X Corp aka Twitter has filed a lawsuit against the Center for Countering Digital Hate CCDH It claimed the anti hate group is illegally quot scraping quot its servers and cherry picking hateful posts as part of quot a scare campaign to drive away advertisers quot according to documents filed in San Francisco federal court The Center published a research article in June asserting X allowed explicitly racist and homophobic posts despite policies to the contrary even after they d been reported However X responded that the CCDH used poor methodology and failed to study all million posts on the service each day Continue reading This article originally appeared on Engadget at 2023-08-01 11:15:36
Cisco Cisco Blog How to Make the Best Out of A Day for Me at Cisco https://feedpress.me/link/23532/16277939/how-to-make-the-best-out-of-a-day-for-me-at-cisco How to Make the Best Out of A Day for Me at CiscoRuffina shares tips for making the most of Cisco s Day for Me a day off each quarter for all employees to unwind and recharge and a highlight of her internship experience 2023-08-01 12:00:01
医療系 医療介護 CBnews 「地域共生社会」実現に制度の垣根を超えた支援を-23年版厚労白書 持続可能な医療・介護の実現も https://www.cbnews.jp/news/entry/20230801201608 共生社会 2023-08-01 20:34:00
ニュース BBC News - Home Voyager 2: Nasa loses contact with record-breaking probe after sending wrong command https://www.bbc.co.uk/news/world-66371569?at_medium=RSS&at_campaign=KARANGA agency 2023-08-01 11:26:13
ニュース BBC News - Home Watch: Snake invades Sri Lanka cricket match https://www.bbc.co.uk/news/world-asia-66373467?at_medium=RSS&at_campaign=KARANGA colombo 2023-08-01 11:09:43
ニュース BBC News - Home Portugal 0-0 USA: World champions USA scrape into last 16 https://www.bbc.co.uk/sport/football/66369075?at_medium=RSS&at_campaign=KARANGA Portugal USA World champions USA scrape into last Defending champions the USA miss out on finishing top of Group E thanks to an uninspiring draw against debutants Portugal at the Women s World Cup 2023-08-01 11:04:35
ニュース BBC News - Home The Ashes 2023: Brendon McCullum praises England's 'refined' style https://www.bbc.co.uk/sport/cricket/66370732?at_medium=RSS&at_campaign=KARANGA The Ashes Brendon McCullum praises England x s x refined x styleEngland coach Brendon McCullum reiterates his wish for his side to stick to their attacking style after the drawn Ashes 2023-08-01 11:02:13
ニュース Newsweek プーチンの巨大な肖像写真を飾る、金正恩...「2人の独裁者」の「急接近」が意味することとは? https://www.newsweekjapan.jp/stories/world/2023/08/2-508.php 【写真】壁にびっしり、プーチン大統領の巨大写真【写真】プーチンが小顔すぎなのか横並びの金正恩とプーチン北朝鮮が金日成、金正日父子の肖像画や巨大な銅像を掲げて個人崇拝していることは有名だが、他国の首脳の巨大な写真を複数の部屋に大量に掲げることは珍しい。 2023-08-01 20:11:58

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

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

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