AWS |
lambdaタグが付けられた新着投稿 - Qiita |
Amazon ECR のイメージスキャン結果を Slack 通知 (拡張スキャン対応版) |
https://qiita.com/hayao_k/items/53228ea158aa82d4d5b7
|
年にAWSLambdaを使用して基本スキャンの結果をSlackに通知する方法について投稿したのですが、拡張スキャンの通知には対応していません。 |
2021-12-13 02:24:21 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
[研究:その2]ジェスチャー認識で色々遠隔操作してみる |
https://qiita.com/magisystem0408/items/683e786311de8aaae5ae
|
前回までのスケジュール今週実装したものyeelightの繋ぎこみ完了yeelightは操作するデバイスとライトが同じwifiを使用をしていることが必須で、GHzの通信帯出ないと繋げません。 |
2021-12-13 02:59:24 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
JavaScriptだけでMultiple Select |
https://qiita.com/tks-hsmt/items/96bfe9b749f1aa2b4aab
|
実装する機能セレクトボックスをクリックすると選択肢が表示選択肢をクリックするとセレクトボックスに移動セレクトボックスの選択肢を×ボタンで削除可能セレクトボックス内or要素外をクリックすることで選択肢を閉じる完成品SeethePenUntitledbyTakeshiHashimototkshsmtonCodePen実装時のポイント①クリックイベント時の要素判定イベントを設定した要素addEventListenerの対象要素を取得したい場合は「EventcurrentTarget」を利用します。 |
2021-12-13 02:01:23 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Cmakeのパスが通らない |
https://teratail.com/questions/373515?rss=all
|
cmake |
2021-12-13 02:24:04 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
マウスの動きとは異なる線の表示をしたい |
https://teratail.com/questions/373514?rss=all
|
マウスの動きとは異なる線の表示をしたい線をマウスで書くときに角度を使用して実際のカーソルの動きとは異なる線を表示したいtkinterを使ってマウスで線を書きたいです。 |
2021-12-13 02:13:53 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
Rails 多対多アソシエーションでwhereメソッドを使うと値を取ることが出来なかった話 |
https://qiita.com/djen_tkgc/items/283e4b58cbccea1661aa
|
findbyThefindbymethodfindsthefirstrecordmatchingsomeconditionsActiveRecordでDBを操作する際は使用するメソッドがActiveRecordのfindermethodなのか、単一オブジェクトを返すメソッドなのか、意識したほうが良さそうです。 |
2021-12-13 02:27:44 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
Amazon ECR のイメージスキャン結果を Slack 通知 (拡張スキャン対応版) |
https://qiita.com/hayao_k/items/53228ea158aa82d4d5b7
|
年にAWSLambdaを使用して基本スキャンの結果をSlackに通知する方法について投稿したのですが、拡張スキャンの通知には対応していません。 |
2021-12-13 02:24:21 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
Amazon ECR のイメージスキャン結果を Slack 通知 (拡張スキャン対応版) |
https://qiita.com/hayao_k/items/53228ea158aa82d4d5b7
|
年にAWSLambdaを使用して基本スキャンの結果をSlackに通知する方法について投稿したのですが、拡張スキャンの通知には対応していません。 |
2021-12-13 02:24:21 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
Rails 多対多アソシエーションでwhereメソッドを使うと値を取ることが出来なかった話 |
https://qiita.com/djen_tkgc/items/283e4b58cbccea1661aa
|
findbyThefindbymethodfindsthefirstrecordmatchingsomeconditionsActiveRecordでDBを操作する際は使用するメソッドがActiveRecordのfindermethodなのか、単一オブジェクトを返すメソッドなのか、意識したほうが良さそうです。 |
2021-12-13 02:27:44 |
海外TECH |
DEV Community |
Python Switches to Match-Case |
https://dev.to/vickilanger/python-switches-to-match-case-4mmb
|
Python Switches to Match CaseJump to PastPresentBenefitsExample Example Future Past Once upon a time in a Python Enhancement Proposal PEP was introduced PEP detailed many different ways a switch statement could be implemented and why Python should have them That s a long time ago though Let s jump into the here and now Present The possibility to use match case statements in Python has not been around very long The addition of match case statements in based on PEP They were introduced in October of with Python v If you are using Python v or older you won t be able to try these out I don t suspect you ll be missing out on much as these are relatively new By the time you need them I m sure you ll pick them up quickly Either way keep reading just to get a quick introduction to the concept If you skip reading this you won t miss anything other than some cute examples I d suggest at least checking those out Worth noting if you hear others talk about switch case statements match case is pretty much the same thing Match case statements are incredibly similar to if else statements Seemingly they can be used interchangeably Match case does have a few benefits though Your computer can read and understand match case statements quicker than if else statements On that note it tends to be easier for you and other programmers to read and manage match case statements I think it s time for an example Is it time to play with your dog dog name input What is your dog s name dog wants to play True they always want to play match dog wants to play case True print Go get it name case False print Okay name maybe we ll play later Wait but how would that look as an if else statement dog name input What is your dog s name dog wants to play True they still always want to play if dog wants to play print Go get it name else print Okay name maybe we ll play later Well that doesn t seem very useful When making a decision that only has two options an if else statement is actually shorter That s okay because match case statements really shine and show off their usefulness when we have more options Comparison if else vs match case Are you cold I m cold Let s take a trip to the Sleevonista sweater factory Sleevonista makes one size fits all sweaters with different amounts of sleeves Here s a long kinda unwieldy if else example if sweater sleeves print give to spider squid or octopus elif sweater sleeves print give to butterfly bumble bee grasshopper elif sweater sleeves or sweater sleeves gt print give to or legged dog elif sweater sleeves or sweater sleeves print give sweater to human with or arms elif sweater sleeves print give sweater to to your snake friend else print sweater is broken make another one Let s turn Sleevonista s into a match case statment sweater sleeves int input How many sleeves does the sweater have match sweater sleeves case print give to spider squid or octopus case print give to butterfly bumble bee grasshopper case print give to or legged dog case print give sweater to human with or arms case print give sweater to to your snake friend case gt NOTE unsure on the accuracy of this line s syntax print sweater is broken make another one case print You made a sweater Notice the wildcard This will always be True and it considered irrefutable You may only have one irrefutable case and it has to be the at the end Future As time goes by I imagine match case statements in python will catch on Eventually the ll be as commonplace as switch case statements in languages like Ruby Java and so many other languages If you d like more read more on the motivation and rationale behind Python now having match case statements checkout PEP What other examples can you think of Can you come up with some real life examples Comment below with what you come up with |
2021-12-12 17:52:43 |
海外TECH |
DEV Community |
Vite 與環境變數 |
https://dev.to/leon0824/vite-yu-huan-jing-bian-shu-1i64
|
環境變數這些環境變數往往伴隨著專案的運行環境而變在Vite的設計上已經為我們預留了development環境開發環境與production環境生產環境兩者以檔名做區分依照Vite的規範開發環境的檔名是envdevelopment下面是一個最陽春的例子envdevelopmentVITEBACKENDHOSThttplocalhost而在生產環境也有這個變數但是值是不一樣的依照Vite的規範生產環境的檔名是envproduction內容如下envproductionVITEBACKENDHOST只要把這兩個檔案置於專案的根目錄下Vite就會自動載入要注意的是必須像上面的範例一樣在變數前方有VITE的前綴Vite才會載入否則會無情的忽略。 |
2021-12-12 17:50:01 |
海外TECH |
DEV Community |
Why I ditched chrome for Edge? |
https://dev.to/j471n/why-i-ditched-chrome-for-edge-51ih
|
Why I ditched chrome for Edge I ve been using google chrome for a long time I love the extensions and the look and feel of chrome but then I realized that all these extensions now work on the new Microsoft edge plus edge got a bunch of additional features That I always wish chrome had let s take a look at why edge may be the better choice When it comes to internet browsers google chrome dominates the market according to stack counter chrome currently has a share of about while microsoft edge is just around A major reason for this is the availability of extensions that you can add to chrome all these third party add ons that let you customize the browser s behavior and add all these extra features it s a great benefit and even a necessity now for most of us Microsoft completely changed edge in edge is now based on the same open source chromium platform Just like chrome which means that all of these features and extensions that you re used to from chrome are now available inedge too but that s not all let s take a look at some other important criteria that gives edge an edge Privacylet s face it google chrome is not exactly known for securing user privacy I mean google s whole business model is to collect data and use the information to tailor ads that you see and even the results that you get on its services like google search and youtube microsoft has a different business model that s not mainly focused on advertising and with edge it s easier to configure the privacy level of your browser in your settings under Privacy Edge gives you three levels of tracking prevention in case you re wondering what trackers are they re used by websites to collect info about your browsing you can choose from three levels basic balanced and strict with balance the default You can read that in details hereTo View your Privacy Setting of Edge Click HereYou can never really be sure what happens with your data but i like the user friendly approach in edge which makes it easier for me to manage my settings and keep me better protected online FeaturesChrome and edge are now under the same framework there isn t that much difference and most of the features are similar but there are a few that i really like in edge Vertical TabsEdge supports vertical tabs which comes very handy when you have multiple tabs open and it really helps you in multitasking It is a great tool to manage your tabs because as you open more tabs cutting off the page titles which makes finding a specific tab a bitdifficult but in edge you have the option to arrange them vertically this way the titles remain visible to make this switch you just tap the little square icon on the far left side of the tab row now you have a separate column with the tabs if you want to focus on a specific page content you just have to collapse the pane when you hover over it it s going to open back up i usually just pin the pane to keep it always open if you can t getused to the vertical tabs just click on the icon again to turn them off How to Enable and Use Vertical Tabs in Microsoft Edge Sleeping TabsAnother nice feature that was introduced recently is sleeping tabs edge is going to putinactive tabs to sleep after a certain amount of time according to microsoft this can improve your memory and cpu usage by up to You ll recognize the sleepers when they become faded to resume a sleeping tab just click on it the tab will unfade and your content will be there immediately you can customize the feature in theSettings gt System and Performance You can turn it on with the save resources with sleeping tabs option are in the bottom with the drop down menu of time you can specify the amount of time after which the tabs you go to sleep and with the add button here you can add sites you never want to put to sleep Your Settings should look like this How to Save Memory With “Sleeping Tabs in Microsoft Edge Immersive ReaderImmersive Reader is something i often use especially on pages that have a lot ofadvertising it strips out all the visual noise so you can concentrate on the text Let me show you how it works and looks like I am on this website which has lot s of ads and other extra content which I don t want to read I just want to read the article without any extra clutter You can enable the Immersive mode by pressing the button in the right on the searchbarAfter enabling that now let s see how the site looks like Now as you can see it cleared all the ads and the extra clutter and you can now read or listen to the article yeah you read that right It also provides the feature to read the text aloud Read AloudIn addition to Immersive Reader you also have the option to use a voice engine to read the text aloud for you just click on the button I tested it for pages in English and it works very well and sounds quite natural with voice options over here you can customize the experience Use Immersive Reader in Microsoft Edge CollectionsThis allows you to add sites as the collection and it also supports syncing so that you can access your collections on mobile devices as well Clicking the button near the top right of the screen brings up the collections sidebar menu From there you can start a new collection and hit the “Add current page You can also right click any tab and select Add all tabs to a new collection How to Use Collections in Microsoft Edge PerformancePerformed a couple of tests to measure the loading speed of websites which were byno means scientific I couldn t see any major performance differences between the two browsers some pages report a higher ram usage of chrome in some cases To see the difference I open tabs in chrome and the same tabs in the edge I opened Instagram Facebook Github Youtube LinkedIn And you can see the results below Majorly there are only RAM differences chrome uses extra ram than the edge Note the RAM difference could be different according to the extensions you have installed so it can vary from device to device Wrapping UpIn my opinion Edge has an edge yours could be different I am using Edge for years and I don t have any issue with that Don t hesitate to share your opinions in the comment section You can extend your support by buying me a Coffee You might be interested in CSS Resources that you should bookmarkSome Strange Concept of JavaScript Git Commands everybody should know |
2021-12-12 17:44:13 |
海外TECH |
DEV Community |
How to read a user's file with JavaScript in 35 seconds! |
https://dev.to/tomaszs2/how-to-read-a-users-file-with-javascript-in-35-seconds-2ipb
|
javascript |
2021-12-12 17:39:48 |
海外TECH |
DEV Community |
What is "Code Refactoring"? |
https://dev.to/maddy/what-is-code-refactoring-26nd
|
What is quot Code Refactoring quot Originally published on my blog Recently I ve been dealing with code refactoring in my workplace and therefore I thought about writing an article on it WHAT IS CODE REFACTORING In software engineering code refactoring is the procedure of changing the structure of existing code without impacting its behaviour and functionality WHY DO WE NEED CODE REFACTORING We need code refactoring because ️It makes it easy to add new code ️The existing code becomes cleaner and more readable after being refactored ️Engineers can understand the code better through refactoring ️Coding becomes more enjoyable and less painful KEY BENEFITS OF REFACTORING CODECode refactoring can bring in many different advantages It makes code more reusable It improves the standard of the code The code becomes easier to maintain and scale Refactoring improves the architecture of the code without changing software behaviour However code refactoring can be a challenging process because It s time consuming when you start refactoring the code you don t know how long it will take Plus you don t know where to begin to change the code and this uncertainty may take away some more time Re testing refactoring may lead an engineer to rewrite some tests and ensure they still pass Backward compatibility the code still needs to work with the older version of the existing code Fear factor some engineers may be afraid of restructuring the code and the reasons behind this fear can vary For example they might be fearful of breaking code that works and the time it may take to rewrite some tests Reluctance not all software engineers see the benefits of restructuring the code there is this ongoing saying that you should never touch code that works This leads to engineers being hesitant when it comes to code refactoring The major problem that code refactoring addresses are that of code smells WHAT IS A CODE SMELL A code smell is a signal which says that the code has been written without following the best practices How can you identify a code smell Well there are many ways to recognize a code smell Repeated code the same code appears in multiple locations Large class a class that contains too much code Long method a method that has too many parameters It reduces readability and testability Complexity looks enforced the design is overly complicated Cyclomatic complexity this happens when there are too many IF statements or loops Difficult to debug code becomes difficult to debug Difficult to scale a program with too many codes smells makes it challenging to add a new feature or implement a small change HOW TO REFACTOR CODESome standard techniques to refactor code Extracting a method a long and over complicated method can be extracted into smaller methods You can also decide to create a whole new class to replace a long method Inline method you can replace the body of a method call with the body of the method itself Moving features if a method uses members of another class then consider moving that method to the other class Consider replacing arrays with Objects Break up conditionals and replace nested conditions with guard clauses a precondition for example doing a null check at the beginning of an IF statement Consider making method calls simpler by renaming a method DATABASE REFACTORINGRefactoring also applies to databases A change to a database can be The structure you can change the table s name or a column Data quality make changes to improve the data quality stored in the database Referential integrity any data linked to a table should exist and unused data should be removed from the database Architectural this means enhancing how external applications communicate with the database Method code changes intending to improve overall quality Transformations this refers to changes in the database schema for example by adding an extra column Overall I think code refactoring is one of those things that it s painful to do now but you reap the benefits after Are you in favour or against code refactoring Let me know in the comments Thanks for reading my article Until next time |
2021-12-12 17:34:33 |
海外TECH |
Engadget |
'Halo Infinite' adds a dedicated Slayer playlist on December 14th |
https://www.engadget.com/halo-infinite-slayer-update-release-date-170729198.html?src=rss
|
x Halo Infinite x adds a dedicated Slayer playlist on December thOne of the Halo series best known multiplayer modes is coming to Halo Infinite sooner than you might have expected As Windows Centralnotes Industries community lead Brian Jarrard has confirmed a dedicated Slayer playlist is coming as part of an update on December th This will be a quot basic quot mode rather than the variants wanted to release after the holidays but the developers planned to quot bolster and expand quot it in the future The Slayer playlist is coming alongside three already promised options that include Fiesta FFA and Tactical Slayer SWAT The December th update will also remove or ease the requirements for existing challenges while adding more to accompany the new playlists There s a new challenge category based on player score that should better reflect your in game performance although it s only billed as an quot initial step quot toward true performance based experience points This addition won t satisfy fans still waiting for promised features like campaign co op or Forge which won t arrive until mid at the earliest However the Slayer playlist release shows that is eager to court those enthusiasts as quickly as it can even if it means stripping out some extras |
2021-12-12 17:07:29 |
ニュース |
BBC News - Home |
Covid: UK alert level raised to four due to Omicron spread |
https://www.bbc.co.uk/news/uk-59629916?at_medium=RSS&at_campaign=KARANGA
|
alert |
2021-12-12 17:34:23 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
ひろゆきが呆れる「子どもの人生をダメにする言葉」ワースト1 - 1%の努力 |
https://diamond.jp/articles/-/289697
|
youtube |
2021-12-13 02:50:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
サイバーエージェントの人事トップが教える これだけは押さえたい「若手抜擢」の3原則 - 若手育成の教科書 |
https://diamond.jp/articles/-/289653
|
曽山哲人 |
2021-12-13 02:45:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「すぐサボろうとする人」と「ずっと努力できる人」の根本的な違い - チームが自然に生まれ変わる |
https://diamond.jp/articles/-/288259
|
「すぐサボろうとする人」と「ずっと努力できる人」の根本的な違いチームが自然に生まれ変わるリモートワーク、残業規制、パワハラ、多様性…リーダーの悩みは尽きない。 |
2021-12-13 02:40:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「株で勝てない人にありがちな1つのクセ」元ファンドマネジャーが断言 - 株トレ |
https://diamond.jp/articles/-/289458
|
運用 |
2021-12-13 02:35:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
ずれた話題をもとに戻したいとき 覚えておくといい「たった一つのコツ」とは? - 武器になる話し方 |
https://diamond.jp/articles/-/290266
|
ずれた話題をもとに戻したいとき覚えておくといい「たった一つのコツ」とは武器になる話し方万部超のベストセラー『超一流の雑談力』著者安田正さんによる、新しい話し方の本『武器になる話し方』が月日に発売になりました。 |
2021-12-13 02:30:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「頭の悪い人」がよくやってしまう残念な思考法 - 上流思考 |
https://diamond.jp/articles/-/289178
|
話題作 |
2021-12-13 02:25:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
怒ることのできる相手は大切よ - 精神科医Tomyが教える 1秒で元気が湧き出る言葉 |
https://diamond.jp/articles/-/288664
|
voicy |
2021-12-13 02:20:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
よりよく生きるために「死」について考えないといけない理由 - 人生の土台となる読書 |
https://diamond.jp/articles/-/290025
|
読書 |
2021-12-13 02:15:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
ダイエットに成功する 最大のポイントは 「思考のチェンジ」 - 3か月で自然に痩せていく仕組み |
https://diamond.jp/articles/-/289952
|
会食三昧なのに、このメソッドでキロも痩せた精神科医の樺沢紫苑先生が、「ストレスフリー我慢不要アウトプットレコーディングで痩せられる、脳科学的にも正しいメソッドです」と推薦する話題の書、「か月で自然に痩せていく仕組み意志力ゼロで体が変わる勤休ダイエットプログラム」野上浩一郎著から、そのコツや実践法を紹介していきます。 |
2021-12-13 02:10:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
なぜ、専門家ばかりの有識者会議からは新しいアイデアが生まれないのか? - アーキテクト思考 |
https://diamond.jp/articles/-/290243
|
|
2021-12-13 02:05:00 |
北海道 |
北海道新聞 |
G7外相、侵攻阻止へロシア警告 中国の経済的威圧に懸念 |
https://www.hokkaido-np.co.jp/article/622133/
|
阻止 |
2021-12-13 02:18:22 |
北海道 |
北海道新聞 |
旗手がセルティック移籍へ J1川崎の東京五輪代表 |
https://www.hokkaido-np.co.jp/article/622180/
|
旗手怜央 |
2021-12-13 02:18:22 |
コメント
コメントを投稿