投稿時間:2020-05-11 23:46:37 RSSフィード2020-05-11 23:00 分まとめ(76件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… 「MacBook Pro 14インチ」の登場は来年か https://taisy0.com/2020/05/11/121510.html macbookpro 2020-05-11 13:41:39
IT 気になる、記になる… 「iPhone 12」シリーズ、価格やストレージ容量を含めラインナップの詳細が明らかに?? https://taisy0.com/2020/05/11/121505.html frontpagetech 2020-05-11 13:19:01
python Pythonタグが付けられた新着投稿 - Qiita 【Python】経過時間を時分秒(00:00:00)で表示する https://qiita.com/cyrus_qiita/items/9da73a6687c00ddf9a31 【Python】経過時間を時分秒で表示するPythonのプログラムにおいて、timeモジュールを利用した経過時間の測定の方法の記事は既にたくさんあり非常に勉強になったのですが、「」のように時分秒で表示する方法が出てこなかったため書き残しておきます。 2020-05-11 22:45:04
python Pythonタグが付けられた新着投稿 - Qiita Python: 深層学習のチューニング https://qiita.com/savaniased/items/b392b85dcd0949df489b 上側に更新され、値がどんどん大きくなっていますつまり、モデルの学習を適切に行うためには、損失関数に対する適切な学習率を設定する必要があるのです。 2020-05-11 22:03:47
js JavaScriptタグが付けられた新着投稿 - Qiita WebRTC Insertable Streams で映像ストリームをいじってみた https://qiita.com/massie_g/items/2b0b6d4f61f1865b4da5 エンコードされた状態、暗号化はされていない状態、でフレームデータに触ることができます。 2020-05-11 22:03:02
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Laravel/Homesteadによる仮想環境構築における、ゲストOSとホストOSの共有ファイル作成 https://teratail.com/questions/260723?rss=all LaravelHomesteadによる仮想環境構築における、ゲストOSとホストOSの共有ファイル作成前提・実現したいこと初心者です。 2020-05-11 22:54:14
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) MVP構成で1つのactivityで3つのfragmentの画面遷移をしたい https://teratail.com/questions/260722?rss=all MVP構成でつのactivityでつのfragmentの画面遷移をしたい前提・実現したいことkotlinでmvp構成でアプリケーションを作っています。 2020-05-11 22:52:57
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) office365について https://teratail.com/questions/260721?rss=all office 2020-05-11 22:52:52
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) デバックコンソール に結果を表示させたい https://teratail.com/questions/260720?rss=all python 2020-05-11 22:49:24
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) グローバルナビをクリック時、文字が動く https://teratail.com/questions/260719?rss=all グローバルナビをクリック時、文字が動く前提・実現したいことここに質問の内容を詳しく書いてください。 2020-05-11 22:47:17
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) jQueryでfadeInが機能しない https://teratail.com/questions/260718?rss=all jQueryでfadeInが機能しない前提・実現したいことjQueryで動きのあるホームページを作っています。 2020-05-11 22:42:14
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 投稿フォームと投稿ボタンを作成したいと思っています。 https://teratail.com/questions/260717?rss=all 投稿フォームと投稿ボタンを作成したいと思っています。 2020-05-11 22:38:25
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) ブラウザ上の右クリック⇒ソースを表示について https://teratail.com/questions/260716?rss=all 右クリックのソースの表示を行っても、HTMLのソースコードやJavascriptのソースコードが見えない存在しないように見えるサイトをよく見かけます。 2020-05-11 22:37:48
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) iOSでAppStoreからのリジェクト理由が解決できない https://teratail.com/questions/260715?rss=all iOSでAppStoreからのリジェクト理由が解決できないCのXamarinで開発したアプリをバージョンUPさせてAppStoreにアプリ申請をするのですが、以下のつの理由で却下されてしまいます。 2020-05-11 22:35:50
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) enzymeをインストールしてからテストが実行できない その他の質問 https://teratail.com/questions/260714?rss=all enzymeをインストールしてからテストが実行できないその他の質問reactでyarnnbsptestnbspnbspwatchを実行しようとしているのですが、enzymeをインストールしてから下記の画像のようなエラーが出てしまいます。 2020-05-11 22:34:10
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Pythonでcsvファイルから値を読み込んだFFT処理について https://teratail.com/questions/260713?rss=all Pythonでcsvファイルから値を読み込んだFFT処理について前提・実現したいこと超初心者です。 2020-05-11 22:30:20
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) larave-mixでvueのscssが反映されない。 https://teratail.com/questions/260712?rss=all LaravelのbladeからVueコンポーネントの使用はできておりますが、コンポーネント内に記載しているscssが反映されません。 2020-05-11 22:24:24
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 【Rails】投稿失敗時にフォームに入力していた値を保持したい https://teratail.com/questions/260711?rss=all 発生している問題・エラーメッセージ本文に関しては入力していた値を保持できるのですが、タグに関しては保持できないでいます。 2020-05-11 22:20:58
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 連想配列から特定値取り出し https://teratail.com/questions/260710?rss=all aposaapos 2020-05-11 22:18:02
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 空白が含まれる文字列の比較が分かりません。 https://teratail.com/questions/260709?rss=all 空白が含まれる文字列の比較が分かりません。 2020-05-11 22:14:20
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Linux標準教科書 基本的なコマンド https://teratail.com/questions/260708?rss=all Linux標準教科書基本的なコマンドLinux標準教科書Verの内容を勉強をしているところですが最初ののファイルやディレクトリの参照lsというところで「lsnbspコマンドの実行」という実習はすぐ「ダウンロードデスクトップ・・・」などの言葉が出てきて出来たのですが次の「場所を指定したディレクトリ一覧の取得」lsusrnbspと入力しても教科書のように「binnbspetcnbspincludenbsp」nbspなどが出てきません。 2020-05-11 22:10:56
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) unityでPhotonNetWorkingを使ったチャット機能を作る https://teratail.com/questions/260707?rss=all unityでPhotonNetWorkingを使ったチャット機能を作るこのサイトを見ながらやっています。 2020-05-11 22:08:05
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) windows10でコマンドプロンプトに入力するときにパスの最初のところに来るH:やr:は何なのでしょうか。 https://teratail.com/questions/260706?rss=all 初歩的かもしれませんがよろしくお願いします。 2020-05-11 22:07:59
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Rust の Option<T> の扱い方について https://teratail.com/questions/260705?rss=all RustのOptionltTgtの扱い方についてRustでスタックのようなものを書こうとしているのですが、OptionltTgtの扱いかたがよくわかりません。 2020-05-11 22:06:26
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) axios パスの書き方 https://teratail.com/questions/260704?rss=all axios 2020-05-11 22:03:55
Ruby Rubyタグが付けられた新着投稿 - Qiita whereメソッドで生SQLを書く時の注意 https://qiita.com/tamugramer/items/ba30fd93967b724c4253 rswhereidsqluserwheresql 2020-05-11 22:27:50
AWS AWSタグが付けられた新着投稿 - Qiita An Introduction of a Microservices with ASP.net core 3x(Part-2) https://qiita.com/alokrawat050/items/bef1b7c5aef00d1f1911 An Introduction of a Microservices with ASP net core x Part Before you proceed We want to start writing code and deploying our Microservices to Amazon Web Services So you will need to have a few things prepared Step Have a Source Control system ready The easiest way of having a source control system is to sign up with GitHub at with a free account Step Install NET Core SDK It can be any NET Core SDK as long as it is not Net Core or Install Visual Studio or higherStep Create a free account at AWS You will need this account to deploy your Microservices If you did not reach out Part then please go through the below link Introduction about the Microservices architecture and Monolithic application architecture and problems An Introduction of a Microservices with ASP net core x Part In this part we will do the sign up confirm the email and will play with AWS settings Let s Create a project file and will do AWS Cognito setting part Step Open you vs code and create a net core application lt gt lt gt lt gt Step Add a few AWS Packages in the projectGo to the Project gt Manage NuGet Pacakges then search Amazon AspNetCore Identity Cognito then search Amazon Extensions CognitoAuthentication Step Create a new User in AWShere I already created a new user called ad word user lt gt lt gt now set a new permission AmazonCognitoDeveloperAuthenticatedIdentitiesStep Setup AWS CognitoSearch Cognito from your dashboard lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt lt gt Step Create a New App ClientCreate a new app client and copy the app client id and app client secret lt gt lt gt Step SetUp app client ID and client secretOpen the file appsettings json and copy the below code and paste in your file Logging LogLevel Default Information Microsoft Warning Microsoft Hosting Lifetime Information AllowedHosts AWS Region lt YOUR REGION gt UserPoolClientId lt YOUR CLIENT ID gt UserPoolClientSecret lt YOUR CLIENT SECRET gt UserPoolId lt YOUR POOL ID gt UserPoolId Step Create Below files in the following directories in the Controllers directory create a Accounts cs controller right click on Controllers directory add gt new file ASP NET Core gt MVC Controller Class in the Models directory create a new directory called Accounts and inside the newly created directory create two model files ConfirmModel cs and SignupModel cs right click on Models directory add gt new folder gt Accounts then right click on the newly created directory called Accounts add gt new class General gt Empty Class in the Views directory create a new directory called Accounts and inside the newly created directory create two model files Confirm cshtml and Signup cshtml right click on Views directory add gt new folder gt Accounts then right click on newly created directory called Accounts add gt new file ASP NET Core gt Razor PageStep Code in the Accounts cs file using System Threading Tasks using Amazon AspNetCore Identity Cognito using Amazon Extensions CognitoAuthentication using Microsoft AspNetCore Identity using Microsoft AspNetCore Mvc using WebAdWord Models Accounts public class Accounts Controller private readonly SignInManager lt CognitoUser gt signInManager private readonly UserManager lt CognitoUser gt userManager private readonly CognitoUserPool pool public Accounts SignInManager lt CognitoUser gt signInManager UserManager lt CognitoUser gt userManager CognitoUserPool pool signInManager signInManager userManager userManager pool pool public async Task lt IActionResult gt Signup var model new SignupModel return View model HttpPost public async Task lt IActionResult gt Signup SignupModel model if ModelState IsValid var user pool GetUser model Email if user Status null ModelState AddModelError UserExists User with this email alred exits return View model user Attributes Add CognitoAttribute Name AttributeName model Email var createdUser await userManager CreateAsync user model Password ConfigureAwait false if createdUser Succeeded RedirectToAction Confirm return View HttpGet public async Task lt IActionResult gt Confirm ConfirmModel model return View model HttpPost ActionName Confirm public async Task lt IActionResult gt Confirm Post ConfirmModel model if ModelState IsValid var user await userManager FindByEmailAsync model Email ConfigureAwait false if user null ModelState AddModelError NotFound A user with the given email address was not found return View model var result await userManager as CognitoUserManager lt CognitoUser gt ConfirmSignUpAsync user model Code true ConfigureAwait false if result Succeeded return RedirectToAction Index Home else foreach var item in result Errors ModelState AddModelError item Code item Description return View model return View model the above all codes belongs to the ︎public class Accounts Controller here in the Models Accounts SignupModel cs file using System ComponentModel DataAnnotations namespace WebAdWord Models Accounts public class SignupModel Required EmailAddress Display Name Email public string Email get set Required DataType DataType Password StringLength ErrorMessage Password must be at least six characters long Display Name Password public string Password get set Required DataType DataType Password Compare Password ErrorMessage Password and its confirmation do not match public string ConfirmPassword get set public SignupModel in the Models Accounts ConfirmModel cs file using System ComponentModel DataAnnotations namespace WebAdWord Models Accounts public class ConfirmModel Required ErrorMessage Email is required Display Name Email EmailAddress public string Email get set Required ErrorMessage Code is required public string Code get set in the Views Accounts Signup cshtml file ViewData Title SignUp Page model WebAdWord Models Accounts SignupModel lt div class row gt lt div class col md gt lt form method post asp controller Accounts asp action Signup gt lt h gt Create a new account lt h gt lt hr gt lt div asp validation summary All class text danger gt lt div gt lt div class form group gt lt label asp for Email gt lt label gt lt input asp for Email class form control gt lt span asp validation for Email class text danger gt lt span gt lt div gt lt div class form group gt lt label asp for Password gt lt label gt lt input asp for Password class form control gt lt span asp validation for Password class text danger gt lt span gt lt div gt lt div class form group gt lt label asp for ConfirmPassword gt lt label gt lt input asp for ConfirmPassword class form control gt lt span asp validation for ConfirmPassword class text danger gt lt span gt lt div gt lt button type submit class btn btn default gt Sign Up lt button gt lt form gt lt div gt lt div gt in the Views Accounts Confirm cshtml file ViewData Title Confirm Page model WebAdWord Models Accounts ConfirmModel lt div class row gt lt div class col md gt lt form method post asp controller Accounts asp action Confirm gt lt h gt Confirm the new account lt h gt lt hr gt lt div asp validation summary All class text danger gt lt div gt lt div class form group gt lt label asp for Email gt lt label gt lt input asp for Email gt lt span asp validation for Email class text danger gt lt span gt lt div gt lt div class form group gt lt label asp for Code gt lt label gt lt input asp for Code gt lt span asp validation for Code class text danger gt lt span gt lt div gt lt button type submit gt Confirm lt button gt lt form gt lt div gt lt div gt Step Debug the Code After sign up you will get a mail Copy the verification code and then access the below URL https localhost Accounts ConfirmAfter Successfully confirming you will redirect to the Home Page Step AWS Cognito DashboardHere you can see that newly created user s display in the dashboard In the next part we will implement a CURD operation and also implement search functionality If you encountered any error then please share it with me If this guide has been helpful for you and your team please share it with others Thanks amp Best Regards Alok Rawat 2020-05-11 22:36:52
AWS AWSタグが付けられた新着投稿 - Qiita 【AWS入門】アカウント作成後にやるべき初期設定 アカウント編 https://qiita.com/Suzuki09/items/3acdd6b7abea7bdfa758 以下のリンクに飛ぶとCloudWatchの画面になると思いますcwdashboardHomeサイドバーにある請求を選択すると以下のようなページに飛ぶのでアラームを作成していきますしきい値をドル約円に設定し次へここでは新しいトピックを作成します。 2020-05-11 22:33:26
Docker dockerタグが付けられた新着投稿 - Qiita MySQLのコンテナを作成したのに再起動し続けるときの対応方法 https://qiita.com/ponsuke0531/items/973b4beecd99ba23ce66 MySQLのコンテナを作成したのに再起動し続けるときの対応方法環境CentOSLinuxreleaseCore使っているMySQLのイメージMySQL事象MySQLのコンテナを作成したのに再起動し続けるdockercomposeymlversionservicesotherservice省略mysqlimagemysqlcommandmysqldcharactersetserverutfmbcollationserverutfmbgeneralcienvironmentMYSQLDATABASEsampledbMYSQLUSERponsukeMYSQLPASSWORDponsukeMYSQLTCPPORTports省略MySQLのコンテナを作成したのに作成されるのが異様に早かったdockercomposeupdnorecreatebuild省略StatusDownloadednewerimageformysqlStartingotherservicedoneCreatingmysqldoneなぜか、再起動し続けるdockerpssCONTAINERIDIMAGECOMMANDCREATEDSTATUSPORTSNAMESSIZEmysqldockerentrypoints…secondsagoRestartingsecondsagomysqlBvirtualMBabcdefghijklhostotherserviceusrsbininithoursagoUpminutesgttcpotherserviceMBvirtualGBだから、コンテナを使うこともできないdockerexecitbashErrorresponsefromdaemonContainerisrestartingwaituntilthecontainerisrunning原因rootユーザーのパスワードを指定しないから参考dockerdockercomposeでmysqlが起動しないQiitadockercomposeymlにMYSQLROOTPASSWORDでrootのパスワードは指定できる。 2020-05-11 22:41:44
golang Goタグが付けられた新着投稿 - Qiita Go言語でMySQLに接続する方法 https://qiita.com/__Rayleigh__/items/7d00eba9293843af8370 Go言語でMySQLに接続する方法はじめにこの記事ではGo言語でMySQLに接続する方法を紹介します。 2020-05-11 22:38:43
golang Goタグが付けられた新着投稿 - Qiita Goで外部コマンドの標準出力を触る https://qiita.com/tayusa/items/d9c4b92cccc1a1766f54 Goで外部コマンドの標準出力を触る概要funcCommandnamestringargstringCmdで外部コマンドを指定します。 2020-05-11 22:37:52
Linux CentOSタグが付けられた新着投稿 - Qiita MySQLのコンテナを作成したのに再起動し続けるときの対応方法 https://qiita.com/ponsuke0531/items/973b4beecd99ba23ce66 MySQLのコンテナを作成したのに再起動し続けるときの対応方法環境CentOSLinuxreleaseCore使っているMySQLのイメージMySQL事象MySQLのコンテナを作成したのに再起動し続けるdockercomposeymlversionservicesotherservice省略mysqlimagemysqlcommandmysqldcharactersetserverutfmbcollationserverutfmbgeneralcienvironmentMYSQLDATABASEsampledbMYSQLUSERponsukeMYSQLPASSWORDponsukeMYSQLTCPPORTports省略MySQLのコンテナを作成したのに作成されるのが異様に早かったdockercomposeupdnorecreatebuild省略StatusDownloadednewerimageformysqlStartingotherservicedoneCreatingmysqldoneなぜか、再起動し続けるdockerpssCONTAINERIDIMAGECOMMANDCREATEDSTATUSPORTSNAMESSIZEmysqldockerentrypoints…secondsagoRestartingsecondsagomysqlBvirtualMBabcdefghijklhostotherserviceusrsbininithoursagoUpminutesgttcpotherserviceMBvirtualGBだから、コンテナを使うこともできないdockerexecitbashErrorresponsefromdaemonContainerisrestartingwaituntilthecontainerisrunning原因rootユーザーのパスワードを指定しないから参考dockerdockercomposeでmysqlが起動しないQiitadockercomposeymlにMYSQLROOTPASSWORDでrootのパスワードは指定できる。 2020-05-11 22:41:44
Git Gitタグが付けられた新着投稿 - Qiita basic HTML5/git https://qiita.com/zomggang/items/319c996cf00a763ca951 basicHTMLgitAreHTMLandCSSaprogramminglanguageNopeHTMLはHyperTextMarkupLanguageの略語で、マックアップ→何かマックするテンプレートのものです。 2020-05-11 22:49:21
Ruby Railsタグが付けられた新着投稿 - Qiita devise-auth-tokenでaccess-tokenをresponseで取得できない https://qiita.com/minatatsu/items/2e29471e876f47b94d00 deviseauthtokenでaccesstokenをresponseで取得できない今回発生した問題ページ内でrequestheadersにアクセスしても認証に必要なaccesstokenやclientが見当たらない。 2020-05-11 22:37:04
Ruby Railsタグが付けられた新着投稿 - Qiita chart-js-railsでグラフを表示させたかったが上手くいかなった件(結論タイポ) https://qiita.com/kazu_kazu/items/b0b18eff020f66359a14 原因が単なるタイポなのか、それともパスの関係などで上手く呼び出せていないのか判断できなかったので、applicationjsやchartjsが何なのか調べてみた。 2020-05-11 22:33:05
Ruby Railsタグが付けられた新着投稿 - Qiita [メモ]Docker for mac 高速に by docker-sync https://qiita.com/cutsome/items/4e42f322444289af7eaf メモDockerformac高速にbydockersyncRailsの開発環境をdockercomposeで動かしていたが、めちゃくちゃ遅いなと思いながらヶ月そのまま過ごしていた僕に、光が差し込んだ。 2020-05-11 22:31:03
Ruby Railsタグが付けられた新着投稿 - Qiita whereメソッドで生SQLを書く時の注意 https://qiita.com/tamugramer/items/ba30fd93967b724c4253 rswhereidsqluserwheresql 2020-05-11 22:27:50
技術ブログ Developers.IO Lambda@EdgeのCloudWatch Logsの保存期間を一括設定する https://dev.classmethod.jp/articles/set-retension-periods-to-lambda-at-edge-cloudwatch-logs/ cloudwatchlogs 2020-05-11 13:34:09
海外TECH DEV Community Motion-controlled Fruit Ninja game using Three.js & Tensorflow.js https://dev.to/devdevcharlie/motion-controlled-fruit-ninja-game-using-three-js-tensorflow-js-18de Motion controlled Fruit Ninja game using Three js amp Tensorflow jsOver the past few weeks I ve spent some time building a clone of the Fruit Ninja game you can play with hand movements using web technologies Demo Feel free to check the live demoIn this post I m gonna go through the steps I took to build it the tools I used and the different challenges I encountered If you re more into videos I made a quick video tutorial Step Breaking the problem downThe first thing I always do when I come up with an idea is spend some time figuring out how to break it into smaller pieces This way it allows me to identify parts of the project I might already know how to build where I need to do some extra research identify the different tools I need to use based on the features and finally have a rough idea of the timeframe needed to build it For this particular project I ended up with the following parts Get the pose detection working Set up the D scene Add D objects Map the D hands movements to the D world Creating the hand trail animation Add collision detection between the hands and D objects Add the game logic points sounds game over etc Refactor Deploy Step Picking the toolsNow that the project is broken down into independent chunks we can start thinking about the tools we need to build it Pose detectionI knew I wanted to be able to detect hands and their position Having worked with the PoseNet library before not only did I know that it was a good tool to do this but I also knew it wouldn t take me too long to implement it again D sceneI also knew I wanted to use D in the browser One of the best libraries for this is the amazing Three js Having used it before as well I decided to go with it instead of trying something like Babylon js or p js only because my free time is limited and I want to optimise how I use it D objectsThe goal of the game is to slice some fruits and avoid bombs so I needed to load these D objects in the game Even though I could have gone ahead and designed them myself in softwares like Blender this would have taken a lot longer Instead I used Poly to search through assets created by other people and available to download Hand trailsI wanted to visualise where my hand was in the D scene I could have done it by showing a simple cube but I wanted to try something a little different I had never tried to create some kind of trail effect so I did some research and found a really cool little library called TrailRendererJS that lets you create a nice looking trail effect SoundsI also wanted to add some sounds to the game Even though I could have done this using the native Web Audio API I sometimes find it a bit difficult to use There s a few JavaScript libraries that offer a level of abstraction but my favourite is Howler js HostingI decided to host this experiment on Netlify not because I work there but because I find it the simplest and fastest way to deploy stuff at the moment Step Building the thingWithout going through the whole code here are some samples of the main features Pose detectionTo use PoseNet you need to start by adding the following scripts to your HTML if you re not using it as an npm package lt script src tensorflow tfjs gt lt script gt lt script src tensorflow models posenet gt lt script gt Once you have access to the library you need to load the model const loadPoseNet async gt net await posenet load architecture MobileNetV outputStride inputResolution multiplier video await loadVideo detectPoseInRealTime video Here we start by loading the machine learning model then we initialise the video feed and once both of these steps have completed we call the function responsible for detecting the body position in the webcam feed The loadVideo function initiates the webcam feed using the built in getUserMedia function const loadVideo async gt const video await setupCamera video play return video const setupCamera async gt if navigator mediaDevices navigator mediaDevices getUserMedia throw new Error Browser API navigator mediaDevices getUserMedia not available const video document getElementById video video width window innerWidth video height window innerHeight const stream await navigator mediaDevices getUserMedia audio false video facingMode user width window innerWidth height window innerHeight video srcObject stream return new Promise resolve gt video onloadedmetadata gt resolve video The detectPoseInRealTime function runs continuously const detectPoseInRealTime async video gt async function poseDetectionFrame const imageScaleFactor const outputStride let poses const pose await net estimateSinglePose video imageScaleFactor flipHorizontal outputStride poses push pose let minPoseConfidence let minPartConfidence poses forEach score keypoints gt if score gt minPoseConfidence const leftWrist keypoints find k gt k part leftWrist const rightWrist keypoints find k gt k part rightWrist console log leftWrist position will return an object with shape x y requestAnimationFrame poseDetectionFrame poseDetectionFrame Setting up a D sceneTo start using Three js you need to load it lt script src gt lt script gt Then you can start creating your scene camera and renderer const initScene gt scene new THREE Scene camera new THREE PerspectiveCamera window innerWidth window innerHeight camera position set scene add camera const initRenderer gt renderer new THREE WebGLRenderer alpha true renderer setPixelRatio window devicePixelRatio renderer setSize window innerWidth window innerHeight let rendererContainer document getElementsByClassName game rendererContainer appendChild renderer domElement Loading D objectsTo load D models you need to add some additional loaders the OBJLoader and MTLLoader These two loaders will allow you to load the D objects and their material const fruitsModels model banana Banana material banana Banana name banana model apple Apple material apple Apple name apple model bomb bomb material bomb bomb name bomb const loadFruitsModels gt return fruitsModels map fruit gt var mtlLoader new THREE MTLLoader mtlLoader setPath assets mtlLoader load fruit material mtl function materials materials preload var objLoader new THREE OBJLoader objLoader setMaterials materials objLoader setPath assets objLoader load fruit model obj function object object traverse function child if child instanceof THREE Mesh var mesh new THREE Mesh child geometry child material fruitModel mesh fruitModel name fruit name fruits push fruitModel generateFruits return fruits In the code sample above I am separating the step that loads the models to the one that appends them onto the scene I am doing this as I want to load the models only once but be able to generate new objects as they appear disappear from the screen const generateFruits numFruits gt for var i i lt numFruits i const randomFruit fruits generateRandomPosition let newFruit randomFruit clone switch newFruit name case apple newFruit position set break case banana newFruit position set break case bomb newFruit position set newFruit scale set break default break fruitsObjects push newFruit scene add newFruit renderer render scene camera To make the code sample above easier to read I m setting the position at x y however in the real game they are set randomly as the fruit is created and appended to the scene Mapping D coordinates to D positionThis part is one of the trickiest and to be honest one that I don t think I can explain properly The complexity lies in the fact that the D coordinates from PoseNet don t map directly to coordinates in the Three js scene The coordinates PoseNet gives us are the same you would get if you were logging the position of the mouse in the browser window so the value on the x axis would go from to over for the width in pixels However coordinates in a D scene don t work the same way so you have to convert them To do this we start by creating a vector from our hand coordinates const handVector new THREE Vector the x coordinates seem to be flipped so i m subtracting them from window innerWidthhandVector x window innerWidth hand coordinates x window innerWidth handVector y hand coordinates y window innerHeight handVector z Then we use the following bit of magic to map the coordinates to a D world and apply them to our hand mesh handVector unproject camera const cameraPosition camera position const dir handVector sub cameraPosition normalize const distance cameraPosition z dir z const newPos cameraPosition clone add dir multiplyScalar distance hand mesh position copy newPos Collision detectionThis part is the other tricky one Only after the D coordinates have been mapped to D ones can we work on collision detection From what I know you cannot work on this collision detection directly from D coordinates to D objects The way we re doing this is by implementing what is called Raycasting Raycasting is the creation of a ray casted from an origin vector our hand mesh in a certain direction Using this ray we can check if any object in our scene intersects it collision The code to do this looks like this const handGeometry hand mesh geometry const originPoint hand mesh position clone for var vertexIndex vertexIndex lt handGeometry vertices length vertexIndex const localVertex handGeometry vertices vertexIndex clone const globalVertex localVertex applyMatrix hand mesh matrix const directionVector globalVertex sub hand mesh position const ray new THREE Raycaster originPoint directionVector clone normalize const collisionResults ray intersectObjects fruitsObjects if collisionResults length gt if collisionResults distance lt This distance value is a little bit arbitrary console log Collision with a fruit If you don t understand entirely what it does it s ok I find it pretty complicated The main parts you need to understand is that we clone the position of our hand originPoint we loop through all the vertices in the hand mesh we create a Raycaster entity and check if the ray intersects with any fruit object If it does there s a collision Hand trailsTo render the hand trail the code is a bit long but if you want to have a look I d advise you to check the example from TrailRendererJS directly I just made some changes to fit the style that I wanted and removed the bits I didn t need Playing soundsTo start using Howler js you need to add the following script tag in your HTML lt script src gt lt script gt Once it s loaded you can use it like this let newFruitSound new Howl src assets fruit ma newFruitSound play ChallengesHere are a couple of challenges I encountered while working on this project Positions in DI find positioning objects in D quite tricky especially when I am using OBJ models downloaded from somewhere else When I loaded the apple model in my scene I assumed that when setting the x y z coordinates I could use the same for the banana and bomb model but it turned out not to be the case Depending on how the objects were created in a D software they might have a different scale or position in their own bounding box As a result I had to manually test different positions and scale for each model loaded which can take a while This issue also impacted the collision detection Sometimes raycasting didn t seem to work if I modified the scale of the object I then played with the z axis to bring objects closer or further from the camera but as a result the collision detection doesn t work of the time because of the check collisionResults distance lt Without this check for distance though collision seems to be detected even when I don t hit a fruit on the screen so there s obviously something I don t quite understand there PerformanceWhen working on this type of side projects I know that the performance is not gonna be the best because of how much I m expecting the browser to handle However considering I am doing live pose detection D animation and collision detection in the browser I don t think the current lag is THAT bad We can always improve performance though so I tried to do that by running a Lighthouse audit fixed a few things and ended up with a pretty good score However this is where web performance can mean different things Technically performance metrics like first paint time to interactive etc were pretty good but it didn t mean that the game experience felt performant I don t know yet if there is really anything I could do about that but I think it would be an interesting area to dive into Extra resourcesRepoOther side projects using similar tech Beat Pose Beat saber using hand movements in the browser DemoRepoQua run tine Hiking trails triggered by running DemoRepoHope it helps 2020-05-11 13:16:35
海外TECH DEV Community Explain Deno Like I'm Five https://dev.to/ben/explain-deno-like-i-m-five-i4m fivedeno 2020-05-11 13:01:16
Apple AppleInsider - Frontpage News Apple plans $330 million investment in Taiwanese Mini LED and micro LED factory https://appleinsider.com/articles/20/05/11/apple-plans-330-million-investment-in-taiwanese-mini-led-and-micro-led-factory Apple plans million investment in Taiwanese Mini LED and micro LED factory A new report from China says that Apple intends to help fund the opening of a new factory at Taiwan s Hsinchu Science Park No date has yet been reported but it s believed that the factory will be used to produce both Mini LED and micro LED displays for future devices 2020-05-11 13:29:23
Apple AppleInsider - Frontpage News Entire 'iPhone 12' & 'iPhone 12 Pro' lineup specs detailed https://appleinsider.com/articles/20/05/11/entire-iphone-12-iphone-12-pro-lineup-specs-detailed Entire x iPhone x amp x iPhone Pro x lineup specs detailed A prolific leaker has revealed pricing specs and camera information spanning the entire quot iPhone quot and quot iPhone Pro quot lineup expected in the fall 2020-05-11 13:09:52
海外TECH Engadget Square Enix's 54-game charity bundle includes Eidos and Ion Storm classics https://www.engadget.com/square-enix-eidos-anthology-steam-bundle-132007909.html Square Enix x s game charity bundle includes Eidos and Ion Storm classicsNeed an incentive to stay at home during the pandemic How about a months long game backlog that includes some classics Square Enix is happy to oblige The publisher has released a Square Enix Eidos Anthology on Steam that bundles Eidos games for 2020-05-11 13:20:07
海外TECH Engadget Google and Mount Sinai use Nest Cams to remotely monitor COVID-19 patients https://www.engadget.com/google-mount-sinai-nest-cam-covid-19-monitoring-130028913.html Google and Mount Sinai use Nest Cams to remotely monitor COVID patientsIn person checks on COVID patients are inherently risky and that means using up valuable protective equipment not to mention time that might be necessary for urgent situations Google and New York City s Mount Sinai Hospital have developed a sa 2020-05-11 13:00:28
海外TECH Network World BrandPost: SD-WAN Should be a Feature, Not a Stand-Alone Solution https://www.networkworld.com/article/3542592/sd-wan-should-be-a-feature-not-a-stand-alone-solution.html#tk.rss_all BrandPost SD WAN Should be a Feature Not a Stand Alone Solution Consolidation has been an essential part of digital innovation for decades Many of the features and functions we now take for granted were once stand alone solutions TCP IP used to be a solution you had to purchase and add to your network separately VPN concentrators were exclusively sold as separate devices rather than as a feature SD WAN is no different The Security Platform is the Ideal Location for SD WANThe whole idea of an integrated security platform is based around the idea that certain essential functions should be part of a single system Look at the standard features on a security platform NGFW IPS antivirus anti malware AAA services web filtering and sandboxing and others depending on the platform To read this article in full please click here 2020-05-11 13:44:00
海外TECH CodeProject Latest Articles SonarQube Integration with Visual Studio Professional https://www.codeproject.com/Tips/5267232/SonarQube-Integration-with-Visual-Studio-Professio coverage 2020-05-11 13:13:00
海外科学 NYT > Science Coronavirus Live Updates: White House Scrambles to Stem Its Own Outbreak https://www.nytimes.com/2020/05/11/us/coronavirus-updates.html Coronavirus Live Updates White House Scrambles to Stem Its Own OutbreakThe infections stirred concerns about how to keep workplaces safe as the economy reopens Treasury Secretary Steven Mnuchin said that unemployment would get worse before it got better 2020-05-11 13:28:05
海外科学 NYT > Science Coronavirus World Updates: Empty Icons Return to Life With Lockdowns Easing https://www.nytimes.com/2020/05/11/world/coronavirus-news.html Coronavirus World Updates Empty Icons Return to Life With Lockdowns EasingPlaces that seemed eerie and alien when empty ーfamous beaches theme parks and railways ーare now being cautiously revisited 2020-05-11 13:28:15
金融 RSS FILE - 日本証券業協会 公社債発行額・償還額等 http://www.jsda.or.jp/shiryoshitsu/toukei/hakkou/index.html 発行 2020-05-11 15:00:00
金融 RSS FILE - 日本証券業協会 新型コロナウイルス感染症への対応について http://www.jsda.or.jp/shinchaku/coronavirus/index.html 新型コロナウイルス 2020-05-11 14:00:00
金融 RSS FILE - 日本証券業協会 J-IRISS http://www.jsda.or.jp/anshin/j-iriss/index.html iriss 2020-05-11 13:54:00
金融 金融庁ホームページ 職員を募集しています。(預金取扱金融機関の経営の健全性を判断するための基準に係る施策の企画・立案及び推進に関する業務に従事する職員(課長補佐クラス)) https://www.fsa.go.jp/common/recruit/r2/kantoku-03/kantoku-03.html 課長補佐 2020-05-11 15:00:00
海外ニュース Japan Times latest articles Mercury rises as Japan sees midsummer heat in May https://www.japantimes.co.jp/news/2020/05/11/national/japan-midsummer-heat-may/ Mercury rises as Japan sees midsummer heat in MayTemperatures across Japan soared Monday with many areas in the Kanto region topping degrees Celsius ーlevels on par with those of midsummer days As 2020-05-11 23:59:58
海外ニュース Japan Times latest articles Outbreak on North Korea border raises doubts over its coronavirus toll https://www.japantimes.co.jp/news/2020/05/11/asia-pacific/outbreak-north-korea-border-coronavirus/ Outbreak on North Korea border raises doubts over its coronavirus tollChinese authorities banned all nonessential transportation in the city of Shulan in the northeastern province of Jilin while residential compounds and villages were closed 2020-05-11 23:57:11
海外ニュース Japan Times latest articles Japan’s dwindling hospital beds highlight need to curb COVID-19 cases https://www.japantimes.co.jp/news/2020/05/11/national/japan-hospital-beds-coronavirus/ casesmore 2020-05-11 22:42:39
海外ニュース Japan Times latest articles Tokyo starts distributing cash to businesses shuttered due to virus https://www.japantimes.co.jp/news/2020/05/11/national/tokyo-coronavirus-aid/ Tokyo starts distributing cash to businesses shuttered due to virusSubsidies for businesses and nonprofit organizations are worth for single shop owners and million for operators of multiple sites 2020-05-11 22:37:48
海外ニュース Japan Times latest articles UFC’s return could provide blueprint for other pro leagues https://www.japantimes.co.jp/sports/2020/05/11/more-sports/ufcs-return-provide-blueprint-pro-leagues/ UFC s return could provide blueprint for other pro leaguesThe closed door event in Jacksonville was a victory for UFC President Dana White who lobbied aggressively to be the first professional circuit to return to 2020-05-11 23:50:55
海外ニュース Japan Times latest articles Lewis Hamilton racing himself online to keep busy https://www.japantimes.co.jp/sports/2020/05/11/more-sports/auto-racing/lewis-hamilton-racing-online-keep-busy/ Lewis Hamilton racing himself online to keep busyWhile Formula One stars compete in virtual events and various esports series during the COVID lockdown six time world champion Lewis Hamilton has been busy racing 2020-05-11 22:04:03
ニュース BBC News - Home Coronavirus: Face covering advice given to people in England https://www.bbc.co.uk/news/uk-52620556 Coronavirus Face covering advice given to people in EnglandThe advice for people in England to aim to wear face coverings in some public transport and shops is in a new government document on tackling the coronavirus 2020-05-11 13:57:31
ニュース BBC News - Home Coronavirus: No professional sport in England until 1 June at earliest https://www.bbc.co.uk/sport/52619111 Coronavirus No professional sport in England until June at earliestNo professional sport even behind closed doors will be staged in England until June at the earliest the UK government announces 2020-05-11 13:44:19
ニュース BBC News - Home Coronavirus: 'Don't rush to beauty spots' plea after PM speech https://www.bbc.co.uk/news/uk-england-52615443 bosses 2020-05-11 13:41:56
ニュース BBC News - Home Morrisons cuts petrol price to below £1 a litre https://www.bbc.co.uk/news/business-52619118 february 2020-05-11 13:52:44
ニュース BBC News - Home Coronavirus: Who should wear a face mask? https://www.bbc.co.uk/news/health-51205344 england 2020-05-11 13:06:58
ニュース BBC News - Home Lockdown update: What are the new rules set out by Boris Johnson? https://www.bbc.co.uk/news/explainers-52530518 boris 2020-05-11 13:43:32
ニュース BBC News - Home Coronavirus: What are social distancing and self-isolation rules? https://www.bbc.co.uk/news/uk-51506729 england 2020-05-11 13:45:45
ニュース BBC News - Home Coronavirus: What are the new travel quarantine rules? https://www.bbc.co.uk/news/explainers-52544307 covid 2020-05-11 13:49:16
ビジネス ダイヤモンド・オンライン - 新着記事 三菱重工業(7011)、10年ぶりの「減配」を発表して 配当利回りが2.73%に大幅ダウン! 2021年3月期の 年間配当額は前期の半額となる「1株あたり75円」に! - 配当【増配・減配】最新ニュース! https://diamond.jp/articles/-/236955 三菱重工業、年ぶりの「減配」を発表して配当利回りがに大幅ダウン年月期の年間配当額は前期の半額となる「株あたり円」に配当【増配・減配】最新ニュース三菱重工業が年ぶりの「減配」を発表し、配当利回りがに三菱重工業は年月期の配当予想を発表し、期続いた連続非減配がストップする見通しとなった。 2020-05-11 22:40:00
LifeHuck ライフハッカー[日本版] ウォーキングは間違いなく身体に良い!週にどれくらい歩くのがベスト? https://www.lifehacker.jp/2020/05/212614you-need-to-walk-outside-every-day.html 間違い 2020-05-11 22:05:00
北海道 北海道新聞 政府、34県の一斉解除で調整 緊急事態宣言、特定警戒の一部も https://www.hokkaido-np.co.jp/article/419952/ 新型コロナウイルス 2020-05-11 22:46:00
北海道 北海道新聞 東京感染者、集計ミスで76人増 保健所の報告漏れや二重計上 https://www.hokkaido-np.co.jp/article/419950/ 新型コロナウイルス 2020-05-11 22:24:00
北海道 北海道新聞 遺棄容疑でベトナム人逮捕 被害男性と同居、富山県警 https://www.hokkaido-np.co.jp/article/419949/ 富山県警 2020-05-11 22:23:00
北海道 北海道新聞 国内感染新たに43人 24人死亡 https://www.hokkaido-np.co.jp/article/419948/ 新型コロナウイルス 2020-05-11 22:23:00
北海道 北海道新聞 札幌市、18日に10万円給付の申請書郵送 月内にも給付 https://www.hokkaido-np.co.jp/article/419942/ 新型コロナウイルス 2020-05-11 22:20:15
北海道 北海道新聞 子ども70万人が食料不足 イタリア、感染危機で困窮 https://www.hokkaido-np.co.jp/article/419945/ 新型コロナウイルス 2020-05-11 22:14:00
北海道 北海道新聞 通天閣、解除に向け「黄色」に ライトアップ、太陽の塔も https://www.hokkaido-np.co.jp/article/419941/ 太陽の塔 2020-05-11 22:04:00
北海道 北海道新聞 NY円、107円前半 https://www.hokkaido-np.co.jp/article/419940/ 外国為替市場 2020-05-11 22:04:00

コメント

このブログの人気の投稿

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

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

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