投稿時間:2021-06-12 19:27:37 RSSフィード2021-06-12 19:00 分まとめ(31件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita JDLA E資格取得(ラビット★チャレンジ) https://qiita.com/Yumeneco/items/43360e3b89b1b4b18cbe 日本ディープラーニング協会JDLAラビットチャレンジE資格を受験するために必要なことE資格を受験するには、JDLAが認定したディープラーニングに関するプログラム講座を受講し修了する必要があります。 2021-06-12 18:56:14
python Pythonタグが付けられた新着投稿 - Qiita Python仮想環境の構築方法 https://qiita.com/progripo1115/items/8ea4b78bb8cb5d8363a7 PSCDocumentsgtpythonmvenvvenvsampleコマンドが正しく動作していれば、下記のとおり選択したディレクトリの直下に仮想環境ディレクトリが作成されています。 2021-06-12 18:40:01
js JavaScriptタグが付けられた新着投稿 - Qiita 職業訓練校 Webプログラマ養成科 https://qiita.com/nypark82/items/9ba00fc32147f3bcd1ee 職業訓練校Webプログラマ養成科職業訓練校に通い始めました前職を辞めてからしばらくはJavaScriptPHPを中心に勉強していましたがオブジェクト指向の餌食になってしまい、エラーのオンパレード。 2021-06-12 18:14:53
js JavaScriptタグが付けられた新着投稿 - Qiita Seleniumを使ってe-typingを自動化した ②実装編 https://qiita.com/golira5151/items/e7c14565dc2d73562be3 Seleniumを使ってetypingを自動化した②実装編はじめに前回の記事でselenium準備編を書いたので、ブラウザを動かすコードを書いていきます実装以下実装したコードになります。 2021-06-12 18:07:04
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 【HTML・CSS 】HTML各要素の初期値について https://teratail.com/questions/343662?rss=all 2021-06-12 18:59:25
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 【SQL文】PRIMARY KEYを複数設定したのですが反映されません。 https://teratail.com/questions/343661?rss=all 【SQL文】PRIMARYKEYを複数設定したのですが反映されません。 2021-06-12 18:54:44
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) swiftで画像複数選択して投稿する為の画像選択するおすすめライブラリってありますか? https://teratail.com/questions/343660?rss=all swiftで画像複数選択して投稿する為の画像選択するおすすめライブラリってありますかswiftで画像を複数選択して、投稿する機能を作っていますが、画像選択するライブラリをGitHubで探してて、なかなか良い見つけられません。 2021-06-12 18:53:05
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) AWS Lambdaを使用したAlexa経由でのLチカの動作時間について https://teratail.com/questions/343659?rss=all AWSLambdaを使用したAlexa経由でのLチカの動作時間についてAWSnbspIoTに登録したラズベリーパイ経由でLEDの点灯Lチカを行ってます下記URLを参考に実施しています。 2021-06-12 18:48:09
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) DirectionとVector3の変換 https://teratail.com/questions/343658?rss=all DirectionとVectorの変換前提・実現したいことUnityのWaypointとRigidbodyを用いた、カービィやロックマンX系のようなDスクロール移動発生している問題・エラーメッセージwaypointを用いた動きの参考としてnbspUnityでD横スクロールの挙動を考えるこちらのサイトにあったwaypoint生成スクリプトをお借りすることにしました勿論このまま使えば正常に作動するのですが、個人的にtransformposition用いた移動は大きいことが気になるので、Rigidbodyを用いた移動に変更したいです。 2021-06-12 18:44:32
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) form内のタグの条件分岐の方法に関して https://teratail.com/questions/343657?rss=all form内のタグの条件分岐の方法に関して現在、お問い合わせフォームを作成しており、「勤務期間」の箇所に「現在も勤務中」ボタンをつけたいと考えております。 2021-06-12 18:43:47
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) AWSのVPCでルートを設定したいです https://teratail.com/questions/343656?rss=all AWSのVPCでルートを設定したいです前提・実現したいことここに質問の内容を詳しく書いてください。 2021-06-12 18:42:03
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) if文で困っています。 https://teratail.com/questions/343655?rss=all 前提・実現したいこと調べたい数字をスプレッドシート上で検索して、あった時に成功、なかった時に失敗と出るようなプログラムを作ろうとしたんですが、うまくいきません。 2021-06-12 18:39:15
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) メニューバーの項目を押すと特定の位置までスクロールする https://teratail.com/questions/343654?rss=all メニューバーの項目を押すと特定の位置までスクロールするメニューバーの項目を押すことで特定の場所へスクロールする動作を実装しようとしています。 2021-06-12 18:25:45
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Laravel8 レコード追加件数確認テストの方法 https://teratail.com/questions/343653?rss=all Laravelレコード追加件数確認テストの方法前提・実現したいことLaravelのFeatureでレコード追加件数確認のテストを通したい。 2021-06-12 18:22:09
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Springで実行しようとすると、メインクラスが見つからなかったかロードできませんとでます。 https://teratail.com/questions/343652?rss=all Springで実行しようとすると、メインクラスが見つからなかったかロードできませんとでます。 2021-06-12 18:13:52
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) センターモードにしたいのですがプレビューで確認すると縦長にしか表示されませんので教えてください。宜しくお願いいたします。 https://teratail.com/questions/343651?rss=all センターモードにしたいのですがプレビューで確認すると縦長にしか表示されませんので教えてください。 2021-06-12 18:06:38
Ruby Rubyタグが付けられた新着投稿 - Qiita 【Rails】マージしていないにも関わらずdevelopのマイグレーションが更新された話 https://qiita.com/mihooo24/items/cc27e1cd25f1d8ba097f 原因はこれではありませんでした②featureブランチでマイグレーションの更新をした後にリセットすることを忘れていたプルリクの確認を行うため、ローカルのdevelopブランチにプルリク分を取り込みます。 2021-06-12 18:37:56
Ruby Rubyタグが付けられた新着投稿 - Qiita [Ruby on Rails] impressionistを導入して閲覧数をカウントする https://qiita.com/tomorun/items/c59c7b786d7abdef5bf2 Gemrailsgemimpressionistrailsgemimpressionistgtbundleインストールrailsgimpressionistrailsdbmigrateテーブル作成私はrailsなのですが、gemimpressionistで進めたため、エラーにハマりました。 2021-06-12 18:16:00
AWS AWSタグが付けられた新着投稿 - Qiita TerraformでIAM ユーザーに初期パスワードを埋め込む方法 https://qiita.com/stakakey/items/d7ce86256bb4e38d0828 公開鍵作成ツールをダウンロード鍵作成作成した鍵をエンコードtfファイルに入れる公式リファレンスはこちら参考になったQiitaの記事何をするのかTerraformのProvisionerのlocalexecを使うパワー系プレーですね。 2021-06-12 18:58:39
AWS AWSタグが付けられた新着投稿 - Qiita AWS KMS describe-key --key-id にはエイリアスを指定できる https://qiita.com/quryu/items/fdce899a22a76e692d09 AWSKMSdescribekeykeyidにはエイリアスを指定できる今までキーIDしか指定できないと思っていた。 2021-06-12 18:51:01
Docker dockerタグが付けられた新着投稿 - Qiita ボリュームの中身が更新されているか確認する(初心者向け) https://qiita.com/monomonosu/items/34a1b51a01eb16d7eac8 ボリュームの中身が更新されているか確認する初心者向けはじめにDockerにてマウントする方法にバインドマウントとボリュームマウントがあるかと思います。 2021-06-12 18:05:40
Ruby Railsタグが付けられた新着投稿 - Qiita 【Rails】マージしていないにも関わらずdevelopのマイグレーションが更新された話 https://qiita.com/mihooo24/items/cc27e1cd25f1d8ba097f 原因はこれではありませんでした②featureブランチでマイグレーションの更新をした後にリセットすることを忘れていたプルリクの確認を行うため、ローカルのdevelopブランチにプルリク分を取り込みます。 2021-06-12 18:37:56
海外TECH DEV Community I built a Wikipedia chrome extension 🔥 https://dev.to/iwaniukooo11/i-built-a-wikipedia-chrome-extension-3m6a I built a Wikipedia chrome extension You can find code here GitHub repoTry it out Live link IntroIn this article I am going to show you step by step how I have built a full working chrome extension My extension is called Random Wikipedia Pages which shows random Wikipedia articles and counts how many of them have already been shown or clicked by user You can see the final result here Technological stackI made the extension with the use of ReactStyled ComponentsSweet State Fetching dataIn order to enjoy my article you should know at least basics of React Being familiar with Styled Components and any State Management library is welcome but not obligatory Of course you should also understand how fetching data from external API works Table of contentsGetting started Project planCreate React App Load your extensionExplore the folder structureCreating layout and componentsWorking with Wikipedia API and creating a store reducerBuilding full extension from top to bottomArticle ButtonsConclusion Step Getting started Project planAt first I m going to explain more precisely how this extension actually works When opens the extension an app fetches the random article and displays it User can read full article when he clicks a blue button Then he is being redirected to full Wikipedia page but also he can draw the next article when he clicks a light button Every time user clicks any button stats are getting updated At the bottom there is located a link to the article you currently read and to the GitHub repo Now let s start with coding Create react appAt first create react app using the dedicated template to make chrome extensions npm init react app my first extension scripts version react browser extension scripts template browser extensionand thencd my first extension Load your extensionBefore explaining the structure of project let s load the extension in chrome Go to chrome extensions Click on the Developer Mode button on the upper right Click Load unpacked button and select dev folder from our projectNow when turning on your extension you should have the following view And that s it This is the way how to create a very basic extension Later on we will just operate with Wikipedia API and store configuration which is kinda harder because the whole extension logic is almost done Explaining the folder structureLet s go back to the code stuff If you are keen on React the folder structure should be known for you my first extension├ーREADME md├ーnode modules├ーpackage json├ー gitignore├ーpublic ├ーimg │├ーicon png │├ーicon png │├ーicon png ├ーpopup html ├ーoptions html └ーmanifest json└ーsrc ├ーbackground │├ーindex js ├ーcontentScripts │├ーindex js ├ーoptions │├ーindex js │├ーOptions js ├ーApp css ├ーApp js ├ーApp test js ├ーindex css ├ーindex js ├ーlogo svgThere are few folders that are actually not necessary and you can ignore them These folders are src background Responsible for working in the background and watch if user for example clicks any keyword shortcut We don t need that in this project src contentScripts Responsible for managing a webpage for example styles change on which user currently is We don t need that in this project src options Automatically generated page for user when he can manage his options Our app doesn t have that feature So that you can also ignore the public options html which is a template for that page However you should get familiar with following files public manifest json It is a primary file which describes your app You put here information like title description version etc public popup html A template for your extension Taking advantage of the fact that we are here let s import our basic font Titilium Web weight and lt link href Web wght amp display swap rel stylesheet gt Additionally I have added a prettierrc file which is responsible for formatting my code Step Creating layout and componentsNow that you have created a project folder it s time to prepare layout and components LayoutAt first let s make a layout folder In order to do that I create theme js file in that and add basic colors src layout theme jsexport default colorBlue AFF colorGrey colorWhite fff Because of the fact that I want those color variables to be available in every section of the app I must use ThemeProvider which provides theme variables to every component src layout layout jsimport React from react import ThemeProvider from styled components import theme from theme const Theme props gt return lt ThemeProvider theme theme gt props children lt ThemeProvider gt ーsrc ├ーlayout ├ーlayout js ├ーtheme js ├ーwrap jsAt the end I create a simple Wrapper which wraps the entire content of every section src layout wrap jsimport styled from styled components const Wrap styled section width px margin auto position relative export default Wrap ComponentsSome elements will certainly be used more than once hence they should be stored in different files So let s do that for Button Desc and Header ーsrc ├ーcomponents ├ーdesc │├ーdesc js ├ーheader │├ーheader js ├ーbutton │├ーbutton js Step Working with Wikipedia API and creating a store reducerWell despite I don t find this project unusually hard this is the most difficult part of it In this section I fetch data from Wikipedia API and I configure the state management store which is responsible for making request to Wikipedia endpoint saving received data to state and updating local statistics so here goes the local storage stuff which is especially uncomfortable when it comes to chrome browser Making a Wikipedia requestAt first I will show you how to fetch data from Wikipedia API The goal of my request is to achieve some english random article Only title and beginning field is necessary The request should look like this action query amp generator random amp grnnamespace amp prop extracts description amp grnlimit amp explaintext There I describe for what specific param stands for Request partValueRole Api URLformatjsonResponse formatactionqueryThe goal is to query some data not to update f e generatorrandomDeclaring I need a random pagepropextractField I want to receive extract stands for description explaintext Returns extracts field in txt style instead of html grnlimitQuantity of pagesgrnamespace I won t lie I m not sure what this tagged param is supposed to be responsible for Understanding Wikipedia API is very hard documentation is barely user friendly I have just found this param on StackOverflow and so the request can work An example of response batchcomplete continue grncontinue continue grncontinue query pages pageid ns title Category Parks on the National Register of Historic Places in Minnesota extract Parks on the National Register of Historic Places in the U S state of Minnesota As you can see everything works fine We have all necessary fields Working with reducerIn order to manage state in my app I used React Sweet State I decided to use this library due to its easiness I managed to keep my whole reducer logic in one file because there are only two actions necessary IncrementOpen after clicking blue button Responsible for getting stats data from chrome about total clicked articles and updating themFetchArticle after clicking light button Responsible for fetching article sending it to state getting statistics data from storage how many articles have been already fetched and how many clicked and updating stats after every fetchReducer file is located in the reducer folder ーsrc ├ーreducer ├ーstore jsAt first installing library via NPM is required npm i react sweet stateSo let s start At the beginning I import installed library and create initialState which contains all basic fieldssrc reducer store js src reducer store jsimport createStore createHook from react sweet state const initialState title Stands for the tittle of article desc Contains article text id Id of article useful when you want to make a link isTooLong false Informs if fetched text was longer than chars Now it s time to create a store src reducer store jsconst Store createStore initialState our basic state actions here go the actions that I described earlier fetchArticle gt My fetchArticle code In order to make my notes more readable my entire code below is located in the exact place where the My fetchArticle code comment is placed At first I must create one more function which destructs setState and getState function and at the very beginning I m setting state as initial state so that when fetching new article state has no values and the loading effect is being shown then As mentioned in this function I must get user stats which are located in the chrome storage At first I initial all the variables that are necessary const keyShown allTimeShown Key of total shown articlesconst keyOpen allTimeOpened Key of tot clicked articleslet counterAllTimeShown Value of total shown articleslet counterAllTimeOpen Value of total clicked articleslet isFound false Checking if chrome storage contains those keys necessary if user runs this extansion first time Before we fall into working with Chrome storage we must add global chrome object into our file It is very simple you must only this simple line of code at the beginning of reducer js src store reducer js global chrome import createStore createHook from react sweet state Note that in order to have an access to chrome storage user must allow it In order to do that putting this line into our manfiest json is necessary public manifest json permissions storage Now we must get stats values from chrome storage At first I feel obliged to instruct you how it works I have spent a lot of time in order to understand chrome storage logic Instinctively if you fetch data asynchronously usually you expect it to look like this How it usually looksconst res await library getData And so when working with chrome storage you would probably expect it to look this way What you would expectconst res await chrome storage sync get keyShown keyOpen Unfortunately chrome storage doesn t work so simple The only way to receive your response is to pass a callback a function as an argument when getting data from chrome storage This is the only correct waychrome storage sync get keyShown keyOpen async res gt Here goes the rest of logic this is the only way to have access to the chrome response Instead of splitting the rest of code of fetchArticle action into smaller pieces of code I will show you the final efect now chrome storage sync get keyShown keyOpen async res gt counterAllTimeOpen res keyOpen Checking if response contains my totalOpen key if keyShown in res If contains get total shown value counterAllTimeShown res keyShown isFound true if isFound If contains increment totalShownStats chrome storage sync set keyShown counterAllTimeShown else If not set default chrome storage sync set keyShown Fetch data section const url action query amp generator random amp grnnamespace amp prop extracts amp grnlimit amp explaintext let resp await fetch url Fetching article resp await resp json Getting title extract and Id values from response const response resp const id Object keys response query pages const title response query pages id title let desc response query pages id extract let isTooLong false Some articles might be very very long There is no enough place in that litle extension So that I set limit to if desc length gt desc desc substring isTooLong true Final setting state setState id title desc isTooLong keyShown counterAllTimeShown keyOpen counterAllTimeOpen I know there was a lot of stuff in this part If you don t understand it Go again through this part If you want to see the final effect of this part of code click here The whole fetchArticle action is described in these steps Setting State fields to falsify valuesInitializing key and value variablesGetting data from chrome storageChecking if stats values are not nullable Saving incremented stat allTimeShown or the default valueMaking a Wikipedia requestGetting necessary data from Wikipedia responseChecking if text isn t too long chars max Updating stateIf you went through this you have already got the worst part behind you Now it will be only easier The only thing left is to create an incrementOpen action but rust me It very easy It takes literally lines of code actions incrementOpen gt setState getState gt const key allTimeOpened const counter getState key setState getState key counter chrome storage sync set key counter This action is invoked when user clicks a blue button Then he is redirected to the full Wikipedia webpage and allTimeOpened stat is increased Step Building full extension from top to bottomNow that all the components have been created and whole app logic has been done it s time to put all the pieces together My folder structure from the partial folder looks like this ーsrc ├ーpartials ├ーbanner │├ーbanner js ├ーarticle │├ーarticle js ├ーbuttons │├ーbuttons js ├ーstats │├ーstats js ├ーfooter │├ーfooter jsBanner and Footer are totally stateless parts so I won t describe their structure here it s literally part of few components Moreover paradoxically there is no big logic in Stats they only show values comping from states Let s focus on the parts which use actions coming from storage then In order to use use and manage my state properly I import my state and treat it as a hook import useCounter from store reducer In order to use a Skeleton loading when waiting for fetching data I must install a react loading skeleton packagenpm i react loading skeleton Article jsNow look at my article component It is a place where all the data coming from Wikipedia are being shown src partials article article js const Article props gt const state actions useCounter useEffect gt actions fetchArticle return lt Layout gt lt Wrap as article gt lt Header bold margin gt state title lt Skeleton gt lt Header gt lt StyledDesc gt state desc state isTooLong state desc state desc lt Skeleton count gt lt StyledDesc gt state isTooLong amp amp lt Whiter gt lt Wrap gt lt Layout gt As you can see if data isn t already fetched the Skeleton will be shown instead of empty text Furthermore If text is too long then after the description come sign in order to signalize that text has been shorted Note that I have used a lt Whiter gt component Thanks to that when text is too long this component gives an effect of disappearance of text const Whiter styled div background linear gradient deg rgba rgba width height px position absolute bottom left Buttons jsThis partial is responsible for having two buttons and managing stats system Reminder After clicking a blue button user is redirected to full Wikipedia article and total clicked stats is increased and after clicking a light button a new article is fetched and total shown is increased though src partials buttons buttons jsconst Buttons gt const state actions useCounter const linkClickHandler gt actions incrementOpen window open state id blank focus return lt Layout gt lt StyledWrap gt lt Button full first active state title onClick linkClickHandler gt Read full on Wikipedia lt Button gt lt Button active state title disabled state title onClick actions fetchArticle gt Find another article lt Button gt lt StyledWrap gt lt Layout gt App jsThe only thing left is to import all partials and place it in the app component src App jsfunction App return lt div className App gt lt Wrap gt lt Banner gt lt Article gt lt Buttons gt lt Stats gt lt Footer gt lt Wrap gt lt div gt ConclusionAnd so it works I firmly believe that I described in detail process of creating my Wikipedia extension It s breathtaking that the entire logic could have been done with React only If you have any questions Write comments and send messages to communicate with me You can find final code here GitHub repoTry it out Live linkFeel free to rate my extension or give a star to my repo 2021-06-12 09:43:44
海外TECH Engadget Netflix and CD Projekt Red are hosting a 'The Witcher' convention on July 9th https://www.engadget.com/netflix-cd-projekt-witcher-convention-091907636.html?src=rss_b2c Netflix and CD Projekt Red are hosting a x The Witcher x convention on July thNetflix and CD Projekt Red are holding a virtual The Witcher convention with events that tackle both the games and live action series 2021-06-12 09:19:07
ニュース BBC News - Home Trooping the Colour: Scaled back celebration for Queen's official birthday https://www.bbc.co.uk/news/uk-57451808 covid 2021-06-12 09:48:52
ニュース BBC News - Home Stobart Air: Aer Lingus stops most Belfast City Airport flights https://www.bbc.co.uk/news/uk-northern-ireland-57451845 liquidation 2021-06-12 09:32:24
ニュース BBC News - Home Harry Dunn death: Path clear for virtual trial, says foreign secretary https://www.bbc.co.uk/news/uk-england-northamptonshire-57449680 trial 2021-06-12 09:30:39
北海道 北海道新聞 日4―3D(12日) 日本ハム、連敗を4で止める https://www.hokkaido-np.co.jp/article/554844/ 日本ハム 2021-06-12 18:14:00
北海道 北海道新聞 楽1―9神(12日) 阪神が5連勝 https://www.hokkaido-np.co.jp/article/554845/ 勝ち越し 2021-06-12 18:06:00
北海道 北海道新聞 将棋、広瀬八段が2回戦へ JT杯開幕 https://www.hokkaido-np.co.jp/article/554843/ 将棋日本シリーズ 2021-06-12 18:02:00
北海道 北海道新聞 バスケ女子、ポルトガルに2連勝 五輪日本代表候補の強化試合 https://www.hokkaido-np.co.jp/article/554841/ 強化試合 2021-06-12 18: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件)