IT |
気になる、記になる… |
「iモード公式サイト」、本日で提供終了 |
https://taisy0.com/2021/11/30/149200.html
|
公式サイト |
2021-11-30 14:15:33 |
TECH |
Engadget Japanese |
9万円で120Hz液晶とGTX1650、6コアTiger Lake。ガレリアゲームノートがお買い得に |
https://japanese.engadget.com/galleria-rl-5-c-g-50-144155951.html
|
galleria |
2021-11-30 14:41:55 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] スマートロック「Qrio」で障害、発生から4日たつも直らず 遠隔操作できない状態 |
https://www.itmedia.co.jp/news/articles/2111/30/news199.html
|
itmedia |
2021-11-30 23:45:00 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
【toio 2021】 #toio の姿勢角(ロール・ピッチ・ヨー)をブラウザ上で可視化(Web Bluetooth API、Smoothie Charts を利用) |
https://qiita.com/youtoy/items/9b3b39b3f91b36821305
|
toioの新しく公開された仕様「姿勢角検出」で取得できる値をグラフ化してみた以前もtoioの制御で使ったWebBluetoothAPIで実装して、HTMLのページで値を受け取りつつSmoothieChartsでグラフ描画もする形。 |
2021-11-30 23:04:13 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Zabbixのトリガー内にあります、URLとはどういう使い方をされるのでしょうか |
https://teratail.com/questions/371719?rss=all
|
zabbix |
2021-11-30 23:57:27 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Zabbixのトリガーの項目にある「障害児のイベントのクローズ」のいみがわからない |
https://teratail.com/questions/371718?rss=all
|
zabbix |
2021-11-30 23:51:19 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
お名前.comとさくらのレンタルサーバーのDNS設定 |
https://teratail.com/questions/371717?rss=all
|
お名前comとさくらのレンタルサーバーのDNS設定DNSの設定について質問させてください。 |
2021-11-30 23:37:58 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
複数台のiPadでそれぞれ別の動画を同じタイミングで再生させたい |
https://teratail.com/questions/371716?rss=all
|
複数 |
2021-11-30 23:31:49 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
importに関して |
https://teratail.com/questions/371715?rss=all
|
importに関してpythonの写経をしていますが、下記のような構成でimportができなくなっています。 |
2021-11-30 23:31:43 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
C# システムがもともと持っているエクセルシートとユーザが入力したエクセルシートの値を比較したい |
https://teratail.com/questions/371714?rss=all
|
VisualStudioでCを用いて、システムがもともと持っているエクセルシートとユーザが入力したエクセルシートの値を比較するプログラムを作っています。 |
2021-11-30 23:30:58 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
条件分岐を無くしたい |
https://teratail.com/questions/371713?rss=all
|
条件分岐を無くしたいrubyを使ってあるプログラムを書いています。 |
2021-11-30 23:23:26 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
【selenium】time.sleep以外で待機処理する方法 |
https://teratail.com/questions/371712?rss=all
|
【selenium】timesleep以外で待機処理する方法実現したいことPythonnbsp閲覧いただきありがとうございます。 |
2021-11-30 23:22:25 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
なぜか users/login にリダイレクトされてしまう |
https://teratail.com/questions/371711?rss=all
|
なぜかusersloginにリダイレクトされてしまう例えば、wwwaaacomnbspというサイトをcakephpnbspで作成し、wwwaaacomaaanbspでアクセスすると、「ページは存在しません」みたいなエラーページを表示されるように、エラーページを作成しましたが、なぜか、wwwaaacomusersloginnbspにリダイレクトされてしまいます。 |
2021-11-30 23:18:21 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Qt のフォームディレクトリを誤って削除したので再度表示させたいです |
https://teratail.com/questions/371710?rss=all
|
Qtのフォームディレクトリを誤って削除したので再度表示させたいです前提・実現したいこと参考書を見ながらQtnbspCreatornbspを動かしていたのですが、デザインモードを使用していた際に誤ってフォームディレクトリを削除してしまいました。 |
2021-11-30 23:10:45 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
awsのDynamoDBをpynamodbで成業する中でのエラー。 |
https://teratail.com/questions/371709?rss=all
|
awsのDynamoDBをpynamodbで成業する中でのエラー。 |
2021-11-30 23:06:49 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
iOSでCSSアニメーションが動かない |
https://teratail.com/questions/371708?rss=all
|
iOSでCSSアニメーションが動かない初心者です。 |
2021-11-30 23:06:18 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
gem を作って公開してみた 〜準備編〜 |
https://qiita.com/Satoooon/items/a04cc778b0e5ac11ae24
|
gemを作って公開してみた準備編はじめにRubyやRailsの開発を行なっているとアプリケーションの機能拡充をしたりする上でgemを使う方はいるがご自身でgemの開発、公開をしたことがある方もいらっしゃらないかと思います。 |
2021-11-30 23:27:54 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
Dockerでcode-serverを立てる |
https://qiita.com/YKIYO2/items/06cf44dead84188677ae
|
|
2021-11-30 23:10:14 |
golang |
Goタグが付けられた新着投稿 - Qiita |
Go言語で整数を5バイトに押し込む簡単なお仕事 |
https://qiita.com/saliton/items/76781d1462bf04db7557
|
Nバイト配列からbit整数の配列への変換vuintuintunsafePointerampbufjuintbufjltltがおすすめbit整数が並んだバイト配列から整数を読み出す場合を測定しましょう。 |
2021-11-30 23:29:52 |
技術ブログ |
Developers.IO |
CloudWatchメトリクスをのデータポイントをAWS CLIで取得する |
https://dev.classmethod.jp/articles/get-data-points-for-cloudwatch-metrics-with-api/
|
amazoncloudwatch |
2021-11-30 14:50:11 |
技術ブログ |
Developers.IO |
[AWS Step Functions] 複数の先行ステートマシンの実行が完了した後に別AWSアカウントのステートマシンを実行してみた |
https://dev.classmethod.jp/articles/run-a-state-machine-for-another-account-after-multiple-prior-state-machines-have-completed-execution/
|
awsstepfunctions |
2021-11-30 14:18:30 |
技術ブログ |
Developers.IO |
新たなAmazon Inspectorと統合されたAmazon ECRのイメージスキャン拡張版がリリースされました! #reinvent |
https://dev.classmethod.jp/articles/amazon-ecr-enhanced-scanning/
|
amazonecr |
2021-11-30 14:01:55 |
海外TECH |
MakeUseOf |
The Best Smart Floodlight Cameras for Outdoor Security |
https://www.makeuseof.com/best-smart-floodlight-cameras/
|
camera |
2021-11-30 14:55:23 |
海外TECH |
MakeUseOf |
The 7 Best Smart Blinds for Your Home |
https://www.makeuseof.com/best-smart-blinds/
|
assistant |
2021-11-30 14:55:22 |
海外TECH |
MakeUseOf |
What Is Motion Blur in Video Editing? Why You Should Use It |
https://www.makeuseof.com/motion-blur-video-editing-what-why/
|
editors |
2021-11-30 14:30:22 |
海外TECH |
MakeUseOf |
Chuwi CoreBook XPro 15.5" Review: A Great 120Hz Laptop ... for Spreadsheets? |
https://www.makeuseof.com/chuwi-corebook-xpro-laptop-15-review/
|
problem |
2021-11-30 14:06:22 |
海外TECH |
DEV Community |
how to prepare for flatiron school // resources i used |
https://dev.to/e_papanicolas/how-to-prepare-for-flatiron-school-resources-i-used-3ela
|
how to prepare for flatiron school resources i usedLooking over the Flatiron School website and reading about the Software Engineering Live program I felt a sense of excitement alongside a sense of dread Questions swirled around my head for days as I pondered my decision to do this Is it right for me Is it wrong for me Am I smart enough Will I be able to absorb all of this information But the one question that was above all other questions Am I prepared enough I wouldn t be able to answer this question though until I had begun the program As I pored over the pre work I felt a sense of relief I seemed to have a grasp on what was being asked of me And as I power through Phase that feeling albeit unsteady persists That being said I wanted to share some of the resources I used in my journey towards Flatiron School Years ago a friend had made a career change into tech by teaching herself and using Codecademy So this year when I decided myself to make a similar leap this seemed like a natural starting point After taking a few free lessons on the Codecademy website I decided to upgrade to the Pro version The options were simple month on a monthly subscription or month for a full year subscription I immediately sprung for the yearly subscription and it was worth the purchase Codecademy has seemingly endless courses ranging from Intro level Skill Paths and even Career Paths The courses I dabbled in Build A Website with HTML CSS and Github PagesLearn JavascriptFront End Engineer Career PathAnd these were only a few of the possibilities and options available Subjects such as Data Science Machine Learning Game Development and Cyber Security are offered as Career and Skill Paths Python JavaScript SQL Ruby PHP and Swift are among the many languages they also offer courses in Learning on Codecademy certainly set me up for success in my continuing education and I plan to keep my subscription for further learning in the future As I got more and more into the development community I began listening to a few coding podcasts to hear from others in the coding community and try and understand how to relate the information to my own path forward The Code Newbie Podcast quickly became a favorite of mine I loved listening to the host Saron interview her guests about their own journeys into tech discuss the subject of the day and then relate it to code newbies like myself Listening to this podcast gave me different bits of information on various aspects of breaking into the tech world and also led me to my next learning resource One guest on the Code Newbie podcast was someone I had previously read about and heard talk on another podcast so when Wes Bos was featured on my favorite podcast I knew it was time to check his stuff out They discussed a popular free mini course that he had released called JavaScript a day code challenge making projects using vanilla JavaScript That seemed a little daunting to me but then I discovered he had released a Beginner Javascript course on wesbos com It seemed like a no brainer for me as I was trying to find ways to level up And I am so so glad I went for it His course includes video files or the option to stream the course as well as a full Github repo containig starter files and solutions The videos are separated by distinct subject for ease of use when re watching or trying to find certain information What I liked was the ability to pause the videos or code along with him He is a fantastic teacher and projects sprinkled in throughout the course really help show how much you are learning I took the premium Beginner JavaScript course but he also offers free courses on CSS Grid and Flexbox CLI Markdown and Redux Some of his premium courses include Learn Node React for Beginners Advanced React and GraphQL and Master Gatsby This course left me hungry for even more learning Which led me to you guessed it FLATIRON By this time in my personal journey I was really feeling like I had a precarious grasp on the fundamentals but no idea how to tie it all together Upon a recommendation from a friend who had been through Flatiron s Software Engineering Live I decided to pursue the Full Stack route with hopes that I could utilize everything I d learned and once again level up Some other great resources that I have found helpful along the way FreeCodeCampMDN DocsW SchoolsI can t wait to share more with you about my Flatiron coding journey Stay tuned |
2021-11-30 14:32:04 |
海外TECH |
DEV Community |
Make your own blog site with GatsbyJS |
https://dev.to/justdev_sim/make-your-own-blog-site-with-gatsbyjs-5em6
|
Make your own blog site with GatsbyJSAs a part of the DaysOfCode challenge I decided to create a blog to document my journey with the challenge This blog is built using GatsbyJS and I learned the basics of Gatsby in a couple of days If you know ReactJS Gatsby is easy to catch on to Without further ado let s dive into how you can develop a blog just like this for sharing your own thoughts and journeys Table of ContentsWhat is GatsbyJS What are starters in Gatsby System PrerequisitesDeveloping the site What is GatsbyJS Gatsby is a React based open source framework for creating websites and apps What are starters in Gatsby To develop our blog we will be using the gatsby starter blog starter but what is a starter It is a boilerplate Gatsby site that helps jump start the development process Starters are maintained by the community for the community System PrerequisitesYou need to perform the following installations on your system before you begin with the development Node js preferably the LTS version After you install Node js open your terminal or command prompt and install gatsby cli using npm with the commandnpm install g gatsby cliTo facilitate deployment and to make your repository on GitHub you need to download and install git ORUse CodeSandbox to develop right from your browser Creating and setting up the project is significantly easier and hassle free in a sandbox Will not be using this method in this blog We re all set to begin development Developing the site Steps to developCreate a new gatsby project and install the starterRun the website locallyCreate a GitHub repository and push the code to the repositoryChange author details in gatsby config jsCreate your first blog post Step Create a new gatsby project and install the starterUsing your terminal navigate to the directory where you want to create the project To create a new project we use the gatsby new command we can install the starter in ways gatsby new project name starter repo link gatsby new project name GithHub username repo name For example I want to call my project my blog gatsby new my blog gatsby new my blog gatsbyjs gatsby starter blog Step Run the website locallyNavigate to your project directory in the terminal gt cd my blogInstall all dependencies using npm or yarn my blog gt npm installOR my blog gt yarnRun gatsby develop The terminal output will look like this success open and validate gatsby configs load plugins s success extract queries from components ssuccess write out requires ssuccess run page queries s s⠀You can now view my blog in the browser ⠀ http localhost ⠀View GraphiQL an in browser IDE to explore your site s data and schema⠀ http localhost graphql⠀Note that the development build is not optimized To create a production build use gatsby build⠀success Building development bundle ssuccess Writing page data json files to public directory s sThe website will now be accessible at http localhost As long as the development server is running you can view your website here It automatically recompiles every time you save changes as long as gatsby develop is running The GraphiQL interface at http localhost graphql It is okay if you don t have experience working with GraphQL I have yet to learn it and it is not needed to build this blog thanks to the starter Step Create a GitHub repository and push the code to the repositoryNavigate to the project directory in the terminal Run the command git init to initialise a local git repository Run git add all to add all files to git Run git commit m create initial commit to commit these files to the repository Now sign in to GitHub and create a new empty repository Copy the link to the repo For example In your terminal in your local repository run the following command to link to GitHub repo git remote add origin repo link Here replace the repo link with the link copied in the previous step Push the initial commit to GitHub using the command git push u origin main Our repository is now on GitHub Now let s make some changes so that the blog is ours Step Change author details in gatsby config jsOpen the file my blog gatsby config js in your favorite editor I use VSCode The file contains a module exports object within which the siteMetadata is there It should look like this siteMetadata title Gatsby Starter Blog author name Kyle Mathews summary who lives and works in San Francisco building useful things description A starter blog demonstrating what Gatsby can do siteUrl social twitter kylemathews Replace with your details except for siteUrl for now like so siteMetadata title Simran s Blog author name Simran Makhija summary who lives and studies Computer Science in Indore India description My blog for sharing all things tech and community built with GatsbyJS as a part of DaysOfCode siteUrl social twitter justdev sim Replace src images profile pic png with your own picture Make sure the name of the image is profile pic png Now the blog has your name title info and image The site will now look like this Step Create your first blog postNow let s take a look at how our blogs are stored and organised The content blog directory stores all your blog posts Each blog post has its own subdirectory The name of this subdirectory corresponds to the route at which the blog will be rendered For example The blog within the hello world folder can be found at base url hello world http localhost hello world on our local server The index md file contains the markdown source for your blog The default hello world contains a markdown cheatsheet of sorts that I have stored in a separate file and refer to for syntax Now let s go ahead and write our own first blog Delete all folders within content blog Create a new folder hello world Within this folder create a new file index md This is where we ll write our markdown source In the file add the frontmatter title Hello World date T Z description Hi I am a student developer Nice to meet you This front matter corresponds to the name date and blog description we see on the home page like so Below the frontmatter you can include the entire content of your blog Here s how my content blog hello world index md looks title Hello Worlddate T Z description Hi I am a student developer Nice to meet you Hi I am Simran Makhija ️Nice to meet you I am a final year Computer Science amp Engineering student from Indore India Thank you for dropping by Save all changes and push them to your GitHub repository This is it on developing the blog site Hope it was easy to follow and helpful In my next blog I will be writing about deploying this site to the internet Thank you for reading See you then |
2021-11-30 14:25:24 |
海外TECH |
DEV Community |
A sample e-commerce web app built with ReactJS, ExpressJS and MongoDB |
https://dev.to/linhtch90/a-sample-e-commerce-web-app-built-with-reactjs-expressjs-and-mongodb-4dp3
|
A sample e commerce web app built with ReactJS ExpressJS and MongoDBMERN stack which stands for MongoDB ExpressJS ReactJS and NodeJS has become a popular choice for fullstack Javascript web developer As a personal project for education purpose I developed a basic bookstore web app with MERN stack Through this project beginners could have a useful resource to understand how to implement ReactJS Redux React Router and others related libraries in React ecosystem to build up a functional front end solution In addition the back end developed with ExpressJS and MongoDB is also an example for building a web api with Javascript Further detail information is available on Homepage of the live demo at The source code is available at Please give me a Github star as a compliment if my effort is useful for you Thanks |
2021-11-30 14:12:04 |
海外TECH |
DEV Community |
How to Analyze and Improve your 'Create React App' Production Build |
https://dev.to/alexeagleson/how-to-analyze-and-improve-your-create-react-app-production-build-4f34
|
How to Analyze and Improve your x Create React App x Production BuildIn this tutorial we re gonna take a step by step look at how to analyze and optimize your Create React App project using a custom webpack configuration that is extremely easy to set up We will be using examples that make small adjustments and try different ways of importing modules and splitting your code to see the direct impacts it has on your bundle sizes and performance The goal here is to help you get a better understanding of what webpack is actually doing by seeing the exact changes that occur to a production build when you make small changes to your application To begin we ll create a brand new React app called something big and bloatednpx create react app something big and bloated template typescriptNext we ll install the dependencies we need to analyze the project npm install craco craco webpack bundle analyzer save devcraco A tool to use a custom webpack configuration with Create React Appwebpack bundle analyzer A webpack plugin for analyzing bundle sizeWe need to create a configuration file for craco in the root of our project to include our webpack plugin craco config jsconst BundleAnalyzerPlugin require webpack bundle analyzer BundleAnalyzerPlugin module exports function return webpack plugins new BundleAnalyzerPlugin analyzerMode server If we run the usual npm run build script for a production build it will use the standard react scripts method However if we run craco build it will still run the same process but inject in any webpack configuration you have included in your craco config js file Pretty sweet Let s give it a try We ll create a new entry called analyze in package json scripts scripts start react scripts start build react scripts build test react scripts test eject react scripts eject analyze craco build Now run npm run analyzeBecause we set the analyzerMode to server in our craco config we will automatically get our browser open with the results served as a webpage you can use the json option if you want the output without involving the browser You can hover over each module within the chunks or your can use the little arrow at the upper left which pops out a drawer You ll get three different values stat The size of the original source codeparsed the size of the same code as compiled bundlesgzipped the size of the compiled bundles after being gzippedSo for most deployments you can look at the gzipped value as how much network usage you will need and the parsed size as how much code the browser is going to handle once unzipping is complete Be aware that this value can be just as problematic on users with less powerful CPUs as the gzip size can be for those on slow networks Both are important to consider On create react app v for this tutorial the values I get are kb kb kb for stat parsed gzipped respectively You can see right out of the box we get a bit of overhead though for most users that s a small price to pay for convenience Now let s try adding some libraries and look at how this value changes We ll consider the way that we do our imports and see how we might be able to better control our bundle size by only importing what we need I m gonna pick a fairly popular UI library called MUI Material UI It s a good example of a large package that significantly weigh down your app if not bundled properly It will make a good example for our tutorial We will need the following packages mui material A React component library designed to give you some useful pre styled components out of the box mui icons material An icon package for MUI based on material icons emotion react Required for mui material emotion styled Required for mui material npm install mui material mui icons material emotion react emotion styled saveBefore we even do anything let s run our analyzer again Remember we ve added these libraries but we aren t actually using any of them yet Do you think our bundle size will increase Let s find out npm run analyzekb kb kb again Exact same result That s great That means that webpack is not including any libraries we don t actually use It s doing its job well Now we ll import a component from MUI We ll grab a relatively complex one something more than a button Let s use the Speed Dial Create a new component file in src src CustomSpeedDial tsximport React from react import Box from mui material Box import SpeedDial from mui material SpeedDial import SpeedDialIcon from mui material SpeedDialIcon import SpeedDialAction from mui material SpeedDialAction import FileCopyIcon from mui icons material FileCopyOutlined import SaveIcon from mui icons material Save import PrintIcon from mui icons material Print import ShareIcon from mui icons material Share const actions icon lt FileCopyIcon gt name Copy icon lt SaveIcon gt name Save icon lt PrintIcon gt name Print icon lt ShareIcon gt name Share export default function CustomSpeedDial return lt Box sx height transform translateZ px flexGrow gt lt SpeedDial ariaLabel SpeedDial basic example sx position absolute bottom left icon lt SpeedDialIcon gt gt actions map action gt lt SpeedDialAction key action name icon action icon tooltipTitle action name gt lt Box gt Replace the contents of your App tsx file with the following src App tsximport React from react import CustomSpeedDial from CustomSpeedDial function App return lt CustomSpeedDial gt export default App Run the development server to check it out npm run startEverything looks good Let s see how much that impacted our build RUn our analyze command again npm run analyzeOur bundle size is now up to kb kb kb That s a significant increase for one component Of course bear in mind that it s fairly complex and as soon as you use one you need to include all the other dependencies that make MUI function I d bet if you added a second component you wouldn t get such a big jump In fact we can try now Add the following to your SpeedDial component src CustomSpeedDial tsx import React from react import Box from mui material Box import SpeedDial from mui material SpeedDial import SpeedDialIcon from mui material SpeedDialIcon import SpeedDialAction from mui material SpeedDialAction import FileCopyIcon from mui icons material FileCopyOutlined import SaveIcon from mui icons material Save import PrintIcon from mui icons material Print import ShareIcon from mui icons material Share NEWimport Button from mui material Button const actions icon lt FileCopyIcon gt name Copy icon lt SaveIcon gt name Save icon lt PrintIcon gt name Print icon lt ShareIcon gt name Share export default function CustomSpeedDial return lt Box sx height transform translateZ px flexGrow gt NEW lt Button variant contained gt Hello world lt Button gt lt SpeedDial ariaLabel SpeedDial basic example sx position absolute bottom left icon lt SpeedDialIcon gt gt actions map action gt lt SpeedDialAction key action name icon action icon tooltipTitle action name gt lt SpeedDial gt lt Box gt We ve imported a button above and included it with our speed dial two new lines marked with NEW comments When we run npm run analyze again we get almost the same kb kb kb We can see that the button extremely little to the bundle size since most of the building blocks for it were already included with the Speed Dial But now let s compare when using the traditional commonJS import Add the following line to the very top of your CustomSpeedDial component if ESLint complains about import order place the line after all your imports statements src CustomSpeedDial tsxconst material require mui material Analyze again npm run analyzeHoly moly MB kb kb What happened Looks like we re bundling the entire MUI library Popper Tooltip js We re not using any of those but they re taking up a ton of space in our chunk It turns out that when we are using ES modules webpack is very good at figuring out which pieces of code we are actually using based on what we import and export This process is called tree shaking and it requires you to use ES modules in order to work You can see that doing so can have a very dramatic effect on our final bundle Our current program is exactly the same functionally as our previous one but thanks to a single commonJS import it s a whopping x the size Yikes Here s what we re going to do though Instead of removing that require in our CustomSpeedDial we re going to leave it there and introduce something called code spltting as another option available to you Code splitting is effective when you have a certain component or page or general part of your application that isn t necessary required for every visitor It might be a datepicker that only appears when a user makes a booking or it might be a help page that only a small percentage of users will need We can use React s lazy and suspense features to break these pieces into separate bundle chunks and only load them when necessary Let s update App tsx There s a lot to unpack here so we ll just show the code first and break it down src App tsximport CircularProgress from mui material CircularProgress import Button from mui material Button import React Suspense useState from react const CustomSpeedDial React lazy gt import CustomSpeedDial function App const showSpeedDial setShowSpeedDial useState false if showSpeedDial return lt Suspense fallback lt CircularProgress gt gt lt CustomSpeedDial gt lt Suspense gt return lt Button variant contained onClick gt setShowSpeedDial true gt Click to load speed dial lt Button gt export default App The numbers are a little out of order but that s intentional You ll see it follows the actual flow of the component We lazy import the CustomSpeedDial module Remember that s the one that uses require for the entire MUI package and comes in at MB By using the lazy import what happens is that the import only occurs when our primary component here CustomSpeedDial actually tries to render it We ll see that it doesn t by default A boolean React state value to keep track of whether which component we want to render The default false value means we will not be rendering CustomSpeedDial Our default component is a basic Button imported directly from MUI When this button is pressed it sets the value of showSpeedDial to true Once showSpeedDial is true we take this branch at the next render The reason we get a re render is because we updated a stateful React value showSpeedDial The purpose of the Suspense component is to tells React what to render while waiting for the module to import Depending on the size it could take a second or more For our example we are using MUI s CircularProgress to imply a loading state while the module is loading Once it loads it switches to render the children of the Suspense component Now it s time to try it out We ll begin with an analyze npm run analyzeThis gets really interesting Webpack has created new separate chunks You ll notice there are more js chunks when you toggle the drawer on the left In fact this largest chunk on the left dae chunk js mb kb kb isn t even used on the default load of our app Based on our learnings earlier we can see that huge chunk is definitely our CustomSpeedDial tsx component that imports all of MUI with require commonJS import On the right we have the much smaller bundle c chunk js that includes things like Button and ButtonBase This is the chunk that will load on every page load We can look at the size and validate that in a moment Since our ultimate goal is to make sure our production app is running as efficiently as possible we want to run our tests on the production version of the app Use the following command to build a production version of the app bpm run buildNext we ll need to serve that build directory that was created If you have your own local serve you prefer to use use it If not just add the serve package npm install serve save devAnd then use it to serve the build directory npx serve buildYou can find the page at http localhost or whatever port serve specifies on the command line Press F to open your browser s Developer Tools and click the Network tab THis process should be roughly the same in both Chrome Edge and Firefox I am using Firefox so the screenshots should match your experience If you are using another browser the options will still be there just potentially in a different location Click the Disable Cache checkbox so that we are loading the JS files on every refresh and not a cached version from the browser We want to be able to see the load times and sizes Now hit the refresh button F As we predicted our total transfer is KB with KB of that being the highlighted smaller c chunk we identified remember this is a served production build so we are working with GZIP sizes just like your real app would for real users There is no sign of the KB gzipped chunk Let s click the load speed dial button on our app There s that KB chunk with our CustomSpeedDial component inside of it How cool is it that it only loaded the code on demand Wrapping UpI hope you can start brainstorming ways to reduce the bundle size of your app and potentially introduce code splitting to improve initial load times Also worth noting these tips are not exclusive to Create React App All we did was introduce a special tool called craco to allow us to configure webpack Any application running webpack can potentially benefit from these tips It would be irresponsible to me not to mention that Create React App does recommend a similar tool that doesn t require craco although personally I feel it s not as intuitive to read the data it still gets the job done well Read about it here Continue LearningPlease check some of my other learning tutorials Feel free to leave a comment or question and share with others if you find any of them helpful Running a Local Web ServerHow to use IndexedDBESLintPrettierBabelReact amp JSXWebpack The BasicsWebpack Loaders Optimizations amp Bundle AnalysisWebpack DevServer React amp TypescriptFor more tutorials like this follow me eagleson alex on Twitter |
2021-11-30 14:04:24 |
Apple |
AppleInsider - Frontpage News |
Best deals Nov. 30: $200 off Canon EOS R, $150 off QNAP NAS, more! |
https://appleinsider.com/articles/21/11/30/best-deals-nov-30-200-off-canon-eos-r-150-off-qnap-nas-enclosure-more?utm_medium=rss
|
Best deals Nov off Canon EOS R off QNAP NAS more A day after the Cyber Monday fray there are still good deals to be had Tuesday s best deals include off the Canon EOS R Mirrorless Camera Samsung s T Touch TB drive for and a discount on refurbished Amazon Fire HD tablets Best Deals for November The internet has a plethora of deals each day but many deals aren t worth pursuing In an effort to help you sift through the chaos we ve hand curated some of the best deals we could find on Apple products tech accessories and other items for the AppleInsider audience Read more |
2021-11-30 14:41:09 |
Apple |
AppleInsider - Frontpage News |
Native Union Curve Strap review: A lightweight silicone band for Apple Watch |
https://appleinsider.com/articles/21/11/30/native-union-curve-strap-review-a-lightweight-silicone-band-for-apple-watch?utm_medium=rss
|
Native Union Curve Strap review A lightweight silicone band for Apple WatchThe Native Union Curve Strap for Apple Watch is an absurdly comfortable silicone strap that is both durable and lightweight Native Union Curve Apple Watch strapWe ve tried our fair share of budget Apple Watch bands Some work surprisingly well while others aren t worth their discounted prices Native Union comes into the market with a mid priced band that doesn t do anything far outside the norm but nails the simple things Read more |
2021-11-30 14:05:45 |
Apple |
AppleInsider - Frontpage News |
16-inch MacBook Pro users reporting MagSafe issues, clamshell mode problems |
https://appleinsider.com/articles/21/11/30/16-inch-macbook-pro-users-reporting-magsafe-issues-clamshell-mode-problems?utm_medium=rss
|
inch MacBook Pro users reporting MagSafe issues clamshell mode problemsFor some users the new inch MacBook Pro does not always charge when completely shut down and others are dealing with external monitors not waking correctly in clamshell mode MagSafe charging on a MacBook ProSome users of the revised inch MacBook Pro have been reporting hardware issues concerning MagSafe charging and using external monitors Read more |
2021-11-30 14:43:25 |
海外TECH |
Engadget |
Twitter bans sharing 'private' images and videos without consent |
https://www.engadget.com/twitter-private-photos-videos-personal-information-privacy-145228097.html?src=rss
|
Twitter bans sharing x private x images and videos without consentTwitter has expanded its private information policy to include media meaning that users are not allowed to share photos or videos of a private individual without their permission The company notes that tweeting images of someone without consent can violate their privacy and potentially lead to harm against them Beginning today we will not allow the sharing of private media such as images or videos of private individuals without their consent Publishing people s private info is also prohibited under the policy as is threatening or incentivizing others to do so ーTwitter Safety TwitterSafety November The Twitter Safety team wrote in a blog post that although anyone can be impacted by private media being shared it quot can have a disproportionate effect on women activists dissidents and members of minority communities quot If someone reports a photo or video that violates the policy Twitter will remove the media and take action based on its enforcement options Those include downranking the visibility of the tweet in replies and search results or telling the person who posted it to delete the tweet Twitter also has the right to permanently suspend users who violate the policy There are some exceptions to the policy It doesn t cover private media of public figures or others if a photo or video and the text in the tweet quot are shared in the public interest or add value to public discourse quot In other words if it s newsworthy Twitter will allow the media in question to remain on the platform That said if the goal of sharing private photos or videos of public figures quot or individuals who are part of public conversations is to harass intimidate or use fear to silence them quot Twitter might remove the media The abusive behavior and non consensual nudity policy still apply to public figures Developing |
2021-11-30 14:52:28 |
海外TECH |
Engadget |
Patient receives the world's first fully 3D-printed prosthetic eye |
https://www.engadget.com/patient-receives-a-fully-3-d-printed-eye-for-the-first-time-ever-142528877.html?src=rss
|
Patient receives the world x s first fully D printed prosthetic eyeA patient has been fitted with a highly realistic D printed prosthetic eye for the first time ever Fraunhofer Technology has announced Patient Steve Verze received the high tech version as a permanent replacement for his traditional prosthetic eye quot It makes me feel more and more confident quot he told On Demand News quot If I can t spot the difference I know other people won t spot the difference quot nbsp Fraunhofer worked with British company Ocupeye Ltd on a new process that s faster and far less invasive Previously doctors would need to make a mold of the eye socket something that s so difficult for kids that they need to go under a general anesthetic nbsp Now the team can do a non invasive second scan using a specially modified ophthalmic scanner that delivers a precise measurement of the eye socket That data is combined with a color calibrated image of the healthy eye and transferred over Fraunhofer s quot Cuttlefish Eye quot system which rapidly creates a D print model The software is particularly apt at making a quot realistic representation of even transparent materials quot according to Fraunhofer nbsp The model is then printed out by a company called Fit AG which has experience in additive manufacturing for medical technology From there the prostheses are inspected and given a final polish and touchup by ocularists quot With a single D printer Ocupeye can potentially fulfil the annual requirement of around prostheses required for the UK market quot according to the press release nbsp Verze s prosthetic is a precursor to a forthcoming clinical trial that will evaluate the effectiveness of D printed eyes vs traditional hand made eyes according to University College London Around patients will be recruited two assess the prostheses for motility movement cosmesis look fit comfort mucous discharge and more quot This new eye looks fantastic and being based on D digital printing technology it s only going to be better and better quot Verze said in a statement nbsp |
2021-11-30 14:25:28 |
海外TECH |
Engadget |
Ninja's 10-in-1 multicooker is 41 percent off at Amazon |
https://www.engadget.com/ninja-10-in-1-multicooker-amazon-sale-141417649.html?src=rss
|
Ninja x s in multicooker is percent off at AmazonDon t worry if you missed out on Black Friday multicooker deals ーthere are still big bargains available Ninja s OS Foodi in cooker is back on sale at Amazon for or percent off its usual price As with a similar deal in October this might be the best value for money sale for one of Ninja s do everything devices Buy OS Foodi in at Amazon This Foodi model remains an easy pick It offers the usual multicooker features like pressure cooking slow cooking and and steaming but adds air frying and other perks you don t always see You might also appreciate a quart capacity that s ever so slightly larger than the typical qt Instant Pot size Once gain the main catch is simply the ecosystem Ninja has its supporters but Instant Pot s fan base offers plenty of recipes and other advice you won t necessarily find for competing cookers If that s no issue though Ninja s machine is a safe pick at this price given the broad feature set Get the latest Black Friday and Cyber Monday offers by visiting our deals homepage and following EngadgetDeals on Twitter |
2021-11-30 14:14:17 |
ラズパイ |
Raspberry Pi |
How do we develop AI education in schools? A panel discussion |
https://www.raspberrypi.org/blog/ai-education-schools-panel-uk-policy/
|
How do we develop AI education in schools A panel discussionAI is a broad and rapidly developing field of technology Our goal is to make sure all young people have the skills knowledge and confidence to use and create AI systems So what should AI education in schools look like To hear a range of insights into this we organised a panel discussion as part The post How do we develop AI education in schools A panel discussion appeared first on Raspberry Pi |
2021-11-30 14:11:05 |
Cisco |
Cisco Blog |
Why the world needs us to give on GivingTuesday … and every day |
https://blogs.cisco.com/csr/why-the-world-needs-us-to-give-on-givingtuesday-and-every-day
|
Why the world needs us to give on GivingTuesday …and every dayThere has never been a better time to embrace the philosophy of GivingTuesday Learn more about how you can get involved with giving back efforts |
2021-11-30 14:00:39 |
海外科学 |
NYT > Science |
As World Shuts Borders to Stop Omicron, Japan Offers a Cautionary Tale |
https://www.nytimes.com/2021/11/29/world/asia/omicron-japan-border.html
|
As World Shuts Borders to Stop Omicron Japan Offers a Cautionary TaleJapan which has been very cautious throughout the pandemic is again barring all nonresident foreigners There is an economic and human cost |
2021-11-30 14:26:35 |
海外科学 |
NYT > Science |
Will the Covid Vaccines Stop Omicron? Scientists Are Racing to Find Out. |
https://www.nytimes.com/2021/11/28/health/covid-omicron-vaccines-immunity.html
|
Will the Covid Vaccines Stop Omicron Scientists Are Racing to Find Out A “Frankenstein mix of mutations raises concerns but the variant may remain vulnerable to current vaccines If not revisions will be necessary |
2021-11-30 14:50:44 |
海外科学 |
NYT > Science |
Booster Rollout for Nursing Homes Is Sluggish |
https://www.nytimes.com/2021/11/27/health/covid-nursing-home-booster.html
|
delta |
2021-11-30 14:53:52 |
金融 |
金融庁ホームページ |
「事業者を支える融資・再生実務のあり方に関する研究会(第4回)」議事録について公表しました。 |
https://www.fsa.go.jp/singi/arikataken/gijiroku/20211025.html
|
議事録 |
2021-11-30 16:00:00 |
金融 |
金融庁ホームページ |
「事業者を支える融資・再生実務のあり方に関する研究会」論点整理2.0を公表しました。 |
https://www.fsa.go.jp/singi/arikataken/rontenseiri2.pdf
|
論点 |
2021-11-30 16:00:00 |
ニュース |
BBC News - Home |
Covid: We'll throw everything at booster campaign, says PM |
https://www.bbc.co.uk/news/uk-59476361?at_medium=RSS&at_campaign=KARANGA
|
variant |
2021-11-30 14:00:42 |
ニュース |
BBC News - Home |
Covid in Scotland: Nine cases of Omicron variant linked to 'single event' |
https://www.bbc.co.uk/news/uk-scotland-59473564?at_medium=RSS&at_campaign=KARANGA
|
november |
2021-11-30 14:52:49 |
ニュース |
BBC News - Home |
Global markets fall after Moderna Omicron warning |
https://www.bbc.co.uk/news/business-59426353?at_medium=RSS&at_campaign=KARANGA
|
variant |
2021-11-30 14:53:15 |
ニュース |
BBC News - Home |
Arthur Labinjo-Hughes 'knew his dad was going to kill him' |
https://www.bbc.co.uk/news/uk-england-birmingham-59475076?at_medium=RSS&at_campaign=KARANGA
|
arthur |
2021-11-30 14:32:45 |
ニュース |
BBC News - Home |
Dutch Covid case: Escaped couple fight quarantine in TB ward |
https://www.bbc.co.uk/news/world-europe-59473067?at_medium=RSS&at_campaign=KARANGA
|
netherlands |
2021-11-30 14:07:38 |
LifeHuck |
ライフハッカー[日本版] |
いつでもどこでもサッと使える「コードレス掃除機」7選【Amazonブラックフライデー】 |
https://www.lifehacker.jp/2021/11/246758amazon-blackfriday-sale-cordless-vac.html
|
amazon |
2021-11-30 23:30:00 |
北海道 |
北海道新聞 |
仏大統領選に極右評論家 ルペン氏ら右派と争いに |
https://www.hokkaido-np.co.jp/article/617536/
|
大統領選 |
2021-11-30 23:15:00 |
北海道 |
北海道新聞 |
エトピリカ 繁殖確認できず 根室ユルリなど 環境省「危機的」 |
https://www.hokkaido-np.co.jp/article/617406/
|
絶滅危惧種 |
2021-11-30 23:06:34 |
北海道 |
北海道新聞 |
総人口1億2614万人 国勢調査確定値 道内は15万7千人減で全国最大の減少幅 |
https://www.hokkaido-np.co.jp/article/617477/
|
国勢調査 |
2021-11-30 23:04:44 |
北海道 |
北海道新聞 |
NY円、112円後半 |
https://www.hokkaido-np.co.jp/article/617534/
|
外国為替市場 |
2021-11-30 23:03:00 |
北海道 |
北海道新聞 |
オミクロン道内への流入の監視徹底 道、検査体制整備急ぐ |
https://www.hokkaido-np.co.jp/article/617511/
|
新型コロナウイルス |
2021-11-30 23:01:36 |
コメント
コメントを投稿