投稿時間:2021-11-24 15:49:26 RSSフィード2021-11-24 15:00 分まとめ(62件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
TECH Engadget Japanese PS5版テレビアプリ torne 配信開始。nasneを高速・快適視聴 https://japanese.engadget.com/torne-ps5-nasne-053057353.html nasne 2021-11-24 05:30:57
TECH Engadget Japanese イタリア競争当局、アップルとアマゾンに独禁法違反で約260億円の罰金。Beats製品の販売制限を確認 https://japanese.engadget.com/apple-amazon-fined-260euro-antitrust-052003145.html amazon 2021-11-24 05:20:03
ROBOT ロボスタ VRとアバターロボット、リモート現場管理のSaaSを開発する建設テックのログビルドが総額約1億円の資金調達 https://robotstart.info/2021/11/24/logbuild-pre-s-a.html VRとアバターロボット、リモート現場管理のSaaSを開発する建設テックのログビルドが総額約億円の資金調達株式会社logbuild湘南の建設会社社長元現場監督が創業した株式会社logbuild本社神奈川県藤沢市、代表取締役中堀健一、以下「ログビルド」は、リモート施工管理実現の為、VR写真による度現場可視化アプリ、アバターロボット、オンライン現場立ち合いアプリを開発するスタートアップ。 2021-11-24 05:05:05
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 売上高1兆円以上の企業、社長報酬の中央値は「9860万円」 昨対比で微減 https://www.itmedia.co.jp/business/articles/2111/24/news087.html itmedia 2021-11-24 14:51:00
IT ITmedia 総合記事一覧 [ITmedia PC USER] Amazon、声で印刷を実行できるAlexa向けの新プリント機能を提供開始 https://www.itmedia.co.jp/pcuser/articles/2111/24/news131.html alexa 2021-11-24 14:25:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] テレワークで従業員の“メンタル不調”が増加 人事の約6割が「実感する」と回答 https://www.itmedia.co.jp/business/articles/2111/24/news127.html itmedia 2021-11-24 14:05:00
TECH Techable(テッカブル) バイリンガルの脳はなぜ自然に2つの言語を操れるのか? ニューヨーク大が発見 https://techable.jp/archives/167251 切り替え 2021-11-24 05:00:17
IT 情報システムリーダーのためのIT情報専門サイト IT Leaders 特権ID管理「SecureCube Access Check」新版、CSVマスター編集ツールでデータ登録を容易に | IT Leaders https://it.impress.co.jp/articles/-/22367 特権ID管理「SecureCubeAccessCheck」新版、CSVマスター編集ツールでデータ登録を容易にITLeadersNRIセキュアテクノロジーズは年月日、特権ID管理ゲートウェイソフトウェア「SecureCubeAccessCheck」の新版を販売開始した。 2021-11-24 14:47:00
AWS AWS Big Data Blog Embed interactive dashboards in your apps and portals in minutes with Amazon QuickSight’s new 1-click embedding feature https://aws.amazon.com/blogs/big-data/embed-interactive-dashboards-in-your-apps-and-portals-in-minutes-with-amazon-quicksights-new-1-click-embedding-feature/ Embed interactive dashboards in your apps and portals in minutes with Amazon QuickSight s new click embedding featureAmazon QuickSight is a fully managed cloud native business intelligence BI service that makes it easy to connect to your data create interactive dashboards and share these with tens of thousands of users either directly within a QuickSight application or embedded in web apps and portals QuickSight Enterprise Edition now supports click embedding a feature that allows … 2021-11-24 05:53:07
AWS AWS Big Data Blog Send custom branded email reports from Amazon QuickSight https://aws.amazon.com/blogs/big-data/send-custom-branded-email-reports-from-amazon-quicksight/ Send custom branded email reports from Amazon QuickSightAmazon QuickSight is a fully managed cloud native business intelligence BI service that makes it easy to connect to your data create interactive dashboards and share these with tens of thousands of users either directly within QuickSight application or embedded in web apps and portals QuickSight Enterprise Edition now supports the ability to send custom branded email … 2021-11-24 05:50:51
python Pythonタグが付けられた新着投稿 - Qiita 自由に移動できる3D掲示板を作った https://qiita.com/narupo/items/0366118b41beaac76d16 ひらがなカタカナ大小英数字ほか記号すこしD空間にしてみて面白かったところD空間上にコメントが配置されるので、話題ごとにクラウドができて視覚的に面白いなぁと思いました。 2021-11-24 15:00:13
python Pythonタグが付けられた新着投稿 - Qiita Anacondaでjupyter notebookを使っていてgraphvizのPathが通らない時の解決法のメモ https://qiita.com/kotanomura1991/items/444fa8327911fb424238 Anacondaでjupyternotebookを使っていてgraphvizのPathが通らない時の解決法のメモ状況Anacondaでjupyternotebookを使っていてgraphvizのPathが通らないので、ググりながら全部試したがやっぱりだめ。 2021-11-24 14:47:31
python Pythonタグが付けられた新着投稿 - Qiita Pythonで指数平滑移動平均をやってみた https://qiita.com/TanakaFusuke/items/29a586a77c41401b8938 Pythonで指数平滑移動平均をやってみた指数平滑移動平均とは移動平均について移動平均とは、一定の期間の値から平均値を計算して表す値です。 2021-11-24 14:15:31
js JavaScriptタグが付けられた新着投稿 - Qiita 自由に移動できる3D掲示板を作った https://qiita.com/narupo/items/0366118b41beaac76d16 ひらがなカタカナ大小英数字ほか記号すこしD空間にしてみて面白かったところD空間上にコメントが配置されるので、話題ごとにクラウドができて視覚的に面白いなぁと思いました。 2021-11-24 15:00:13
js JavaScriptタグが付けられた新着投稿 - Qiita IntersectionObserverについて https://qiita.com/Qubieeee/items/4a8dccd85f1b20323fa7 2021-11-24 14:52:47
js JavaScriptタグが付けられた新着投稿 - Qiita Harmoware-VISの紹介 https://qiita.com/ucl_Harmoware_VIS/items/e861e0f651ffde647b6a ひとつの移動体データは「始点」「終点」「移動経路」で構成されます。 2021-11-24 14:13:57
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 外部jsの読み込み・htmlへの書き出しについて https://teratail.com/questions/370774?rss=all categoryannouncementtext 2021-11-24 14:50:49
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) PHPフレームワークLaravel入門をバージョンが違う状態で手をつけて良いのかについて https://teratail.com/questions/370773?rss=all PHPフレームワークLaravel入門をバージョンが違う状態で手をつけて良いのかについて質問内容MacのVScodeで開発していて、主にJSVuejs、PHPLaravelの言語について勉強しています。 2021-11-24 14:50:35
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) [WPF] MVVM Windowの動的な最大化・最小化・閉じるボタンの非アクティブ化 https://teratail.com/questions/370772?rss=all WPFMVVMWindowの動的な最大化・最小化・閉じるボタンの非アクティブ化前提・実現したいことWPFのWindowスタイル「閉じる・最大化・最小化」を動的に非アクティブnbspornbsp非表示にしたいと考えています。 2021-11-24 14:50:34
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) end to end の音声認識の機械学習に使用するコーパスについて https://teratail.com/questions/370771?rss=all endtoendの音声認識の機械学習に使用するコーパスについて今私は音声認識の機械学習を行おうとしているのですが、音声認識モデル構築にしようするコーパスについてですが、endnbsptonbspendの音声認識の仕組み自体は理解できるのですが、コーパスを用いた機械学習時に必要なものがよく理解できません。 2021-11-24 14:50:23
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 背景色(べた塗り)の後に画像が表示されるアニメーションを作りたい https://teratail.com/questions/370770?rss=all 背景色べた塗りの後に画像が表示されるアニメーションを作りたい下記の参考サイトのような画像や文字が表示される前に、その要素に背景色ベタ塗りが入るアニメーションを作りたいと考えております。 2021-11-24 14:47:25
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) GASのアップロードフォームでPDFが真っ白になる https://teratail.com/questions/370769?rss=all GASのアップロードフォームでPDFが真っ白になる前提・実現したいことGASGoogleで、アップロードフォームを作成したのですが、アップロードしたPDFが真っ白になってしまう。 2021-11-24 14:43:09
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) PythonでClientとServerでそれぞれ2つずつの通信ができません。 https://teratail.com/questions/370768?rss=all TCPでクライアントとクライアントは、両方のサーバーServerServerにデータを送信できるようにします。 2021-11-24 14:41:54
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) AUTO INCREMENTされたIDを使ったINSERT https://teratail.com/questions/370767?rss=all AUTOINCREMENTされたIDを使ったINSERT以下のようなデータ構成で、度の入力で複数件のデータに対応する場合ですが、入力情報受付日付、担当者名、使用マシンID、客先IDnbsp指定日時nbspコメント文字列商品データ商品コード、商品数量、処理フラグ→nbsp件件程度可変全てをまとめてテーブルにすると、の情報が重複して非効率なので、、を分けるとすると、次のようになるのかと。 2021-11-24 14:41:06
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) VSCodeのターミナルでBootstrapをインストールしたい https://teratail.com/questions/370766?rss=all 「統合ターミナルでコマンドラインを作業してみる」という項目を進めています。 2021-11-24 14:40:41
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 16進数の正規表現について https://teratail.com/questions/370765?rss=all axxzu 2021-11-24 14:36:11
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Googleフォームの回答に初期値をセットしたい https://teratail.com/questions/370764?rss=all Googleフォームの回答に初期値をセットしたい前提・実現したいことGoogleフォームでアンケートを作成し、ログインしたアカウントによって、昨年度のデータを回答欄にあらかじめ初期値としてセットしておきたいです。 2021-11-24 14:33:37
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 画面サイズに合わせたcssの書き方について https://teratail.com/questions/370763?rss=all 画面サイズに合わせたcssの書き方についてhtml、css初心者です。 2021-11-24 14:26:04
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) カンマ区切りの文字列を入力してもらいたい https://teratail.com/questions/370762?rss=all abcde 2021-11-24 14:21:03
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Jest specかtestか ファイルの名前について https://teratail.com/questions/370761?rss=all Jestspecかtestかファイルの名前についてJestを使用してユニットテストを書いています。 2021-11-24 14:15:29
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) VB.NET Selenium Chrome で、javascript を無効にしたいです https://teratail.com/questions/370760?rss=all VBNETSeleniumChromeで、javascriptを無効にしたいです前提・実現したいことVBNETでSeleniumをインストールしてChromeを操作しているのですが、ヘッドレスで起動してページを表示させた場合、javascriptが無効になりません。 2021-11-24 14:02:24
Ruby Rubyタグが付けられた新着投稿 - Qiita 投稿モデル単体テストコードの記述 https://qiita.com/TAKA__m/items/32924c138ded74be58f8 投稿モデル単体テストコードの記述前回に続いて、サンプルアプリの投稿機能、Eatモデルの単体テストコードを実装します①テストコードを記述するファイルを作成まず、Eatモデル単体テストコードを記述するための、ファイルを生成します以下のコマンドを実行しますターミナルrailsgrspecmodeleat以下のように、テストコードを記述するためのファイルeatspecrbと、FactoryBotを記述するためのファイルeatsrbが生成されますspecLfactoriesLeatsrbLusersrbmodelsLeatspecrbLuserspecrb②FactoryBotを準備続いて、Eatモデルのインスタンスを生成するFactoryBotを設定しますeatsrbに、以下のように記述しますspecfactorieseatsrbFactoryBotdefinedofactoryeatdotextFakerLoremsentenceimageFakerLoremsentenceassociationuserendend行目にassociationuserという記述がありますこれはusersrbのFactoryBotとアソシエーションがあることを意味していますつまり、Eatのインスタンスが生成したと同時に、関連するUserのインスタンスも生成されますEatに対しては、必ずUserが紐付いている必要があるため、このように記述する必要がありますUserはEatを必ず持っているわけではないため、usersrbには記述しません。 2021-11-24 14:56:55
AWS AWSタグが付けられた新着投稿 - Qiita [初心者向け]AWSを使って外部サイトからkintoneにレコードを追加 https://qiita.com/yu2mi/items/f424eb93ef5e2876a999 初心者向けAWSを使って外部サイトからkintoneにレコードを追加やりたいこと外部サイトで入力したデータをマスタkintoneに登録動作確認環境作業端末windowsマスタデータkintoneテストの流れkintoneアプリ作成AWSLambda関数の作成AWSLambda環境構築AWSAPIGateway環境構築外部ページの作成kintoneアプリ作成テスト用のアプリを作成アプリ名テストアプリ項目レコード番号項目文字列行➤フィールド名テキスト➤フィールドコードtextAPIトークンの生成アプリの設定設定APIトークンからレコード閲覧アクセス権有りのAPIトークンを生成し保存APIトークンを控えるAWSLambda関数の作成※nodejsのインストールはこちらを参考にしました。 2021-11-24 14:28:23
AWS AWSタグが付けられた新着投稿 - Qiita GitHubActionsのSelf-hosted runnerを必要な時だけ起動する https://qiita.com/renave/items/b557aca674b4be0876f1 まとめいかがでしょうかSelfhostedrunnerにハイスペックなマシンを使うことでCIの処理時間今回はSpringNativeのビルドを短くすることができますが、費用も気にした方がいいのでこういう形にしてみました。 2021-11-24 14:12:58
Linux CentOSタグが付けられた新着投稿 - Qiita chronyd覚書 https://qiita.com/yoshiyuki_kono/items/5e1ffe5423a34a8b46ce 参照ソースからの測定値が、周波数を示す値と現在使用されている周波数との差を反映します。 2021-11-24 14:49:52
Ruby Railsタグが付けられた新着投稿 - Qiita 投稿モデル単体テストコードの記述 https://qiita.com/TAKA__m/items/32924c138ded74be58f8 投稿モデル単体テストコードの記述前回に続いて、サンプルアプリの投稿機能、Eatモデルの単体テストコードを実装します①テストコードを記述するファイルを作成まず、Eatモデル単体テストコードを記述するための、ファイルを生成します以下のコマンドを実行しますターミナルrailsgrspecmodeleat以下のように、テストコードを記述するためのファイルeatspecrbと、FactoryBotを記述するためのファイルeatsrbが生成されますspecLfactoriesLeatsrbLusersrbmodelsLeatspecrbLuserspecrb②FactoryBotを準備続いて、Eatモデルのインスタンスを生成するFactoryBotを設定しますeatsrbに、以下のように記述しますspecfactorieseatsrbFactoryBotdefinedofactoryeatdotextFakerLoremsentenceimageFakerLoremsentenceassociationuserendend行目にassociationuserという記述がありますこれはusersrbのFactoryBotとアソシエーションがあることを意味していますつまり、Eatのインスタンスが生成したと同時に、関連するUserのインスタンスも生成されますEatに対しては、必ずUserが紐付いている必要があるため、このように記述する必要がありますUserはEatを必ず持っているわけではないため、usersrbには記述しません。 2021-11-24 14:56:55
技術ブログ Developers.IO i tried to setup AWS CodePipeline and AWS CodeDeploy to deploy application on Amazon EC2 using github as a source https://dev.classmethod.jp/articles/i-tried-to-setup-aws-codepipeline-and-aws-codedeploy-to-deploy-application-on-amazon-ec2-using-github-as-a-source/ i tried to setup AWS CodePipeline and AWS CodeDeploy to deploy application on Amazon EC using github as a sourceIntroduction In this article we will learn about how to create a CI CD Pipeline using github and AWS Service 2021-11-24 05:50:06
技術ブログ Developers.IO [アップデート]S3ライフサイクルルールにオブジェクトのバージョン数を追加できるようになりました。 https://dev.classmethod.jp/articles/s3-lifecyclerule-add-object-version/ awsreinvent 2021-11-24 05:14:29
技術ブログ Developers.IO 【12/15(水)リモート】クラスメソッドの会社説明会を開催します https://dev.classmethod.jp/news/jobfair-211215/ 会社説明会 2021-11-24 05:10:41
海外TECH DEV Community Crafting an interactive Node CLI tool from absolute scratch 🔥 https://dev.to/aviyel/crafting-an-interactive-node-cli-tool-from-absolute-scratch-5ecc Crafting an interactive Node CLI tool from absolute scratch In this blog tutorial you will learn how to create your very own Command Line Interface using Node js where we will attempt to automatically fetch the pre configured JavaScript and various other frameworks boilerplate initial project templates So What is Node CLI CLI tools enable you to perform specific tasks or operations directly from your terminal or command line prompt CLI s can be constructed in a variety of computer languages with Node js being one of the most popular platforms Node js command line interfaces CLIs simplify and accelerate repetitive operations while making use of the vast Node js infrastructure These can be readily deployed and accessed across different systems due to the existence of package managers like node package manager npm yarn and pnpm So without further ado let s get started and develop our very own CLI to acquire fetch our pre configured simple static site template JavaScript templates and several other frameworks boilerplate basic project templates automatically with the help of just simple CLI commands Project configurationLet s begin by creating a new folder for our project named template grabber which will serve as a command project formatting for CLI s on NPM Next we ll execute npm init y to initialize our npm project and then open it in your preferred coding editor Then inside our main project directory make a src directory and a bin directory and inside the src directory make a interfaceCommand js file and inside the bin directory make an empty template grabber file without any file extension As a result the structure of your folders and files should resemble something like this Let s open our interfaceCommand js file in the src folder and export a function called an interfaceCommand that accepts some arguments For now we ll just console log the arguments src interfaceCommand jsexport function interfaceCommand args console log args Next navigate to the template grabber file which is located in the bin directory and inside it we will simply create a script inside of the node that requires the esm module This allows us to use es modules without having to transpile the variety of node js versions that may not have that kind of support and once we have done that we will call the interfaceCommand function from within the interfaceCommand js bin template grabber usr bin env noderequire require esm module options require src interfaceCommand interfaceCommand process argv Then we ll use npm to install the esm module and then we ll go to our package json file and alter it for publishing our npm package notably name which we ll set to pramitmarattha template grabber You should create or add your own npm name and don t forget to update the description In the main point it to the index js file in the src directory and the bin directory Create two entries as mentioned in the code below and then create a publishConfig with public access and don t forget to set up a keyword for the project The package json file should look like this after the dependencies have been installed name pramitmarattha template grabber version description A Command Line Interface to automatically setup pre configured JavaScript and various other frameworks initial project template crafted using NodeJS and external third party library main src index js bin pramitmarattha template grabber bin template grabber template grabber bin template grabber publishConfig access public scripts test echo Error no test specified amp amp exit repository type git url git keywords cli command line interface javascript react generator template project vite vue auto generator template grabber author pramitmarattha license MIT bugs url dependencies esm Next we ll use npm link to establish a link to our code so that we can test it out by simply typing template grabberinto the terminal So let s run template grabber into our terminal and specify yes and we ll see that there are roughly three arguments passed in because we logged out using console log previously Let s examine what happens if we simply use template argument As you can see there are only two arguments Let s try again with template grabber yes git which has four arguments as you can see Arranging and processing our argumentsLet s go over each argument one by one now that we ve prepared them The arguments our CLI will accept are a template which can be javascript or other frameworks as well as whether you want to do a git initialization and whether you want to install node dependencies using the npm package manager We ll utilize a few packages to help us out here including inquirer which allows us to ask questions about missing choices and arg which allows us to process arguments into options So to install these packages simply type the following command into your terminal npm install inquirer argAfter installing these packages your package json file s dependencies section should look like this Now that we ve installed our dependencies let s use them so let s import arg into our interface first After that create a function called argumentOptionsParser that takes the command line inputs and turns them to options So we re specifying the parameters we re hoping to see in this object which include git yes and install as well as their aliases Finally the second object that we pass in is the arguments that we want argv to use which start at the third argument of the raw args so the first one is the template garbber and the second one is the template so starting at the three we are looking for these arguments and after that we will return some options in an object so skipPrompts will correspond to if the user specifies yes and If the user specifies install the runInstall option corresponds otherwise it will be false template is actually the user s first argument so it ll be args and finally if the user specifies git the git the option will correspond As a result your argumentOptionsParser function in your interfaceCommand file should look like this function argumentOptionsParser rawArguments let args arg git Boolean help Boolean yes Boolean install Boolean g git h help y yes i install argv rawArguments slice return template args skipPrompts args yes false git args git false runInstall args install false Next we ll go to our interfaceCommand function and process the previously declared options instead of the args and we ll console log the options instead of the args export function interfaceCommand args let opts argumentOptionsParser args console log opts Let s go over to our terminal and put it to the test Inquiring about the missing undeclared itemsLet s prompt the user for any missing items they didn t pass in on the command line To do this we ll create an async function called inquireUndeclaredItems that takes the choices we ve gathered so far and prompts the user for any missing items they didn t define on the command line The first thing we do inside that method is set the default template to react Next we want to tick the skipPrompts option since we don t want to prompt users with options if they don t want to be prompted again So we ll verify if users have specified skip prompts and if they have we ll take the choices we ve gathered so far and set the template to either the template the user specified in opts template or the default vanilla react template if they didn t specify one on the command line The next thing we ll do is set up our lists of questions so we can assist the user in filling in the missing parameters The first thing we ll look for is the template and if they haven t specified one we ll create a question to ask them which template to use We ll start by pushing a question on and it ll be a list type so we ll give the user a couple of options to choose from The message will be What template would you like to use and the name will be a template name The options will be react javascript or viteReact templates with react being the default option as stated above If they haven t specified git we ll do something similar and simply ask the users if they want to start the git repository inside the templated projects with the default being false We ll set a constant of answers equals to await inquirer to prompt the questions and that ll return an answer to users specified so we ll return our existing options as well as the template whether of the template they specified inside of the options or the answers that the user gave us and we ll do the same thing for the git As a result your inquireUndeclaredItems function in your interfaceCommand file should look like this async function inquireUndeclaredItems opts const defaultTemplate React if opts skipPrompts return opts template opts template defaultTemplate const displayOptions if opts template displayOptions push type list name template message What template would you like to use choices React viteReact JavaScript default defaultTemplate if opts git displayOptions push type confirm name git message Would you like to use git default false const userInput await inquirer prompt displayOptions return opts template opts template userInput template git opts git userInput git Let s move on to our interfaceCommand function now that you ve successfully constructed this inquireUndeclaredItems function Let s use the command to prompt for the missing options while passing the options we have so far and making the function asynchronous Hence your interfaceCommandfunction in your interfaceCommand file should look like this export async function interfaceCommand args let opts argumentOptionsParser args opts await inquireUndeclaredItems opts console log opts If you ve followed all of the detailed instructions till now your interfaceCommand js file should look like this src interfaceCommand jsimport arg from arg import inquirer from inquirer function argumentOptionsParser rawArguments let args arg git Boolean help Boolean yes Boolean install Boolean g git h help y yes i install argv rawArguments slice return template args skipPrompts args yes false git args git false runInstall args install false async function inquireUndeclaredItems opts const defaultTemplate React if opts skipPrompts return opts template opts template defaultTemplate const displayOptions if opts template displayOptions push type list name template message What template would you like to use choices React viteReact JavaScript default defaultTemplate if opts git displayOptions push type confirm name git message Would you like to use git default false const userInput await inquirer prompt displayOptions return opts template opts template userInput template git opts git userInput git export async function interfaceCommand args let opts argumentOptionsParser args opts await inquireUndeclaredItems opts console log opts Now let s see whether this works so open your terminal and type template grabber It will also ask us whether we want a git repo set up for our project or not Adding templatesNow that we have options set up for our users it s time to generate and initialize the template To do so we ll use ncp to copy some of the template files and chalk to format the output using various different colors So to install these packages simply type the following command into your terminal npm install ncp chalkAfter installing these packages your package json file s dependencies section should look like this All of our application s core logic will be included in a file called main js in the source folder As an outcome the structure of your folders and files should look like this Let s start by importing all of the necessary dependencies into our main js file then promisifying the fs access and ncp functions and storing them as access We ll use access to check for reading access to a file and copy to copy our project template files into the users target folder recursively src main jsimport fs from fs import path from path import chalk from chalk import ncp from ncp import promisify from util accessconst access promisify fs access reccusive copyconst copy promisify ncp Next we ll write an asynchronous method called copyProjectTemplateFiles that takes the options and uses them to copy the template directory to the target directory without overwriting it so for that we ll set clobber to false async function to copy template filesasync function copyProjectTemplateFiles opts return copy opts templateDirectory opts targetDirectory clobber false Next we ll create the templateGrabber function which will create users bootstrap the project The first thing we ll do inside this function is specify a target directory so we ll take the options we ve had so far and also specify the target directory If they passed in a target directory we ll use that otherwise we ll use the process on the current working directory which will be our normal operations Then using path resolve from the current pathname we ll set the template directory Several directories up there s a folder called projectTemplates and inside it there s a folder with the templates folder name We ll be able to resolve the template directory utilizing all of that inside our path resolve function We can now set the template directory within our options once we have that Now that we have a template directory we need to check to see if it exists so we use access to look at it If it succeeds we re set to go if it doesn t we ll merely log out the error and exit the process inside our catch block We ll simply log out the success message if everything went smoothly If you ve followed all of the detailed instructions till now your templateGrabber function should look like this export async function templateGrabber opts opts opts targetDirectory opts targetDirectory process cwd const fullPathName new URL import meta url pathname let templateDir path resolve fullPathName substr fullPathName indexOf projectTemplates opts template toLowerCase templateDir templateDir substring opts templateDirectory templateDir try await access templateDir fs constants R OK catch err console log chalk red Template directory templateDir does not exist console log err process exit console log Copying project files await copyProjectTemplateFiles opts console log chalk green Creating project from template opts template return true Now we need to correctly arrange and build our folders and files so let s make a projectTemplates directory inside our main project folder Create three directories inside it for now react viteReact and javascript Inside each of these add your own project templates or go to the following repo and grab the projectTemplates files if you just want to follow along with this guide Project TemplatesThe structure of your files and folders should resemble something like this Return to your interfaceCommand js file and import the templateGrabber function from the main logic file then replace the console log with the templateGrabber function and supply the CLI arguments to it After you ve got that figured out your interfaceCommand js file should look like this src interfaceCommand jsimport arg from arg import inquirer from inquirer import templateGrabber from main js function argumentOptionsParser rawArguments let args arg git Boolean help Boolean yes Boolean install Boolean g git h help y yes i install argv rawArguments slice return template args skipPrompts args yes false git args git false runInstall args install false async function inquireUndeclaredItems opts const defaultTemplate React if opts skipPrompts return opts template opts template defaultTemplate const displayOptions if opts template displayOptions push type list name template message What template would you like to use choices React JavaScript vite default defaultTemplate if opts git displayOptions push type confirm name git message Would you like to use git default false const userInput await inquirer prompt displayOptions return opts template opts template userInput template git opts git userInput git export async function interfaceCommand args let opts argumentOptionsParser args opts await inquireUndeclaredItems opts console log opts await templateGrabber opts So let s try out one demo first before we proceed any further so for that create one test sample directory and lets run our template project script inside it Your react template should be ready if you look in your sample testing folder Fixing git initialization and project installationNow that we re almost done let s fix the git initialization issues and issues for installing the packages inside our project templates To do so we ll use execa pkg install and listr which are all external thriparty packages To install these packages simply type the following command inside of your terminal npm install listr pkg install execaAfter installing these packages your package json file s dependencies section should look like this Let s start by importing all of the necessary dependencies into our main js file then we ll create an asynchronous function called initializeGit that will take in our opt and inside of that we ll run execa and specify that we want to run git with the parameter of init and we ll use the current working directory as a opts targetDirectory which is the directory from which the user is currently running the project and finally if the result failed we ll simply need to reject this promise and return the failed message to it async function initializeGit opts const result await execa git init cwd opts targetDirectory if result failed console error chalk red Failed to initialize git repository return Promise reject new Error Failed to initialize git repository result stderr process exit return Finally inside of our templateGrabber function we ll replace the point where we copied our template files with a Listr to list the task so inside this we ll simply copy the project files initialize the git and install the dependencies This will take a list of objects with titles and tasks so the first one will be copy project files and inside the task we ll run copyProjectTemplateFiles and pass the opts to it The second one will be for initializing git so name it accordingly The task that we will run there is initilizeGit and we will pass our opts Finally we will specify our third argument called enabled which will simply check to see if git is initialized inside the project or not Installing the project dependencies is the final and third task so title it appropriately and the task will be project install taking in a current working directory of opts targetDirectory inside this one we ll specify another argument called skip which will simply skip the task and let the user know that if they don t specify run install as an option they can pass install to automatically install the dependencies Finally use await runningTask run to begin the process of running these tasks which will initialize git install dependencies and copy files if the user desires After you have added everything your main js file should look like this src main jsimport chalk from chalk import fs from fs import path from path import ncp from ncp import promisify from util import projectInstall from pkg install import execa from execa import Listr from listr accessconst access promisify fs access reccusive copyconst copy promisify ncp async function initializeGit opts const result await execa git init cwd opts targetDirectory if result failed console error chalk red Failed to initialize git repository return Promise reject new Error Failed to initialize git repository result stderr process exit return async function to copy template filesasync function copyProjectTemplateFiles opts return copy opts templateDirectory opts targetDirectory clobber false export async function templateGrabber opts opts opts targetDirectory opts targetDirectory process cwd const fullPathName new URL import meta url pathname let templateDir path resolve fullPathName substr fullPathName indexOf projectTemplates opts template toLowerCase templateDir templateDir substring opts templateDirectory templateDir try await access templateDir fs constants R OK catch err console log chalk red Template directory templateDir does not exist console log err process exit console log Copying project files await copyProjectTemplateFiles opts const runningTask new Listr title Hold up Copying project files task async gt await copyProjectTemplateFiles opts title Waitt Initializing git repository task async gt await initializeGit opts enabled gt opts git title REEEEEEE Installing dependencies task async gt await projectInstall cwd opts targetDirectory skip gt opts runInstall install to install all dependencies undefined await runningTask run console log chalk green Creating project from template opts template return true Lets test out our script so lets create one sample testing folder and lets fire the following command script inside the terminaltemplate grabber viteReact git installThe project s complete source code can be found here ConclusionYou ve just successfully learned how to build a CLI tool from the ground up using Node js This project s potential is limitless and also don t forget to check out some of the libraries described above since these packages are really powerful and may be used to develop a variety of large industry level tools so get creative and Happy Coding Main article available here gt Happy Coding Follow aviyelHQ or sign up on Aviyel for early access if you are a project maintainer contributor or just an Open Source enthusiast Join Aviyel s Discord gt Aviyel s worldTwitter gt 2021-11-24 05:35:28
海外TECH DEV Community 7 Awesome Python Libraries To Play With 🕺 https://dev.to/unitybuddy/7-awesome-python-libraries-to-play-with-4pco Awesome Python Libraries To Play With Hello buddies While playing with Python for a time I found some quite interesting modules that are considered worthy of sharing with others So today we re going to see Interesting and Awesome Python libraries modules that are useful too PyperclipThis module was created to enable cross platform copy pasting in Python which was earlier absent The pyperclip module has copy and paste functions that can send a text to and receive text from your computer s clipboard Sending the output of your program to the clipboard will make it easy to paste it on an email word processor or some other software Installpip install pyperclipCode Python program to demonstrate pyperclip module This will import pyperclipimport pyperclippyperclip copy Hello buddies pyperclip paste pyperclip copy This is an interesting module pyperclip paste Emoji Emojis have become a way to express and to enhance simple boring texts Now the same gems can be used in Python programs too Yes really You now have the ultimate power to use emojis in your code For this emoji module is needed to be installed Installpip install emojiCodefrom emoji import emojizeprint emojize laptop Alternatively encode function can be used from emojis module to convert Unicode to emojis import emojisemojified emojis encode There is a snake in my boot print emojified Emoji Cheat sheet WikipediaNow import Wikipedia in Python using Wikipedia module Use the incessant flow of knowledge with Python for daily needs Install pip install wikipediaCodeimport wikipediaresult wikipedia page Python Programming Language print result summary HowdoiStuck on a coding problem Wish to visit StackOverflow without leaving the terminal With howdoi you can do it Install pip install howdoiCode howdoi make trees in Pythonhowdoi commit in gitAsk whatever question you have and it will try it s best to answer it From now you don t need to open those browsers for a quick search and get those hefty amounts of ads and distractions Just howdoi AntigravityThe reason this module is here is because this is quite fun It s basically an Easter egg in Python which is used in Google App Engines It was added to Google App Engines just as a medium to amuse the users Installpip install antigravityCode import antigravitySee the magic urllibUrllib module is the URL handling module for python It is used to fetch URLs Uniform Resource Locators It uses the urlopen function and is able to fetch URLs using a variety of different protocols Urllib is a package that collects several modules for working with URLs such as urllib request for opening and reading urllib robotparser for parsing robot txt filesurllib parse for parsing URLsurllib error for the exceptions raisedInstallpip install urllibCode This will import urlopen class from urllib modulefrom urllib request import urlopenpage urlopen print page headers You can also see the coding of the website by using read function This will import urlopen class from urllib modulefrom urllib request import urlopenpage urlopen Fetches the code of the web pagecontent page read print content TurtleYes a turtle can be imported Don t worry it s not slow Turtle is a Python module to draw It has a huge application and a number of methods which you can learn about in here But with just a few basics pretty cool stuff can be done This module comes built in with Python so there is no need to install it Code This will import turtle moduleimport turtlemyTurtle turtle Turtle myWin turtle Screen Turtle to draw a spiraldef drawSpiral myTurtle linelen myTurtle forward linelen myTurtle right drawSpiral myTurtle linelen drawSpiral myTurtle myWin exitonclick So buddies that s all for now Happy Coding References 2021-11-24 05:14:46
海外TECH DEV Community YouTube Channels and resources for Engineering Students https://dev.to/deeksha_51/youtube-channels-and-resources-for-engineering-students-22f2 YouTube Channels and resources for Engineering StudentsThe concept of education has changed drastically in the recent years With the rise of internet and technology you don t have to be present in the classroom to learn something You have access to quality education anytime and anywhere With the ocean of resources you might feel confused about where to start from or which program to choose to develop your skills Here is the list of a few resources which helped me learn and grow freeCodeCamp If you want to get hands on practice with the skills you re learning then you should definitely check out this platform It provides you with a code editor and output screen along with the informational content so you can learn the concepts and simultaneously apply them as well There are various subtasks in every course and after the completion of these subtasks you can test the skills you learnt by working on some example projects which come with problem statements They also provide certification after the successful submission of the projects They also have a YouTube channel covering a plethora of courses taught by instructors around the globe They are a Non Profit organization with a supportive community which has helped millions with their interactive coding lessons articles and videos in exploring new fields Neso Academy I recommend this channel to everyone who is currently preparing for GATE their university exams or just wanting to learn about basics of Computer and Operating System Their videos are beginner friendly and have detailed explanation about the concepts making them easier to understand and retained Along with the core computer science subjects this channel also offers amazing content about Analog and Digital Electronics and Instrumentation Code with Harry This channel has playlists covering a wide variety of fields be it any programming language web development app development GUI with Tkinter Data Structures amp Algorithms Machine learning etc One thing I liked about this channel apart from the amazing content is that the notes and the links to the code are provided in the description which come handy when you want to revise the session Following are some of the DSA and competitive programming playlists that I found really helpful•Competitive Programming DSA Course Hindi By luv•C Full Course C Tutorial Data Structures amp Algorithms By Apna College•Dynamic Programming Playlist Coding Interview Questions Tutorials Algorithm By Aditya Verma•Data Structures and Algorithms By Jenny s lectures CS IT NET amp JRFThese are some of the resources which I found useful if you have other recommendations please drop them in the comments I would love to check them out Let s keep learning and growing together 2021-11-24 05:11:45
海外TECH DEV Community SPO600 Week 9 reflection https://dev.to/qzhang125/spo600-week-9-reflection-1858 spo 2021-11-24 05:08:09
海外TECH Engadget Samsung will build a $17 billion semiconductor factory in Texas https://www.engadget.com/samsung-17-billion-chip-factory-texas-054150875.html?src=rss Samsung will build a billion semiconductor factory in TexasSamsung has committed to build a chip making factory in Texas just as the US starts to push for the expansion in semiconductor production within the country The Korean tech giant will be investing billion into the new facility which will manufacture high end and advanced chips for smartphones G and artificial intelligence among other applications According to The Wall Street Journal construction for the factory is scheduled to begin next year while production within the facility is expected to start in the second half of nbsp The US government has been taking steps towards boosting semiconductor production in the US following the global chip shortage caused by shuttered plants and the high demand for PCs and other devices during the pandemic This issue continues to have a huge impact across industries ーjust this year automakers like GM and Ford had to suspend or cut production in their US plants due to supply constraints nbsp Samsung scouted locations in Arizona New York and Florida for the new project and also considered Austin where it has an existing factory It ultimately chose Taylor Texas for this new facility due to the generous tax breaks and incentives it offered as well as the city s capability to do rolling blackouts and providing electricity to certain facilities in the case of power outage nbsp Kim Ki nam chief executive of the Samsung Electronics Device Solutions Division said in a statement quot As we add a new facility in Taylor Samsung is laying the groundwork for another important chapter in our future With greater manufacturing capacity we will able to better serve the needs of our customers and contribute to the stability of the global semiconductor supply chain We are also proud to be bringing more jobs and supporting the training and talent development for local communities as Samsung celebrates years of semiconductor manufacturing in the US quot 2021-11-24 05:41:50
海外科学 NYT > Science Live Video: Watch NASA Launch DART, a Mission to Crash Into an Asteroid https://www.nytimes.com/2021/11/23/science/nasa-dart-launch-asteroid.html Live Video Watch NASA Launch DART a Mission to Crash Into an AsteroidAn early morning liftoff kicks off DART NASA s first mission to test a spacecraft that could one day save Earth from a deadly space rock 2021-11-24 05:45:35
金融 ニッセイ基礎研究所 数学記号の由来について(10)-確率・統計(P、E、nPr、nCr、μ、σ等)- https://www.nli-research.co.jp/topics_detail1/id=69424?site=nli Nmicro、sigma平均micro、分散sigmaの正規分布の歴史「正規分布normaldistribution」は年近く前から研究されており、多くの表記が使用されてきたが、今日使用されているものは比較的最近のものであるようだ。 2021-11-24 14:32:25
ニュース ジェトロ ビジネスニュース(通商弘報) モディ首相、農産物流通促進法など新農業関連法の撤廃表明 https://www.jetro.go.jp/biznews/2021/11/81df8e1036181052.html 首相 2021-11-24 05:50:00
ニュース ジェトロ ビジネスニュース(通商弘報) ニューサウスウェールズ州現代奴隷法、2022年1月1日施行 https://www.jetro.go.jp/biznews/2021/11/89587f689c40ade6.html 現代 2021-11-24 05:40:00
ニュース ジェトロ ビジネスニュース(通商弘報) 欧州医薬品庁、EU加盟国の新型コロナ治療薬モルヌピラビルの緊急使用に関する意見発表 https://www.jetro.go.jp/biznews/2021/11/3e45be6ceb479d70.html 欧州医薬品庁 2021-11-24 05:35:00
ニュース ジェトロ ビジネスニュース(通商弘報) COP26の直後に環境相が交代 https://www.jetro.go.jp/biznews/2021/11/83f8f1547bf880e1.html 直後 2021-11-24 05:20:00
ニュース ジェトロ ビジネスニュース(通商弘報) バイデン米政権、石油戦略備蓄を5,000万バレル放出へ、日本政府も一部放出決定 https://www.jetro.go.jp/biznews/2021/11/edc3735d95f6e1cd.html 日本政府 2021-11-24 05:15:00
ニュース BBC News - Home No babies allowed in Commons, MP Stella Creasy told https://www.bbc.co.uk/news/uk-59396801?at_medium=RSS&at_campaign=KARANGA westminster 2021-11-24 05:54:41
GCP Google Cloud Platform Japan 公式ブログ Google Cloud サービスで SAP のマネージド アプリケーションをピアリングする 3 つの理由 https://cloud.google.com/blog/ja/products/sap-google-cloud/three-reasons-peer-sap-managed-apps-your-google-cloud-services/ 貴社がGoogleCloudを使ってRISEwithSAPマネージドアプリケーションまたはSAPEnterpriseCloudServicesなどの他のSAPマネージドサービスをホストしている場合、VPCネットワークピアリングが重要な機能である理由や、ネットワーク管理者が同機能を実装する方法について詳しく知ることは決して無駄にはなりません。 2021-11-24 07:00:00
GCP Google Cloud Platform Japan 公式ブログ Chrome OS のアップデート配信サイクルが短縮: 各々のペースで移行可能に https://cloud.google.com/blog/ja/products/chrome-enterprise/chrome-os-lts/ LTSチャネルのデバイスはセキュリティアップデートを受け取れますが、古いStableリリースに固定されたデバイスは受け取れないためです。 2021-11-24 06:00:00
IT 週刊アスキー 新作ロボットSRPG『Relayer(リレイヤー)』のDL版プレオーダーが11月25日12時よりスタート! https://weekly.ascii.jp/elem/000/004/075/4075984/ playstation 2021-11-24 14:30:00
IT 週刊アスキー 老舗メゾンのシャンパーニュで楽しむ年末年始、キンプトン新宿東京「ペリエ ジュエ ルームプラン」11月25日~2022年1月31日提供 https://weekly.ascii.jp/elem/000/004/075/4075965/ 年末年始 2021-11-24 14:10:00
マーケティング AdverTimes 「ナイキランド」開設 若者向け仮想空間「ロブロックス」に https://www.advertimes.com/20211124/article369297/ nikeland 2021-11-24 06:00:07
マーケティング AdverTimes 中国のライブ配信者が数時間で数十億ドル稼ぐ現象はいつまで続くのか―米メディア https://www.advertimes.com/20211124/article369247/ 米メディア 2021-11-24 06:00:04
マーケティング AdverTimes 再びマーケティング領域で注目されるPR ロングセラーを多数持つカルビーの事例 https://www.advertimes.com/20211124/article369292/ 2021-11-24 05:53:21
マーケティング AdverTimes 「イノベ構想」動画で紹介 推進機構、ドラマ仕立ての2本公開 https://www.advertimes.com/20211124/article369241/ 紹介 2021-11-24 05:30:33
GCP Cloud Blog JA Google Cloud サービスで SAP のマネージド アプリケーションをピアリングする 3 つの理由 https://cloud.google.com/blog/ja/products/sap-google-cloud/three-reasons-peer-sap-managed-apps-your-google-cloud-services/ 貴社がGoogleCloudを使ってRISEwithSAPマネージドアプリケーションまたはSAPEnterpriseCloudServicesなどの他のSAPマネージドサービスをホストしている場合、VPCネットワークピアリングが重要な機能である理由や、ネットワーク管理者が同機能を実装する方法について詳しく知ることは決して無駄にはなりません。 2021-11-24 07:00:00
GCP Cloud Blog JA Chrome OS のアップデート配信サイクルが短縮: 各々のペースで移行可能に https://cloud.google.com/blog/ja/products/chrome-enterprise/chrome-os-lts/ LTSチャネルのデバイスはセキュリティアップデートを受け取れますが、古いStableリリースに固定されたデバイスは受け取れないためです。 2021-11-24 06:00:00

コメント

このブログの人気の投稿

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

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

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)