投稿時間:2022-10-11 20:33:09 RSSフィード2022-10-11 20:00 分まとめ(37件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia News] 任天堂、“公序良俗に反する利用”にコメント VTuberの「AVスプラ」動画受けてか https://www.itmedia.co.jp/news/articles/2210/11/news176.html itmedia 2022-10-11 19:30:00
python Pythonタグが付けられた新着投稿 - Qiita 【AtCoder】RE,MLEが出た時の対処法(灰色コーダー向け)【競技プログラミング】 https://qiita.com/sano192/items/2da11eaeeeea3daab944 atcoder 2022-10-11 19:39:30
python Pythonタグが付けられた新着投稿 - Qiita AtCoder緑になりました https://qiita.com/gakusei_programmer/items/146728aaa229475c4826 atcoder 2022-10-11 19:20:58
js JavaScriptタグが付けられた新着投稿 - Qiita What is Custom Software Development? https://qiita.com/decipherzone/items/9fd77bc5b0b8f2cc64ab developers 2022-10-11 19:21:38
AWS AWSタグが付けられた新着投稿 - Qiita CodeBuild時にGradleのバージョンが古くて失敗する https://qiita.com/keiji-ueno/items/6cea024c18ea69f0fb20 containerrunning 2022-10-11 19:36:44
Docker dockerタグが付けられた新着投稿 - Qiita docker compose 初心者によるハンズオン形式備忘録 https://qiita.com/hitoshi44/items/da84bb91766d403e99cd dockercompose 2022-10-11 19:27:40
Docker dockerタグが付けられた新着投稿 - Qiita Docker httpdイメージで.htaccessを有効にする https://qiita.com/uniuni__8282/items/c1bd24e4489b1091cada docker 2022-10-11 19:17:37
golang Goタグが付けられた新着投稿 - Qiita docker compose 初心者によるハンズオン形式備忘録 https://qiita.com/hitoshi44/items/da84bb91766d403e99cd dockercompose 2022-10-11 19:27:40
海外TECH MakeUseOf How to Set Up Your New Android Phone https://www.makeuseof.com/tag/new-android-phone-setup/ doesn 2022-10-11 10:20:14
海外TECH MakeUseOf The 10 Best Workout Apps to Get in Shape https://www.makeuseof.com/tag/best-workout-apps/ plans 2022-10-11 10:16:14
海外TECH MakeUseOf 7 Things to Consider Before Using a Crypto Exchange https://www.makeuseof.com/things-to-consider-before-using-a-crypto-exchange/ doesn 2022-10-11 10:16:14
海外TECH MakeUseOf What Is Pixel Pass and Is It the Best Way to Buy a Pixel 7? https://www.makeuseof.com/what-is-pixel-pass-and-is-it-worth-getting/ What Is Pixel Pass and Is It the Best Way to Buy a Pixel Pixel Pass bundles Google s latest Pixel phone and a host of services into a single subscription But is it the cheapest way to buy your new phone 2022-10-11 10:11:14
海外TECH DEV Community AWS re:Invent 2022: Know Before You Go https://dev.to/aws-heroes/aws-reinvent-2022-know-before-you-go-gh6 AWS re Invent Know Before You GoThere are just a few months until AWS re Invent so it s time to start planning your time booking your schedule and thinking about making community connections I ve put together a list of five tips and the sessions I m looking forward to I hope you find them helpful too Build your scheduleSeating reservations open on October th at am PDT That s am here in New Zealand so it s going to be an early morning for me Spend some time looking through the session catalogue and pick your favourites from the options If you re after some suggestions check out the attendee guides to get you started If you don t manage to lock in a spot keep in mind there will be room for walk up attendees and overflow rooms with silent disco style headphones Don t forget you can catch the breakout sessions on YouTube after the event and keep up with the conversation on Twitter Plan your travelsThis year sessions will be all across The Strip at the Encore Wynn The Venetian Caesars Forum MGM Grand and Mandalay Bay To get around the campus you can use the campus shuttle that will be serving venues more than a minute walk apart This is a great way to get where you need to be and maybe start a conversation with someone along the way In addition to the campus shuttle don t forget to use the monorail to avoid traffic and if you re planning on walking make sure you bring comfortable shoes and check how long your journey will be Those hotels may look close but they can be quite some distance away Mix it upThe session catalogue is full of different options to keep you learning all week But not all sessions are created equal Breakout sessions are minute lectures for beginners at the level right up to advanced topics at the level If you re looking for something more hands on try a workshop builders session or lab Here are some of the sessions I m looking forward to Advice from an ex FBI agent who took down Silk Road and Anonymous PRTThis session features Chris Tarbell one of the most successful cybersecurity law enforcement officials of all time He has extensive expertise in cybersecurity and computer forensics Tarbell shares the adrenaline pumping tale of how he infiltrated and took down two notorious cyber criminals on the dark web networks Anonymous and Silk Road A day in the life of a cloud empowered aerodynamics engineer CMPImagine yourself as an aerodynamics engineer who uses computational fluid dynamics CFD to design new cars and planes and you want the fastest turnaround times while retaining accuracy This interactive chalk talk walks through techniques for optimizing complex workflows by combining AWS capabilities with optimization tricks to reduce simulation time for popular CFD codes such as OpenFOAM and Siemens Simcenter STAR CCM Boost productivity and avoid becoming overwhelmed INOIn this workshop practice how to use emotional intelligence techniques such as self awareness and self management to understand hidden rules that are impacting your ability to find balance Build your vision for success and learn about the techniques used to help more than Amazonians supercharge their productivity Get to the ExpoTake some time between sessions to visit the Expo hall to meet AWS experts vendors partners and maybe even an AWS Hero at the Community Developer Lounge This year the Expo is also home to the AWS Builders Fair This is a fun interactive way to learn about real world applications of AWS services Discover how projects were built by talking to the experts who built them and learn how to implement their ideas in your own projects Community Connectionsre Invent is a great opportunity to learn all you can about the latest in technology and hear about new features But it s just as important to make connections with the community and thousands of cloud enthusiasts and AWS experts You can meet new people at restaurant receptions bingo nights World Cup viewings and re Play the coolest party in tech where you can end the week on a high note Look after yourselfIt may only be a few days but re Invent will be full of learning walking early starts and late finishes Schedule time for exploring The Strip making connections and taking a break to escape the crowds when you need to It s going to be a great week I hope to see you there Read more Ways to maximize AWS re invent as an ABW Grantee Olumuyiwa Kolayemi for AWS Community Builders・Oct ・ min read beginners aws community Can t miss Security Sessions at re Invent Chris Farris for AWS Community Builders・Oct ・ min read aws cloudsecurity AWS APAC Community Summit Wrap up Helen Anderson for AWS Heroes・Sep ・ min read aws techtalks community AWS concepts from A to Z Helen Anderson・Dec ・ min read beginners aws architect 2022-10-11 10:46:48
海外TECH DEV Community Python-tweepy: automating a follow back task using windows scheduler https://dev.to/wachuka_james/python-tweepy-automating-a-follow-back-task-using-windows-scheduler-4fm0 Python tweepy automating a follow back task using windows schedulerThe Twitter API is a set of programmatic endpoints that can be used to understand or build a Twitter conversation This API allows you to search for and retrieve interact with or create a variety of resources including Tweets Users Spaces Live Messages Lists Trending Media Locations Some twitter API endpointsGET tweets id quote tweets Returns Quote Tweets for a Tweet specified by the requested Tweet ID POST users id retweets Causes the user ID identified in the path parameter to Retweet the target Tweet DELETE users id retweets source tweet idAllows a user or authenticated user ID to remove the Retweet of a Tweet GET tweets sample streamStreams about of all Tweets in real time POST users id followingAllows a user ID to follow another user If the target user does not have public Tweets this endpoint will send a follow request Things you can do with twitter API You can perform various operations related to retrieving displaying sorting and filtering data in Twitter For example you can Create an app that gives users access to specific types of TweetsBuild a website where users can only see and read tweets from specific locations Start a personal project to explore the sentiment of your own tweets Curate specific Tweets to create stories and narratives on your site for any purpose Show trends or show users her engagement with one of her branded hashtags TweepyTweepy is a Python package that seamlessly and transparently accesses Twitter developer endpoints Without Tweepy the user would have to deal with various low level details about her HTTP requests rate limiting authentication serialization etc Tweepy handles all this mess for you making your application error prone Simply put Tweepy is an open source her Python package that gives developers the ability to communicate with her Twitter API For this task the methods used are supported by tweepy Creating a twitter app with read and write permissionsGo to app settings gt user authentication settings gt app permissions and enable read writeUnder type of app enable public client then provide callback url and website urlNew keys will be generated Connecting to the twitter APIimport tweepydef twitter api input your twitter API credentials consumer key consumer secret access token access token secret authentication of consumer key and secret auth tweepy OAuthHandler consumer key consumer secret authentication of access token and secret auth set access token access token access token secret api tweepy API auth wait on rate limit True return apiCreate a followback task in pythonimport get twitter apiimport pandas as pdapi get twitter api twitter api friends api friends ids api me id followers api followers ids api me id function to followback your friendsdef follow back to follow print retrieving twitter information print People you follow n len friends print Your Followers n len followers for follower in followers if follower not in friends to follow append follower api create friendship follower print You have followed len to follow More follow back Scheduling the task in using windows task schedulercreate a bat file that will activate the environment and run the python script batch file to run python tweepy cron script every five minutes program will first activate venv then run python scriptC data eng python tweepy Scripts activate bat amp amp python C data eng python tweepy app pyTo add a task to windows scheduler go to start gt task scheduler gt create a folder mytask gt create task tweepy follow back gt trigger repeat after mins gt action start program schedule follow back bat full code is available on 2022-10-11 10:13:34
海外TECH DEV Community Building THE MOST practical Todolist with React and Websockets 🪄✨ https://dev.to/novu/building-the-most-practical-todolist-with-react-and-websockets-18hd Building THE MOST practical Todolist with React and Websockets 🪄 What is this article about In this article you ll learn how to build a team to do list with React js and Socket io Users can create read and delete to dos and add comments to each to do via Socket io You ll also learn how to add notifications to the application when you create or delete a to do item Novu the first open source notification infrastructureJust a quick background about us Novu is the first open source notification infrastructure We basically help to manage all the product notifications It can be In App the bell icon like you have in the Dev Community Websockets Emails SMSs and so on I would be super happy if you could give us a star It will help me to make more articles every week We will also send some awesome swag during Hacktoberfest What is Socket io Socket io is a popular JavaScript library that allows us to create real time bi directional communication between web browsers and a Node js server It is a highly performant and reliable library designed to process a large volume of data with minimal delay It follows the WebSocket protocol and provides better functionalities such as fallback to HTTP long polling or automatic reconnection which enables us to build efficient real time applications How to create a real time connection with React amp Socket ioHere we ll set up the project environment for the to do list application You ll also learn how to add Socket io to a React and Node js application and connect both development servers for real time communication via Socket io Create the project folder containing two sub folders named client and server mkdir todo listcd todo listmkdir client serverNavigate into the client folder via your terminal and create a new React js project cd clientnpx create react app Install Socket io client API and React Router  React Router is a JavaScript library that enables us to navigate between pages in a React application npm install socket io client react router domDelete the redundant files such as the logo and the test files from the React app and update the App js file to display Hello World as below function App return lt div gt lt p gt Hello World lt p gt lt div gt export default App Navigate into the server folder and create a package json file cd server amp npm init yInstall Express js CORS Nodemon and Socket io Server API Express js is a fast minimalist framework that provides several features for building web applications in Node js  CORS is a Node js package that allows communication between different domains Nodemon is a Node js tool that automatically restarts the server after detecting file changes and Socket io allows us to configure a real time connection on the server npm install express cors nodemon socket ioCreate an index js file the entry point to the web server touch index jsSet up a simple Node js server using Express js The code snippet below returns a JSON object when you visit the http localhost api in your browser index jsconst express require express const app express const PORT app use express urlencoded extended true app use express json app get api req res gt res json message Hello world app listen PORT gt console log Server listening on PORT Import the HTTP and the CORS library to allow data transfer between the client and the server domains const express require express const app express const PORT app use express urlencoded extended true app use express json New importsconst http require http Server app const cors require cors app use cors app get api req res gt res json message Hello world http listen PORT gt console log Server listening on PORT Next add Socket io to the project to create a real time connection Before the app get block copy the code below New imports const socketIO require socket io http cors origin http localhost Add this before the app get blocksocketIO on connection socket gt console log socket id user just connected socket on disconnect gt socket disconnect console log A user disconnected From the code snippet above the socket io connection  function establishes a connection with the React app then creates a unique ID for each socket and logs the ID to the console whenever a user visits the web page When you refresh or close the web page the socket fires the disconnect event showing that a user has disconnected from the socket Configure Nodemon by adding the start command to the list of scripts in the package json file The code snippet below starts the server using Nodemon In server package json scripts test echo Error no test specified amp amp exit start nodemon index js You can now run the server with Nodemon by using the command below npm start Building the user interfaceHere we ll create the user interface for the to do list application Users will be able to sign in add and delete a to do and add comments to every to do Navigate into the client src folder and create a components folder containing a Home js and Main js file cd clientmkdir componentscd componentstouch Home js Main jsUpdate the App js file to render the newly created components on different routes via React Router import React from react import socketIO from socket io client import BrowserRouter Routes Route from react router dom import Main from components Main import Home from components Home const socket socketIO connect http localhost const App gt return lt BrowserRouter gt lt Routes gt lt Route path element lt Home gt gt lt Route path app element lt Main socket socket gt gt lt Routes gt lt BrowserRouter gt export default App Navigate into the src index css file and copy the code below It contains all the CSS required for styling this project import url Grotesk wght amp display swap box sizing border box margin padding font family Space Grotesk sans serif navbar width height vh background color d display flex align items center justify content space between padding px color dffff form width min height vh display flex align items center justify content center padding px input padding px px width margin right px form cta home form gt button width px cursor pointer padding px height px font size px background color d color dffff border none outline none border radius px todo container width display flex align items center flex direction column min height px todo item display flex align items center width padding px background color ddd margin px justify content space between color d deleteBtn padding px px background color rgb border none outline none color fff cursor pointer deleteBtn hover color rgb background color fff commentsBtn padding px px margin right px outline none cursor pointer border none background color fff commentsBtn hover background color ddd border px solid modal min height vh width position fixed top background color fff display flex align items center justify content center modal container width background color fff min height vh padding px border radius px border px solid modal container gt h margin bottom px comment form display flex margin bottom px align items center comment form gt input padding px border px solid d width margin right px comment margin bottom px comment form gt button padding px px cursor pointer background color d color fff outline none border none height px home width min height vh display flex flex direction column align items center justify content center home form width display flex flex direction column align items center home form gt margin bottom px home gt h margin bottom px The Home pageHere the application accepts the username and saves it in the local storage for user identification Copy the code below into the Home component import React useState from react import useNavigate from react router dom const Home gt const username setUsername useState const navigate useNavigate const handleSubmit e gt e preventDefault localStorage setItem username username Navigates to the application navigate app return lt div className home gt lt h gt Sign in to your todo list lt h gt lt form onSubmit handleSubmit className home form gt lt label htmlFor username gt Your Username lt label gt lt input value username required onChange e gt setUsername e target value className input gt lt button gt SIGN IN lt button gt lt form gt lt div gt export default Home The Main componentHere we ll build the user interface for the central part of the application Copy the code snippet below into the Main js file import React useState from react import Nav from Nav function Main socket const todo setTodo useState Generates a random string as the todo ID const generateID gt Math random toString substring const handleAddTodo e gt e preventDefault Every todo has this structure id todo amp comments console log id generateID todo comments setTodo return lt div gt lt Nav gt lt form className form onSubmit handleAddTodo gt lt input value todo onChange e gt setTodo e target value className input required gt lt button className form cta gt ADD TODO lt button gt lt form gt lt div className todo container gt lt div className todo item gt lt p gt Contributing to open source lt p gt lt div gt lt button className commentsBtn gt View Comments lt button gt lt button className deleteBtn gt DELETE lt button gt lt div gt lt div gt lt div className todo item gt lt p gt Coffee chat with the team lt p gt lt div gt lt button className commentsBtn gt View Comments lt button gt lt button className deleteBtn gt DELETE lt button gt lt div gt lt div gt lt div className todo item gt lt p gt Work on my side projects lt p gt lt div gt lt button className commentsBtn gt View Comments lt button gt lt button className deleteBtn gt DELETE lt button gt lt div gt lt div gt lt div gt lt div gt export default Main The code snippet above represents the user interface that enables users to create a to do view comments and delete existing to dos The Nav component is the navigation bar for the application later in this tutorial we ll send notifications with Novu within this component Create the Nav component and copy the code below into it Within src components Nav jsimport React from react const Nav gt return lt nav className navbar gt lt h gt Todo List lt h gt lt nav gt export default Nav Congratulations We ve created the user interface for the application In the upcoming sections you ll learn how to send real time data with Socket io and notifications with Novu How to create a new to doIn this section I ll guide you through creating new to dos and display them on the React app with Socket io Update the handleAddTodo function within the Main js file to send the new to do to the server via Socket io const handleAddTodo e gt e preventDefault Sends a event addTodo via Socket io containing the id todo and the comments array socket emit addTodo id generateID todo comments setTodo Create a listener to the event on the server socketIO on connection socket gt console log socket id user just connected socket on addTodo todo gt todo contains the object from the React app console log todo socket on disconnect gt socket disconnect console log A user disconnected Create an array on the backend server that holds all the to dos and add the new to do to the list Array containing all the to doslet todoList socketIO on connection socket gt console log socket id user just connected socket on addTodo todo gt Adds the to do object to the list of to dos todoList unshift todo Sends all the to dos to the React app socket emit todos todoList socket on disconnect gt socket disconnect console log A user disconnected Create a listener for the to dos on the React app via the useEffect hook Copy the code below In src components Main jsuseEffect gt socket on todos data gt console log data socket Display the to dos as below import React useState useEffect from react import Nav from Nav function Main socket const todo setTodo useState const todoList setTodoList useState const generateID gt Math random toString substring const handleAddTodo e gt e preventDefault socket emit addTodo id generateID todo comments setTodo useEffect gt socket on todos data gt setTodoList data socket return lt div gt lt Nav gt lt form className form onSubmit handleAddTodo gt lt input value todo onChange e gt setTodo e target value className input required gt lt button className form cta gt ADD TODO lt button gt lt form gt lt div className todo container gt todoList map item gt lt div className todo item key item id gt lt p gt item todo lt p gt lt div gt lt button className commentsBtn gt View Comments lt button gt lt button className deleteBtn gt DELETE lt button gt lt div gt lt div gt lt div gt lt div gt export default Main So far we can only view the existing to dos when we add one Next let s make it possible for us to display the to dos when we load the page Create a route on the server that returns the to do list app get api req res gt res json todoList Update the useEffect hook to fetch the to do list from the server and listen when for new to dos useEffect gt function fetchTodos fetch http localhost api then res gt res json then data gt setTodoList data catch err gt console error err fetchTodos socket on todos data gt setTodoList data socket Congratulations we can now add new to dos to the to do list How to delete existing to dosAdd an onClick event to the delete button that gets the ID of the selected to do lt button className deleteBtn onClick gt deleteTodo item id gt DELETE lt button gt Create the deleteTodo function and send the to do s ID to the server via Socket io const deleteTodo id gt socket emit deleteTodo id Create a listener for the deleteTodo event that removes the to do via its ID from the to do list Array containing all the to doslet todoList socketIO on connection socket gt console log socket id user just connected socket on addTodo todo gt todoList unshift todo socket emit todos todoList Filters the array of to dos and sends the updated to do to the React app socket on deleteTodo id gt todoList todoList filter todo gt todo id id Sends the updated to do to the React app socket emit todos todoList socket on disconnect gt socket disconnect console log A user disconnected You can now add and delete each to do via Socket io Next you ll learn how to add and display comments for each to do How to display and add comments for each to doIn this section I ll guide you through adding comments to each to do and you ll also learn how to create Modals in React Creating a modal in React jsCreate a Modal js file that will contain the comments for each to do as below import React useState from react const Modal socket gt const comment setComment useState const addComment e gt e preventDefault console log comment setComment return lt div className modal gt lt div className modal container gt lt h gt Comments lt h gt lt form className comment form onSubmit addComment gt lt input className comment input type text value comment onChange e gt setComment e target value required gt lt button gt Add Comment lt button gt lt form gt lt div className comments container gt lt div className comment gt lt p gt lt strong gt Nevo lt strong gt Hello guys lt p gt lt div gt lt div gt lt div gt lt div gt export default Modal To make this component display as a Modal we need to give it some styling as done below within the src index css file especially the position and z index property modal min height vh width position fixed z index top background color fff display flex align items center justify content center Next let s toggle the Modal js component when we click on the View Comment button within the Main js file import React useState useEffect from react import Nav from Nav import Modal from Modal function Main socket const todo setTodo useState const todoList setTodoList useState const showModal setShowModal useState false const toggleModal gt setShowModal showModal other functions return lt div gt lt div className todo container gt todoList map item gt lt div className todo item key item id gt lt p gt item todo lt p gt lt div gt This button toggles the Modal component lt button className commentsBtn onClick toggleModal gt View Comments lt button gt lt button className deleteBtn onClick gt deleteTodo item id gt DELETE lt button gt lt div gt lt div gt lt div gt The Modal replaces the Main component showModal lt Modal showModal showModal setShowModal setShowModal gt lt div gt export default Main Since we ve been able to display the Modal when we click on the View Button next let s toggle the Modal when we click outside the comments container Update the Modal js file as below import React useState useRef from react const Modal socket showModal setShowModal gt const comment setComment useState const modalRef useRef If the container modalRef is clicked it closes the modal const closeModal e gt if modalRef current e target setShowModal showModal const addComment e gt e preventDefault console log comment setComment return lt div className modal onClick closeModal ref modalRef gt lt div gt Congratulations You ve learnt how to add Modals to a React application Hence let s make it possible to users to add and display comments Displaying the to do commentsUpdate the toggleModal function within the Main js file to send the ID of the selected to do to the server const toggleModal todoId gt socket emit viewComments todoId setShowModal showModal Create a listener on the server that accepts the to do ID fetches its details and sends it back to the React app socket on viewComments id gt for let i i lt todoList length i if id todoList i id sends the todo details back to the React app for display socket emit commentsReceived todoList i Create a listener for the commentsReceived event within the Modal js file useEffect gt socket on commentsReceived todo gt console log todo socket Render the comments by copying the below import React useEffect useRef useState from react const Modal showModal setShowModal socket gt const modalRef useRef const comment setComment useState const comments setComments useState const closeModal e gt if modalRef current e target setShowModal showModal const addComment e gt e preventDefault console log comment setComment Listens for the todo details from the server useEffect gt socket on commentsReceived todo gt setComments todo comments socket return lt div className modal onClick closeModal ref modalRef gt lt div className modal container gt lt h gt Comments lt h gt lt form className comment form onSubmit addComment gt lt input className comment input type text value comment onChange e gt setComment e target value required gt lt button gt Add Comment lt button gt lt form gt Displays the comments lt div className comments container gt comments length gt comments map item index gt lt div className comment key index gt lt p gt lt strong gt item name lt strong gt item text lt p gt lt div gt lt p gt No comments available yet lt p gt lt div gt lt div gt lt div gt export default Modal Adding Comments to to dosCreate a state within the Main js that holds the ID of the selected to do Pass the state to the Modal js component const toggleModal itemId gt socket emit viewComments itemId Pass this ID into the Modal component setSelectedItemID itemId setShowModal showModal Update the addComment function within the Modal js file to send the comment details to the server const addComment e gt e preventDefault socket emit updateComment todoID selectedItemID The ID passed from the Main js file comment user localStorage getItem username setComment Create a listener for the addComment event on the server that adds the comment to the to do s comments socket on updateComment data gt Destructure the items from the object const user todoID comment data for let i i lt todoList length i Gets the todo if todoID todoList i id Add the comment to the list of comments todoList i comments push name user text comment Sends an update to React app socket emit commentsReceived todoList i Congratulations We can now add comments to each to do and display them on the React app EXTRA Sending notifications with NovuIf you want to add notifications to the application when a user adds a comment or a new to do you can do that easily with Novu within the Nav js component Novu allows you to add various notification types such as email SMS and in app notifications How to add Novu to a React and Node js applicationTo add the in app notification install the Novu Node js SDK on the server and the Notification Center in the React app Install on the clientnpm install novu notification centerInstall on the servernpm install novu nodeCreate a Novu project by running the code below A personalised dashboard is available to you Install on the clientnpx novu initYou will need to sign in with Github before creating a Novu project The code snippet below contains the steps you should follow after running npx novu initNow let s setup your account and send your first notificationWhat is your application name Devto CloneNow lets setup your environment How would you like to proceed gt Create a free cloud account Recommended Create your account with gt Sign in with GitHubI accept the Terms and Condidtions and have read the Privacy Policy gt Yes️Create your account successfully We ve created a demo web page for you to see novu notifications in action Visit http localhost demo to continueVisit the demo web page http localhost demo copy your subscriber ID from the page and click the Skip Tutorial button We ll be using it later in this tutorial Update the components Nav jsfile to contain Novu and its required elements for in app notifications from the documentation import React from react import NovuProvider PopoverNotificationCenter NotificationBell from novu notification center import useNavigate from react router dom const Nav gt const navigate useNavigate const onNotificationClick notification gt navigate notification cta data url return lt nav className navbar gt lt h gt Todo List lt h gt lt div gt lt NovuProvider subscriberId lt YOUR SUBSCRIBER ID applicationIdentifier lt YOUR APP ID gt gt lt PopoverNotificationCenter onNotificationClick onNotificationClick colorScheme light gt unseenCount gt lt NotificationBell unseenCount unseenCount gt lt PopoverNotificationCenter gt lt NovuProvider gt lt div gt lt nav gt export default Nav The code snippet above adds Novu notification bell icon to the Nav component enabling us to view all the notifications from the application The NovuProvider component requires your Subscriber ID copied earlier from http localhost demoand your application ID available in the Settings section under API Keys on the Novu Manage Platform Next let s create the workflow for the application which describes the features you want to add to the application Select Notification from the Development sidebar and create a notification template Select the newly created template click on Workflow Editor and ensure the workflow is as below From the image above Novu triggers the Digest engine before sending the in app notification Novu Digest allows us to control how we want to send notifications within the application It collects multiple trigger events and sends them as a single message The image above sends notifications every minutes and it can be effective when you have many users and frequent updates Click the In Appstep and edit the notification template to contain the content below userId added a new to do Novu allows you to add dynamic content or data to the templates using the Handlebars templating engine The data for the username variable will be inserted into the template as a payload from the request Save the template by clicking Update button and head back to your code editor Adding Novu to the applicationImport Novu from the package and create an instance using your API Key on the server server index jsconst Novu require novu node const novu new Novu lt YOUR API KEY gt Create a function that sends the notification via Novu to the React app const sendNotification async template id gt try const result await novu trigger template id to subscriberId lt SUBSCRIBER ID gt console log result catch err console error Error gt gt gt gt err socket on addTodo todo gt todoList unshift todo socket emit todos todoList Triggers the notification via Novu sendNotification lt TEMPLATE ID gt The code snippet above sends a notification to all users when a new to do is added to the application Congratulation you have finished building the Todolist ConclusionSo far you ve learnt how to set up Socket io in a React and Node js application and communicate between a server and a client via Socket io This is a demo of what you can build using Socket io and React Feel free to improve the application by adding authentication a real time database and notifications via Novu when a user drops a comment The source code for this tutorial is available here P S Novu is sending awesome swag on Hacktoberfest Come and participate Happy if you can support us by giving us a star ️ 2022-10-11 10:07:02
Apple AppleInsider - Frontpage News Australian union calls for Apple Store strike over pay and benefits https://appleinsider.com/articles/22/10/11/australian-union-calls-for-apple-store-strike-over-pay-and-benefits?utm_medium=rss Australian union calls for Apple Store strike over pay and benefitsAround workers across multiple Apple Store sites in Australia are expected to go on strike for one hour on October as talks with Apple appear to halt Apple Charlestown is one of three stores expected to see industrial actionFollowing pressure from workers unions and then Australia s Fair Work Commission Apple agreed to negotiate with local unions in September While both sides agreed to extend the negotiation time that period ended without a resolution Read more 2022-10-11 10:57:28
海外TECH Engadget Anker's October Prime Day deals bring charging accessories down to new record lows https://www.engadget.com/anker-october-prime-day-deals-104512014.html?src=rss Anker x s October Prime Day deals bring charging accessories down to new record lowsAnker is selling quite a robust selection of products at a discount for Amazon s Prime Early Access Sale and some of the deals even represent new all time lows for the items If you need to make sure your devices don t ever run out of battery the Anker Power Bank is currently on sale for or less than its retail price The model has a mAh battery capacity and has two USB C as well as one USB A charging ports Anker says it carries enough juice to charge an iPhone for almost five times though that number would probably be lower if you have an iPhone nbsp Buy Anker GAN chargers and accessories at Amazon up to percent offNeed a portable wireless battery for your iPhone instead The black variant of the Anker Magnetic Battery MagGo is currently on sale for That s off and the lowest we ve seen for the wireless charger on the website The device has a small kickstand attachment and since it sticks to your iPhone while charging it also doubles as a phone stand This one s a bit smaller than the Power Bank and has a mAh battery capacity with a W USB C power delivery port for fast charging times The white and blue versions are also on sale but they cost a bit more at If you re traveling or just simply need a power strip with an abundance of ports and outlets you can get Anker s Charging Station for or percent off its usual price That s the lowest we ve seen for the power strip which has a maximum output of W The Charging Station has two USB C ports two USB A ports and two AC outlets and it comes with a five foot detachable cord nbsp In case you need cords to be able to connect your iPhones and iPads to a USB C charger you can also grab a bunch from the sale A pack bundle of Anker s Powerline II USB C to Lightning Cable will set you back or lower than usual The cables come in different lengths ーthree feet six feet and feet ーand had been tested to withstand up to bends nbsp There are a lot more Anker items on sale at the moment but they are exclusive to Prime members If you re a new user or haven t been a Prime subscriber over the past months though you can sign up for a day free trial Get the latest Amazon Prime Day offers by following EngadgetDeals on Twitter and subscribing to the Engadget Deals newsletter 2022-10-11 10:45:12
海外TECH Engadget Audio-Technica's ATH-M20xBT headphones drop to $59 for Prime Day https://www.engadget.com/audio-technicas-ath-m-20-xbt-wireless-headphones-prime-day-good-deal-102536028.html?src=rss Audio Technica x s ATH MxBT headphones drop to for Prime DayThere are Prime Day deals flying around for just about everything under the sun well as long as it s on Amazon If you re on the lookout for a solid deal on budget friendly headphones in particular consider Audio Technica s ATH MxBT Sure the name might not easily roll off the tongue but they were already solid value before they dropped to an all time low price for Prime Day You can now pick up a set for which is off the regular price Buy Audio Technica ATH MxBT at Amazon These are our favorite budget wireless headphones on the market right now They have physical controls and Bluetooth multipoint connectivity which enables you to link them to more than one device simultaneously say a laptop and a phone There s also a wired connection option The headphones have mm drivers designed to bolster low frequency performance A low latency mode should help to make sure audio and video are synced which could prove useful for gaming You ll get up to hours of battery life on a single charge so given that they re pretty comfortable you might end up wearing them all day If you need to you can top up the battery with up to three hours of listening time after just minutes of charging On the downside there s no active noise cancellation You won t be able to fold these up either If you can live with those tradeoffs though it s certainly worth considering the MxBT as a budget conscious set of headphones for yourself or even as a stocking stuffer for someone else Get the latest Amazon Prime Day offers by following EngadgetDeals on Twitter and subscribing to the Engadget Deals newsletter 2022-10-11 10:25:36
海外TECH WIRED 25 Best Prime Day Laptop, Phone, TV, and Tech Deals (2022): Prime Early Access Sale https://www.wired.com/story/best-amazon-prime-day-laptop-tv-phones-tech-deals-2022/ access 2022-10-11 10:15:39
医療系 医療介護 CBnews エバシェルド、かかりつけ以外の患者にも投与を-厚労省が呼び掛け https://www.cbnews.jp/news/entry/20221011193302 医療機関 2022-10-11 19:40:00
医療系 医療介護 CBnews 第二次健康日本21、目標達成8項目-53項目中、4項目は「悪化」 https://www.cbnews.jp/news/entry/20221011185640 健康寿命 2022-10-11 19:15:00
金融 金融庁ホームページ 入札公告等を更新しました。 https://www.fsa.go.jp/choutatu/choutatu_j/nyusatu_menu.html 公告 2022-10-11 11:00:00
ニュース BBC News - Home Bank of England in fresh emergency move to calm markets https://www.bbc.co.uk/news/business-63211743?at_medium=RSS&at_campaign=KARANGA bonds 2022-10-11 10:48:42
ニュース BBC News - Home People not looking for work due to illness hits record high https://www.bbc.co.uk/news/business-63204333?at_medium=RSS&at_campaign=KARANGA labour 2022-10-11 10:13:47
ニュース BBC News - Home War in Ukraine: No sign Russia considering nuclear weapons - GCHQ https://www.bbc.co.uk/news/uk-63207771?at_medium=RSS&at_campaign=KARANGA agency 2022-10-11 10:21:12
ニュース BBC News - Home Jamie Oliver calls for free school meal extension https://www.bbc.co.uk/news/education-63214021?at_medium=RSS&at_campaign=KARANGA meals 2022-10-11 10:38:50
ニュース BBC News - Home Care-worker shortage: Woman appalled by lack of support for dying mum https://www.bbc.co.uk/news/uk-63177547?at_medium=RSS&at_campaign=KARANGA shortage 2022-10-11 10:01:23
北海道 北海道新聞 総合型選抜入試、104校に 国公立大、過去最多 https://www.hokkaido-np.co.jp/article/743723/ 国公立大 2022-10-11 19:28:00
北海道 北海道新聞 節電家庭に最大5千円相当還元 ポイント制度、追加付与も https://www.hokkaido-np.co.jp/article/743720/ 経済産業省 2022-10-11 19:20:00
北海道 北海道新聞 びっくりドンキーの木製メニュー、一部店舗で廃止 タブレットでの注文に切り替え https://www.hokkaido-np.co.jp/article/743675/ 一部店舗 2022-10-11 19:15:15
北海道 北海道新聞 日韓局長、徴用工問題を協議 資金拠出と謝罪求める https://www.hokkaido-np.co.jp/article/743716/ 徴用工問題 2022-10-11 19:17:00
北海道 北海道新聞 市政課題のアンケート結果、リアルタイムで公表 札幌市が全国初の試み https://www.hokkaido-np.co.jp/article/743715/ 交流サイト 2022-10-11 19:15:00
北海道 北海道新聞 伝統70キロ遠足歩き通す 弟子屈高 地域協力で3年ぶり完全実施 https://www.hokkaido-np.co.jp/article/743712/ 高校 2022-10-11 19:14:00
北海道 北海道新聞 北見の上下水道料金、値上げ見送り 来年度 市長、物価高など考慮 https://www.hokkaido-np.co.jp/article/743705/ 上下水道 2022-10-11 19:03:00
IT 週刊アスキー 上手に焼けました~!『ソニックフロンティア』で「モンスターハンター」コラボが決定 https://weekly.ascii.jp/elem/000/004/108/4108546/ nintendo 2022-10-11 19:50:00
IT 週刊アスキー サンワサプライ、USB Type-AポートとType-Cポート搭載の電源タップ「TAP-B101UC-2W」「TAP-B102UC-2W」を発売 https://weekly.ascii.jp/elem/000/004/108/4108528/ tapbucw 2022-10-11 19:40:00
IT 週刊アスキー ウイングアーク1st、「invoiceAgent」と「intra-mart」が連携。電子帳簿保存法、インボイス制度に対応 https://weekly.ascii.jp/elem/000/004/108/4108521/ 提供開始 2022-10-11 19:20:00

コメント

このブログの人気の投稿

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

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

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