投稿時間:2021-09-09 12:46:33 RSSフィード2021-09-09 12:00 分まとめ(50件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… Belkin、AirPlay 2対応のオーディオアダプターを発売 https://taisy0.com/2021/09/09/145105.html airplay 2021-09-09 02:49:49
IT 気になる、記になる… IIJmio、9月11日より国内音声通話料金を値下げ https://taisy0.com/2021/09/09/145101.html iijmio 2021-09-09 02:39:25
TECH Engadget Japanese シンプルなデザインと上質な手触り。色を選べる【本革カスタムペンケース】 https://japanese.engadget.com/leather-pen-case-024539230.html ボタンを全て外すと枚のパーツになるカスタムペンケースは、個性たっぷりの色からお好きな色を選んで計通りの中からカスタマイズできます。 2021-09-09 02:45:39
TECH Engadget Japanese 絵心がなくてもマンガのネームが作れる「World Maker」が想像以上に楽しかった(中山智) https://japanese.engadget.com/world-maker-023543067.html worldmaker 2021-09-09 02:35:43
TECH Engadget Japanese SwitchBotの温湿度計。スマホやスマートスピーカーと連携。自動でエアコンをONにもできる|買い物レビュー日記 https://japanese.engadget.com/mini-review-switchbot-021100926.html engadget 2021-09-09 02:11:00
IT ITmedia 総合記事一覧 [ITmedia Mobile] Android 12 beta 5(ファイナル)公開 正式版は「数週間中」 https://www.itmedia.co.jp/mobile/articles/2109/09/news094.html android 2021-09-09 11:53:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 「東京ラーメンストリート」担当者が明かす、コロナ禍の東京駅開発 https://www.itmedia.co.jp/business/articles/2109/09/news033.html itmedia 2021-09-09 11:43:00
IT ITmedia 総合記事一覧 [ITmedia News] N高、量子コンピュータの入門講座を無料配信 「高校生でも取り組める形に」 https://www.itmedia.co.jp/news/articles/2109/09/news087.html itmedianewsn 2021-09-09 11:16:00
IT ITmedia 総合記事一覧 [ITmedia News] “隣のアダプタが邪魔”回避 差込口を90°回転できる電源タップ https://www.itmedia.co.jp/news/articles/2109/09/news086.html itmedia 2021-09-09 11:15:00
TECH Techable(テッカブル) JR東日本、海外スタートアップとの共創活動を開始。第1弾はロボバリスタ https://techable.jp/archives/161708 beyondstations 2021-09-09 02:00:36
AWS AWS Japan Blog 新機能 – Amazon EFS Intelligent-Tiering がアクセスパターンの変化に応じてワークロードのコストを最適化 https://aws.amazon.com/jp/blogs/news/new-amazon-efs-intelligent-tiering-optimizes-costs-for-workloads-with-changing-access-patterns/ 新機能AmazonEFSIntelligentTieringがアクセスパターンの変化に応じてワークロードのコストを最適化AmazonElasticFileSystemAmazonEFSでは、AmazonEFS標準およびAmazonEFS標準InfrequentAccessEFS標準IAのつの標準ストレージクラスと、AmazonEFSゾーンおよびAmazonEFSゾーンInfrequentAccessEFSゾーンIAのつのワンゾーンストレージクラスといったつのストレージクラスを提供しています。 2021-09-09 02:01:45
python Pythonタグが付けられた新着投稿 - Qiita Flask+スクレイピングで記事一覧画面を作ろう② https://qiita.com/Yuthon/items/4c9754b0d14b40122165 Anacondaでの仮想環境を作りたい方仮想環境を作りますcondacreatenameflaskenv作れたら、仮想環境を適用しますcondaactivateflaskenvFlaskwtformsrequestsBeautifulSoupをインストールしますflaskenvpipinstallflaskwtformsrequestsbeautifulsoupvirtualenvでの仮想環境を作りたい方↓まだvirtualenvをインストールしていない方pipinstallvirtualenv仮想環境を作りますvirtualenvflaskenv仮想環境を適用しますsourceflaskenvbinactivateFlaskwtformsrequestsBeautifulSoupをインストールしますflaskenvpipinstallflaskwtformsrequestsbeautifulsouppyenvを使用した仮想環境も構築できますが、少し複雑になるので以下の記事を参考にすると良いかもしれません。 2021-09-09 11:14:56
js JavaScriptタグが付けられた新着投稿 - Qiita サンプル https://qiita.com/tym93442/items/5b9cfe06340e58388fb4 サンプルltDOCTYPEhtmlgtlthtmlgtltheadgtlttitlegtMPTESTPAGElttitlegtltscriptgtdocumentaddEventListenerrecMsgfunctioneventalertsamplehtmleventdetailfalsevarrequestEctensionMinVersionfunctionlaunchifcheckVersionvareventvarmessagelatetryeventnewCustomEventlaunchAppbubblestruedetailmessagecatcheeventdocumentcreateEventCustomEventeventinitCustomEventlaunchApptruefalsemessagedocumentdispatchEventeventelsedocumentdispatchEventeventfunctioncheckVersionvarresultfalseifdocumentgetElementByIdextensionisinstallednullifdocumentgetElementByIdextensionisinstalledvaluegtrequestEctensionMinVersionresulttrueelsealertブラウザ拡張のバージョンが古すぎます。 2021-09-09 11:48:09
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) C#、WPF、DataGridでセルに対して入力完了のタイミングを取得したい https://teratail.com/questions/358523?rss=all C、WPF、DataGridでセルに対して入力完了のタイミングを取得したい前提・実現したいこと実現したいことボールドテキスト列の入力が確定した時点で列、の値を参照して入力値が範囲内ならOK、範囲外ならエラーとしてそのセルからフォーカス移動をさせない出来ていることマウスで選択した場合、選択したセルの値と列の値の取得まで知りたいこと上記の状態からセルのマウス選択ではなく、セルの入力完了で連携をさせたいのですがその方法がわかりませんでした。 2021-09-09 11:51:29
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) For~NextのNextでIndexOutOfRangeExceptionが出る https://teratail.com/questions/358522?rss=all ForNextのNextでIndexOutOfRangeExceptionが出る概要・前提エクセルの書き込み用データを作成するためのシステムを作成しており、該当の箇所は各担当者別のデータを書き込んでいるロジックですrが一定値以上になるとエラーが発生し、ループが出来ず、処理が出来ない状態になってしまいますエラーの解決方法や原因等、ご教授お願い致します。 2021-09-09 11:49:01
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 画像の矩形に囲まれている箇所以外を塗りつぶしたい。 https://teratail.com/questions/358521?rss=all 画像の矩形に囲まれている箇所以外を塗りつぶしたい。 2021-09-09 11:39:17
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) laravel、 jsファイルで、読み込んだスクリプトの関数が実行できない。 https://teratail.com/questions/358520?rss=all laravel、jsファイルで、読み込んだスクリプトの関数が実行できない。 2021-09-09 11:28:04
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) jQueryで同名称のクラスを一括処理したい https://teratail.com/questions/358519?rss=all jQueryで同名称のクラスを一括処理したい前提・実現したいことホームページ制作を行っており、ページ内リンクをクリックした時に下線を引くような処理を行いたいです。 2021-09-09 11:25:50
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) sequel proにアクセスできません https://teratail.com/questions/358518?rss=all sequelproにアクセスできませんsequelnbspproにアクセスできない原因がわかりません。 2021-09-09 11:16:06
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Goによるハッシュチェーンの実装とindex out of range [1] with length 1エラーについて https://teratail.com/questions/358517?rss=all Goによるハッシュチェーンの実装とindexoutofrangewithlengthエラーについてやりたいことGoでつの要素ブロックからなるハッシュチェーンを実装しています。 2021-09-09 11:04:40
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Azure custom vision をLinebotを連携する際にReferenceError: handleEvent is not definedとなる。 https://teratail.com/questions/358516?rss=all な機能を実装中に以下のエラーメッセージが発生しました。 2021-09-09 11:02:47
Ruby Rubyタグが付けられた新着投稿 - Qiita チラ裏。if,elseの問題 https://qiita.com/ogura_gou/items/2a22f8fbd9075c43d1fe 呼び出し方calculatepointsamountisbirthday」step購入金額が円以下なのかまたは円以上なのかを判断したいので、条件分岐後ポイント計算をした後に結果を変数pointに代入します。 2021-09-09 11:28:42
Git Gitタグが付けられた新着投稿 - Qiita 【備忘録】Gitの初期設定 https://qiita.com/mitsu_hrk87/items/88c62c6501eaf23de64b ターミナルで下記のコードを入力してバージョンの確認をする。 2021-09-09 11:06:57
技術ブログ Developers.IO Query Neptune Graph using Gremlin Query Language https://dev.classmethod.jp/articles/query-neptune-graph-using-gremlin-query-language/ Query Neptune Graph using Gremlin Query LanguageIntroduction to Neptune Amazon Neptune Neptune is a fully managed graph database service Neptune is used for 2021-09-09 02:02:20
海外TECH DEV Community Top 20 JavaScript tips and tricks to increase your Speed and Efficiency https://dev.to/coderzz/top-20-javascript-tips-and-tricks-to-increase-your-speed-and-efficiency-bap Top JavaScript tips and tricks to increase your Speed and Efficiency Convenient and useful techniques to reduce the lines of code and pace up your Dev Work In our daily tasks we get to write functions such as sorting searching finding unique values passing parameters swapping values etc so here I present my list of shorthand techniques to write all of them as a Pro JavaScript is truly an awesome languageto learn and work with And there can be more than one approach to reach to the same solution for given problem In this article we will discuss only the quickest ones These approaches will definitely help you in Reducing the number of LOC lines of code Coding Competitions Hackathons orOther time bound tasks Most of these JavaScript Hacks uses techniques from ECMAScript ES onwards though the latest version is ECMAScript ES Note All below tricks have been tested on the Console of Google Chrome  Read More Top JavaScript tips and tricks to increase your Speed and Efficiency 2021-09-09 02:32:29
海外TECH DEV Community EKS Anywhere - Running EKS Cluster on your own infrastructure https://dev.to/aws-builders/eks-anywhere-running-eks-cluster-on-your-own-infrastructure-1n19 EKS Anywhere Running EKS Cluster on your own infrastructureWhat is EKS Anywhere What does EKS Anywhere solve AnnouncementFirst Look Installing EKS Anywhere Local Manage on premise EKS Anywhere Cluster from AWS EKS ConsoleSetup GitOps in EKS Anywhere ClusterConclusion What is EKS Anywhere Amazon EKS Anywhere is a new deployment option for Amazon EKS that enables you to easily create and operate Kubernetes clusters on premises with your virtual machines It brings a consistent AWS management experience to your data center building on the strengths of Amazon EKS Distro the same distribution of Kubernetes that powers EKS on AWS Its goal is to include complete lifecycle management of multiple Kubernetes clusters capable of operating entirely independently of any AWS services What does EKS Anywhere solve The central selling point of EKS Anywhere is that it allows customers to use Amazon s Kubernetes software within private data centers It makes EKS Anywhere handy in situations where businesses already have a large on premises infrastructure that they want to modernize the cloud keep the data in their private network due to legal reasons or where they believe their total cost of ownership will be lower if they host workloads on their servers instead of in the public cloud So the use cases the EKS Anywhere solves areHybrid Cloud ConsistencyDisconnected EnvironmentApplication ModernizationData sovereignty AnnouncementECS Anywhere and EKS Anywhere ーtwo new versions of AWS managed containers and managed Kubernetes services announcements are made at AWS re Invent In May ECS Anywhere was generally available and today th September the EKS Anywhere is available for general use Sivamuthu Kumar சிவமுத்துகுமார் ksivamuthu Super excited about this launch EKS twitter com awscloud statu… PM Sep Amazon Web Services awscloud No need to contain excitement for containers ️With Amazon EKS Anywhere easily create and operate Kubernetes clusters on premーon your own infrastructure in one installable software package AWS CloudComputing Developer First Look I planned to explore AWS EKS with the three features I m excited about Installation methods Local and or typical Production on premise environments VMware Manage on premise EKS Anywhere Cluster from AWS EKS ConsoleSetup GitOps in EKS Anywhere ClusterIn this blog post I m capturing the steps I followed and my thoughts on them Installing EKS Anywhere Local The eksctl tool is my favorite tool for creating the EKS cluster in AWS To install EKS Anywhere eksctl got a plugin called eksctl anywhere This will let you create a cluster in multiple providers for local development or production workloads I tried macOS first It got stuck at Creating new bootstrap cluster ending up a lot of containers created and exiting Maybe it s an issue with my macOS resource requirements GB RAM GB assigned for docker Later I switched to Linux VM Core GB Ram created in Azure To install in macOS using home brew brew install aws tap eks anywhereor install plugin using the following command in Linux export EKSA RELEASE OS uname s tr A Z a z curl EKSA RELEASE OS eksctl anywhere v EKSA RELEASE OS amd tar gz silent location tar xz eksctl anywheresudo mv eksctl anywhere usr local bin Now we are going to install the EKS Anywhere in the local environment using the docker provider eksctl anywhere generate clusterconfig siva dev provider docker gt siva dev yamleksctl anywhere create cluster f siva dev yamlThe cluster is created successfully in a Linux VM root eks anywhere vm home azureuser eksctl anywhere create cluster f siva dev yamlPerforming setup and validationsWarning The docker infrastructure provider is meant for local development and testing onlyDocker Provider setup is validCreating new bootstrap clusterInstalling cluster api providers on bootstrap clusterProvider specific setupCreating new workload clusterInstalling networking on workload clusterInstalling storage class on workload clusterInstalling cluster api providers on workload clusterMoving cluster management from bootstrap to workload clusterInstalling EKS A custom components CRD and controller on workload clusterCreating EKS A CRDs instances on workload clusterInstalling AddonManager and GitOps Toolkit on workload clusterGitOps field not specified bootstrap flux skippedWriting cluster config fileDeleting bootstrap clusterCluster created Install test workloads kubectl apply f amp amp gt kubectl apply f amp amp gt kubectl apply f and verify the resources are created root eks anywhere vm home azureuser k get all n echoserverNAME READY STATUS RESTARTS AGEpod echoserver ddffdd jzlf Running msNAME TYPE CLUSTER IP EXTERNAL IP PORT S AGEservice echoserver NodePort lt none gt TCP msNAME READY UP TO DATE AVAILABLE AGEdeployment apps echoserver msNAME DESIRED CURRENT READY AGEreplicaset apps echoserver ddffdd msInstalling EKS Anywhere VMWare I didn t try this out in VMWare yet You can follow through with the documentation here The bare metal support is planned to release in Manage on premise EKS Anywhere Cluster from AWS EKS ConsoleThe eksctl and kubectl tools are helping us to manage the on premise EKS Anywhere cluster Now let s see how to connect this on premise cluster in the AWS EKS console and manage it from there as a single pane of a dashboard of all of your EKS clusters in AWS EKS and on premise EKS Anywhere For this purpose The AWS EKS Connector lets you connect your EKS Anywhere cluster to the AWS EKS console where you can see your EKS Anywhere cluster its configuration workloads and their status EKS Connector is a software agent that can be deployed on your EKS Anywhere cluster enabling the cluster to register with the EKS console Create the required IAM roles and policies to register a cluster I followed the documentation here Create a service linked role Don t miss this step I got stuck in this without any idea why EKS Anywhere Cluster is not registering aws iam create service linked role aws service name eks connector amazonaws comRegister the EKS cluster by selecting EKS Anywhere Provider and IAM role It will give you the yaml file of the eks connector agent to install in the EKS anywhere cluster And if you apply the necessary permissions to the IAM for managing the cluster all set Now you can manage the workloads configuration of the EKS anywhere cluster from the AWS EKS console Setup GitOps in EKS Anywhere ClusterEKS Anywhere supports a GitOps workflow for the management of your cluster This is another feature I m very much interested in to manage the cluster configuration and workloads from the version controlled source repo in Git When you create a cluster with GitOps enabled EKS Anywhere will automatically commit your cluster configuration to the provided GitHub repository and install a GitOps toolkit on your cluster which watches that committed configuration file Once a change is detected by the GitOps controller running in your cluster the cluster will be adjusted to match the committed configuration file Add the gitops configuration as below in the YAML file you generated above There is no way to modify the existing cluster from eksctl anywhere So I deleted the cluster and recreated it with gitops configuration apiVersion anywhere eks amazonaws com valphakind Clustermetadata name siva devspec gitopsRef kind GitOpsConfig name siva dev gitops apiVersion anywhere eks amazonaws com valphakind DockerDatacenterConfigmetadata name siva devspec apiVersion anywhere eks amazonaws com valphakind GitOpsConfigmetadata name siva dev gitopsspec flux github personal true repository eks anywhere gitops owner ksivamuthuThe repo is set and the flux is installed in the cluster pointing to the repo we configured The changes in the configuration you pushed to the git branch will be monitored by the GitOps controller GitOps Controller pulls the changes and apply the changes in the cluster configuration and workloads root eks anywhere vm home azureuser k get pods n flux systemNAME READY STATUS RESTARTS AGEhelm controller dc npb Running mskustomize controller cf fm Running msnotification controller cdd krtrc Running mssource controller dcfdff twds Running ms ConclusionWith Amazon EKS Anywhere customers can now create and run Kubernetes clusters on premises using VMware Inc s vSphere It comes with an installable software package to create and operate Kubernetes plus automation tools for cluster lifecycle support I m so interested to explore the possibilities of EKS Anywhere at the customer s on premise environments on modernization of legacy workloads Let me know your thoughts in the comments below I m Siva working as Sr Software Architect at Computer Enterprises Inc from Orlando I m an AWS Community builder Auth Ambassador and I am going to write a lot about Cloud Containers IoT and Devops If you are interested in any of that make sure to follow me if you haven t already Please follow me ksivamuthu Twitter or check out my blogs at 2021-09-09 02:24:23
海外TECH DEV Community 10 VS Code Extension For Every Frontend Developers https://dev.to/coderzz/10-vs-code-extension-for-every-frontend-developers-4imo VS Code Extension For Every Frontend DevelopersHello everyone my name is Vansh and I m a frontend developer In this blog post I would like to share VS code extensions that every frontend developer should use The purpose of using these extensions is to write faster cleaner and more consistent code Let s Jump in  Read More VS Code extensions every Frontend Developer should use 2021-09-09 02:14:53
海外TECH DEV Community Best CSS Properties For Building A powerful Website https://dev.to/coderzz/best-css-properties-for-building-a-powerful-website-4d1l Best CSS Properties For Building A powerful WebsiteWhether you re at the beginning of your CSS journey or somewhere else you got to admit   a number of CSS properties is massive And it s easy to confuse yourself in that vast sea  You re copying code from StackOverflow until you find a solution that fits But how will that scale Why does it even work Most of the time you don t care about the answer You just focus on the result When building a website some of the CSS properties are must haves yet it s hard to recognize them  This article exists to help you solve the most common CSS problems while building a website Let s dive into properties you cannot avoid  Read More Best CSS Properties For Building A powerful Website 2021-09-09 02:10:27
海外TECH DEV Community Run, JavaScript, Run https://dev.to/vudodov/run-javascript-run-3lf4 Run JavaScript Run PreambleLet s admit JavaScript is not the most predictable language out there It might get pretty quirky very easily Let s look at the following example setTimeout gt console log timeout console log console Promise resolve promise then res gt console log res prints console promise timeoutEven if we will change the order of instructions it won t impact the final result Promise resolve promise then res gt console log res setTimeout gt console log timeout console log console prints console promise timeoutIt doesn t matter how we will shuffle these three lines they will always end up executed in the same order console promise timeout Why Well you know Of course there is a good enough reason for that And we ll get to it shortly But first we need to clarify a thing or two Put on your JavaScript hat and let s go We are going to focus on the Web Browser JavaScript nonetheless most of the things we are going to discuss can be correlated to other agents such as NodeJS ️Worth mentioningsetTimeout gt is equal to calling setTimeout gt Although neither will guaranty immediate execution as the timeout value is used to set the minimum wait period not the exact period Anyhow example above is completely legit in a given context One thing at a timeThere s one important aspect of JavaScript we need to call out from the start The single threaded nature of the environment it runs in It is hard to overstate the impact of this fact on the language web browsers and ultimately anything that runs JavaScript one thread one call stack one thing at a timePause here for a sec One thing at a time Even when it seems like multiple things are happening simultaneously in reality there s only one single task that gets executed at every given moment just really fast The single thread we were talking about is called browser main thread nowadays more accurate name would be a tab main thread Thus everything that happening on the page is happening in one single thread It is easy to underestimate the scale While our gorgeous code is running meantime the web browser is rendering page content receiving and dispatching all sorts of events doing garbage collection distributing future work and much more ️What about JavaScript Console that thing we all use in the Browser Dev Tools It depends but most likely it will be a different process hence a different thread Exception The single thread thing is the default behavior however we can branch from the main thread and run our JavaScript code in the separate thread with a help of Web Workers API A single thread is not a mistake or a bad design Make JavaScript single threaded was a conscious decision Years ago the average computer had a single core and was less powerful than any mid range phone today Websites were not really interactive if at all hence didn t really need any JavaScript magic Who could foresee where it is going to end up That thing that runs your JavaScriptOften terms JavaScript Runtime and JavaScript Engine are used interchangeably Nevertheless they are like salt and green Two completely different things Let me explain what I mean Three main pieces constitute the JavaScript Runtime They are conceptually separated And most likely developed by different people teams companies and represent independent pieces of software However they work in close collaboration JavaScript Engine compiles optimizes and executes code handles memory allocation and garbage collectionEvent Loop orchestrates and distributes the work enables asynchronicity Browser Web API allows communication with things located outside of the Runtime e g system timers file system HTTP address bar DOM etc The Big Picture The EngineThe JavaScript Engine does not run JavaScript It runs ECMAScript Isn t it the same thing Appears no I ll explain If we will look through the source code of an arbitrary JavaScript engine you know cuz it is a casual thing we do lol we will find an implementation of the ECMAScript declaration This will include all sorts of base objects including Object such as Date and String key language constructions like loops conditions and so forth However if we will look for say setTimer or fetch we won t find much Because they are not part of ECMAScript They are part of Browser Web API nothing to do with Web itself really more like Browser API but you ll find it going under Web API Web Browser API Browser API and simply API The JavaScript Engine will be managing memory and controlling the execution of our fabulous code Which will never be executed in its original shape the engine will keep modifying it all the time Most of the engines are pretty smart they will keep optimizing the code throughout the page lifetime in the constant chase for performance improvements Important though is that the engine only executes the code that it finds in the Stack of Frames or Call Stack or simply the Stack Each frame represents a function call While the engine is running the code it might discover a new function call not to be confused with function declaration and push it to the Call Stack as a new frame Once a new frame has been added the engine pauses the execution of the current frame and focuses on the new one After Engine finishes frame function execution it pops it from the stack and continues where it left assuming it is not the last frame Every function call will end up as a new item on the Call Stack Worth mentioning that Engine does not own exclusive rights on pushes to the Call Stack new work might be pushed from the outside of the engine boundaries we ll talk about it next The Call Stack controls the execution sequence inside Engine Engine won t stop popping frames from the Call Stack until it is empty And it won t allow any interruptions from outside until it is done In the previous article Web Browser Anatomy we ve already discussed some of the key JavaScript engine aspects parsing pre parsing compilation and optimization de optimization With a deeper focus on the V Compilation Pipeline The article is more focused on the code processing itself and slightly touches Browser Engine not to be confused with JavaScript Engine and basic rendering concepts so if it sounds interesting don t forget to check it out after The LoopThe Event Loop is an orchestrator and the main distributor of the work It does not perform the work itself but it ensures that the work is distributed in the expected manner which may vary from browser to browser It is literally an infinite loop ️which constantly keeps checking if there s any work it can schedule for execution A simplified version would look like thiswhile true if allDone const thingsToDo getThingsToDo doThings thingsToDo ️On each iteration the Event Loop performs an ordered series of jobs defined in the processing model documentation We will be getting back to it through the course of the article The Event Loop and event loopsThe Event Loop we usually refer to in the context of the web browser is a Window Event Loop Every origin will get one However sometimes few tabs windows from the same origin might share a single loop Especially when one tab is opened from another This is where we can exploit multiple tabs pages at once Anyhow Window Event Loop is not the only one event loop running in the browser Web workers and other workers will use its own Worker Event Loop Sometimes it will be shared across all workers And worklets will have its own Worklet Event Loop But hereafter when we refer to Event Loop we will actually be referring to the Window Event Loop Tasks Microtasks and MacrotasksGiven the single threaded nature of the language it is hard to overstate the importance of asynchronicity The async behavior is implemented by a set of queues FIFO This is a very common approach Queues are very comfortable for implementing asynchronicity in software and beyond its boundaries Think of a cloud architecture With a high probability in its heart there will be some sort of queue that will be dispatching messages all over the place Anyway back to JavaScript There are two not three main types of queues task queue and microtask queue At the first glance it might look like they are identical And it is true to some degree they have the same role postpone code execution for later The difference lies in how Event Loop uses them You probably wondering where did macrotasks go Macrotask is just a V name for the task So thereafter we will use the term task and everything we say for the task can be applied to macrotask Task queueThe task queue is what keeps the whole thing spinning This is where most of our code gets scheduled for execution Event the initial code the one that we place in between the lt script gt lt script gt tags gets to the Call Stack through the Task Queue Often our code looks like thisdo this on button clickdo that when the server respondscall the serverIn other words we define callbacks what to do and assign them to events when to do that suppose to trigger them When the event happens it does not execute the callback immediately instead it creates and enqueues a task in the Task Queue which in its turn will be eventually processed in other words pushed to the Call Stack The queue is out of our direct reach Dequeueing is happening inside the event loop Most of the tasks are enqueued through so called generic task sources This includes user interactions DOM manipulation network activity and history Although we obviously have a way to impact what and when will get to the Task Queue e g through event handling Ok that s gonna be a tough sentence so bear with me here Dequeueing process happening once per iteration and it will least keep dequeuing until the newest task from the previous iteration that have been in the queue at the moment of the beginning iteration is still in the queue Keep in mind that the newest tasks will be in the tail of the queue due to FIFO First In First Out concept In other words all new tasks we are adding will be executed in the next iteration all current old tasks will be executed in this iteration As per processing model documentation The task queue is not really a queue but an ordered set However it is not very important as its behavior in this context is equivalent to the queue There might be and probably will be multiple task queues in a single event loop The most common reason for that is task priority management E g there might be a separate task queue for user interactions and another queue for everything else This way we can give user interactions higher priority and handle them before anything else Microtask queuePromises asynchronous functions all this goodness is empowered by the microtask queue It is very similar to the task queue except for three major differences Microtasks are processed at different phases in the Event Loop iteration We mentioned above that each Event Loop iteration following strict order known as processing model Microtasks can schedule other microtasks and the new iteration of the Event Loop won t begin until we reach the end of the queue We can directly enqueue a microtask with queueMicrotask The rest is pretty much the same once a task is dequeued and a callback is extracted it will be pushed to the Call Stack for immediate execution Browser Web APIThe final piece in the puzzle is an API the Browser API The connection bridge between the code and everything outside of the runtime Communication with a file system or remote service calls Various event subscriptions Interactions with the address bar and history And more Is facilitated by Browser API Browser API allows us to define event handlers And this is the most common way for developers to pass callbacks event handlers to the Task Queue Browser API are browser specific Each browser implements them separately Hence they work differently although probably will have the same effect Hence every now and then you might bump into a cool new feature that won t be supported by Internet Explorer Browser X And the most common reason the API is not implemented in the Browser X At least nowadays the naming is kinda conventional and no one tries to show uniqueness Imagine writing code when all browsers would name things differently and everything would produce different effects That would be a nightmare wouldn t it Well it used to be like that And it is kinda like this nowadays lol Fortunately we have many tools like BabelJS and a huge community behind that helps mitigate this problem for us I still remember how you had to implement ajax calls XMLHTTPRequest for all possible browsers in your code until the jQuery appeared That was a game changer Bringing things togetherWe ve discussed quite a few things thus far Let s bring them all together in a single list And go over it in the same order as Event Loop will Remember that once some code gets in the Call Stack the Engine will hijack control and start popping executing and pushing the code until finally the Call Stack is empty Once reached the end of the stack it returns control to the same point where it hijacked it The browser will find some JavaScript either in between the lt script gt tags or in the DevTools Console And ultimately it will push it to the Task Queue The Loop keeps checking the Task Queue Once it finds the initial code the Loop will move it to the Call Stack The Engine immediately takes over and doing its job until it empties the Call Stack The Loop will check microtask queue s It will keep dequeuing tasks from the queue and pushing them one item at a time to the Call Stack and it will keep executing until empty from the microtask queue until the microtask queue is empty Remember that microtask code can push another microtask in the queue and it will be executed during the same iteration right here Both Engine Call Stack and Microtask Queue are now empty Finally the Loop gets back to the Task Queue Keep in mind that events were emitting all the time either in the code or outside of it The Loop will mark the newest task the one in the tail of the queue in the queue and start dequeuing tasks from oldest to newest head to tail and pushing code to the Engine Call Stack until it reaches marked task Next it will do some other unrelated to the runtime work like rendering Once all is done the new iteration starts from point The exampleLet s revisit the example from the beginning of the article setTimeout gt console log timeout console log console Promise resolve promise then res gt console log res prints console promise timeoutDoesn t matter how we would shuffle instruction the produced result will stay the sameActually now it makes much more sense check it out First all this code is sent to the Call Stack and executed sequentially setTimeout almost immediately sends a callback to the Task Queue console log prints string in the console this is our first line console Promise resolve then is immediately resolved promise thus it sends the callback to the Microtask Queue the same moment it is executed Stack finishes execution it is empty and it passes control back to the Event Loop Event Loop checks Microtask Queue and finds there callback from the resolved promise and sends it to the Call Stack this is our second line promise Microtask Queue is empty Call Stack is empty it is Task Queue turn now The Event Loop finds a timeout callback in the Task Queue and sends it to the Call Stack this is our third and last line timeout And we are done the stack is empty along with all queues That wasn t too bad was it Recursion ExamplesAlright it is time to have some fun Given we already know how to interact and what to expect from both queues and a stack We will try to implement three different infinite recursion examples Each will utilize one given mechanism It will be more fun if you d open a console and try to run code examples on your own Just don t use this page s console lol I d also advise preparing Browser Task Manager to keep an eye on changes in memory and CPU consumption Most of the modern browsers will have one somewhere in settings Let s start with classics Call Stackconst recursive gt console log stack recursive console log unreachable code recursive console log unreachable code stackstackstack Uncaught RangeError Maximum call stack size exceeded at recursive lt anonymous gt at recursive lt anonymous gt at recursive lt anonymous gt at recursive lt anonymous gt at recursive lt anonymous gt at recursive lt anonymous gt at recursive lt anonymous gt at recursive lt anonymous gt at recursive lt anonymous gt at recursive lt anonymous gt The infinite recursion and its good old buddy Stack Overflow Exception I bet you ve seen a few of these before The Stack Overflow Exception is about reaching the max size of the Call Stack Once we exceed the max size it will blow up with a Maximum call stack size exceeded Note that there are a few console log that will never get printed Remember that every time we push a new item on the Call Stack the Engine will immediately switch to it since we are just pushing new items and never popping The stack keeps growing until we reach its maximum Task QueueLet s try the Task Queue now This one won t blow up immediately it will run much longer util the browser propose you kill the page or wait if you are insistent const recursiveTask gt console log task queue setTimeout recursiveTask console log reachable code recursiveTask console log reachable code reachable code task queuereachable code task queuereachable code task queuereachable code task queuereachable code Note that both extra console log statements are printed Because all the time we are adding a new task to the Task Queue we add it for the next iteration and not for immediate execution Hence all code in this example is processed before starting a new iteration Keep an eye on the memory footprint It will be growing fairly fast together with CPU usage Under a minute my tab went over Gig of memory Microtask QueueOk the final one we ll do the same stuff infinite recursion but this time for the microtask queue const recursiveMicrotask gt console log microtask queue queueMicrotask recursiveMicrotask console log reachable code setTimeout gt console log unreachable code recursiveMicrotask console log reachable code setTimeout gt console log unreachable code reachable code microtask queuereachable code microtask queuereachable code microtask queuereachable code microtask queuereachable code Note how tasks from the Task Queue are never executed unreachable code This is happening because we never end up current Event Loop iteration we keep adding microtasks to the Microtask Queue and it prevents the iteration from finishing If you will leave it for long enough you ll notice that the page including the address bar becomes less responsive Until it completely dies Of course the memory footprint and CPU usage will keep growing much faster since we polluting the Task Queue but if we will remove both setTimeout it will reduce the pace of memory footprint growth Side noteRecursion might be dangerous for infinity simulation I d recommend looking into generator functions for such matters We won t get under the boot of generator functions At least for now But here s a small example of an infinite number generator which shows the gist of it function generateNumber let i while true yield i const numbers generateNumbers console log numbers next value console log numbers next value console log numbers next value That s it Of course everything we looked at is a simplified representation However it illustrates in enough detail how the Runtime functions It is accurate enough to explain the true nature of asynchronicity and code execution sequences in JavaScript As well as hopefully reveal some odd behavior and unexpected race conditions JavaScript has an extremely low entrance barrier And often it is confused with being unstable However some of its behavior is a trade off of some sort and payment for such a low entrance barrier Although few bugs are left there for backward compatibility lol If you enjoyed the read don t forget to check out another related article Web Browser Anatomy 2021-09-09 02:09:10
海外TECH DEV Community AI Project For Beginners https://dev.to/coderzz/ai-project-for-beginners-24ph AI Project For BeginnersArtificial Intelligence has made a significant impact on our daily lives Every time you scroll through social media open Spotify or do a quick Google search you are using an application of AI The AI industry has expanded massively in the past few years and is predicted to grow even further reaching around billion U S dollars by Multinational companies like IBM Accenture and Apple are actively hiring AI practitioners The median salary of an AI engineer as of is that can go over The field of AI is vast and there are many areas within the industry that you can choose to specialise Say if you are intrigued by facial recognition systems and image generation you can choose to work in the field of computer vision  If you d like to build models that can converse with people and learn human language you can work in the field of NLP Natural Language Processing There is a lot of work being done today for the advancement of Artificial Intelligence Companies need AI specialists who can build and deploy scalable models to meet growing industry demands It isn t tough to get started in the field of AI While there is the complexity involved in building machine learning models from scratch  most AI jobs in the industry today don t require you to know the math behind these models Many companies require individuals who can build AI solutions scale them and deploy them for the end user Many high level libraries and frameworks can help you do this without an in depth knowledge of how the models work  Read More Artificial Intelligence Project For Beginners 2021-09-09 02:01:04
Apple AppleInsider - Frontpage News Xbox controller update delivers improved iPhone connectivity with iOS 15 https://appleinsider.com/articles/21/09/09/xbox-controller-update-delivers-improved-iphone-connectivity-with-ios-15?utm_medium=rss Xbox controller update delivers improved iPhone connectivity with iOS A firmware update pushed out by Microsoft on Wednesday allows gamers to keep their Bluetooth enabled Xbox controller paired with both the console and a smartphone like Apple s iPhone Available to members of the Xbox Insider Program the firmware delivers Bluetooth Low Energy compatibility to Xbox One controllers with Bluetooth Xbox Elite Wireless Controller Series and Xbox Adaptive Controllers The new function will enhance cross platform connectivity and reduce latency Microsoft said in a blog post Once the firmware is installed the controller will remember one Bluetooth host like an iPhone or Android handset and one Xbox Wireless host Users can switch between host devices by tapping the controller s pair button Currently gamers are required to manually move through the pairing process when transitioning between Xbox and iPhone Read more 2021-09-09 02:14:05
海外TECH Engadget 'Strange New Worlds' shows off more of its cast on Star Trek Day https://www.engadget.com/star-trek-strange-new-worlds-paramount-plus-020913184.html?src=rss x Strange New Worlds x shows off more of its cast on Star Trek DayStar Trek Strange New Worlds is both a prequel and a spinoff depicting the adventures of the original USS Enterprise before James Kirk assumed command It features the return of Anson Mount as Captain Pike Rebecca Romijn as Number One and Ethan Peck as Spock all reprising their roles from Discovery The cast will be filled out by new actors playing other characters from the original series with Celia Rose Gooding as Lieutenant Nyota Uhura Jess Bush as Nurse Christine Chapel and Babs Olusanmokun as Doctor M Benga Unlike Discovery however Strange New Worlds is intended to be more episodic with standalone installments similar to TOS and TNG New characters also joining the cast include Christina Chong as La an Noonien Singh Melissa Navia as Lieutenant Erica Ortegas and Bruce Horak as Hemmer No premiere date has been given yet but it s likely to debut after Prodigy Discovery and Picard finish their upcoming seasons nbsp You can watch the Star Trek Day event on YouTube while you ll need a subscription to Paramount to watch Strange New Worlds when it drops next year 2021-09-09 02:09:13
海外科学 NYT > Science California Aims to Ban Recycling Symbols on Things That Aren’t Recyclable https://www.nytimes.com/2021/09/08/climate/arrows-recycling-symbol-california.html California Aims to Ban Recycling Symbols on Things That Aren t RecyclableThe well known three arrows symbol doesn t necessarily mean that a product is actually recyclable A new bill would limit the products allowed to feature the mark 2021-09-09 02:55:04
金融 ニッセイ基礎研究所 貸出・マネタリー統計(21年8月)~借入返済ペースに業種別・規模別格差が発生、投信は3ヵ月連続の前年割れに https://www.nli-research.co.jp/topics_detail1/id=68670?site=nli 貸出先の規模別動向月までを見ると、大・中堅企業向け貸出がヵ月連続で前年を割り込んでいるうえ、中小企業向け貸出の伸びもプラス幅を縮小している図表。 2021-09-09 11:37:30
海外ニュース Japan Times latest articles The West owes Qatar a favor over Afghanistan. That was the point. https://www.japantimes.co.jp/news/2021/09/09/world/politics-diplomacy-world/qatar-west-afghanistan/ islamic 2021-09-09 11:29:29
海外ニュース Japan Times latest articles North Korea’s Kim oversees first military parade since Biden’s swearing-in https://www.japantimes.co.jp/news/2021/09/09/asia-pacific/north-korea-military-parade-september/ North Korea s Kim oversees first military parade since Biden s swearing inKim wearing a gray suit and looking noticeably thinner was seen watching the parade marking the rd anniversary of the country s founding in pictures released 2021-09-09 11:20:01
ニュース BBC News - Home Channel crossings: Priti Patel authorises turning back of migrant boats https://www.bbc.co.uk/news/uk-58495948?at_medium=RSS&at_campaign=KARANGA measures 2021-09-09 02:40:02
ビジネス ダイヤモンド・オンライン - 新着記事 中銀デジタル通貨、マイナス金利の深掘りに道 - WSJ発 https://diamond.jp/articles/-/281819 掘り 2021-09-09 11:10:00
GCP Google Cloud Platform Japan 公式ブログ Vertex AI での迅速で安全なサービス提供に向けた予測プライベート エンドポイントの導入 https://cloud.google.com/blog/ja/products/ai-machine-learning/creating-a-private-endpoint-on-vertex-ai/ また、VertexAIを使用してMLのワークフローをサポートする方法については、こちらの紹介動画をご覧ください。 2021-09-09 04:00:00
北海道 北海道新聞 【道スポ】9日先発のバギー 連勝狙う 日ハム https://www.hokkaido-np.co.jp/article/587322/ 勝ち越し 2021-09-09 11:11:00
北海道 北海道新聞 坂本姉妹、ピアノデュオ3位 ミュンヘン音楽コンクール https://www.hokkaido-np.co.jp/article/587321/ 音楽 2021-09-09 11:03:00
ニュース Newsweek 混沌のアフガニスタンを逃れた難民が向かう国はどこ? https://www.newsweekjapan.jp/stories/world/2021/09/post-97066.php 混沌のアフガニスタンを逃れた難民が向かう国はどこイスラム主義勢力タリバンが年ぶりに全権を掌握したアフガニスタン。 2021-09-09 11:46:00
ニュース Newsweek 取引先から切られる?  SDGsが中小企業にとって重要になる理由 https://www.newsweekjapan.jp/stories/business/2021/09/-sdgs.php ①SDGsの各目標を参考に、自社のビジネスに影響を与えるESG問題を知る②自社の活動をSDGsの枠組みでチェックし、実践できている目標と実践できていない目標を整理する③整理した結果をビジネスの改善に活用する『やるべきことがすぐわかるSDGs実践入門中小企業経営者担当者が知っておくべきの原則』より自社の商品やサービスを棚卸しすることは、持続可能な会社経営にも役立っていくことでしょう。 2021-09-09 11:30:00
IT 週刊アスキー ハーゲンダッツの微アル(!?)な「バーマロンタルト」はラムの香りにうっとり https://weekly.ascii.jp/elem/000/004/068/4068652/ 移り変わり 2021-09-09 11:30:00
IT 週刊アスキー 65種以上の寿司が食べ放題! 鮨アカデミー新宿西口店「寿司90分コース」9月30日まで期間限定開催 https://weekly.ascii.jp/elem/000/004/068/4068670/ 新宿西口 2021-09-09 11:20:00
IT 週刊アスキー ファミマの人気「スフレ・プリン」にご当地フレーバーが登場! ホットケーキ風や紅芋チョコ味も https://weekly.ascii.jp/elem/000/004/068/4068555/ 地域限定 2021-09-09 11:10:00
海外TECH reddit Twitter、Redditのサブレディットのような「Communities」のテスト開始 だったらRedditでよくないか? https://www.reddit.com/r/newsokunomoral/comments/pkohc6/twitterredditのサブレディットのようなcommunitiesのテスト開始/ ewsokunomorallinkcomments 2021-09-09 02:10:13
海外TECH reddit 日本が「大麻解禁」を検討し始めた深刻な理由とは https://www.reddit.com/r/newsokunomoral/comments/pkoou6/日本が大麻解禁を検討し始めた深刻な理由とは/ ewsokunomorallinkcomments 2021-09-09 02:22:55
ニュース THE BRIDGE 人工タンパク質繊維開発のSpiber、事業価値証券化などで344億円を調達——世界的アパレルブランド向けに量産体制確立へ http://feedproxy.google.com/~r/SdJapan/~3/Ex3ISOldWTk/spiber-jpy34-4b-funding 人工タンパク質繊維開発のSpiber、事業価値証券化などで億円を調達ー世界的アパレルブランド向けに量産体制確立へ※この記事は英語で書かれた記事を日本語訳したものです。 2021-09-09 02:30:42
GCP Cloud Blog JA Vertex AI での迅速で安全なサービス提供に向けた予測プライベート エンドポイントの導入 https://cloud.google.com/blog/ja/products/ai-machine-learning/creating-a-private-endpoint-on-vertex-ai/ また、VertexAIを使用してMLのワークフローをサポートする方法については、こちらの紹介動画をご覧ください。 2021-09-09 04:00: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件)