python |
Pythonタグが付けられた新着投稿 - Qiita |
Pandasのapplyの使い方! |
https://qiita.com/fumifumitaro/items/55482eaa8e0a0028fdcc
|
Pandasのapplyの使い方執筆の経緯pandasでapplyを使うときにやり方忘れがちなので、個人的メモとしてまとめておきます。 |
2021-09-12 18:52:12 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
【Project Euler】P294: Sum of digits - experience #23のメモ(その1) |
https://qiita.com/masa0599/items/658bba04ffa4fb5ce1ff
|
【ProjectEuler】PSumofdigitsexperienceのメモそのの倍数で各桁の和がの数をまで数える再帰関数lrucachePSumofdigitsexperienceは表題のように簡単そうな問題ですが、数がとんでもなく大きいのでギブアップでした。 |
2021-09-12 18:42:06 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
【Flask】仮想環境構築と「Hello World!」の表示(5分) |
https://qiita.com/probabilityhill/items/18b6ac07df89b9859fa4
|
|
2021-09-12 18:37:23 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
全株式の20年分の値動きを取得する |
https://qiita.com/YuckyQiita/items/f60736a3d93455e62830
|
全株式の年分の値動きを取得するはじめに株式運用を始めるにあたって長期的な値動きを把握したいと思ったので。 |
2021-09-12 18:34:35 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
[環境構築] Pythonのバージョン切り替えができない |
https://qiita.com/minhee/items/3a779a24143002e4cb20
|
環境構築Pythonのバージョン切り替えができないはじめにpythonを使ったアプリ開発に挑戦しようとしたところpythonのインストールの時点でつまづいたので記事にしておきます。 |
2021-09-12 18:18:11 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
【Ansible×pandas】Excelからデータの入力/出力がしたい |
https://qiita.com/masa2223/items/bdf5ab7b36565c8b4d62
|
【Ansible×pandas】Excelからデータの入力出力がしたいはじめにバージョンPythonpandasopenpyxlxlrd概要Ansibleで自動化対応をしていると、エクセルからデータを読み込めないかと良く聞かれます。 |
2021-09-12 18:12:13 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
PythonのImageFontで使うフォントファイルをコード内に記述する |
https://qiita.com/haruki1234/items/85ac1bfc56fe39950baf
|
|
2021-09-12 18:03:59 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
[Python] 行列 ABC207D |
https://qiita.com/tefuxu/items/0b21484c2a53b1463203
|
両者が一致するためには、Sの最も左上のマスとTの最も左上のマスが一致することが必要であり、そのようなマスを求めることで平行移動量は一意に決まるため、平行移動により実際に一致するか判定すれば十分です。 |
2021-09-12 18:02:26 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
【初学者向け】JavaScriptのmapやfilterについて |
https://qiita.com/yasu-hoshi/items/dc15f42a4d1a42bada57
|
まずは配列arryを用意constarry配列arryにmapを使用して新しい配列arryとして定義constarryarrymapnumgtreturnnumconsolelogarry上の流れを見ていきましょう。 |
2021-09-12 18:57:38 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
PHP <form method="" action="">のエラー発生 |
https://teratail.com/questions/359114?rss=all
|
PHPltformmethodquotquotactionquotquotgtのエラー発生前提・実現したいことDockerでPHP環境を構築してメモアプリを作成しています。 |
2021-09-12 18:27:44 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
footerのbackgroundc-colorが反映されない |
https://teratail.com/questions/359113?rss=all
|
footerのbackgroundccolorが反映されない初めてこちらで質問させて頂きます。 |
2021-09-12 18:27:16 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
application.html.erbにデータベースのデータを表示させたい。 |
https://teratail.com/questions/359112?rss=all
|
不快な質問をしてしまっている可能性があります。 |
2021-09-12 18:21:00 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
gem 'devise_token_auth' を利用した認証で client, uidなどのヘッダーが返ってこない |
https://teratail.com/questions/359111?rss=all
|
gemxdevisetokenauthxを利用した認証でclientuidなどのヘッダーが返ってこない主訴RailsnbspAPIモードでnbspdevisetokenauthnbspomniauthtwitterのgemを利用した認証を実装しようとしています。 |
2021-09-12 18:20:59 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
v-for利用時のcomputedによる監視 |
https://teratail.com/questions/359110?rss=all
|
vfor利用時のcomputedによる監視前提・実現したいことvforを利用したループ表示をしたときにcomputedを利用して別々にエラーメッセージ円以上からが表示されるようにしたい。 |
2021-09-12 18:15:55 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
python Windows 仮想環境 有効化できない |
https://teratail.com/questions/359109?rss=all
|
django |
2021-09-12 18:08:20 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
makefile入門者 C++で真面目にmakefileを書くにはどうすればいいのか? |
https://teratail.com/questions/359108?rss=all
|
makefile入門者Cで真面目にmakefileを書くにはどうすればいいのか知りたいことnbsp提示サイトを参考にコピペして自分なりに要らないものを取っ払ったのですが下記のエラーの取り方がわかりません。 |
2021-09-12 18:01:50 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
lima + containerdにおけるEROFS: read-only file system |
https://qiita.com/NamedPython/items/5b38e8e79d500aae8819
|
limacontainerdにおけるEROFSreadonlyfilesystemTLDRdockerで設定できていたWORKDIRが、containerdでは書き込み権限がないかもしれないことに注意例WORKDIRusrlocalappLinuxディレクトリ構造のベーシックに倣って配置って考えたんだと思うserverlesswebpack利用時、rimrafによる一時ファイルの削除が発生EROFS発生単に、WORKDIRapp等書き込み権限があるディレクトリに配置すればOKLima起因なのか、containerd起因なのかは未調査。 |
2021-09-12 18:44:49 |
海外TECH |
DEV Community |
How to Reduce Javascript Libraries Loading Time: Best Practice |
https://dev.to/wpsyed/how-to-reduce-javascript-libraries-loading-time-best-practice-52f0
|
How to Reduce Javascript Libraries Loading Time Best PracticeIn this article I ll explain how to reduce the loading time of Javascript libraries using Auto Loading a public but almost unknown new feature of the Google s AJAX APIs It may looks a bit tricky but with some patience won t be so hard Anyway even Google in its official documentation says “This advanced feature can be difficult to implement depending on the exact situation Therefore we recommend that auto loading only be considered in specific cases when a reduction in latency is crucial Well crucial or not I think any kind of websites from an home made blog to a critical company s website will enjoy shorter loading time Let s startLet s say in our website we use jQuery and Google Map API Normally our code looks like this lt head gt lt jQuery gt lt script type text javascript src gt lt script gt lt Google Map API V gt lt script type text javascript src gt lt script gt lt head gt We could also write the same like this lt head gt lt Google s AJAX APIs gt lt script type text javascript src gt lt script gt lt script type text javascript gt google load maps other params sensor false google load jquery lt script gt lt head gt Ok These are both good ways but our aim is to reduce loading time as best as possible This means that everything has to be loaded with a single call Just one call for ALL our needed libraries Using the Auto Loading featureFirst of all we have to write a small configuration script to let Google know what libraries we need Depending on your need it could be a bit tricky Fortunately Google gives a free configuration wizard but unfortunately it currently supports only some main Google libraries and no external one For example there s no jQuery Too bad This means we have to write our configuration script by hand At least it helps us to understand better how thing works Ok as wrote above in this example we use jQuery and Google Map API so here is what our configuration script looks like “modules name jquery version name maps version other params sensor false Quite self explanatory We are saying we need two modules the first one is jQuery version the second one is Google Map API version note the sensor parameter is mandatory so we must declare it even if false Good now we have to compress it modules name jquery version name maps version other params sensor false Due to formatting you see the code splitted in two line but please consider everything must be on one single lineNow we have to URL encode it you can use any free service like this one B modules A B B name A jquery C version A D C B name A maps C version A Cother params A sensor Dfalse D D DAnd finally we can add this very long string to our HTML lt script type text javascript src A B B name A jquery C version A D C B name A maps C version A Cother params A sensor Dfalse D D D gt Done If now we load our webpage everything will be there jQuery and Google Map API with only one call as fast as possible And obviously in the configuration script we can add as many libraries as we need at the end will always be a single call in our HTML How cool is that Read more about reducing JS libraries load timeAny mistake To trap any mistake in the configuration script we can take a look at the Google s response it will tell us“Error Invalid autoload It can be tracked with the Firefox s Error Console or simply go to the url and see its content if there s something like var error new Error Invalid autoload it means you have done some mistake in the configuration script Going ForwardWhat if we go forward to the initial aim of the Auto Loading feature Can we use it for more then reduce our website loading time Maybe yes…Think this scenario A complex website where there s only one main global javascript loading script cause we don t want to handle tens or hundreds loading scripts spread in every single HTML file We want need one single entry point easy to maintain easy to update Every page called need different libraries One jQuery another one the Feed API another one jQuery Google Map API Language API to provide a translation service to our end users It could be a little hell think this in a very complex web application We could use the Auto Loading feature to simply our life We can add some custom metatags to each HTML file with informations about which Javascript library it needs to run and build runtime a dynamic configuration script to load everything needed |
2021-09-12 09:33:48 |
海外TECH |
DEV Community |
Easter eggs using Rooks |
https://dev.to/anishde12020/easter-eggs-using-rooks-4mhp
|
Easter eggs using RooksI stumbled upon this great React Hooks library called Rooks recently and it has got a lot to offer We all have discovered various Easter eggs in various apps and sites It can range anywhere from stumbling upon a Rick roll when you click a button a certain number of times or enjoying playing snake when you press a hidden button on a page Ok so let us start making an Easter egg An alert when you press a certain key combinationRooks provides us with a very useful useKeys hook With this we can trigger an action whenever a certain key combination is pressed For this example whenever the keys Q W E R T and Y are pressed all together an alert will be triggered saying the key combination was pressed This is a simple example and hence a great place to startFirstly we need to create a react project you can use Gatsby NextJS etc as well as long as it is React I am using Codesandbox for this tutorial but you can do it locally as well Now we need to install rooks so we can runnpm i s rooksYou can following the getting started guide for rooks Now let us see the codeFirstly we need to import the hook import useKeys from rooks Now we need to configure the hook useKeys KeyQ KeyW KeyE KeyR KeyT KeyY gt alert QWERTY Here the first parameter is an array of all the keys that need to be pressed We pass in a callback function which will be triggered if all the keys are pressed as the second parameter Now whenever the keys are pressed together we will see this alert Codesandbox Now we have successfully made our first Easter egg Now it is time for you to explore other hooks and come up with some great Easter eggs for your site Feel free to share your creations down in the comments section |
2021-09-12 09:05:00 |
海外ニュース |
Japan Times latest articles |
Amid China’s rise, Japan defense chief says Tokyo and Hanoi have ‘same destiny’ |
https://www.japantimes.co.jp/news/2021/09/12/national/kishi-vietnam-speech/
|
Amid China s rise Japan defense chief says Tokyo and Hanoi have same destiny Kishi said Vietnam is an important partner for Japan and stressed the need for the countries to work together to address various regional security issues |
2021-09-12 18:57:26 |
海外ニュース |
Japan Times latest articles |
In Japan politics, social media savvy Taro Kono is a rarity. His party isn’t fully on board. |
https://www.japantimes.co.jp/news/2021/09/12/national/politics-diplomacy/kono-communication-style-social-media/
|
In Japan politics social media savvy Taro Kono is a rarity His party isn t fully on board Kono s unorthodox communication style is a double edged sword and has made him a polarizing figure among some of the Liberal Democratic Party s influential old guard |
2021-09-12 18:31:11 |
ニュース |
BBC News - Home |
England vaccine passport plans ditched, Sajid Javid says |
https://www.bbc.co.uk/news/uk-58535258?at_medium=RSS&at_campaign=KARANGA
|
england |
2021-09-12 09:53:23 |
北海道 |
北海道新聞 |
小樽で3人感染 新型コロナ |
https://www.hokkaido-np.co.jp/article/588423/
|
新型コロナウイルス |
2021-09-12 18:14:00 |
北海道 |
北海道新聞 |
京都でヘイトスピーチ対策シンポ 法や条例なく救済難しい |
https://www.hokkaido-np.co.jp/article/588421/
|
市民団体 |
2021-09-12 18:09:00 |
北海道 |
北海道新聞 |
大阪で1147人感染 減少傾向続く |
https://www.hokkaido-np.co.jp/article/588420/
|
新型コロナウイルス |
2021-09-12 18:04:00 |
ビジネス |
東洋経済オンライン |
ネットで生卵がメチャメチャ売れる理由【動画】 リアル店舗ではまず売れない高値の品が売れる | 消費・マーケティング | 東洋経済オンライン |
https://toyokeizai.net/articles/-/455167?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
売り上げ |
2021-09-12 18:05:00 |
コメント
コメントを投稿