投稿時間:2021-12-30 01:30:46 RSSフィード2021-12-30 01:00 分まとめ(35件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
js JavaScriptタグが付けられた新着投稿 - Qiita JavaScriptのif構文とは(初学者向け) https://qiita.com/saraarai5454/items/a00fc592511bbca05060 ↓例の答えはもし答えユーザがと入力した時表示正解それとも答えユーザがと入力した時表示まさかの掛け算それ以外表示不正解です上の例をしっかりとJavaScriptの構文にした場合はこのようになります↓constanswerpromptの答えはifansweralert正解elseifansweralertまさかの掛け算elsealert残念それでは細かく説明をしていきます。 2021-12-30 00:12:42
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Node.jsとexpressを駆使してページ遷移と画像表示を両立したい。miyabi-sunさんにもう一度お聞きしたいです。 https://teratail.com/questions/376027?rss=all Nodejsとexpressを駆使してページ遷移と画像表示を両立したい。 2021-12-30 00:58:55
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) RustでDieselにtransaction-rsを試みるがdiesel::MysqlConnectionにdiesel::connection::Connectionが実装されていないと怒られる https://teratail.com/questions/376026?rss=all RustでDieselにtransactionrsを試みるがdieselMysqlConnectionにdieselconnectionConnectionが実装されていないと怒られる開発環境MacbooknbspPronbspMnbsprustupnbspnbspceanbspmysqlnbspnbspVernbspnbspfornbspmacosnbsponnbsparmnbspHomebrewやったこと、解決したいこと今、私はRustでDieselを用いてMySQLにデータをCRUDする簡単なアプリケーションを作成している。 2021-12-30 00:51:46
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 【React】エラー表示 『Attempted import error: 'auth' is not exported from '../firebase'.』を改善したい https://teratail.com/questions/376025?rss=all 【React】エラー表示『Attemptedimporterrorxauthxisnotexportedfromxfirebasex』を改善したいreactで、Firebaseを使い、認証機能を作成しています。 2021-12-30 00:49:01
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) htmlからワードプレスに変更するとき、固定ページだけ管理画面で編集できません。 https://teratail.com/questions/376024?rss=all htmlからワードプレスに変更するとき、固定ページだけ管理画面で編集できません。 2021-12-30 00:42:34
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Binance APIを使用しBOTを作成中です。レートリミットを超えてしまうとエラーが通知されてしまうのですが、理由が分かりません。どなたか教えてください。 https://teratail.com/questions/376023?rss=all 現在、仮想通貨の急騰急落を通知するBOTを作成しております。 2021-12-30 00:36:24
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) StringBuilderクラスのsubSequenceとsubstringについて https://teratail.com/questions/376022?rss=all builder 2021-12-30 00:17:33
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) VisualStudioのイミディエイトウィンドウでラムダ式が実行できない https://teratail.com/questions/376021?rss=all VisualStudioのイミディエイトウィンドウでラムダ式が実行できないVisualStudioでイミディエイトウィンドウでラムダ式が実行できません。 2021-12-30 00:14:17
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) htmlの謎の改行現象を解決したい。 https://teratail.com/questions/376020?rss=all htmlの謎の改行現象を解決したい。 2021-12-30 00:07:08
Linux Ubuntuタグが付けられた新着投稿 - Qiita Ubuntu LinuxでCapsLockをShift+CapsLockに変更する方法 https://qiita.com/PopularHero/items/ad3723a625d1a85a2351 問題発生初めはCapsLockのオフオンが快適でしたが、暫くしていると日本語のオフオンのCapsLockと本来のCapsLockとが競合するようになりました。 2021-12-30 00:08:14
AWS AWSタグが付けられた新着投稿 - Qiita ROSAで独自コンテナをインターネットに公開してみた https://qiita.com/sugimount-a/items/4551fe33bf699cb9a4b2 ROSARedHatOpenShiftServiceonAWSを動かしてみたROSAのコンソールのアクセス経路と提供元Podを調査してみた今回は、自分たちで作成したDeploymentを外部公開するときの手順を紹介します。 2021-12-30 00:33:43
Docker dockerタグが付けられた新着投稿 - Qiita dockerコンテナ内などでqtを使用したアプリ使用時にエラーが出る。qt.qpa.xcb: could not connect to display https://qiita.com/seigot/items/2df59ab8853e004fb3ed dockerコンテナ内などでqtを使用したアプリ使用時にエラーが出る。 2021-12-30 00:56:30
Docker dockerタグが付けられた新着投稿 - Qiita docker: Error response from daemon: Failed to inspect container エラーの解決策 https://qiita.com/seigot/items/a6d8e77e67826bece4a4 dockerErrorresponsefromdaemonFailedtoinspectcontainerエラーの解決策以下のような感じでdockerを使用しようとするとエラーdockerrunpshmsizemseigotttetrisdockerlatestdockerErrorresponsefromdaemonFailedtoinspectcontainerfaeeaecfddabaedbbceeaebaErrorresponsefromdaemonreadlinkvarlibdockeroverlaylinvalidargumentimage取得時に何かおかしな点があったような気がするので、imageを削除する。 2021-12-30 00:44:35
海外TECH Ars Technica Worker protests, mass illness lead Apple to put iPhone plant on probation https://arstechnica.com/?p=1822727 december 2021-12-29 15:48:00
海外TECH Ars Technica Amazon Echo Show 15 review: Alexa on the big screen https://arstechnica.com/?p=1821589 families 2021-12-29 15:25:10
海外TECH MakeUseOf Hohem iSteady Pro 4 Review: Feature-Rich Budget Action Camera Gimbal https://www.makeuseof.com/hohem-isteady-pro-4-review-action-camera-gimbal/ mount 2021-12-29 15:55:11
海外TECH MakeUseOf Signal Founder Criticizes Telegram Over Encryption, But Do His Claims Have Merit? https://www.makeuseof.com/signal-founder-criticizes-telegram-encryption/ service 2021-12-29 15:45:12
海外TECH MakeUseOf How to Find a Book Without Knowing the Title or Author https://www.makeuseof.com/tag/how-to-find-a-book-without-knowing-the-title-or-author/ description 2021-12-29 15:30:37
海外TECH MakeUseOf How to Install Octoprint on a Raspberry Pi and Manage Your 3D Prints from Anywhere https://www.makeuseof.com/how-to-install-octoprint-on-a-raspberry-pi/ raspberry 2021-12-29 15:30:36
海外TECH MakeUseOf How to Link Excel Data to Your PowerPoint Presentation https://www.makeuseof.com/how-to-link-excel-data-to-powerpoint/ spreadsheet 2021-12-29 15:15:22
海外TECH MakeUseOf Top 9 Professional Sample Code Websites for Programmers https://www.makeuseof.com/tag/top-10-professional-sample-code-websites-for-programmers/ sample 2021-12-29 15:10:22
海外TECH DEV Community Write Better Python Code https://dev.to/dharaneeswaranr/write-better-python-code-51j0 Write Better Python Code IntroductionThis article has the collection python coding practices that I have learned over last few months for writing more idiomatic python code Multiple AssignmentInitialise same value for different variables Instead of thisx y z Use thisx y z Variable Unpackingx y x y x y x y x y z x y z Swapping Variables Instead of thistemp xx yy temp Use thisx y y x Name CasingIn python snake case is preferred over camelCase for variables and functions names Instead of thisdef isEven num pass Use thisdef is even num pass Conditional Expressions Instead of thisdef is even num if num print Even else print Odd Use thisdef is even num print Even if num else print Odd Or thisdef is even num print Even if num else Odd String Formattingname Dumbledore item Socks Instead of thisprint s likes s name item Or thisprint likes format name item Use thisprint f name likes item Comparison Operator Instead of thisif lt x and x lt print x is a digit number Use thisif lt x lt print x is a digit number Iterating over a list or tupleWe don t need to use indices to access list elements Instead we can do this collection Instead of thisfor i in range len collection print collection i Use thisfor number in collection print number Both of these yields the same output Using enumerate When you need both indices and values we can use enumerate names Harry Ron Hermione Ginny Neville for index value in enumerate names print index value Using Set for searchingSearching in a set is faster O compared to list O n Instead of this l a e i o u def is vowel char if char in l print Vowel Use thiss a e i o u def is vowel char if char in s print Vowel List comprehensionConsider the following program to multiply the elements of the list into if they are even arr res Instead of thisfor num in arr if num res append num else res append num Use thisres num if num else num for num in arr Iterating DictionaryUsing dict items to iterate through a dictionary roll name Dharan Priya Instead of thisfor key in roll name print key roll name key Do thisfor key value in roll name items print key value SourcesDo you write Python Code or Pythonic Code Python s f StringsDesign Patterns in Python for the Untrained EyeThe Hitchhiker s Guide to Python 2021-12-29 15:38:11
海外TECH DEV Community JavaScript Scoping https://dev.to/ohdylan/javascript-scoping-3adl JavaScript ScopingAccording to MDN s definition scope in JavaScript is the current context of execution What does that actually mean Scope defines the variables and values that are within your current accessibility and it can also be referred to the environment of variables Let s jump right into an example function hello var phrase Hello console log phrase Dylan console log phrase We have a function called hello and we define a variable called phrase WITHIN the function If we are trying to access the variable phrase from the outside of function we are going to get this error Uncaught ReferenceError phrase is not definedThis is easy to understand right From the global scope perspective we do not know what is a phrase However if we define a global variable and try to use it inside the function var person Dylan function hello var phrase Hello console log phrase person hello We will get Hello DylanFrom here we know that scopes follow hierarchy where children layer can access the variables of parent but not the other way round In our last article JavaScript Single Threaded but Non Blocking we mentioned that JavaScript engine has call stack of function execution contexts A global variable environment is also introduced when global execution context is created If we define a global variable now this variable will be added under the global object window object for browser Each execution context will have a local variable environment which is known as local scope If we try to access a variable in our current execution context it will start looking for this variable within the local scope If the variable is not found it will go up to the parent scope to look for it This is known as the scope chain For example function func var a return function func console log a var a func In this example the code is trying to look for the variable a since it is used in func After it has failed to find it within func scope it will go up to func and found it a Therefore the results of console log is Scope chain of execution contextsWhat if we change our code to this function func var a return func function func console log a var a func It is printing out this time Why is it so We have to bring in another term called lexical scope which is the scope that we determine where the function is defined not called In the first example the func was defined within func and therefore it will reach out to func to look for the variable that is not within its current scope However in the second example the func was defined within the global scope which is same level as func therefore it will look up to global scope for the missing variable Hope this gives you a brief idea on how the JavaScript scoping works In our future articles I shall also bring in concepts like hoisting closure block scope and etc to give you a clearer picture should have done in this article but was too busy pardon me Do follow me for more future articles on web design programming and self improvement 2021-12-29 15:25:24
海外TECH DEV Community 11 Html Tags You Must Know https://dev.to/codeflix/11-html-tags-you-must-know-58gc Html Tags You Must KnowHello Readers sorry I was busy in some work so it got late Let s Get StartedHTML attributes allow you to perform a lot more complex tasks directly on your HTML files Here are some of the most useful ones to know HTML is the building block of the web Knowing some less known but useful parts of this markup language can make your life a lot easier HTML attributes provide several features that can help you to get the most out of HTML It defines additional characteristics or properties of an HTML element In this article you ll learn about HTML attributes that you probably haven t heard of yet MultipleThis attribute allows users to enter multiple values You can use the multiple attribute with tags and tags This boolean attribute is valid only for email or file input types Using multiple Attribute With Tag lt label for language gt Select languages lt label gt lt select name language id language multiple gt lt option value C gt C lt option gt lt option value Python gt Python lt option gt lt option value JavaScript gt JavaScript lt option gt lt option value Java gt Java lt option gt lt select gt Using multiple Attribute for File InputBy using the multiple attribute for file input you can select multiple files by holding the Shift or Ctrl keys lt input type file multiple gt Using multiple Attribute for Email InputBy using the multiple attribute for email input you can enter a list of comma separated email addresses All the white spaces will be removed from each address in the list lt input type email multiple gt ContenteditableYou can make the HTML content editable on a web page using the contenteditable attribute This is a global attribute i e it s common to all HTML elements lt p contenteditable true gt Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore et dolore magnaaliqua Ut enim ad minim veniam quis nostrud exercitationullamco laboris nisi ut aliquip ex ea commodo consequat lt p gt SpellcheckThe spellcheck attribute specifies whether the element may be checked for spelling errors or not You can spellcheck text in the elements text in the editable elements or text in the input elements except passwords lt p contenteditable true spellcheck true gt Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore et dolore magnaaliqua Ut enim ad minim veniam quis nostrud exercitationullamco laboris nisi ut aliquip ex ea commodo consequat lt p gt DowmloadYou can download a resource using the download attribute The download attribute tells the browser to download the specified URL instead of navigating to it You can use the download attribute with tag and tag Note The download attribute only works with same origin URLs It follows the rules of the same origin policy lt a href xyz png download myImage gt Download lt a gt AcceptThe accept attribute of the tag specifies the type of files a user can upload You can specify a comma separated list of one or more file types as its value Accepting an Audio File lt input type file id audioFile accept audio gt Accepting a video file lt input type file id videoFile accept video gt Accepting an Image File lt input type file id imageFile accept image gt Accepting a Microsoft Word File lt input type file id docpicker accept doc docx application msword application vnd openxmlformats officedocument wordprocessingml document gt Accepting PNG or JPEG Files lt input type file id imageFile accept png jpg jpeg gt Accepting a PDF File lt input type file id pdfFile accept gt translateThe translate attribute tells the browser that the element should be translated or not when the page is localized It can have values yes or no lt p translate no gt Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore et dolore magnaaliqua Ut enim ad minim veniam quis nostrud exercitationullamco laboris nisi ut aliquip ex ea commodo consequat lt p gt posterThe poster attribute is used to show an image while the video is downloading or until the user plays the video Note If you don t specify anything nothing is displayed until the first frame is available When the first frame is available it s shown as the poster frame lt video controlssrc poster posterImage png gt lt video gt inputmodeThe inputmode attribute indicates the browser which keyboard to display when a user has selected any input or textarea element This attribute accepts various values None lt input type text inputmode none gt Numeric lt input type text inputmode numeric gt Tel lt input type text inputmode tel gt Decimal lt input type text inputmode decimal gt Email lt input type text inputmode email gt URL lt input type text inputmode url gt Search lt input type text inputmode search gt patternThe pattern attribute of the lt input gt element allows you to specify a regular expression for which the element s value will be validated against You can use the pattern attribute with several input types like text date search URL tel email and password lt form gt lt input name username id username pattern A Za z gt lt form gt autocompleteThe autocomplete attribute specifies whether the browser should automatically complete the input based on user inputs or not You can use the autocomplete attribute with several input types like text search URL tel email password date pickers range and color You can use this attribute with the elements or elements lt form gt lt input name username id username pattern A Za z gt lt form gt autofocusThe autofocus attribute is a boolean attribute indicating that an element should be focused on page load You can use this attribute with or elements Using autofocus Attribute With input Element lt input type text autofocus gt Using autofocus Attribute With select Element lt select name languages id languages gt lt option value C gt C lt option gt lt option value Python gt Python lt option gt lt option value JavaScript gt JavaScript lt option gt lt option value Java gt Java lt option gt lt select gt Using autofocus Attribute With textarea Element lt textarea autofocus gt Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore et dolore magnaaliqua Ut enim ad minim veniam quis nostrud exercitationullamco laboris nisi ut aliquip ex ea commodo consequat lt textarea gt THE END 2021-12-29 15:24:33
海外TECH DEV Community From zero to one. How to Deploy your MongoDB, Node, Strapi, NextJS app to Microsoft Azure. https://dev.to/halolab/from-zero-to-one-how-to-deploy-your-mongodb-node-strapi-nextjs-app-to-microsoft-azure-4c7g From zero to one How to Deploy your MongoDB Node Strapi NextJS app to Microsoft Azure Part Introduction and creating all required for migration resources IntroductionHi to everyone This article will be helpful if you have little or no knowledge of cloud technologies There are three main cloud providers Google Cloud AWS and Azure Let s imagine that your task is to move the application to Azure Before continuing note that the best way to familiarize with basic Azure cloud features to gain a foundational knowledge of cloud services and the way those services are provided with Microsoft Azure is to learn and pass Exam AZ Microsoft Azure Fundamentals The exam is for candidates who are just beginning to work with cloud based solutions and services or are new to Azure Azure Fundamentals can be used to prepare for other Azure role based or specialty certifications but it is not a prerequisite for any of them All Microsoft Azure learning has two options online which is always free and instructor led which is paid Passing the exam and getting the certification is always paid The price depends on the country One more tip learn it before migration because learning during the process is a bad idea There is much to say about passing Microsoft exams but I suggest we move on to the next step and explore the project structure Project structure and reasons for migration to AzureSo let s do a deep dive into the project structure before moving on Front end NEXT js app hosted on Vercel Back end Strapi CMS custom node scripts hosted on HerokuDB Mongo db hosted on Mongo AtlasThe common problems with current providers include No simple ways to spread application to multiply regions and elastically scale the capacity based on demand No static inbound and outbound IP addresses only via proxy which I needed to secure back end and DB connections No obvious ways to give separate accesses to resources based on roles First steps to start to work with Azure regardless wich computing services you choose to host applicationsFirstly go to Microsoft Azure Portal and create the account After you complete the registration you will have a single tenant ID associated with your account which will not change unless you ask Microsoft to delete your account Tenant is associated with a single identity person company or organization and can own one or several subscriptions At this step you will only have one subscription An Azure subscription is a logical container used to provision resources in Azure It holds the details of all your resources like virtual machines VMs databases and more When you create an Azure resource like a VM you identify the subscription it belongs to A subscription is linked to a payment setup and each subscription will result in a separate bill and can use different payment methods Resources from one subscription are isolated from resources in other subscriptions During the registration in Azure you may choose to get dollars on balance of the default subscription that you can spend on Azure services It is a very useful option for beginners in cloud technologies to test different options Now you are signed in have a tenant and one subscription inside it The next step is to decide which Azure services to use for your apps hosting Choose the appropriate Azure servicesAzure offers three main cloud computing platform services SaaS Software as a Service IaaS Infrastructure as a Service PaaS Platform as a Service The main differences and maintaining levels are displayed on the diagram below If you don t want to be responsible for the operating system data runtime and middleware but still need to manage and configure the application the PaaS cloud computing service is a good choice So PaaS ーit is where Azure provider hosts the hardware and software on its own infrastructure and delivers this platform to the user as an integrated solution solution stack or service through an internet connection while the developer is allowed to develop run and manage his own apps without having to build and maintain the infrastructure or platform usually associated with the process When we have decided which cloud computing service to use let s proceed to the next step Creating required resourcesThe next step is to create the App Service Plan and the Resource Group An App Service Plan in two words at a very high level is just the container in which your web applications run It is used to determine the resources available to your application or applications and their boundary Comparing this to an on premises environment the app service environment is one server or servers on which your application is deployed The app service plan defines what configuration of hardware your app runs on and how many servers you have You can deploy multiple web applications inside the same App Service Plan You do not need a separate web app plan for each web app When you create an App Service plan in a certain region for example Western Europe a set of compute resources is created for that plan in that region Whatever apps you put into this App Service plan run on these compute resources as defined by your App Service plan A resource group is a logical container into which Azure resources like web apps databases and storage accounts are deployed and managed The Resource Group can include all the resources for the solution or only those resources that you want to manage as a group You decide how to allocate resources to resource groups based on what makes the most sense for your organization Generally add resources that share the same lifecycle to the same resource group so you can easily deploy update and delete them as a group Steps to create App Service Plan with Resource Group simultaneously Type App Service Plan in the search bar select it from the dropdown and click Create new Now you need to configure it As you don t have the Resource Group yet press create new enter its name and it will be created with the App Service Plan and placed inside it Some other tips Enter the App Service Plan name that will clearly describe group of resources inside it for example name of the project or of the group of projects select the region the better option is to choose the closest region to your customers location because it will affect the latency Select operating system to run your apps in this case Linux was selected Select the pricing tier You can choose from dev test or production plans But in case you want to configure automatic deployment from GitHub choose the PV or higher pricing tier The application plans less than PV have a list of limitations The next features are not available a Auto scale feature Autoscale is a built in feature of Cloud Services Mobile Services Virtual Machine Scale Sets and Websites that helps applications perform their best when demand changes b Daily backups Here probably nothing to explain c Traffic manager improves performance and availability by routing traffic between multiple instances of your app d Staging slots Useful for testing and deployments before swapping them into production If you want to create a high volume of resources in the future use tags Azure tags are name value pairs that are used to organize resources in Azure Portal You can apply tags for individual resources or tag the resource group that they are part of Press Review and create It can take up to minutes App Service Plan and the Resource Group are ready to place resources inside That s why we can proceed to the next steps Creating instances for applicationsAs PaaS was selected we should search among its services The appropriate service is App Service It enables you to build and host web apps mobile back ends and RESTful APIs in the programming language of your choice without managing infrastructure It offers auto scaling and high availability supports both Windows and Linux and enables automated deployments from GitHub Azure DevOps or any Git repo To create the App Service find this category in the search bar and press Create You will be redirected to this service configuration page You need to select from the dropdown the subscription on the resource group where it needs to be located Put the name of the application for example my project back end development In the Publish tab select Code option if you are going to just put the code of your project instead of the ready Docker container It will make Azure create the Docker container for you itself and run your application inside it Select Node from the dropdown of runtime stack The application region and operating system will be chosen automatically according to your App Service Plan settings Press next and in the Monitoring section I fully recommend you to switch on Application Insights It allows you to automatically monitor your application It will automatically detect performance anomalies and includes powerful analytics tools to diagnose issues and to understand how users actually use your app It s designed to help you continuously improve performance and usability It works for apps on various platforms including NET Node js Java and Python hosted on premises hybrid or any public cloud It integrates with your DevOps process and has connection points to various development tools All other settings at this moment let s keep by default Click create and review check if all settings are correct and confirm It can take up to minutes The instance for hosting the back end is ready and you can reproduce previous steps to create a separate App Service instance for the front end application Once it is ready we go to the next part Creating instances for databaseAs mentioned MongoDB is used in the project Azure has an opportunity to place MongoDB using the Azure Cosmos DB s API for MongoDB It has some limitations With the full list of supported operators and limitations or exceptions you can familiarize by the link To create DB go to Azure Cosmos DB Resource and click on Create Azure Cosmos DB account On the next screen select Azure Cosmos DB API for MongoDB The instance for hosting the back end is ready and you As on previous steps select subscription and resource group enter the database name Select the location closest to the rest of your resources and customers to decrease the requests time Select the Mongo version Choosing the capacity mode of the instance is an important step to save your money You need to know the differences between these two options Provisioned has throughput at a constant rate regardless of whether operations are being performed on our Cosmos DB account Serverless Mode ーwe only use throughput when operations are performed on our Cosmos DB resources Each of these options has pros and cons and if you want to know more follow the link But in two words serverless ーpay only when using provisioned ーreserve capacity for the instance and pay for it all the time I need to highlight that it is cheaper to use serverless mode for non highly loaded projects Press the create button and wait until it is ready SummaryLet s check what we have at the moment You can find all the created instances in your resource group on Azure Portal Each of the application instances are already available with the Microsoft example page by the url which you can find in the app essentials section Cosmos db account is ready for moving your database into it Now all resources are ready to deploy your applications and database The next part of the article is going to be about the migration processes and how to connect all instances Make sure you read both parts of the article and then proceed to work because we will talk about database migration in the next steps 2021-12-29 15:18:26
海外TECH DEV Community Listen to the Season 7 Finale of DevDiscuss! https://dev.to/devteam/listen-to-the-season-7-finale-of-devdiscuss-461d Listen to the Season Finale of DevDiscuss The season finale of DevDiscuss is here already In SE we re talking about the ever important topic of cybersecurity what needs to happen to advance the field and how you can dive in S E How Cybersecurity Needs To Evolve and How To Get Into It DevDiscuss Your browser does not support the audio element x initializing × Quick refresher ーDevDiscuss is the first original podcast from DEV all about the burning topics that impact all our lives as developers Host ben ーCreator of DEV amp Co Founder of Forem Guest Alyssa Miller ーBusiness Information Security Officer S amp P Global RatingsLet us know your thoughts on this show in the comments below ーor on Twitter thepracticaldev You can follow DevDiscuss to get episode notifications and listen right in your feed ーor subscribe on your platform of choice Plus if you leave us a review we ll send you a free pack of thank you stickers Details here Quick Listening LinksApple PodcastsSpotifyGoogleListen NotesTuneInRSS FeedDEV Pods SiteAcknowledgements levisharpe for producing amp mixing the showOur season seven sponsors Microsoft New Relic amp Vultr Thanks for tuning in for season of DevDiscuss We can t wait to bring you all new episodes in the new year 2021-12-29 15:17:32
海外TECH DEV Community Welcome Thread - v157 https://dev.to/thepracticaldev/welcome-thread-v157-o3g Welcome Thread v Welcome to DEV Leave a comment below to introduce yourself You can talk about what brought you here what you re learning or just a fun fact about yourself Reply to someone s comment either with a question or just a hello Great to have you in the community 2021-12-29 15:06:10
海外TECH DEV Community Find bottlenecks in Node.js apps with Clinic Flame https://dev.to/mpangrazzi/find-bottlenecks-in-nodejs-apps-with-clinic-flame-3i0h Find bottlenecks in Node js apps with Clinic FlameIn I had the chance to attend a workshop hosted by some great devs from NearForm along a JS conference They showed how to find bottlenecks on Node js applications using Flamegraphs using a very nice profiler they built called Clinic JS Too bad I lost the notes about that workshop but I remembered the tool name So I ve downloaded it and used it successfully to find an actual bottleneck while working on a side project of mine Here s briefly how it works through a super simple example Example app a slow REST API service or similar Let s fire up a very basic HTTP service using the plain node http module which basically is simulating a slow query returning a random number dbQuery computing with the result it computes the Fibonacci series fib returning the Fibonacci value in plain textconst http require http const fib dbQuery require util const hostname const port const baseUrl http hostname port const server http createServer req res gt res statusCode res setHeader Content Type text plain dbQuery then fib then result gt res end result n catch err gt res send err server listen port hostname gt console log Server running at baseUrl The util js module looks like const random min max gt Math floor Math random max min minconst sleep s gt new Promise resolve gt setTimeout resolve s const dbQuery async gt await sleep random ugh return random function fib n if n lt return return fib n fib n module exports dbQuery fib As you can see dbQuery function is intentionally calling sleep before generating a random value to simulate slow I O fib is a potentially CPU heavy task which will block the main Node js main event loop especially with big n values Basic performance testing using curl and timeIf you simply fire up the service using node index jsand then do something like time curl http localhost to test the response time you ll find out that it s quite slow average is around s One can easily guess that both dbQuery and fib functions may be the cause of the slowness and then confirm wisely using logging Anyway let s try to see how Clinic flame could help us Using Clinic FlameClinic Flame is one of the Clinic tools which is very handy in this case So let s run the web service through it clinic flame node index jsNow we can do the same HTTP calls we did above using curl one or two times curl http localhost When done simply hit ctrl c and Clinic Flame will automatically generate a report and show it to you on a browser page Let s look at the report The first thing I did was to uncheck Depedencies WebAssembly Node JS and V checkboxes from the bottom bar since I mainly want to see only how my module code is being called About the report we have to look if there are wide bars with a bright colour It basically means that the function is hot lot of time has being spent at the top of the stack while calling a specific function Here s one and it s related to the dbQuery then fib then code block Note also that we have lots of calls to fib which is ok for a recursive function but with darker bar colours This means that dbQuery took more time at the top of the stack than fib function Probably we sleep more than the time needed to compute fib with the random value What if it happens the opposite i e less or no sleep time for dbQuery and a larger n for fib This time basically all the bars are related to the fib function and they re super wide it means that all the recursive calls to fib took a lot of time Note also that if you check Node JS or V bars they re super thin in comparison with fib ones This means than internal Node js routines took a very short time compared to fib calls Why it could be useful If you have trouble to understanding bottlenecks in your Node js based web service especially if the blocking issue comes from one of your node modules deps where putting random console log calls to debug is both not easy and time consuming Moreover if your blocking issue is appearing only on heavy load you can easily test it using the very nice autocannon CLI param see it with clinic flame help where you can specificy autocannon options to generate some HTTP load on your web service 2021-12-29 15:05:50
海外科学 NYT > Science Chile Writes Its Constitution, Confronting Climate Change Head On https://www.nytimes.com/2021/12/28/climate/chile-constitution-climate-change.html Chile Writes Its Constitution Confronting Climate Change Head OnChile has lots of lithium which is essential to the world s transition to green energy But anger over powerful mining interests a water crisis and inequality has driven Chile to rethink how it defines itself 2021-12-29 15:41:37
金融 RSS FILE - 日本証券業協会 株主コミュニティの統計情報・取扱状況 https://www.jsda.or.jp/shiryoshitsu/toukei/kabucommunity/index.html 株主コミュニティ 2021-12-29 15:30:00
ニュース BBC News - Home Covid: Warning over patchy lateral flow test supply https://www.bbc.co.uk/news/uk-59814032?at_medium=RSS&at_campaign=KARANGA pharmacists 2021-12-29 15:44:15
ニュース BBC News - Home Covid in Scotland: Another record high number of infections https://www.bbc.co.uk/news/uk-scotland-scotland-politics-59817793?at_medium=RSS&at_campaign=KARANGA omicron 2021-12-29 15:27:02
ニュース BBC News - Home Return to Hogwarts: Critics bemoan Rowling's absence in Harry Potter reunion https://www.bbc.co.uk/news/entertainment-arts-59816888?at_medium=RSS&at_campaign=KARANGA absence 2021-12-29 15:43:50
ニュース BBC News - Home Covid has hampered Man Utd progress - Rangnick https://www.bbc.co.uk/sport/football/59821474?at_medium=RSS&at_campaign=KARANGA manchester 2021-12-29 15:46:15
ニュース BBC News - Home Chisnall out of World Darts Championship after positive Covid-19 test https://www.bbc.co.uk/sport/darts/59818041?at_medium=RSS&at_campaign=KARANGA covid 2021-12-29 15:52:35

コメント

このブログの人気の投稿

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

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

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