AWS |
AWS |
AWS Security Competency Partner Overview | Amazon Web Services |
https://www.youtube.com/watch?v=JUMZduQO9X8
|
AWS Security Competency Partner Overview Amazon Web ServicesAWS Security Competency Partners specialize in delivering security focused solutions for your specific workloads and use cases AWS Partner solutions enable automation and agility and scaling with your workloads Easily find buy deploy and manage these cloud ready software solutions including software as a service SaaS products in a matter of minutes from AWS Marketplace These solutions work together to help secure your data in ways not possible on premises with solutions available for a wide range of workloads and use cases Learn more about AWS Cloud Security Subscribe More AWS videos More AWS events videos ABOUT AWSAmazon Web Services AWS is the world s most comprehensive and broadly adopted cloud platform offering over fully featured services from data centers globally Millions of customers ーincluding the fastest growing startups largest enterprises and leading government agencies ーare using AWS to lower costs become more agile and innovate faster AWS AmazonWebServices CloudComputing |
2021-08-16 19:50:27 |
海外TECH |
Ars Technica |
Hospitals hamstrung by ransomware are turning away patients |
https://arstechnica.com/?p=1787517
|
epidemic |
2021-08-16 19:26:29 |
海外TECH |
Ars Technica |
The long-awaited M1X MacBook Pro will be here by November, reporter claims |
https://arstechnica.com/?p=1787486
|
claimsdespite |
2021-08-16 19:11:46 |
海外TECH |
Ars Technica |
Saturn’s core is a big, diffuse, rocky slushball |
https://arstechnica.com/?p=1787509
|
rings |
2021-08-16 19:02:04 |
海外TECH |
DEV Community |
Your first Introduction to TypeScript |
https://dev.to/ericchapman/your-first-introduction-to-typescript-3p6h
|
Your first Introduction to TypeScriptFollow me on Twitter What is Typescript TypeScript is a javascript superset Is TypeScript the same as Javascript Yes and No TypeScript has been created by Microsoft and is built on top of javascript In short it is the same as Javascript but with added features Everything you know from Javascript will be useful in TypeScript Which one should I learn first You definitively learn Javascript first If you don t know Javascript you will have a hard time learning and understanding TypeScript Why create a new language Javascript is ok isn t it When people start using JavaScript in complex applications they quickly realize that JavaScript became hard to work in terms of OOP and difficult to find some bugs TypeScript was developed by Microsoft to bridge this gap So what exactly TypeScript adds to javascript Powerful type systemType error checking at development timeBetter Object Oriented ProgrammingNew features like Interfaces Generics etc Meta Programming like DecoratorsCompile to javascript that can run on an older browserCode Auto completion in the editorAnd more Anything else I should know TypeScript does not run in the browser or with node js like Javascript To execute TypeScript needs to be converted compile to Javascript Using TypeScript involves the use of a compiler For example if you have a file name app ts TypeScript compiler will create the javascript equivalent app js That one will be used to run your app So that is why we say TypeScript help at development time How to install and use TypeScript compilerYou can install TypeScript globally on your dev machine with this command npm install g typescriptTo executer the compiler tsc app js or watch mode tsc app js wIn watch mode TypeScript will automatically re compile your app ts in app js on every save TypeScript config There is a lot of config setting available for TypeScript I will not cover those in this introduction article but just want to let you know that TypeScript settings are store in a file called tsconfig json You can create this file with tsc int TypeScript You will now learn how to use basic TypeScript features Core TypesOne of the most valuable features of TypeScript is the type system In TypeScript you can assign a type to a variable and TypeScript compiler will throw an error if anywhere in your code that type is not respected To understand what type we will do a TypeScript vs Javascript comparison Here a regular Javascript codefunction add num num return num num const result add const result add In this example result will be and result will be Why result is not Since you supply double quotes Javascript thinks your parameters are string and so execute the code with that logic without reporting any error Now imagine the kind of damage this error could do in an accounting application Finding that kind of bug in a k lines of code web application is very hard very frustrating and time consuming TypeScript to the rescue Let s use the same code above but in TypeScriptfunction add num number num number return num num const result add const result add editor compile errorThe only difference is the number type added after the parameter nameIn this exemple the const result add line will report an error in the code editor and when compiling Type inferenceWhen a variable is initialized TypeScript can infer detect the type of the variable automaticalylet amount number same aslet amount best practiceBoth variables will be of type number The best practice is to let the TypeScript inference do its job since we set the initial value ourselves That helps avoids repetitive code Note that we only specify the type when the variable is not initialized with a valuelet title stringtitle Hello World object TypeTypeScript will also infer the object type automaticallyconst person name Mike Taylor age Will result in TypeScript object typeconst person name string age number name Mike Taylor age Array typeThe syntax to declare an array is typeconst names string Mike John Paul const amounts number Tuple typeUse when we need a fixed number of values in an array const names number string Mike Emun typeEnum is mainly used to assign names to constantsenum Role ADMIN READ ONLY AUTHOR console log Role ADMIN You can also specify the key key can be any type enum Role ADMIN READ ONLY AUTHOR console log Role ADMIN Any typeUse any as a fallback if you really don t know the type let title anytitle title Hello World Note that this is not a good practice Try to avoid it union typeA variable can be flexible and be assigned with two typefunction combine item string number item string number if typeof item number amp amp typeof item number console log item item else console log item toString item toString The syntax for union type is type type Type AliasWe can create a custom type that will act as an alias for example a union typetype Dual number stringlet title Dualtitle Hello title object type aliastype User name string age number const user User name Mike age the syntax is then simplyfyfunction loadUser user User do something instead offunction loadUser user name stringl age number do something Function return typeWe can specify the return type of a functionfunction add num number num number number return num num Void return typeWhen a function don t return any value TypeScript will infer the function to be type void function displayMessage void console log Hi there Function typeThe declaring syntax is var type var type ⇒return typefunction add num number num number number return num num let calc Function or more specificlet calc num number num number gt numbercalc addconsole log calc Unknown typeVariable of type unknown will not be assignable except if we check the typeof the assignment let userInput unknownif typeof userInput string userName userInout OOP in TypeScript class declarationclass Product name string price number constructor name string price number this name name this price price const product new Product iPad Shorthand properties initializationclass Product constructor private name string private price number const product new Product iPad Access Modifiers private public readonly protected class Product private name string private price number constructor name string price number this name name this price price public displayProduct console log this name this price const product new Product iPad The public keyword is optional because that s the default modifier if none supply p ublic mean a variable or function available outside of the classp rivate is for variables or functions not available outside of the classreadonly is to variables private and readonlyProtected is for variables or functions available only inside the class or subclass Inheritsclass Friends extends Person Getters and Settersclass Friend get name set name value string Static properties and methodsclass Product static defaultName Product x static display name console log defaultName Person display iPad interfaceinterface IsPerson name string age number speak a string console log a const me IsPerson name Mike age speak text string void console log text class customer implements IsPerson private name private age constructor name string age number this name name this age age public speak text string void console log text GenericsWhen writing programs one of the most important aspects is to build reusable components This ensures that the program is flexible as well as scalable in the long term Generics offer a way to create reusable components Generics provide a way to make components work with any data type and not restrict to one data type So components can be called or used with a variety of data types For example if we want to create an interface with a data property that can contain a different object typeFirst create the interfaceinterface Person lt T gt name string age number data T The lt T gt is a placeholder for the type that will be added by TypeScript at compile timeYou can then use the generic interface in your codeconst person Person lt string gt name Mike age data Info about person orconst person Person lt string gt name Mike age data Info about person info In the above example the same interface has been used to store string and strings arrays |
2021-08-16 19:54:52 |
海外TECH |
DEV Community |
Python Concatenate Lists |
https://dev.to/adamgordonbell/python-concatenate-lists-ocf
|
Python Concatenate Lists Concatenate Two Lists in PythonProblem You have two lists and you d like to join them into a new list Solution Python gt gt gt one one two three gt gt gt two four five gt gt gt one two one two three four five TLDR Use In almost all simple situations using list list is the way you want to concatenate lists The edge cases below are better in some situations but is generally the best choice All options covered work in Python Python and all versions of Python Combine Lists in Place in PythonProblem You have a huge list and you want to add a smaller list on the end while minimizing memory usage In this case it may be best to append to the existing list reusing it instead of recreating a new list gt gt gt longlist one two three one two three one two three gt gt gt shortlist four five four five gt gt gt x extend y gt gt gt x one two three one four five As with any optimization you should verify that this reduces memory thrash in your specific case and stick to the simple idiomatic x y otherwise Let s use the timeit module to check some performance numbers Performance Check gt gt gt setup x one two three y four five six x y with large x gt gt gt timeit timeit x y setup setup number x extend y with large x gt gt gt timeit timeit x extend y setup setup number In this example where x is elements extend is around x faster Concatenating Lists With Large Elements is FineIf the elements in your list are huge million character strings but the list size is less than a thousand elements the previous solution x y will work just fine This is because Python stores references to the values in the list not the values themselves Thus the element size makes no difference to the runtime complexity gt gt gt x one two three gt gt gt y four five gt gt gt This is fine gt gt gt z x y gt gt gt Performance Testing extend is slower for large elements gt gt gt setup x one two three y four five gt gt gt timeit timeit x y setup setup number gt gt gt timeit timeit x extend y setup setup number In this case extend does not have an advantage Avoid Chain From itertools For Two ListsIt is possible to use chain from itertools to create an iterable of two lists gt gt gt longlist one two three one two three one two three gt gt gt shortlist four five four five gt gt gt from itertools import chain gt gt gt z list chain longlist shortlist one two three one four five We can check the performance of using chain gt gt gt setup from itertools import chainx one two three y four five six x y with large x x extend y with large x gt gt gt timeit timeit x extend y setup setup number gt gt gt timeit timeit list chain x y setup setup number Using chain with two lists is slower in all cases tested and x y is easier to understand Combining N Lists in PythonIf you need to add three or even ten lists together and the lists are statically known then for concatenate works great gt gt gt one one two three gt gt gt two four five gt gt gt three gt gt gt z one two three Flatten a List of Lists in PythonHowever if the number of lists is dynamic and unknown until runtime chain from itertools becomes a great option Chain takes a list of lists and flattens it into a single list gt gt gt l one two three four five one two three four five gt gt gt list chain from iterable l one two three four five one two chain can take anything iterable making it an excellent choice for combining lists dictionaries and other iterable structures gt gt gt from itertools import chain gt gt gt one gt gt gt two gt gt gt list chain one two one Performance of Flattening a List of ListsPerformance doesn t always matter but readability always does and the chain method is a straightforward way to combine lists of lists That said let s put readability aside for a moment and try to find the fastest way to flatten lists One option is iterating ourselves result for nestedlist in l result extend nestedlist Let s check its performance vs chain gt gt gt setup from itertools import chainl one two three four five gt gt gt Add Nested Lists using chain from iterable gt gt gt timeit timeit list chain from iterable l setup setup number gt gt gt Add using our own iteration gt gt gt run result for nestedlist in l result extend nestedlist gt gt gt timeit timeit run setup setup number This shows that chain from iterable is faster than extend Flattening and Merging Lists With One Big ListWhat about adding a list of lists to an existing and large list We saw that using extend can be faster with two lists when one is significantly longer than the other so let s test the performance of extend with N lists First we use our standard chain from iterable gt gt gt Method chain from iterable gt gt gt longlist one two three gt gt gt nestedlist longlist one two three four five gt gt gt list chain from iterable nestedlist We then test its performance gt gt gt setup from itertools import chainlonglist one two three combinedlist longlist one two three four five gt gt gt timeit timeit list chain from iterable combinedlist setup setup number Next let s try concatenating by adding everything onto the long list gt gt gt Method extend gt gt gt longlist one two three gt gt gt nestedlist one two three four five gt gt gt for item in nestedlist gt gt gt longlist extent item Performance Test gt gt gt setup from itertools import chainlonglist one two three nestedlist one two three four five gt gt gt run for item in nestedlist longlist extend item gt gt gt timeit timeit run setup setup number There we go extend is much faster when flattening lists or concatenating many lists with one long list If you encounter this using extend to add the smaller lists to the long list can decrease the work that has to be done and increase performance SummaryThese are the main variants of combining lists in python Use this table to guide you in the future Also if you are looking for a nice way to standardize the processes around your python projects running tests installing dependencies and linting code take a look at Earthly for Repeatable Builds ConditionSolutionPerformance Optimization listsx yNo large list small listx extend y YesKnown number of N listsx y zNoUnknown number of N listslist chain from iterable l NoList of Listslist chain from iterable l No large list many small listsfor l in l x extend YesI did all the performance testing using Python on MacOS BigSur If you don t have a performance bottleneck clarity trumps performance and you should ignore the performance suggestions |
2021-08-16 19:35:56 |
Apple |
AppleInsider - Frontpage News |
Vocal App Store critic discontinuing iPhone keyboard app, citing rejections |
https://appleinsider.com/articles/21/08/16/vocal-app-store-critic-discontinuing-iphone-keyboard-app-citing-rejections?utm_medium=rss
|
Vocal App Store critic discontinuing iPhone keyboard app citing rejectionsApple Watch keyboard app FlickType is discontinuing its iPhone keyboard feature citing years of facing obstacle after obstacle from Apple s App Store review process Credit AppleFlickType founder Kosta Eleftheriou who has been a vocal critic of scam apps on the App Store wrote on Monday that the app s team can no longer endure Apple s abuse As such FlickType is abandoning the iPhone portion of their app which is specifically made for blind and low vision users Read more |
2021-08-16 19:49:03 |
Apple |
AppleInsider - Frontpage News |
German journalism association stokes fear over Apple CSAM initiative |
https://appleinsider.com/articles/21/08/16/german-journalism-association-stokes-fear-over-apple-csam-initiative?utm_medium=rss
|
German journalism association stokes fear over Apple CSAM initiativeA German journalist s union has demanded that the European Commission step in over Apple s CSAM tools believing that the system will be used to harvest contact information and perform other intrusions Apple s CSAM tools intended to help fight the spread of illegal images of children have courted controversy throughout August as critics proclaim them to be an affront to privacy The latest group to speak out about the supposed threat is oddly journalists in Germany Austria and Switzerland Journalist union DJV representing writers in the country believes that Apple intends to monitor cell phones locally in the future In a press release the union calls the tools a violation of the freedom of the press and urges for the EU Commission and Austrian and German federal interior ministers to take action Read more |
2021-08-16 19:27:31 |
海外TECH |
Engadget |
Wikipedia vandal adds swastikas to 53,000 pages |
https://www.engadget.com/wikipedia-template-swastika-vandalism-193049735.html?src=rss
|
Wikipedia vandal adds swastikas to pagesWikipedia vandalism is hardly a new phenomenon but one user was able to add swastikas to tens of thousands of articles Among the pages that were defaced included ones for leaders such as President Joe Biden Vice President Kamala Harris and Justin Trudeau Canada s prime minister Articles for celebrities including Jennifer Lopez Ben Affleck and Madonna were also affected The person responsible edited a template that s used on around pages Gizmodo nbsp reported As such the vandal defaced pages that are locked and supposed to have greater protection from such attacks Wikipedia administrators fixed the problem soon after it emerged on Monday morning The user has been banned indefinitely One admin noted that most widely used templates are locked but it seems that some of them remain editable by anyone or as in this case a newish user who makes some good faith edits first Admins protected some more common templates in the wake of the vandalism The quot unacceptable quot attack quot violates a number of Wikipedia s policies quot a Wikimedia Foundation spokesperson told Gizmodo quot Most vandalism on Wikipedia is corrected within five minutes as we saw today quot Even though the site is enormous and ever evolving it s encouraging that administrators are able to detect and resolve major defacement incidents swiftly |
2021-08-16 19:30:49 |
ニュース |
BBC News - Home |
Afghanistan: Another 200 UK troops sent to Kabul evacuation |
https://www.bbc.co.uk/news/uk-58235707
|
afghan |
2021-08-16 19:35:17 |
ニュース |
BBC News - Home |
Afghanistan: UK and US must protect Afghan activists - Malala |
https://www.bbc.co.uk/news/uk-58237871
|
taliban |
2021-08-16 19:15:57 |
ニュース |
BBC News - Home |
England v India: Michael Vaughan says reliance on Joe Root is embarrassing |
https://www.bbc.co.uk/sport/av/cricket/58238210
|
England v India Michael Vaughan says reliance on Joe Root is embarrassingFormer England captain Michael Vaughan says the team s reliance on Joe Root is embarrassing after India took the lead in the Test series with victory at Lord s |
2021-08-16 19:14:21 |
ニュース |
BBC News - Home |
I got tactics wrong in the field - England captain Root |
https://www.bbc.co.uk/sport/cricket/58238115
|
accepts |
2021-08-16 19:30:49 |
ニュース |
BBC News - Home |
Liverpool defender Davies agrees Sheff Utd loan move |
https://www.bbc.co.uk/sport/football/58238197
|
sheffield |
2021-08-16 19:02:58 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
コロナ禍の若手で「ある意欲」が低下?上司が注視すべきポイントとは - トンデモ人事部が会社を壊す |
https://diamond.jp/articles/-/279529
|
コロナ禍の若手で「ある意欲」が低下上司が注視すべきポイントとはトンデモ人事部が会社を壊すテレワークが当たり前の状況になる中、コミュニケーションの質やエンゲージメントの低下を嘆く声が高まっている。 |
2021-08-17 04:55:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
アマゾン衝撃の現場、イギリスの倉庫で働く1200人はルーマニア移民だった! - 潜入ルポamazon帝国 |
https://diamond.jp/articles/-/279653
|
amazon |
2021-08-17 04:52:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
おじさんでもメイクしていいの?メンズコスメ市場の勢いが止まらない - ニュース3面鏡 |
https://diamond.jp/articles/-/278762
|
時代遅れ |
2021-08-17 04:50:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
中国14歳金メダリストの大フィーバーで浮き彫りになった、壮絶な格差の実態 - DOL特別レポート |
https://diamond.jp/articles/-/279548
|
中国代表 |
2021-08-17 04:47:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
EV化で見え始めた欧米の異なる思惑、日本の競争力を脅かす「LCA」とは - 今週のキーワード 真壁昭夫 |
https://diamond.jp/articles/-/279590
|
|
2021-08-17 04:45:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
女性の成長環境がある企業ランキング!2位グーグル、1位は? - 社員クチコミからわかる「企業ランキング」 |
https://diamond.jp/articles/-/279320
|
日本企業 |
2021-08-17 04:40:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
女性の成長環境がある企業ランキング【完全版】、口コミからわかる「本当に必要な施策」 - 社員クチコミからわかる「企業ランキング」 |
https://diamond.jp/articles/-/279310
|
日本企業 |
2021-08-17 04:40:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
仕事はヒマだけど「早朝出勤に昼休みナシ」、会社と給料上乗せを交渉できるか - 組織を壊す「自分ファースト」な社員たち 木村政美 |
https://diamond.jp/articles/-/279589
|
仕事はヒマだけど「早朝出勤に昼休みナシ」、会社と給料上乗せを交渉できるか組織を壊す「自分ファースト」な社員たち木村政美“簡単な事務と電話番くらい。 |
2021-08-17 04:35:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「指示待ち部下」を自ら行動させるための「逆質問」とは? - 人を動かしたければ1分以内で伝えろ! |
https://diamond.jp/articles/-/278979
|
「指示待ち部下」を自ら行動させるための「逆質問」とは人を動かしたければ分以内で伝えろ自ら考えず、上司の指示どおりにしか行動しない「指示待ち部下」に困っていませんか。 |
2021-08-17 04:30:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「どこで、どう稼ぐか」が、SDGsのもう1つの本質 - ワールドクラスの経営 |
https://diamond.jp/articles/-/278218
|
「どこで、どう稼ぐか」が、SDGsのもうつの本質ワールドクラスの経営年月日に施行されたコーポレートガバナンス・コード改訂版では、サステナビリティ重視の姿勢が見られる。 |
2021-08-17 04:25:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
ダイエット中でも罪悪感が激減する「コンビニおつまみ」7選 - ニュース3面鏡 |
https://diamond.jp/articles/-/279566
|
ダイエット中でも罪悪感が激減する「コンビニおつまみ」選ニュース面鏡「テレワーク」や「おうち時間」と並び、コロナ禍で頻繁に耳にするようになった「コロナ太り」という言葉。 |
2021-08-17 04:20:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
「自分が歩みたい未来」を引き寄せるたった2つのこと - 「日本版ジョブ型」時代のキャリア戦略 |
https://diamond.jp/articles/-/279148
|
「自分が歩みたい未来」を引き寄せるたったつのこと「日本版ジョブ型」時代のキャリア戦略日本企業が「ジョブ型」へ舵を切ることにより、キャリアの前提となるゲームのルールが変わりつつある。 |
2021-08-17 04:15:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
ひろゆきが語る「生活保護が存在するメリット」 - 1%の努力 |
https://diamond.jp/articles/-/278674
|
youtube |
2021-08-17 04:10:00 |
ビジネス |
東洋経済オンライン |
三井物産vs伊藤忠、純益6000億円台めぐる攻防戦 資源高で業績を上方修正、非資源事業も回復 | 卸売・物流・商社 | 東洋経済オンライン |
https://toyokeizai.net/articles/-/447964?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
三井物産 |
2021-08-17 05:00:00 |
ビジネス |
東洋経済オンライン |
横浜市長選、菅政権の命運をも左右する「大混戦」 再側近・小此木氏敗北なら「菅降ろし」加速へ | 国内政治 | 東洋経済オンライン |
https://toyokeizai.net/articles/-/448568?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
国内政治 |
2021-08-17 04:30:00 |
コメント
コメントを投稿