投稿時間:2022-02-06 22:23:17 RSSフィード2022-02-06 22:00 分まとめ(23件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita 機械学習による嵐のメンバー分類器 https://qiita.com/s-cat/items/4e8a82505cd31356e608 このサイトには以下をビルドパックに設定する必要があるとありますが設定してもうまくいかず逆に消去することで解決しました。 2022-02-06 21:47:22
python Pythonタグが付けられた新着投稿 - Qiita matplotlibで軸の文字サイズを変更する https://qiita.com/mizomouse/items/b3e50d596c5a1b8faa27 figpltfigurepltplotlabellinefontsizeでx軸の文字サイズ変更pltxlabelxlabelfontsizefontsizeでy軸の文字サイズ変更pltylabelylabelfontsizelabelsizeで軸の数字の文字サイズ変更plttickparamslabelsizefontsizeで凡例の文字サイズ変更pltlegendfontsizepltshow軸の数字の文字サイズだけ小さくするバランス的にこれがいい感じな気がする。 2022-02-06 21:09:28
js JavaScriptタグが付けられた新着投稿 - Qiita NextAuthを完全に理解する #3 https://qiita.com/kage1020/items/195fdd8749f2439849c1 NextAuthを完全に理解するはじめに最近Nextjsを使ったwebアプリケーションを作り始めましたこの中でログイン機能を付けたくてNextAuthjsの導入をしたのですが無知すぎて何をしているのかわかりませんでしたそこで勉強を兼ねてここにドキュメントの内容を日本語訳して記しておきますこの記事の内容この記事はNextAuthのドキュメントを私なりに解釈して書き留めたものですいくつか誤りがあると思いますのでコメント等で指摘していただくと幸いですドキュメントを読みたい方は以下からどうぞ前回の記事は以下からどうぞ今回はnextauthjsについてです初期化nextauthjsファイルではapiauthで始まるすべてのAPIリクエストを処理しますいわゆるダイナミックルーティングですほとんどの場合以下のような初期化で済みますpagesapiauthnextauthjsimportNextAuthfromnextauthexportdefaultNextAuth初期化の途中でログをとりたい場合など特殊な条件下において以下のように初期化もできますpagesapiauthnextauthtsimporttypeNextApiRequestNextApiResponsefromnextimportNextAuthfromnextauthexportdefaultasyncfunctionauthreqNextApiRequestresNextApiResponseDowhateveryouwantherebeforetherequestispasseddowntoNextAuthreturnawaitNextAuthreqresただしNextAuth関数はレスポンスを閉じるのでその後のコードを実行することはできませんNextAuthが機能するために必要なリクエストの一部を変更することは、デフォルトのクッキーをいじるように、予期せぬ結果をもたらす可能性があり、間違った操作をするとセキュリティホールをもたらす可能性があります。 2022-02-06 21:43:57
AWS AWSタグが付けられた新着投稿 - Qiita AWSのストレージのコスト比較 https://qiita.com/sasuke9097/items/0809bfcec3950a828eb6 バッチサーバーバッチの最後でEBSのボリュームまるごとスナップショットを取って日単位か月単位でSに退避がシンプルっぽい。 2022-02-06 21:06:29
Ruby Railsタグが付けられた新着投稿 - Qiita Webpacker から importmap-rails に移行した https://qiita.com/mishina2228/items/d4b9af22d0096ee451d7 Shakapackerへ移行する道もあるのですが、なるべくデフォルトのツールを使っていきたいのと、フロントエンドでTypeScriptなどビルドが必要なライブラリを使用していないので、importmaprailsに移行することにしました。 2022-02-06 21:52:52
海外TECH MakeUseOf The 5 Best Apps for a Temporary Burner Phone Number https://www.makeuseof.com/tag/5-apps-getting-temporary-burner-phone-number/ phone 2022-02-06 12:45:11
海外TECH MakeUseOf How Does a Car HUD Work? https://www.makeuseof.com/how-does-car-hud-work/ access 2022-02-06 12:15:12
海外TECH DEV Community How to create and publish a TypeScript package. https://dev.to/anishpras/how-to-create-and-publish-a-typescript-package-1nli How to create and publish a TypeScript package IntroductionIn this guide we will build a package for generating currency symbols from their respective currency code using typescript and publish it as a Node js package This is what we are going to build Currency symbols generator NPMGithub Repo Alright Let s get started Make sure you have the latest version of node and npm node vv npm v Pick a great nameThis is probably harder than you think The package name must be Pascal Case and lowercase With over packages do a quick search at to make sure your name isn t used yet In this guide we ll choose the name currency symbol generator but make sure to use a unique name so you can publish the package later on npm Open you workspace where you want to create your packageIn this we will be using our Desktop directorycd Desktop Let s initialise our PackageWe will be using TSDX in this guide as it provides all the necessary dependencies You can change the name currency symbol generator to your own package name as it will generate a package json with the same name npx tsdx create currency symbol generatorchoose basic option when asked in the terminal and press enter Then change your directory to the package folder cd currency symbol generatorNote Be sure to use the name as specified while creating the package using tsdx Create a git repositoryAll in order You need a remote git repository for the package so you can download it Creating a remote Git repository isn t relevant to this article but once you ve created it you can use the following lines to initialise your local repository and set up a remote origin git initecho Currency Symbol Generator gt gt README mdgit add amp amp git commit m Initial commit git branch M mainReplace with the URL to your remote repository git remote add origin lt Git Repository Url gt git push u origin main Modify your package jsonAdd author description keywords repository and bugs key in package json Your package json should look like this author Anish Prashun lt anishprashun gmail com version license MIT description A minimal package for getting symbol of a currency using the country code keywords currency symbol react typescript javascript currency symbol get currency symbol anish prashun main dist index js typings dist index d ts files dist src repository type git url directory bugs url engines node gt scripts start tsdx watch build tsdx build test tsdx test lint tsdx lint prepare tsdx build size size limit analyze size limit why peerDependencies husky hooks pre commit tsdx lint prettier printWidth semi true singleQuote true trailingComma es name currency symbol generator module dist currency symbol generator esm js size limit path dist currency symbol generator cjs production min js limit KB path dist currency symbol generator esm js limit KB devDependencies size limit preset small lib husky size limit tsdx tslib typescript Note Change the details according to your need like change the author name to your name and respectively Let s get to the real code now Create a currencyList ts under src folder and create a array that contains all the symbols respective to their currency code const currencyList name AED symbol د إ name AFN symbol ؋ name ALL symbol L name AMD symbol ֏ name ANG symbol ƒ name AOA symbol Kz name ARS symbol name AUD symbol name AWG symbol ƒ name AZN symbol ₼ name BAM symbol KM name BBD symbol name BDT symbol ৳ name BGN symbol лв name BHD symbol د ب name BIF symbol FBu name BMD symbol name BND symbol name BOB symbol b name BRL symbol R name BSD symbol name BTC symbol ฿ name BTN symbol Nu name BWP symbol P name BYR symbol Br name BYN symbol Br name BZD symbol BZ name CAD symbol name CDF symbol FC name CHF symbol CHF name CLP symbol name CNY symbol name COP symbol name CRC symbol ₡ name CUC symbol name CUP symbol ₱ name CVE symbol name CZK symbol Kč name DJF symbol Fdj name DKK symbol kr name DOP symbol RD name DZD symbol دج name EEK symbol kr name EGP symbol £ name ERN symbol Nfk name ETB symbol Br name ETH symbol Ξ name EUR symbol € name FJD symbol name FKP symbol £ name GBP symbol £ name GEL symbol ₾ name GGP symbol £ name GHC symbol ₵ name GHS symbol GH₵ name GIP symbol £ name GMD symbol D name GNF symbol FG name GTQ symbol Q name GYD symbol name HKD symbol name HNL symbol L name HRK symbol kn name HTG symbol G name HUF symbol Ft name IDR symbol Rp name ILS symbol ₪ name IMP symbol £ name INR symbol ₹ name IQD symbol ع د name IRR symbol ﷼ name ISK symbol kr name JEP symbol £ name JMD symbol J name JOD symbol JD name JPY symbol name KES symbol KSh name KGS symbol лв name KHR symbol ៛ name KMF symbol CF name KPW symbol ₩ name KRW symbol ₩ name KWD symbol KD name KYD symbol name KZT symbol лв name LAK symbol ₭ name LBP symbol £ name LKR symbol ₨ name LRD symbol name LSL symbol M name LTC symbol Ł name LTL symbol Lt name LVL symbol Ls name LYD symbol LD name MAD symbol MAD name MDL symbol lei name MGA symbol Ar name MKD symbol ден name MMK symbol K name MNT symbol ₮ name MOP symbol MOP name MRO symbol UM name MRU symbol UM name MUR symbol ₨ name MVR symbol Rf name MWK symbol MK name MXN symbol name MYR symbol RM name MZN symbol MT name NAD symbol name NGN symbol ₦ name NIO symbol C name NOK symbol kr name NPR symbol ₨ name NZD symbol name OMR symbol ﷼ name PAB symbol B name PEN symbol S name PGK symbol K name PHP symbol ₱ name PKR symbol ₨ name PLN symbol zł name PYG symbol Gs name QAR symbol ﷼ name RMB symbol ¥ name RON symbol lei name RSD symbol Дин name RUB symbol ₽ name RWF symbol R₣ name SAR symbol ﷼ name SBD symbol name SCR symbol ₨ name SDG symbol ج س name SEK symbol kr name SGD symbol name SHP symbol £ name SLL symbol Le name SOS symbol S name SRD symbol name SSP symbol £ name STD symbol Db name STN symbol Db name SVC symbol name SYP symbol £ name SZL symbol E name THB symbol ฿ name TJS symbol SM name TMT symbol T name TND symbol د ت name TOP symbol T name TRL symbol ₤ name TRY symbol ₺ name TTD symbol TT name TVD symbol name TWD symbol NT name TZS symbol TSh name UAH symbol ₴ name UGX symbol USh name USD symbol name UYU symbol U name UZS symbol лв name VEF symbol Bs name VND symbol ₫ name VUV symbol VT name WST symbol WS name XAF symbol FCFA name XBT symbol Ƀ name XCD symbol name XOF symbol CFA name XPF symbol ₣ name YER symbol ﷼ name ZAR symbol R name ZWD symbol Z export default currencyList Now Open index ts under src index ts from the root And change the code fromexport const sum a number b number gt if development process env NODE ENV console log boop return a b toimport currencyList from currencyList export const getCurrencySymbol currencyCode string gt if currencyCode currencyCode undefined currencyCode null currencyCode console log Enter a valid currency code else for let i i lt currencyList length i if currencyList i name currencyCode return currencyList i symbol Lets understand what are we really doing we are importing the currencyList then we are exporting a arrow function getCurrencySymbol which accepts currencyCode as an argument Then we are checking for null empty string undefined or string with white space in the if statement Now if the currency code entered is correct then we will use a For loop for checking against the currencyCode in our currencyList and returning the corresponding symbol And thats all for the coding part Give yourself a pat if you have done this much BONUS We are ready for publishing our package but before that we will test it Yes we will be testing it using jest Go to test directory and delete all the files we are pro we will build our own test from scratch Create a currency test ts file in the test directory And write the code import getCurrencySymbol from src describe Symbol Check gt it works gt expect getCurrencySymbol INR toEqual ₹ Here we are checking if our function is working and for that we have created a test named Symbol Check and we are passing INR as our currency code and expecting ₹ symbol and if this happens our test will get pass Now runyarn testAnd you will see a test pass successful message Let s publish our package But before it we need to change few configuration in our tsconfig json Change the noImplicitReturns to false in the tsconfig json Why we are doing it You can check this at HereYour tsconfig json should look like this see to better understand tsconfigs include src types compilerOptions module esnext lib dom esnext importHelpers true output d ts declaration files for consumers declaration true output js map sourcemap files for consumers sourceMap true match output dir to input dir e g dist index instead of dist src index rootDir src stricter type checking for stronger correctness Recommended by TS strict true linter checks for common issues noImplicitReturns false noFallthroughCasesInSwitch true noUnused overlap with typescript eslint no unused vars can disable if duplicative noUnusedLocals true noUnusedParameters true use Node s module resolution algorithm instead of the legacy TS one moduleResolution node transpile JSX to React createElement jsx react interop between ESM and CJS modules Recommended by TS esModuleInterop true significant perf increase by skipping checking d ts files particularly those in node modules Recommended by TS skipLibCheck true error out if import and file system have a casing mismatch Recommended by TS forceConsistentCasingInFileNames true tsdx build ignores this option but it is commonly used when type checking separately with tsc noEmit true Now let s publish our package You just need to run one command to publish your package npm run publish Hurray You just published your typescript package on npm Code Website www anishprashun comLinkedIn Twitter 2022-02-06 12:47:55
海外TECH DEV Community Day 92 of 100 Days of Code & Scrum: Securing Next.js Apps With next-auth https://dev.to/rammina/day-92-of-100-days-of-code-scrum-securing-nextjs-apps-with-next-auth-31f4 Day of Days of Code amp Scrum Securing Next js Apps With next authHello there everyone I took an easy day with coding since it s Sunday However still made sure to code a little bit and learn some Next js That said I m almost done with Next js amp React by Maximilian Schwarzmüller I d say it was a great introductory resource to Next js One could learn a lot from it paired with the official documentation Anyway let s move on to my daily report YesterdayI learned about authentication in Next js JOINing tables in SQL and continued reading the Nexus Guide Today Next jslearned how to use the next auth package for easier handling of authentication in Next js practiced using next auth s client side methods hooks such as signIn signOut useSession and getSession continued going through Next js amp React by Maximilian Schwarzmüller SQLpractice using different JOINs of for emerging SQL tables continued to go through SQLZoo s SQL Tutorial Scrumcontinued reading the Nexus guide for scaling Scrum Thank you for reading Have a good day Resources Recommended ReadingsNext js amp React by Maximilian SchwarzmüllerNext js official documentationSQLZoo s SQL TutorialThe Scrum GuideNexus guide DISCLAIMERThis is not a guide it is just me sharing my experiences and learnings This post only expresses my thoughts and opinions based on my limited knowledge and is in no way a substitute for actual references If I ever make a mistake or if you disagree I would appreciate corrections in the comments Other MediaFeel free to reach out to me in other media 2022-02-06 12:33:25
海外TECH DEV Community How to install Node.js using NVM on macOS M1 https://dev.to/amanhimself/how-to-install-nodejs-using-nvm-on-macos-m1-13f7 How to install Node js using NVM on macOS MNode js can be installed in different ways I recently started working on an organization repository that requires using different Node js versions Using Node Version Manager NVM it is possible to switch between different Node js versions on the fly It also allows testing code with older Node js versions NVM is a shell script used for installing and managing Node js on a Unix based system It allows switching between different versions of Node js via the command line quickly It also works with any POSIX shell such as zsh PrerequisitesMake sure you have installed the following before proceeding Command line toolsHomebrewGitzsh Remove existing installed Node js versionThis step is optional If you haven t installed Node js previously using Homebrew skip this If you have an existing Node js version installed please remove it before installing NVM For example my machine already has a node version installed via Homebrew Open the terminal window and run brew uninstall ignore dependencies nodebrew uninstall force node Install NVM via HomebrewInstall NVM using Homebrew brew install nvmAfter the above command runs create a directory for NVM at the home working directory mkdir nvmWhen using the zsh shell add the following config inside zshrc export NVM DIR HOME nvm s opt homebrew opt nvm nvm sh amp amp opt homebrew opt nvm nvm sh This loads nvm s opt homebrew opt nvm etc bash completion d nvm amp amp opt homebrew opt nvm etc bash completion d nvm This loads nvm bash completionNow either restart the terminal app or execute source zshrc to re load the latest config for the zsh shell from the file Run the command nvm version to verify For example if the config has loaded this command would display a version Install Node js via NVMNode js is available in two different versions Long Term Support LTS Current with latest featuresAlthough I used to love using the Current version with the latest features on my personal machine I use the LTS version for work At the time of writing this post the current LTS version is Running the command nvm install node would install the current version with the latest features To install the current LTS Node js version execute nvm install ltsThen verify the version by running node version Output v Multiple Node js versionsTo install different versions of Node js you can run nvm install Version Numbernvm install Use a specific Node js versionAfter installing multiple versions use the command below to set a specific version as the default version and use it nvm use Uninstall a Node js versionBefore uninstalling a Node js version make sure it is not the active version or currently used version on the machine Switch to a different version and then run the command nvm uninstall Thank you for reading and let s connect Thank you for reading my blog Feel free to subscribe to my email newsletter and connect on Twitter 2022-02-06 12:21:13
海外科学 NYT > Science Climate Change Enters the Therapy Room https://www.nytimes.com/2022/02/06/health/climate-anxiety-therapy.html skepticism 2022-02-06 12:31:01
ニュース BBC News - Home Prince Charles leads Jubilee tributes to 'remarkable' Queen https://www.bbc.co.uk/news/uk-60279585?at_medium=RSS&at_campaign=KARANGA consort 2022-02-06 12:26:07
ニュース BBC News - Home Levi Bellfield confesses to Lin and Megan Russell murders, lawyer says https://www.bbc.co.uk/news/uk-england-kent-60278013?at_medium=RSS&at_campaign=KARANGA bellfield 2022-02-06 12:52:39
ニュース BBC News - Home Worst to come for food price rises, Tesco boss says https://www.bbc.co.uk/news/business-60279019?at_medium=RSS&at_campaign=KARANGA incomes 2022-02-06 12:35:34
ニュース BBC News - Home Neighbours under threat after Channel 5 drops show https://www.bbc.co.uk/news/entertainment-arts-60277939?at_medium=RSS&at_campaign=KARANGA australian 2022-02-06 12:41:42
ニュース BBC News - Home Man City face Peterborough in FA Cup fifth round https://www.bbc.co.uk/sport/football/60279913?at_medium=RSS&at_campaign=KARANGA luton 2022-02-06 12:18:35
北海道 北海道新聞 釧根管内164人感染 新型コロナ https://www.hokkaido-np.co.jp/article/642509/ 根室管内 2022-02-06 21:19:24
北海道 北海道新聞 「もう雪いらない」札幌市民らうんざり 朝から雪かき https://www.hokkaido-np.co.jp/article/642562/ 札幌市民 2022-02-06 21:18:29
北海道 北海道新聞 7日の札幌圏、JR全面運休 特急は108本 記録的な大雪で https://www.hokkaido-np.co.jp/article/642582/ 全面運休 2022-02-06 21:16:59
北海道 北海道新聞 岐阜市長選、柴橋氏が再選確実に 与野党相乗り、3新人破る https://www.hokkaido-np.co.jp/article/642581/ 任期満了 2022-02-06 21:02:24
北海道 北海道新聞 日本が初の準々決勝進出 アイスホッケー・6日 https://www.hokkaido-np.co.jp/article/642592/ 世界ランキング 2022-02-06 21:05:00
北海道 北海道新聞 十勝管内138人感染 5日連続100人超 https://www.hokkaido-np.co.jp/article/642591/ 十勝管内 2022-02-06 21:04:00
北海道 北海道新聞 上川管内186人感染 自宅待機者最多 https://www.hokkaido-np.co.jp/article/642589/ 上川管内 2022-02-06 21:02: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件)