python |
Pythonタグが付けられた新着投稿 - Qiita |
Python 辞書 |
https://qiita.com/Hirakawa123/items/c2bce8971899be5bb52b
|
Python辞書はじめに基礎から定着させていこうということで辞書についてまとめました。 |
2021-12-04 14:08:21 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
openpyxlで円グラフを作成する |
https://qiita.com/shuntaf/items/6cd5a8ad4aafdeea69cd
|
openpyxlで円グラフを作成するopenpyxlで円グラフを作る方法は本に書いてあったり、ネットで検索しても情報がたくさん出てきますが、凡例の指定の仕方まで書かれているものはなかなか見つからなかったのでここに書いておきます。 |
2021-12-04 14:07:47 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
Vue.jsでVimeo動画のフレームを自作することができるのか? |
https://qiita.com/e-sakisaka/items/3f87f5bd13a78ca73ccf
|
商用利用ができるセキュリティ強化や転載防止が可能用途に合わせたプラン設定Youtubeは商業目的とした使用は禁止されているので、これからもVimeoを使う機会がありそうです。 |
2021-12-04 14:45:55 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
2021.12 Swiperのナビゲーションの色を変える |
https://qiita.com/morioka1206/items/95985b1f2db3ea43991c
|
スライダーを簡単に実装できるJavaScriptライブラリーですがナビゲーションの色を変えたいと思い、いろんな記事を試したのですが何故かうまくいかず。 |
2021-12-04 14:28:00 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
SQL JOIN内部結合 |
https://teratail.com/questions/372214?rss=all
|
接続は問題なしです。 |
2021-12-04 14:59:01 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
TkInter: コンボボックスで選択中のアイテムの背景色を変えたい。当該WIDGETにフォーカスがあたっているときは適用できたのですが.... |
https://teratail.com/questions/372213?rss=all
|
TkInterコンボボックスで選択中のアイテムの背景色を変えたい。 |
2021-12-04 14:42:40 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
GAS Google documentでテキストの装飾箇所を抽出し、文字色を変えたい |
https://teratail.com/questions/372212?rss=all
|
GASGoogledocumentでテキストの装飾箇所を抽出し、文字色を変えたいGooglenbspdocument内で、太文字・下線部・斜体・取り消し線などの装飾をGASで一括判定し、それぞれに対して、指定の文字色あるいはハイライトを与える処理をしたいです。 |
2021-12-04 14:27:17 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
node.js CLIで読み込んだライブラリを使用しようとするとエラーが出る |
https://teratail.com/questions/372211?rss=all
|
nodejsCLIで読み込んだライブラリを使用しようとするとエラーが出る前提・実現したいことBudouXというライブラリを「npmnbspinbspDnbspbudoux」でインストール後、budouxtsというファイルで書いたコードをjsへトランスパイルしようとしたところ発生したエラーが発生してしまい使用できませんでした。 |
2021-12-04 14:08:04 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
rakeとシェルスクリプトを使って、複数DBへのデータインポートを効率化する |
https://qiita.com/kou_k/items/be7c748a7e2bfe173e42
|
最後にバッチ処理と組み合わせて定期的に実行したい処理を登録したりするときにもrakeタスクは使えそうだし、業務でよく使うコマンド操作をシェルスクリプトにまとめて登録しておけば業務スピードが上がりそうだなと感じました。 |
2021-12-04 14:17:26 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
rakeとシェルスクリプトを使って、複数DBへのデータインポートを効率化する |
https://qiita.com/kou_k/items/be7c748a7e2bfe173e42
|
最後にバッチ処理と組み合わせて定期的に実行したい処理を登録したりするときにもrakeタスクは使えそうだし、業務でよく使うコマンド操作をシェルスクリプトにまとめて登録しておけば業務スピードが上がりそうだなと感じました。 |
2021-12-04 14:17:26 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
Rails 掲示板詳細画面の追加/コメント機能の実装 解説 |
https://qiita.com/yuht-09/items/322bfabdb98940d1e193
|
「self呼び出し元のインスタンス」で使うことも多い今回のインスタンスメソッドは、「selfcurrentuserのidとobjectcommentのuseridが一致しているか」という意味になる。 |
2021-12-04 14:09:11 |
技術ブログ |
Developers.IO |
Amazon EventBridge가 뭐야? EventBridge를 사용해 봤습니다 |
https://dev.classmethod.jp/articles/i-used-eventbridge/
|
Amazon EventBridge가뭐야 EventBridge를사용해봤습니다안녕하세요클래스메소드김재욱 Kim Jaewook 입니다 이번안건에서처음으로Amazon EventBridge 사용해봤기때문에정리해보고자합니다 이번블로그에서는EventBridg |
2021-12-04 05:55:58 |
海外TECH |
DEV Community |
15 reasons why you should learn JavaScript right now |
https://dev.to/jonhb/15-reasons-why-you-should-learn-javascript-right-now-3l21
|
reasons why you should learn JavaScript right nowThere are two reasons why it s sometimes hard to make a choice either there are too few options to choose from or there are too many When it comes to programming languages there is an embarrassment of riches which in turn can cause mental gridlock There s Python Java JavaScript C CPP PHP Swift C Ruby Objective C and SQL and that s not even the full list How do you choose Now bear in mind that as far as programmers go there s no such thing as knowing too many languages A programmer with a grasp of many languages is a programmer who is highly marketable and very much in demand Upskilling is always a smart way to go Read More reasons why you should learn JavaScript right now |
2021-12-04 05:48:55 |
海外TECH |
DEV Community |
Advent of Code #3 (in JavaScript & Haskell) |
https://dev.to/sethcalebweeks/advent-of-code-3-in-javascript-haskell-52m1
|
Advent of Code in JavaScript amp Haskell Today s Advent of Code problem is a tough one On the surface it looks very similar to day one and two but there is a lot more going on While I was able to solve day one and two fairly quickly in Excel I had to jump straight to Haskell and JavaScript to find today s solutions Part I won t reiterate the problem because it is pretty complicated Our input is an array of binary strings input The first order of business is to turn each binary string into a list of integers I had to split this into two steps because I was fighting with the Haskell type system charArrays Char charArrays map map inputbitArrays Int bitArrays map map read Char gt Int charArraysThen we zip together all the bitArrays to get the total number of ones in each bit position I m using foldl so that the first value of the input list is used as the initial value bitCounts Int bitCounts foldl zipWith bitArraysNext we check whether one or zero occurs more frequently for each bit by comparing the count to half of the total input length The least common is simply the bit reversal of the most common mostCommon Int mostCommon map number gt if number gt length input div then else bitCountsleastCommon Int leastCommon map number gt if number then else mostCommonTo convert the bitArrays into decimal numbers we reverse the list to start from the right side and fold keeping track of the power and accumulated total The power is multiplied by two each iteration and the current bit multiplied by the current power is added to the accumulator I tried to figure out how to use foldr instead of foldl but couldn t get it working toDecimal Int gt InttoDecimal fst foldl acc power x gt acc power x power reverseThe finally answer is the most and least common numbers multiplied together gamma Intgamma toDecimal mostCommonepsilon Int epsilon toDecimal leastCommonanswer gamma epsilonIn JavaScript we can convert the input into bit arrays in one shot pretty easily const bitArrays input map binary gt binary split map char gt parseInt char We need to define our own zipWith function prior to reducing to find the totals of each bit position The reduce function in JavaScript automatically uses the first element if no initial value is provided const zipWith f a b gt Array Math min a length b length fill map i gt f a i b i const bitCounts bitArrays reduce acc x gt zipWith a b gt a b acc x The rest of the solution is very similar to the Haskell implementation const mostCommon bitCounts map total gt total gt input length const leastCommon mostCommon map total gt total const toDecimal bitArray gt bitArray reverse reduce acc power x gt acc power x power const gamma toDecimal mostCommon const epsilon toDecimal leastCommon const answer gamma epsilon Part This part looks similar to the first one but is drastically different We start off by creating a helper function which will split a list of bitArrays into two lists depending on whether a given bit is zero or one In general this is just a filter function which also returns the values that were rejected from the filter criteria You can tell we are in wacky land when we pull out array indexing using the operator splitByBit Int gt Int gt Int Int splitByBit bit foldl ones zeros x gt if x bit then x ones zeros else ones x zeros Using this helper function we need a recursive function to test out each bit position until we get a single result back for the oxygen generator and CO scrubber ratings Technically there are situations that are not handled by these functions but they work according to the problem description oxygenGenerator Int gt Int gt IntoxygenGenerator bit bitArrays length ones gt length zeros if length ones then toDecimal head ones else oxygenGenerator bit ones otherwise if length zeros then toDecimal head zeros else oxygenGenerator bit zeros where ones zeros splitByBit bit bitArrayscoScrubber Int gt Int gt IntcoScrubber bit bitArrays length zeros lt length ones if length zeros then toDecimal head zeros else coScrubber bit zeros otherwise if length ones then toDecimal head ones else coScrubber bit ones where ones zeros splitByBit bit bitArraysAnd finally we call our recursive functions with initial conditions to get the final results oxygenGeneratorRating IntoxygenGeneratorRating oxygenGenerator bitArrayscoScrubberRating IntcoScrubberRating coScrubber bitArraysanswer oxygenGeneratorRating coScrubberRatingAgain this translates relatively easily into JavaScript so here is the whole thing minus the stuff we already defined in part const splitByBit bit array gt array reduce ones zeros x gt x bit x ones zeros ones x zeros const oxygenGenerator bit bitArrays gt ones zeros splitByBit bit bitArrays if ones length gt zeros length return ones length toDecimal ones oxygenGeneratorRating bit ones return zeros length toDecimal zeros oxygenGeneratorRating bit zeros const coScrubber bit bitArrays gt ones zeros splitByBit bit bitArrays if zeros length lt ones length return zeros length toDecimal zeros coScrubberRating bit zeros return ones length toDecimal ones coScrubberRating bit ones const oxygenGeneratorRating oxygenGenerator bitArrays const coScrubberRating coScrubber bitArrays const answer oxygenGeneratorRating coScrubberRating The biggest struggle I had with this problem was messing with the Haskell types and figuring out the deeply nested conditional logic I think the conditional logic could be further improved in Haskell through some smart pattern matching |
2021-12-04 05:45:15 |
海外TECH |
DEV Community |
7 Best Tools For Developers - They Can't Live Without It |
https://dev.to/jonhb/7-best-tools-for-developers-they-cant-live-without-it-3049
|
Best Tools For Developers They Can x t Live Without It The best tools for developers are a priority for them to work As a developer he always works with code editors browsers terminals etc to improve his productivity VS Code is one of the best editors every developer would like to work with it I ve also listed the VS Code extensions for JS that are useful for a developer And browser extensions are also a great way to improve productivity and I ve also listed Chrome extensions for a developer If you are a junior programmer this will give you an idea the improve your coding skills and if you are a senior developer you are still learn something new from it Extensions are one the best tools for developers Let s see the best tools for developers Read More Best Tools For Developers They Can t Live Without It |
2021-12-04 05:41:29 |
海外TECH |
DEV Community |
Reviving an Old Feature Request in Telescope |
https://dev.to/belokond/reviving-an-old-feature-request-in-telescope-of2
|
Reviving an Old Feature Request in TelescopeFor a while now I was looking for an issue to work on for my release assignment The issue I found is huge but very interesting The expectations for this release are very high so I was looking for something challenging enough to meet them After searching for several days I finally found one ❁´ ❁ The feature request is in Telescope the blog aggregator for Seneca students The Feature An integration with LivestreamsThe whole feature request or at least the idea about it can be found in the original issue and also you can read David Humphrey s blog post about the idea and what sparked it I have to admit that I will not work on the whole feature as it is related to a lot of new parts that would have to be thoroughly researched tested reviewed and approved and I don t want to overwhelm myself or the team to review my PR The part I will work on for my release will be introducing video aggregation in Telescope Action Plan for Video AggregationI am not very familiar with video aggregation as I only heard about blog aggregation when I first learned about Telescope so I am completely clueless on how it might work To begin with I plan to aggregate videos from YouTube as it is the biggest video platform in the world and YouTube has a really useful Data API that fits my use case Some More PlanningAs I mentioned before my plan for video aggregation is going to be based off of what I know from Telescope I have read the source code of Telescope and I got a general idea and structure of how it works I believe I can do something similar to what we have except with major differences First I would like to explain how Telescope works in a very general overview The Internals of Telescope First off I got a quick diagram of how Telescope can be represented As I have noted from reading the codebase for a few hours the general idea is that the front end communicates with the Microservices API which communicates with the back end The back end is in charge of all the data and blog caching The back end receives a list of feeds to read posts from These blog posts are then cached in the redis database which is read by the Microservices API Of course the back end does more than just caching the blog posts such as indexing the blog posts for searching purposes The front end will access the information from the Redis database through the Microservices API Information such as blog posts users and search are provided by this API So what s the plan Well my basic plan is basically replicating the same ideas as what Telescope provides but with video links to YouTube Since one video at the highest quality takes much more space than hundreds of text blog posts we cannot cache them It will be extremely expensive for us As for the user serving a video at the highest quality is going to eat up the bandwidth like crazy So instead of caching the videos themselves we would cache the video IDs for these videos and then simply embedding a YouTube video player on the front end I have summarized my course of action as the following In the back end portion get a source to retrieve the youtube channels these one may have to be provided by the users in Telescope cache the video ID s of the most recent videos of each one of the channelsIn the API add an endpoint to provide the video ID s or the youtube linksIn the front end portion provide the embedded youtube videos on the timeline where the blog posts are provided ExpectationsMy major expectation out of all of this is that the feature gets resurrected so that it can be carried to completion I also expect to complete the back end part of the plan in a few days as I think it will form a strong base on what we actually need to show in the front end This is probably going to be my biggest PR yet in open source as it will have to include documentation and tests for all of this Either way wish me the best on this challenge |
2021-12-04 05:17:53 |
海外科学 |
NYT > Science |
Omicron Variant Spreading Twice as Quickly as Delta in South Africa |
https://www.nytimes.com/2021/12/03/health/coronavirus-omicron-vaccines-contagiousness.html
|
course |
2021-12-04 05:42:53 |
ニュース |
BBC News - Home |
Michigan school shooting: Reward offered to find suspect's parents |
https://www.bbc.co.uk/news/world-us-canada-59530279?at_medium=RSS&at_campaign=KARANGA
|
father |
2021-12-04 05:12:22 |
ニュース |
BBC News - Home |
Covid: GPs can defer some services in booster jab push |
https://www.bbc.co.uk/news/uk-59528615?at_medium=RSS&at_campaign=KARANGA
|
booster |
2021-12-04 05:18:56 |
ニュース |
BBC News - Home |
Russia Ukraine: Biden warns Russia against Ukraine 'red lines' |
https://www.bbc.co.uk/news/world-us-canada-59528864?at_medium=RSS&at_campaign=KARANGA
|
early |
2021-12-04 05:42:26 |
ニュース |
BBC News - Home |
Newspaper headlines: Omicron 'red alert', and Arthur failings probe |
https://www.bbc.co.uk/news/blogs-the-papers-59528474?at_medium=RSS&at_campaign=KARANGA
|
coronavirus |
2021-12-04 05:34:09 |
LifeHuck |
ライフハッカー[日本版] |
ワイルドさがたまらないね! ソロキャンに良さげな国産パップテント |
https://www.lifehacker.jp/2021/12/machi-ya-fireproofhcgtent-start.html
|
fireproofhcgtent |
2021-12-04 15:00:00 |
北海道 |
北海道新聞 |
ビオンテック、変異株対応に自信 CEO、100日以内に販売可能 |
https://www.hokkaido-np.co.jp/article/619057/
|
販売 |
2021-12-04 14:16:27 |
北海道 |
北海道新聞 |
驚く見た目でもおいしい…しけで打ち上げ、幻の食材ルッツ拾い 石狩・浜益の住民集い「祭り」 |
https://www.hokkaido-np.co.jp/article/618942/
|
食材 |
2021-12-04 14:16:12 |
北海道 |
北海道新聞 |
元日本代表FW田中が引退へ 浦和、新潟で活躍 |
https://www.hokkaido-np.co.jp/article/619105/
|
今季限り |
2021-12-04 14:13:00 |
ビジネス |
東洋経済オンライン |
「フランス人が愛する」何とも美しく落ち着く場所 憩いの森、コーヒー屋、コートダジュールを行く | 街・住まい | 東洋経済オンライン |
https://toyokeizai.net/articles/-/473363?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
東洋経済オンライン |
2021-12-04 14:30:00 |
ビジネス |
プレジデントオンライン |
空室だらけなのには理由がある…老人ホーム選びのプロが教える「地雷施設」の見分け方 - 口コミや体験入居はアテにならない |
https://president.jp/articles/-/52365
|
老人ホーム |
2021-12-04 15:00:00 |
コメント
コメントを投稿