投稿時間:2023-04-17 18:23:20 RSSフィード2023-04-17 18:00 分まとめ(26件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia News] LINEギフトで情報漏えい 8年間にわたり ユーザーに告知も「意味が分からない」の声 https://www.itmedia.co.jp/news/articles/2304/17/news156.html itmedianewsline 2023-04-17 17:33:00
IT ITmedia 総合記事一覧 [ITmedia News] “問い合わせフォーム作成キット”に脆弱性 入力内容を第三者が取得できる状態に https://www.itmedia.co.jp/news/articles/2304/17/news154.html itmedia 2023-04-17 17:20:00
IT ITmedia 総合記事一覧 [ITmedia News] PayPay、最大30%ポイント還元の「あなたのまちを応援プロジェクト」6自治体で 練馬区、蕨市など https://www.itmedia.co.jp/news/articles/2304/17/news150.html itmedianewspaypay 2023-04-17 17:19:00
IT SNSマーケティングの情報ならソーシャルメディアラボ【Gaiax】 【2023年3月の主要SNSニュースまとめ】Twitterアルゴリズムをオープンソース化、TikTok米国で全面禁止の可能性?ほか https://gaiax-socialmedialab.jp/post-136993/ tiktok 2023-04-17 08:51:15
python Pythonタグが付けられた新着投稿 - Qiita 【2023年4月決定版】Stable Diffusion 公式にはないモデルを使ってフォトリアリスティックな美女画像を作る (3) https://qiita.com/javacommons/items/e63f6d25d8864f31a366 basilmix 2023-04-17 17:41:39
js JavaScriptタグが付けられた新着投稿 - Qiita 変化するelementのサイズを取得するためのResizeObserver https://qiita.com/ufoo68/items/5ed1d3721b8995df32b8 element 2023-04-17 17:47:04
js JavaScriptタグが付けられた新着投稿 - Qiita テスト投稿公開001 https://qiita.com/mms_0011_st/items/8d7679da4dfe5bfbc3e3 ionhelloreturnhelloworld 2023-04-17 17:06:12
Git Gitタグが付けられた新着投稿 - Qiita Git main(master)ブランチなどを別のブランチの内容で上書きマージしたい https://qiita.com/satoru_pripara/items/a2b1f5acc7c6c01fceac gitmainmaster 2023-04-17 17:32:31
技術ブログ Developers.IO I tried to Visualize and Forecast Data using Amazon QuickSight https://dev.classmethod.jp/articles/visualize-and-forecast-data-using-amazon-quicksight/ I tried to Visualize and Forecast Data using Amazon QuickSightData Visualization The process of putting information into a visual context such as a map or graph in order 2023-04-17 08:53:35
技術ブログ Developers.IO データシェアリング先のアカウントで閲覧可能なオブジェクトをパターン分けさせたいときに役立つ「Database Roles」を試してみた #SnowflakeDB https://dev.classmethod.jp/articles/snowflake-try-database-role/ databaseroles 2023-04-17 08:50:00
技術ブログ Developers.IO [レポート] チームビルディングのためのワークショップデザイン #devio_day1 #sub3 https://dev.classmethod.jp/articles/developersio-day-one-workshopdesign-for-teambuilding/ chatgpt 2023-04-17 08:36:31
海外TECH DEV Community Beyond Angular Signals: Signals & Custom Render Strategies https://dev.to/this-is-angular/beyond-angular-signals-signals-custom-render-strategies-46h7 Beyond Angular Signals Signals amp Custom Render StrategiesTL DR Angular Signals might make it easier to track all the expressions in a view Component or EmbeddedView and schedule custom render strategies in a very surgical way Thus enabling some exciting optimizations While libraries and frameworks are getting better and better at tracking changes in a fine grained way and propagating them to the DOM we might notice that sometimes the performance bottleneck resides in DOM updates Let s explore how Angular Signals could allow us to overcome these performance bottlenecks with custom rendering strategies From Tick to SigIt has been a while now since the Angular team has been exploring way more than we can think alternative reactivity models and looking for something that lies between the extremes of naive Zone js i e Zone js without OnPush and Zoneless Angular combined with special pipes amp directives like those provided by RxAngular then Pawel Kozlowski joined the Angular team as a full time member and together with Alex Rickabaugh they merged into Pawælex In the meantime while Ryan Carniato keeps insisting that he did not invent Signals he undoubtedly made them popular in the JavaScript ecosystem Cf The Evolution of Signals in JavaScript and eventually ended up influencing Angular That is how Pawælex amp friends Andrew Dylan amp Jeremy made the Angular Signals RFC happen DOM updates are not that cheapThe fantastic thing about Signals is how frameworks and libraries like Angular SolidJS Preact or Qwik magically track changes and rerender whatever has to rerender without much boilerplate compared to more manual alternatives But wait If they rerender whatever has to rerender what happens if the performance bottleneck is the DOM update itself Let s try updating elements every ms Component template lt div ngFor let of lines gt count lt div gt export class CounterComponent implements OnInit count signal lines Array ngOnInit setInterval gt this count update value gt value Oups We re spending more than of our time rendering and we can notice the frame rate dropping to somewhere around fps Let s calm down a bitThe first solution which we might think of is simply updating the Signals only when we want to rerender but that would require some boilerplate i e creating intermediate Signals which are not computed Signals and this is how it would look like if we want to throttle a Signal Component template throttledCount class MyCmp count signal throttledCount throttleSignal this count duration Cf throttleSignal but this has a couple of drawbacks using a single unthrottled Signal in the same view would defeat our efforts ️if intermediate Signals scheduled updates are not coalesced we might introduce some random inconsistencies and break the whole glitch free implementation of Signals Updating the viewport onlyWhat if the browser was sensitive It would turn to us and say I m tired of working so much and nobody cares about my efforts From now on I won t work if you don t look at me We might probably agree In fact why would we keep updating below the fold elements Or more generally why would we keep updating elements outside the viewport If we tried to implement this using an intermediate Signal then the function would need a reference to the DOM element in order to know if it s in the viewport lazyCount applyViewportStrategy this count element this would require more boilerplate and as the same Signal might be used in different places then we would need an intermediate Signal for each usage While this could be solved using a structural directive we would clutter the template instead template lt span lazyViewportSignal count let countValue gt countValue lt span gt lt span gt x lt span gt lt span lazyViewportSignal double let doubleValue gt doubleValue lt span gt which is far from ideal What about Eventual Consistency for DOM updates Another alternative is acting at the change detection level If we can customize the rendering strategy then we can easily postpone the rendering of the content below the fold More precisely we could stop updating the content outside the viewport until it s in the viewport While introducing such inconsistency between the state and the view might sound frightening If applied wisely this is nothing more than Eventual Consistency meaning that we will eventually end up in a consistent state After all we could state the following theorem obviously inspired by the CAP Theorem The process of synchronizing the state and the view can t guarantee both consistency and availability Inspired by the work of my RxAngular friends I thought that by combining something like custom render strategies with the Signals tracking system we could get the best of both worlds and achieve our goal in the most unobtrusive way This could look something like this Component template lt div viewportStrategy gt lt span gt count lt span gt lt span gt x lt span gt lt span gt double lt span gt lt div gt export class CounterComponent implements OnInit count Signal double computed gt count ‍Sneaking between Signals amp Change DetectionObviously my first move was to ask the Angular team more precisely my dear friend Alex who is now part of Pawælex as mentioned before if there were any plans to provide an API to override how Signals trigger Change Detection Alex said no I heard not yet Then I said thanks And we simultaneously said bye That s when I put on my coding apron and started trying some naive stuff My first try was nothing more than something like this This doesn t work as expected const viewRef vcr createEmbeddedView templateRef viewRef detach effect gt console log Yeay we are in if called more than once viewRef detectChanges but it didn t work The naive idea behind this was that if effect can track Signal calls and if detectChanges has to synchronously call the Signals in the view then the effect should run again each time a Signal changes That s when I realized that we are lucky that this doesn t work because otherwise this would mean that we would trigger change detection on our view whenever a Signal changes in any child or deeply nested child Something at the view level stopped the propagation of the Signals and acted as a boundary mechanism I had to find what it was and the best way was to jump into the source code Yeah I know I like to try random stuff first The Reactive GraphIn order for the Signals to track changes Angular has to build a reactive graph Each node in this graph extends the ReactiveNode abstract class There are currently four types of reactive nodes Writable Signals signal Computed Signals computed Watchers effect the Reactive Logical View Consumer the special one we need the introduction of Signal based components will probably add more node types like component inputs Each ReactiveNode knows all of its consumers and producers which are all ReactiveNodes This is necessary in order to achieve the push pull glitch free implementation of Angular Signals This reactive graph is built using the setActiveConsumer function which sets the currently active consumer in a global variable which is read by the producer when called in the same call stack Finally whenever a reactive node might have changed it notifies its consumers by calling their onConsumerDependencyMayHaveChanged method The Reactive Logical View ConsumerWhile spelunking and ruining my apron I stumbled upon a surprising reactive node type that lives in IVy renderer source code the ReactiveLViewConsumer While writable Signals are the leaf nodes of the reactive graph the Reactive Logical View Consumers are the root nodes Just like any other reactive node this one implements the onConsumerDependencyMayHaveChanged method but not like any other reactive node this one is bound to a view so it can control the change detection and it does by marking the view as dirty when notified by a producer onConsumerDependencyMayHaveChanged markViewDirty this lView Sneaking like an elephant between Signals amp Change DetectionSadly there doesn t seem to be any elegant way of overriding the current behavior of marking the view to check when Signals trigger a change notification but luckily I have my coding apron on so I am not afraid of getting dirty Create the embedded viewFirst let s create a typical structural directive so we can create amp control the embedded view Directive standalone true selector viewportStrategy class ViewportStrategyDirective private templateRef inject TemplateRef private vcr inject ViewContainerRef ngOnInit const viewRef this vcr createEmbeddedView this templateRef Trigger change detection onceFor some reason the ReactiveLViewConsumer is instantiated after the first change detection My apron was already too dirty to dive any deeper but my guess is that it is lazily initialized when Signals are used for performance s sake The workaround is to trigger change detection once before detaching the change detector viewRef detectChanges viewRef detach Aha While writing this I stumbled upon this comment here so I was right Finally once Yeah Grab the ReactiveLViewConsumerconst reactiveViewConsumer viewRef lView REACTIVE TEMPLATE CONSUMER Override the Signal notification handler like a monkeyNow that we have the ReactiveLViewConsumer instance we can let the hacker in us override the onConsumerDependencyMayHaveChanged method and trigger skip schedule change detection with the strategy of our choice like a naive throttle let timeout reactiveViewConsumer onConsumerDependencyMayHaveChanged gt if timeout null return timeout setTimeout gt viewRef detectChanges timeout null or we can use RxJS which is still one of the most convenient ways of handling timing related strategies and it is already bundled anyway in most apps Cf ThrottleStrategyDirective amp ViewportStrategyDirective and it works Let s try This seems to be at least times faster even though tracking the element s appearance in the viewport is a relatively expensive task and the frame rate is pretty decent but note that This might break in any future version major or minor of Angular Maybe you shouldn t do this at work Also this only tracks the view handled by the directive It won t detach and track child views or components What s next RxAngular SignalsThe strategies implemented in our demo are willingly naive and need better scheduling and coalescing to reduce the amount of reflows amp repaints Instead of venturing into that this could be combined with RxAngular Render Strategies wink wink wink to my RxAngular friends ️We might need more low level Angular APIsTo achieve our goal we had to hack our way into Angular internals which might change without notice in future versions If Angular could provide some additional APIs like interface ViewRef This doesn t exist setCustomSignalChangeHandler callback gt void or something less verbose we could combine this with ViewRef detach and easily sneak in between Signals and change detection Signal Based ComponentsAs of today Signal based components are not implemented yet so there is no way to know if this would work as implementation details will probably change Custom Render Strategies in some other Libraries amp FrameworksWhat about other libraries and frameworks I couldn t refrain from asking so I did and received interesting feedback from SolidJS s Ryan Carniato amp Preact s Jason Miller SolidJS Preact ReactIn React no matter if we are using Signals or not we could implement a Higher Order Component that decides whether to really render or return a memoized value depending on its strategy const CounterWithViewportStrategy withViewportStrategy gt lt div gt count lt div gt export function App return lt gt items map gt lt CounterWithViewportStrategy count count gt lt gt Cf React Custom Render Strategies DemoThis could probably be more efficient with Signals if achieved by wrapping React createElement like Preact Signals integration does and implementing a custom strategy instead of the default behavior Or maybe using a custom hook based on useSyncExternalStore Vue jsUsing JSX we could wrap the render just like withMemo does defineComponent setup const count ref return viewportStrategy rootEl gt lt div ref rootEl gt count lt div gt Cf throttle example on Stackblitz but I m still wondering how this could work in SFC without having to add a compiler node transform to convert something like v viewport strategy into a wrapper QwikThis one needs a bit more investigation and I am not sure if overriding the default render strategy is currently feasible However my first guess would be that this can be qwikly added to the framework For example there could be an API allowing us to toggle a component s DETACHED flag which would skip scheduling component render in notifyRender ‍Closing Observations ️Please don t do this at work The presented solution is based on internal APIs that might change at any moment including the next Angular minor or patch versions So why write about it My goal here is to show some new capabilities that could be enabled thanks to Signals while improving the Developer eXperience at the same time Wanna try custom render strategies before switching to Signals Check out RxAngular s template ConclusionWhile custom render strategies can instantly improve performance in some specific situations the final note is that you should prefer keeping a low number of DOM elements and reducing the number of updates In other words keep your apps simple as much as you can organized and your data flow optimized by design using fine grained reactivity whether you are using RxJS based solutions or Signals Links amp Upcoming Workshops‍WorkshopsSubscribe to NewsletterSource Code Repository Discuss this on github 2023-04-17 08:35:25
海外TECH DEV Community #TestCulture 🦅 Episode 32 – Community of Practice https://dev.to/mathilde_llg/testculture-episode-32-community-of-practice-n9f TestCulture Episode Community of PracticeThe idea of Communities of Practice was first proposed by cognitive anthropologist Jean Lave and educational theorist Etienne Wenger in 𝗝𝗲𝗮𝗻𝗟𝗮𝘃𝗲is a social anthropologist who develops theories of learning as a process of changing participation in ongoing changing practices Her lifelong work challenges conventional theories of learning and education 𝗘𝘁𝗶𝗲𝗻𝗻𝗲𝗪𝗲𝗻𝗴𝗲𝗿is an educational theorist and practitioner recognized for co formulating the theory of situated cognition He has also made significant contributions to the field of communities of practice Wenger further developed the concept in a book “Communities of Practice For Wenger these communities are a means of learning that can be classified in the style of education called 𝐬𝐨𝐜𝐢𝐨𝐜𝐨𝐧𝐬𝐭𝐫𝐮𝐜𝐭𝐢𝐯𝐢𝐬𝐦 These communities are interested in sharing the tacit knowledge held within an organization Learn more about the concept about Community Of Pratice here 2023-04-17 08:26:52
海外TECH DEV Community Handling Paystack transactions using webhooks https://dev.to/ifedayo/handling-paystack-transactions-using-webhooks-4k61 Handling Paystack transactions using webhooksPaystack is a popular payment processing platform used by businesses and individuals in Nigeria and other African countries One of the key features of Paystack is its ability to process transactions using webhooks Webhooks are HTTP callbacks that enable the automatic transfer of transaction data from Paystack to your application in real time Webhooks are useful for a variety of reasons They can automate tasks and streamline workflows by eliminating the need for manual intervention For example when a customer places an order on an e commerce website a webhook can trigger an automated process that sends a confirmation email to the customer updates the inventory system and notifies the shipping department to prepare the order for delivery Overall webhooks are a flexible and powerful way to enable real time communication and automation between web applications making them a valuable tool for developers and businesses alike In this article we will explore how to implement Paystack transactions using webhooks with TypeScript We will cover the steps involved in setting up the Paystack API creating a webhook endpoint handling Paystack webhook events and testing the webhook integration Setting up the Paystack APITo use the Paystack API you will need to create a Paystack account and obtain the API keys needed for transaction processing Here are the steps involved Create a Paystack account Go to signup and follow the instructions to create an account After getting access to the dashboard on the left hand navigation bar you click on settings Obtain the API keys Go to the API section of your dashboard and copy the secret and public keys You can use the Paystack API to initiate transactions by sending a POST request to the API endpoint with the necessary transaction details Here is an example of how to initiate a transaction in TypeScript import axios from axios const API SECRET KEY yoursecretkey Test Secret Key for Test mode onconst transactionDetails email customer email com amount metadata custom fields display name Customer s name variable name customer name value John Doe axios post transactionDetails headers Authorization Bearer API SECRET KEY then response gt console log response data catch error gt console log error NOTES amount Paystack divides the amount by to have value for kobo which sets the current amount to in naira In transactionDetails metadata value don t necessarily have to be set status true message Authorization URL created data authorization url access code tqvqyiwxlxmcg reference xrmihwxzv Let s breakdown the response from the Paystack API after initiating a transaction status A boolean value indicating whether the request was successful true or not false message A message indicating the result of the request In this case the message is Authorization URL created which means that the Paystack API was able to create an authorization URL for the transaction data An object containing the data returned by the Paystack API In this case the data object contains three properties authorization url The URL that the user should be redirected to in order to authorize the transaction access code A code that is used to authorize the transaction reference A unique reference code that identifies the transaction On following the authorization url you redirected to a similar webpage like the one below where you can simulate different transaction scenarios Setting up the webhook endpointTo receive and process transaction data from Paystack in real time you will need to set up a webhook endpoint Here are the steps involved Create a webhook endpoint You can create a webhook endpoint using an HTTP framework like Express Here is an example of how to create a webhook endpoint in TypeScript import express from express import json from body parser const app express app use json app post paystack webhook req res gt const eventData req body console log eventData res sendStatus app listen gt console log Webhook server started on port Register the webhook endpoint with Paystack Go to the Webhooks section of your Paystack dashboard and add your webhook URL Paystack will send transaction data to this URL whenever a transaction event occurs To receive webhook events from Paystack your endpoint needs to be accessible from the internet Paystack does not allow to register localhost as webhook URL however you can expose your local enpoint to the internet One way to achieve this in a local development environment is to use a tool like ngrok which exposes your local endpoint to a public URL that can be accessed from the internet Here is how to use ngrok to expose your local endpoint Download and install ngrok from the official website Start ngrok by running the command ngrok http replace with the port number of your local endpoint Ngrok will generate a public URL that you can use as your webhook endpoint in the Paystack dashboard Handling the Paystack webhook eventsPaystack sends different types of webhook events to your webhook endpoint depending on the status of the transaction Here are the steps involved in handling Paystack webhook events in TypeScript Verify the webhook event Paystack sends a signature with each webhook event that you can use to verify the authenticity of the event Here is how to verify the signature import crypto from crypto const API SECRET KEY yoursecretkey function verify eventData any signature string boolean const hmac crypto createHmac sha API SECRET KEY const expectedSignature hmac update JSON stringify eventData digest hex return expectedSignature signature Handle the webhook event Once you have verified the signature you can process the webhook event based on the event type Here is how to handle a successful transaction event app post paystack webhook req res gt const eventData req body const signature req headers x paystack signature if verify eventData signature return res sendStatus if eventData event charge success const transactionId eventData data id Process the successful transaction to maybe fund wallet and update your WalletModel console log Transaction transactionId was successful return res sendStatus Testing the webhook integrationTo test your webhook integration you can use the Paystack Test Mode to simulate different transaction scenarios Here are the steps involved Switch to Test Mode Go to your Paystack dashboard and switch to Test Mode Initiate a test transaction Use the Paystack API to initiate a test transaction with the necessary test parameters Check the webhook response Once the test transaction is complete check the webhook response to ensure that the transaction data was received and processed correctly To test your webhook processing logic thoroughly you can simulate different webhook events by sending different test parameters to the Paystack API For example you can simulate a failed transaction a disputed transaction or a successful refund By following these steps you can thoroughly test your Paystack webhook integration in a local development environment and ensure that your application can handle real time transactions correctly ConclusionIn this article we explored how to implement Paystack transactions using webhooks with TypeScript We covered the steps involved in setting up the Paystack API creating a webhook endpoint handling Paystack webhook events and testing the webhook integration By following these steps you can easily integrate Paystack transactions into your TypeScript application and process transactions in real time Further reading Paystack API documentation ngrok docs 2023-04-17 08:09:03
医療系 医療介護 CBnews ワクチン接種委託業務で不適正事案、過払い防止を-厚労省が事務連絡、抜き打ちで現地確認も https://www.cbnews.jp/news/entry/20230417172343 予防接種 2023-04-17 17:50:00
医療系 医療介護 CBnews 公立343病院の7割で院内感染、第7波に-270病院で計3.8万人が欠勤、全自病調べ https://www.cbnews.jp/news/entry/20230417154026 全国自治体病院協議会 2023-04-17 17:40:00
金融 ニッセイ基礎研究所 今週のレポート・コラムまとめ【4/11-4/17発行分】 https://www.nli-research.co.jp/topics_detail1/id=74575?site=nli 2023-04-17 17:30:37
金融 日本銀行:RSS 第18回「金融庁・日本銀行連絡会」の開催について http://www.boj.or.jp/finsys/macpru/mac230417a.pdf 日本銀行 2023-04-17 18:00:00
ニュース BBC News - Home 'Ignorant' protesters blamed for Grand National death https://www.bbc.co.uk/sport/horse-racing/65296693?at_medium=RSS&at_campaign=KARANGA x Ignorant x protesters blamed for Grand National deathHorse trainer Sandy Thomson says the interruption to the Grand National by ignorant animal rights activists contributed to Hill Sixteen s death 2023-04-17 08:15:00
ニュース BBC News - Home Vladimir Kara-Murza: Russian opposition figure jailed for 25 years https://www.bbc.co.uk/news/world-europe-65297003?at_medium=RSS&at_campaign=KARANGA comments 2023-04-17 08:46:34
ニュース BBC News - Home Rishi Sunak sets up review to tackle 'anti-maths mindset' https://www.bbc.co.uk/news/uk-politics-65293430?at_medium=RSS&at_campaign=KARANGA advisory 2023-04-17 08:29:15
ビジネス 不景気.com マイネットが退職勧奨による40名の人員削減へ、全従業員1割 - 不景気com https://www.fukeiki.com/2023/04/mynet-cut-40-job.html 退職勧奨 2023-04-17 08:28:20
ニュース Newsweek 「まさか、あの修道士の幽霊か?」夜の田舎道に謎の男...ドラレコが捉えた衝撃の姿 イギリス https://www.newsweekjapan.jp/stories/world/2023/04/post-101415.php 2023-04-17 17:30:00
IT 週刊アスキー 厳選された英国の紅茶や焼き菓子を用意! 「英国展」小田急百貨店新宿店で開催 https://weekly.ascii.jp/elem/000/004/133/4133178/ 小田急百貨店 2023-04-17 17:30:00
IT 週刊アスキー 崎陽軒から初夏限定グルメが登場! 「初夏のかながわ味わい弁当」「おうちで駅弁シリーズ 初夏限定 山菜ごはん弁当」など https://weekly.ascii.jp/elem/000/004/133/4133192/ 期間限定 2023-04-17 17:20:00
IT 週刊アスキー クリスピークリームドーナツ×セサミストリートのコラボが再び♡「エルモ」の好物“ワサビ”味ドーナツも店舗限定で https://weekly.ascii.jp/elem/000/004/131/4131607/ 限定 2023-04-17 17:10: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件)