投稿時間:2022-11-24 21:27:33 RSSフィード2022-11-24 21:00 分まとめ(33件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT InfoQ How We Can Use Data to Improve System Quality https://www.infoq.com/news/2022/11/data-improve-system-quality/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global How We Can Use Data to Improve System QualityTo understand how systems are being used we can collect metrics and identify trends over time The data and insights gained can be used to improve system quality by improving software design or testing patterns By Ben Linders 2022-11-24 11:35:00
IT ITmedia 総合記事一覧 [ITmedia News] 「Stable Diffusion 2.0」リリース 高品質化、アダルト排除、解像度アップ、奥行推定など機能追加 https://www.itmedia.co.jp/news/articles/2211/24/news174.html itmedia 2022-11-24 20:10:00
python Pythonタグが付けられた新着投稿 - Qiita Django新しいアプリケーションの作成方法 https://qiita.com/ysk-s/items/52b5c3747d3c10391ec5 django 2022-11-24 20:44:14
python Pythonタグが付けられた新着投稿 - Qiita Python で計算する準備 足し算・引き算・掛け算・割り算・分数・累乗 https://qiita.com/akiba_burari/items/5bb4c083b30768a33aa1 足し算 2022-11-24 20:03:33
python Pythonタグが付けられた新着投稿 - Qiita GitHub API ✖️Flaskを使ったアプリ完成までの道のり https://qiita.com/sasao-genmaicha/items/7cefab40fbd14ecf5688 flask 2022-11-24 20:03:13
js JavaScriptタグが付けられた新着投稿 - Qiita 今日のアウトゥフィトゥを教えてくるobniz温度計を作成 https://qiita.com/winniexedge/items/69b8db626d2aa4bd544a obniz 2022-11-24 20:32:03
js JavaScriptタグが付けられた新着投稿 - Qiita はじめての投稿 https://qiita.com/gwoong/items/434aff673af2ef74d8e7 react 2022-11-24 20:19:32
AWS AWSタグが付けられた新着投稿 - Qiita AWS クラウドプラクティショナー学習記録 https://qiita.com/ChihiroHozono/items/25e9b9d1f950c5346436 記録 2022-11-24 20:55:35
AWS AWSタグが付けられた新着投稿 - Qiita [小ネタ]CDKで作成するAWSリソースに共通タグを付与する方法 https://qiita.com/namasa/items/54d60d3fb815fbe814b8 金額 2022-11-24 20:19:38
Docker dockerタグが付けられた新着投稿 - Qiita 【OWASP Juice Shop】環境構築方法 https://qiita.com/security_person10/items/8dad0f2047e8bb85a8b3 owaspjuice 2022-11-24 20:33:21
技術ブログ Mercari Engineering Blog 「Mercari Advent Calendar 2022」開催のお知らせ https://engineering.mercari.com/blog/entry/20221124-mercari-advent-calendar-2022/ hellip 2022-11-24 11:30:55
技術ブログ Mercari Engineering Blog 「Merpay Advent Calendar 2022」開催のお知らせ https://engineering.mercari.com/blog/entry/20221124-merpay-advent-calendar-2022/ hellip 2022-11-24 11:30:36
技術ブログ Developers.IO Slackハドルのタイトルを任意に変える(トピックの変更) https://dev.classmethod.jp/articles/slack-huddle-change-topic/ slack 2022-11-24 11:23:13
海外TECH MakeUseOf The 7 Best Power Banks for Steam Deck https://www.makeuseof.com/best-power-banks-steam-deck/ steam 2022-11-24 11:01:15
海外TECH DEV Community Building an In-App Bell Notification in React using Novu https://dev.to/documatic/building-in-app-bell-notification-in-react-using-novu-325o Building an In App Bell Notification in React using NovuCover image by storyset on Freepik IntroductionPush notifications are not seen as good practice They distract you want your attention or sometimes they are too frequent But In app notifications are more useful and can update you about the application Novu is an open source notification management tool They provide Email SMS Push and In App notification Email and SMS notifications are dependent on providers They have providers such as Sendinblue for email and Twilio for SMS There are other providers too So today we are going to use the In App notification feature of Novu to setup the following Creating a trigger in Novu DashboardBuilding Bell Icon using Notification CenterInitiating trigger in Node using ExpressLet s get started PrequisitiseSince its a web application project I hope you know the following Web Development with HTML CSS and JavaScriptBasic ReactAs for the tools we need to have these tools pre installed Node It provides you with a JavaScript runtime environment It will help install dependencies and run scripts Creating account and Setting up Novu DahboardVisit novu co and click on GET STARTED to create a Novu account After creating the account the Novu dashboard will open From the Notifications panel Click on New to create a notification template From Create new template Enter the Notification Name Select Workflow Editor to add an In App notification Drag and drop the In App steps from Steps to add to the Workflow editor Now Click on the In App step from the Workflow Editor to open its properties in the right panel Click on Edit Template from that menu to add message content to the notification Add your message and you can also add a button to the notification After adding the message content and URL Click on Create to create the notification A message will be pop up with code to initialize the trigger A trigger in Novu is a function that will start the sending of notifications Click on Got it to proceed Now its time to write some code Bell Icon in ReactThe project is going to have a frontend in React In the frontend we will build our bell icon and its feature using the notification center of Novu The trigger for initializing the notification has to be in Node That s why we are going to use ExpressJS for our node server For exchanging data we are going to use the API Now let s create the project Install a React project with the below command in the terminal npx create react app novu inappRemove the unnecessary file and code We are going to need the following dependencies on our frontend notificaiton center This is by Novu to manage the In App notification I will also provide us with the UI for the bell and notification panel axios This will be helpful in making request to our Node server in Express You can install all the above dependencies with the below command npm i novu notification center axios App jsIn App js we are going to build our UI and make a request to our backend server for initializing the notification Here is the code import App css import useState from react import NovuBell from component NovuBell import axios from axios function App const status setStatus useState status of passed failed notificaiton const sendNotification async gt await axios post http localhost subscriberId process env REACT APP SUBSCRIBER ID then res gt setStatus res status return lt div className App gt lt div className NavBar gt lt h gt Notificaiton by Novu lt h gt lt NovuBell subscriberId process env REACT APP SUBSCRIBER ID gt lt div gt lt button onClick sendNotification gt Send Notification lt button gt status amp amp lt h gt Notification Sent lt h gt status amp amp lt h gt Notification couldn t sent lt h gt lt div gt export default App As you can see we are having a Send Notification button This will call the sendNotificaiton function This function will make a call to our server with the subscriberId A subscriberId is a unique string Novu is using it to identify the receiver of the notification In a database it can be the userId that you can fetch and pass as the parameter We have implemented this as our environment for our application You shouldn t do that I am doing this for testing purposes only envAs the environment variable we are going to need Novu API and application identifier You can get it from your Novu Dashboard Navigate to Setting gt API keys Create a env file in the root directory to add the API key and application identifier Along with this we are also going to add the subscriberId This can be any random unique string REACT APP NOVU API lt API KEY gt REACT APP NOVU IDENTIFIER lt APPLICATION IDENTIFIER gt REACT APP SUBSCRIBER ID lt SUBSCRIBER ID gt Notification ComponentNow it s time to create our bell notification Create a component folder in the src folder Within it creates a file with the name NovuBell jsHere is the code for the notification bell import NovuProvider PopoverNotificationCenter NotificationBell from novu notification center function NovuBell return lt NovuProvider subscriberId process env REACT APP SUBSCRIBER ID applicationIdentifier process env REACT APP NOVU IDENTIFIER gt lt PopoverNotificationCenter gt unseenCount gt lt NotificationBell unseenCount unseenCount gt lt PopoverNotificationCenter gt lt NovuProvider gt export default NovuBell server jsNow it s time to create our server In the root directory create a file with the name server js We are going to need the following dependencies for our node server express It s a framework to create our backend novu node It is a library for accessing the feature of novu in node We are going to use this for initializing the notification cors For handling cors related errors dotenv For accessing the environment variable in our node server You can install all the above dependencies with the below command npm i express cors dotenvHere is the code for the server js const Novu require novu node const express require express const cors require cors require dotenv config const app express const novu new Novu process env REACT APP NOVU API app use cors app use express json extended false app post async req res gt try const status await novu trigger bell notification to subscriberId req body subscriberId payload res send status catch err console log err const PORT process env PORT app listen PORT gt console log Server started at PORT In the try catch block we are initiating the bell notification template It is being initiated by novu trigger In to we are sending the subscriberId of the receiver You can pass more data such as name in the payload We are sending back the status of the call such as and to our frontend On this status basis we are going the decide whether the notification is successfully sent or not Testing the ApplicaitonRun the server with the below command node server jsIt should print Server started at in the console Run the React with the below command npm run startIt will run the React at http localhost It should look like this Now if you click on the Send Notificaiton button a notification will be sent As our fronted will receive the notification The bell icon will change to show the notification Click on the bell icon to access the notification ConclusionWe have built the notification bell using the Novu You can add a button to this notification to redirect the user once they click on it You might encounter a few warnings in the console while running React It is caused by the novu notification center library I tried to solve it but couldn t find any solution If you find something do mention it in the comment Novu can provide you with many interesting features of notification You can read the Notification Center for React Component from their docs for adding more features to the existing project I hope this guide has provided you with useful information about Novu and its In App notification Thanks for reading the blog post 2022-11-24 11:30:00
海外TECH DEV Community Build Your Own PHP Framework Step By Step - Part 1 https://dev.to/robbiecahill/build-your-own-php-framework-step-by-step-part-1-k32 Build Your Own PHP Framework Step By Step Part In this guide we ll go over how you how you can build your own PHP framework with alot less code than you might be expecting You don t need an advanced understanding of PHP although it will help The code is fairly uncomplicated and simple to understand so this guide should be suitable for most experience levels Back in the old days PHP had no frameworks The code was clunky and had no strucutre Application and model code was mixed in with the views The code for the first version of Facebook which has since been leaked to the web was like this If you search the web you d probably able to find a copy without too much effort but I wont link to it here From these dark ages along came frameworks Frameworks let you split your application model and view code into separate layers and provide a basic structure for your code Most PHP projects use one of the popular frameworks like Symfony or Zend But like all good things in life using a framework someone else built has downsides Most frameworks come packaged with lots of libraries that you will never useFrameworks lock you in and are difficult to migrate away from and upgrade Try upgrading from Zend to the latest version or Yii to Yii Or from Symfony to Zend or vice versa Frameworks encourage Framework specific code for common operations like getting GET POST input and validation when you could be using framework agnostic code built into PHP or composer dependencies This makes lock in worse and makes upgrades and switching frameworks even harder Frameworks contain alot of extra processing that you probably don t need and this has a siginficant performance impact You ll be using the libraries that the framework maintainer likes rather than the ones you like Prefer RedbeanPHP as your ORM when the framework uses Doctrine You ll need to go against the framework to implement what you want Adding new people to your team is harder you need people who have worked with the specific third party framework you are using Otherwise they ll need to learn it on the job The documentation of most frameworks is not in a good state and there are alot of undocumented quirks you might run into But we still need a framework otherwise were back to the bad old days of spaghetti code Whats the solution Build your own lightweight framework The reason why many frameworks come with so much bloat is that they were originally created in a world before composer so the framework tried to provide everything you might ever need Nowdays we have composer for PHP Instead of getting a framework that provides lots of libraries that add bloat to your codebase and that you may never use you can individually install composer packages as needed composer also provides a free PSR autoloader you can use to structure your code There is no more need to use a third party framework composer dependencies and built in PHP functionality provide everything you need to create your own framework with a minimal amount of code PrerequisitesTo build a basic MVC framework with PHP you will needPHP or latercomposer for dependencies As you won t be using a pre built framework you ll only install the dependencies you ll be using and nothing else Set up composerTo build your own PHP framework you ll need to get some dependencies from composer Create a composer json file with the following contents name cipher code phpframework description PHP Framework type project license MIT autoload psr Framework src require slim slim slim psr php di php di Then run composer install to install the initial dependencies and initialize your autoloader Set up initial public index phpLike most PHP applications you ll need a index php script as the Front Controller or entry point into your application Create the file public index php with the following contents lt php public index phpuse Psr Http Message ResponseInterface as Response use Psr Http Message ServerRequestInterface as Request use Slim Factory AppFactory use DI Container This will make referencing files by path much simpler rootDir realpath DIR define ROOT DIR rootDir require ROOT DIR vendor autoload php app AppFactory create container new Container app gt get hello name function Request request Response response array args name args name response gt getBody gt write Hello name return response app gt run First we define ROOT DIR as a constant with we can use to refer to all other in codebase file paths in the future No more doing DIR Folder file php You can just start from ROOT DIR instead i e ROOT DIR Folder file php We then use this ROOT DIR constant to load composer Behind the scenes composer then sets up the autoloader for you so you can namespace your code The RouterA core component of any framework is the Router which is used to dispatch incoming requests to the right controller action This is how Symfony and Zend might know how to route hello name to HelloController gt hello for example To build your own PHP framework you need a Router We ve installed Slim a super lightweight framework In our code we are only using the Slim Router to set up the hello name route Slim isn t a full MVC framework it just provides a basic set of core components such as a Router which you can use to create your own framework This isn t yet a full MVC framework because its just using a simple callback and doesn t have any Controllers yet However its enough to test our setup to make sure everything is wired up properly Confirm setup with the PHP built in web serverStart the PHP built in web server withphp S localhost t public public index phpThen hit http localhost hello lt your name gt in your browser You should see a page like the one below If not go back and check over your work Create src Controller HelloController phpAs mentioned earlier we are using a simple callback to respond to requests so this isn t a full MVC framework The next step is to add a controller So lets add HelloController to handle requests to hello name lt phpnamespace Framework Controller use Slim Psr Request use Slim Psr Response class HelloController public function hello Request request Response response array args name args name response gt getBody gt write Hello name return response Wire up your ControllerUpdate index php to match the following Don t forget to import the new namesapces lt php public index phpuse Psr Http Message ResponseInterface as Response use Psr Http Message ServerRequestInterface as Request use Slim Factory AppFactory use DI Container use Framework Controller HelloController This will make referencing files by path much simpler rootDir realpath DIR define ROOT DIR rootDir require ROOT DIR vendor autoload php app AppFactory create container new Container app gt get hello name function Request request Response response array args use container var Framework Controller HelloController helloController container gt get HelloController class return helloController gt hello request response args app gt run Here we are using PHP DI Autowiring to get the controller with container gt get HelloController class instead of calling new HelloController which you might try to do if I didn t tell you otherwise This is so that we can inject dependencies with Dependency Injection later on Now start the PHP built in web server again Hit http localhost hello lt your name gt again and you should see the same result as before If not go back and check over your work Create src Util Greeter phpNow we have a controller to dispatch requests but we have a design issue Our controller is doing too much Not only is it handling the output of the greeting its also generating it itself We should be following SOLID Principles and one of these is Single Purpose Right now the greeting isn t too complicated and only supports English Lets imagine a future where you need to do the greetings in multiple languages With the current setup that means introducing lots of logic into your code If language is Spanish output the Spanish greeting and so on The controller would get alot bigger than it needs to be A good principle to follow with any framework is skinny controllers So you only put the minimum amount of code in your controller to handle the request The heavy lifting should be done elsewhere If we offload the greeting generation to another class we can use that as a base for a future structure where we can easily support multiple languages without much logic So lets offload generating the greeting to a new Greeter class lt php src Util Greeter phpnamespace Framework Util class Greeter public function greet string name string return Hello name Update HelloController to use Greeter lt php src Controller HelloController phpnamespace Framework Controller use Framework Util Greeter use Slim Psr Request use Slim Psr Response class HelloController public function construct protected Greeter greeter public function hello Request request Response response array args name args name response gt getBody gt write this gt greeter gt greet name return response This is our first use of Dependency Injection In the constructor we use PHP property promotion so we only have to define the dependency once PHP DI Autowiring uses Reflection to check what the class needs ahead of time then injects it automatically at runtime This makes managing dependencies and adhering to SOLID Principles much easier Wrapping up Part Now you have a simple framework with a Router DI and a Controller It is mostly following SOLID Principles and we don t have any tests yet To implement full MVC we need a Model and View layer This will come next in Build Your Own PHP Framework Part If you d like to give me extra motivation to create Part sooner share this article across all of your socials using the links provided The more engagement I see the faster i ll create Part 2022-11-24 11:14:32
Apple AppleInsider - Frontpage News Foxconn apologizes to rioting workers, appears to be paying bonuses https://appleinsider.com/articles/22/11/24/foxconn-apologizes-to-rioting-workers-appears-to-be-paying-bonuses?utm_medium=rss Foxconn apologizes to rioting workers appears to be paying bonusesFollowing riots at its iPhone plant in Zhengzhou Foxconn has apologized and said pay problems were a technical error Hundreds of workers from the Zhengzhou rioted on Wednesday protesting about food and conditions in the COVID lockdown measures and also pay Despite Foxconn having previously promised bonuses rioters claimed that the company had revised contracts to prevent workers being eligible According to BBC News the company has now issued a statement saying that a technical error occurred during the onboarding process Foxconn said that the pay its new recruits would get is now the same as agreed in the official recruitment posters Read more 2022-11-24 11:13:54
海外TECH Engadget Tesla's FSD driver assist beta is now available to anyone who wants to pay https://www.engadget.com/tesla-fsd-driver-assist-available-to-all-drivers-114916660.html?src=rss Tesla x s FSD driver assist beta is now available to anyone who wants to payAfter gradually expanding access to its so called full self driving FSD beta for the last few years Tesla is opening it up to anyone who has paid for it Elon Musk announced in a tweet Tesla Full Self Driving Beta is now available to anyone in North America who requests it from the car screen assuming you have bought this option he said nbsp FSD is an extension of Tesla s Autopilot driver assist feature expanding on the latter with automated functions like automated steering in cities automatic parking smart vehicle summoning and traffic light stop sign recognition The feature is a paid upgrade priced at following a price hike of in September nbsp Tesla Full Self Driving Beta is now available to anyone in North America who requests it from the car screen assuming you have bought this option Congrats to Tesla Autopilot AI team on achieving a major milestone ーElon Musk elonmusk November Tesla first promised to launch full self driving features in but they only finally appeared in July to a small number of expert and careful drivers It was released more widely in the version beta but testers were limited to an early access program On the last FSD release Tesla dropped the requirement for at least Autopilot miles and an safety score and now anyone who wants it can have it nbsp However Tesla is rolling out FSD widely at a time when it s under scrutiny from regulators The National Highway Traffic Safety Administration NHTSA recently expanded its investigation into a series of Tesla crashes involving first responders to most models In a separate probe it s also looking into more than incidents involving Autopilot nbsp Musk has promised full self driving with no one behind the wheel for some time now Most recently he said he thought it could arrive this year but backed off those claims in Tesla s latest earnings report Tesla s stock has been on a steep decline of late following Elon Musk s billion purchase of Twitter nbsp 2022-11-24 11:49:16
医療系 医療介護 CBnews 「かかりつけ医機能」地域ごとに改善点協議-全世代型構築会議が論点整理 https://www.cbnews.jp/news/entry/20221124202113 社会保障 2022-11-24 20:50:00
ニュース BBC News - Home UK net migration hits all-time record at 504,000 https://www.bbc.co.uk/news/uk-63743259?at_medium=RSS&at_campaign=KARANGA ukraine 2022-11-24 11:35:50
ニュース BBC News - Home Patients dying as ambulances face crippling delays in England https://www.bbc.co.uk/news/health-63743383?at_medium=RSS&at_campaign=KARANGA england 2022-11-24 11:38:28
ニュース BBC News - Home China Covid: Record number of cases as virus surges nationwide https://www.bbc.co.uk/news/world-asia-china-63739617?at_medium=RSS&at_campaign=KARANGA workplaces 2022-11-24 11:47:42
ニュース BBC News - Home Some Met officers not trusted to talk to public - chief https://www.bbc.co.uk/news/uk-england-london-63684172?at_medium=RSS&at_campaign=KARANGA commissioner 2022-11-24 11:44:38
ニュース BBC News - Home Ukraine war: Most of Kyiv spends night without power after missiles https://www.bbc.co.uk/news/world-europe-63740923?at_medium=RSS&at_campaign=KARANGA ukrainians 2022-11-24 11:32:10
ニュース BBC News - Home Cost of living: Patients refuse sick notes over lost pay worry - GPs https://www.bbc.co.uk/news/uk-wales-63741104?at_medium=RSS&at_campaign=KARANGA health 2022-11-24 11:04:40
ニュース BBC News - Home A Place in the Sun axed me after cancer news - Irwin https://www.bbc.co.uk/news/entertainment-arts-63741938?at_medium=RSS&at_campaign=KARANGA irwin 2022-11-24 11:13:38
ニュース BBC News - Home What is the energy price cap and what will happen to bills? https://www.bbc.co.uk/news/business-58090533?at_medium=RSS&at_campaign=KARANGA april 2022-11-24 11:22:17
ニュース BBC News - Home England v South Africa: Tommy Freeman comes in on the wing as hosts make changes https://www.bbc.co.uk/sport/rugby-union/63722370?at_medium=RSS&at_campaign=KARANGA England v South Africa Tommy Freeman comes in on the wing as hosts make changesNorthampton s Tommy Freeman takes Jack Nowell s place on the wing in one of four changes for England s match against South Africa on Saturday 2022-11-24 11:39:15
北海道 北海道新聞 年末年始、新千歳―羽田線68便増 エア・ドゥ https://www.hokkaido-np.co.jp/article/765203/ airdo 2022-11-24 20:08:00
北海道 北海道新聞 大会組織委が企業実績の表作成 入札前、電通に協力依頼 https://www.hokkaido-np.co.jp/article/765201/ 東京五輪 2022-11-24 20:06:00
北海道 北海道新聞 ロシア軍全土攻撃、死者10人に 侵攻9カ月、隣国も停電 https://www.hokkaido-np.co.jp/article/765198/ 隣国 2022-11-24 20:03:00
北海道 北海道新聞 「賞を励みに頑張る」 道新文学賞、短歌賞・俳句賞贈呈式 https://www.hokkaido-np.co.jp/article/765195/ 北海道新聞 2022-11-24 20:02:00
ニュース Newsweek 人間に換算すると120 歳! 元野良猫が存命する世界最高齢の猫に認定 https://www.newsweekjapan.jp/stories/world/2022/11/120-7.php 史上最高齢は年と日キャッツプロテクションのナオミ・ロスリングさんは、フロッシーを「少なくとも人間の年齢で歳」と説明している。 2022-11-24 20:45:17

コメント

このブログの人気の投稿

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