IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] 「監獄レストラン ザ・ロックアップ」、7月末に完全閉店へ 23年の歴史に幕 |
https://www.itmedia.co.jp/business/articles/2206/10/news097.html
|
itmedia |
2022-06-10 11:35:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] テスラ、中型SUV「モデルY」の国内受注開始 619万円から |
https://www.itmedia.co.jp/business/articles/2206/10/news094.html
|
itmedia |
2022-06-10 11:14:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] IQOS ILUMA専用たばこスティックに新フレーバー登場 「テリア ブラック イエロー メンソール」6月13日に発売 |
https://www.itmedia.co.jp/business/articles/2206/10/news081.html
|
iqosiluma |
2022-06-10 11:04:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] ヤクルト1000、新規申し込み一時停止 前年比105.1%の販売 |
https://www.itmedia.co.jp/business/articles/2206/10/news093.html
|
itmedia |
2022-06-10 11:03:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] WebブラウザのVivaldi、ビルトインメールアプリ「Mail 1.0」をリリース |
https://www.itmedia.co.jp/news/articles/2206/10/news090.html
|
itmedia |
2022-06-10 11:01:00 |
TECH |
Techable(テッカブル) |
天気や防災情報の発信、買い物支援まで。ユカイ工学の会話ロボが高齢者の見守りでマルチに活躍 |
https://techable.jp/archives/180340
|
株式会社 |
2022-06-10 02:00:11 |
AWS |
lambdaタグが付けられた新着投稿 - Qiita |
Python初心者がAWS LambdaのPython3.6→3.9へランタイム変更対応を行ってみた。 |
https://qiita.com/ps-kimura/items/dd372596cf2d7f63df6b
|
awslambda |
2022-06-10 11:14:54 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
CORSにハマった...(Laravel, JavaScript) |
https://qiita.com/daaaayoshi/items/887dd6149f6a8a00d682
|
cross |
2022-06-10 11:28:38 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
Python初心者がAWS LambdaのPython3.6→3.9へランタイム変更対応を行ってみた。 |
https://qiita.com/ps-kimura/items/dd372596cf2d7f63df6b
|
awslambda |
2022-06-10 11:14:54 |
海外TECH |
DEV Community |
O que é Github? |
https://dev.to/luysla/o-que-e-github-1hlj
|
O que éGithub Oi gente Bem eu trouxe esse post pra esclarecer o que éGithub A maioria dos meus posts que são poucos ainda rs são sempre para pessoas que estão iniciando na programação e imagino que fiquem esse tipo de dúvida Então vamos lá GitAntes de falar do github em si precisamos saber que existe o git por trás de tudo isso Em resumo o git éum controlador de versões de código aberto Ele foi criado por Linus Torvalds mesmo criador do Linux inclusive D Com ele vocêconsegue versionar e ter um controle melhor das versões do seu código projeto Sim mas qual a utilidade disso Bem quando estamos falando de desenvolver projetos individuais nós temos o maior controle das alterações feitas Mas imagina que vocêprecisa trabalhar em um projeto que o mesmo arquivo pode ser alterado por vocêe por outra pessoa ao mesmo tempo sem esse controle de versões iria ser quase inviável vocêjuntar esse código ou controlar as alterações Basicamente o git te ajuda nessa junção desse código Outro exemplo de utilidade voltar em uma versão específica do seu código Digamos que no seu projeto vocêmudou a cor do site para ser azul sóque com a mudança o site parou de funcionar usando o git vocêpode voltar o código para a versão anterior que estava funcionando antes dessa alteração Esse ésóum exemplo simples mas podemos entender a importância desse controle do nosso código E o que éo github Basicamente o github éuma plataforma web que vocêarmazena em nuvem e gerencia seus projetos que usam git Exemplo estou criando o meu site localmente usando o git no meu computador e quero que o meu projeto seja armazenado na nuvem Eu posso criar um repositório no github e armazenar o meu projeto O github também oferece a utilização dos recursos do próprio git a partir de sua interface então se eu quiser ver as alterações do código qual linha foi removida qual a pessoa que fez a alteração criar commits tudo isso na plataforma O que facilita o trabalho em conjunto também e facilita o uso do git para quem não émuito familiarizado com comandos no terminal Provavelmente se vocêéiniciante na programação fazendo algum curso jáouviu falar sobre o github porque no geral éum ambiente que se tornou muito importante para criar seu portfólio pessoal e profissional além de colaborar com projetos de outras pessoas também émuito comum vocêver devs usando o github com essas finalidades Virou meio que uma rede social para devs também Então por isso não deixem de usar vou deixar aqui embaixo alguns links que podem ajudar vocêa entender mais profundamente como funciona o git e o github mas se for legal futuramente posso trazer mais informações sobre o git porque tem muitos detalhes que não comentei aqui nesse postmas espero que tenham gostado desse resumo Links para saber mais Git tutorial bem legalDocumentação do GithubCurso gratuito de Git e Github |
2022-06-10 02:45:05 |
海外TECH |
DEV Community |
ES6 Handbook |
https://dev.to/vedanthb/es6-handbook-12bd
|
ES Handbook From var to const letIn ES you declare variables via var Such variables are function scoped their scopes are the innermost enclosing functions The behavior of varis occasionally confusing This is an example var x function func randomize if randomize var x Math random A scope whole function return x return x accesses the x from line A func false undefinedThat func returns undefined may be surprising You can see why if you rewrite the code so that it more closely reflects what is actually going on var x function func randomize var x if randomize x Math random return x return x func false undefinedIn ES you can additionally declare variables via let and const Such variables are block scoped their scopes are the innermost enclosing blocks let is roughly a block scoped version of var const works like let but creates variables whose values can t be changed letand constbehave more strictly and throw more exceptions e g when you access their variables inside their scope before they are declared Block scoping helps with keeping the effects of code fragments more local And it s more mainstream than function scoping which eases moving between JavaScript and other programming languages If you replace var with let in the initial version you get different behavior let x function func randomize if randomize let x Math random return x return x func false That means that you can t blindly replace var with let or const in existing code you have to be careful during refactoring My advice is Prefer const You can use it for all variables whose values never change Otherwise use let for variables whose values do change Avoid var From IIFEs to blocksIn ES you had to use a pattern called IIFE Immediately Invoked Function Expression if you wanted to restrict the scope of a variable tmp to a block function open IIFE var tmp ··· ··· close IIFEconsole log tmp ReferenceErrorIn ECMAScript you can simply use a block and a letdeclaration or a const declaration open block let tmp ··· ··· close blockconsole log tmp ReferenceError From concatenating strings to template literalsWith ES JavaScript finally gets literals for string interpolation and multi line strings String interpolationIn ES you put values into strings by concatenating those values and string fragments function printCoord x y console log x y In ES you can use string interpolation via template literals function printCoord x y console log x y Multi line stringsTemplate literals also help with representing multi line strings For example this is what you have to do to represent one in ES var HTML SKELETON lt doctype html gt n lt html gt n lt head gt n lt meta charset UTF gt n lt title gt lt title gt n lt head gt n lt body gt n lt body gt n lt html gt n If you escape the newlines via backslashes things look a bit nicer but you still have to explicitly add newlines var HTML SKELETON lt doctype html gt n lt html gt n lt head gt n lt meta charset UTF gt n lt title gt lt title gt n lt head gt n lt body gt n lt body gt n lt html gt ES template literals can span multiple lines const HTML SKELETON lt doctype html gt lt html gt lt head gt lt meta charset UTF gt lt title gt lt title gt lt head gt lt body gt lt body gt lt html gt From function expressions to arrow functionsIn current ES code you have to be careful with this whenever you are using function expressions In the following example I create the helper variable this line A so that the this of UiComponent can be accessed in line B function UiComponent var this this A var button document getElementById myButton button addEventListener click function console log CLICK this handleClick B UiComponent prototype handleClick function ··· In ES you can use arrow functions which don t shadow this line A function UiComponent var button document getElementById myButton button addEventListener click gt console log CLICK this handleClick A In ES you also have the option of using a class instead of a constructor function That is explored later Arrow functions are especially handy for short callbacks that only return results of expressions In ES such callbacks are relatively verbose var arr var squares arr map function x return x x In ES arrow functions are much more concise const arr const squares arr map x gt x x When defining parameters you can even omit parentheses if the parameters are just a single identifier Thus x gt x x and x gt x x are both allowed Handling multiple return valuesSome functions or methods return multiple values via arrays or objects In ES you always need to create intermediate variables if you want to access those values In ES you can avoid intermediate variables via destructuring Multiple return values via arraysexec returns captured groups via an Array like object In ES you need an intermediate variable matchObjin the example below even if you are only interested in the groups var matchObj d d d d d d d d exec var year matchObj var month matchObj var day matchObj In ES destructuring makes this code simpler const year month day d d d d d d d d exec The empty slot at the beginning of the Array pattern skips the Array element at index zero Multiple return values via objectsThe method Object getOwnPropertyDescriptor returns a property descriptor an object that holds multiple values in its properties In ES even if you are only interested in the properties of an object you still need an intermediate variable propDesc in the example below var obj foo var propDesc Object getOwnPropertyDescriptor obj foo var writable propDesc writable var configurable propDesc configurable console log writable configurable true trueIn ES you can use destructuring const obj foo const writable configurable Object getOwnPropertyDescriptor obj foo console log writable configurable true true From for to forEach to for ofPrior to ES you iterated over Arrays as follows var arr a b c for var i i lt arr length i var elem arr i console log elem In ES you have the option of using the Array method forEach arr forEach function elem console log elem A for loop has the advantage that you can break from it forEach has the advantage of conciseness In ES the for of loop combines both advantages const arr a b c for const elem of arr console log elem If you want both index and value of each array element for of has got you covered too via the new Array method entries and destructuring for const index elem of arr entries console log index elem Handling parameter default valuesIn ES you specify default values for parameters like this function foo x y x x y y ··· ES has nicer syntax function foo x y ··· An added benefit is that in ES a parameter default value is only triggered by undefined while it is triggered by any falsy value in the previous ES code From arguments to rest parametersIn ES if you want a function or method to accept an arbitrary number of arguments you must use the special variable arguments function logAllArguments for var i i lt arguments length i console log arguments i In ES you can declare a rest parameter args in the example below via the operator function logAllArguments args for const arg of args console log arg Rest parameters are even nicer if you are only interested in trailing parameters function format pattern args ··· Handling this case in ES is clumsy function format pattern var args slice call arguments ··· Rest parameters make code easier to read You can tell that a function has a variable number of parameters just by looking at its parameter definitions From function expressions in object literals to method definitionsIn JavaScript methods are properties whose values are functions In ES object literals methods are created like other properties The property values are provided via function expressions var obj foo function ··· bar function this foo trailing comma is legal in ES ES has method definitions special syntax for creating methods const obj foo ··· bar this foo From constructors to classesES classes are mostly just more convenient syntax for constructor functions Base classesIn ES you implement constructor functions directly function Person name this name name Person prototype describe function return Person called this name In ES classes provide slightly more convenient syntax for constructor functions class Person constructor name this name name describe return Person called this name Note the compact syntax for method definitions no keyword function needed Also note that there are no commas between the parts of a class Derived classesSubclassing is complicated in ES especially referring to super constructors and super properties This is the canonical way of creating a sub constructor Employee of Person Person call this name super name this title title Employee prototype Object create Person prototype Employee prototype constructor Employee Employee prototype describe function return Person prototype describe call this super describe this title ES has built in support for subclassing via the extends clause class Employee extends Person constructor name title super name this title title describe return super describe this title From custom error constructors to subclasses of ErrorIn ES it is impossible to subclass the built in constructor for exceptions Error The following code shows a work around that gives the constructor MyError important features such as a stack trace function MyError Use Error as a function var superInstance Error apply null arguments copyOwnPropertiesFrom this superInstance MyError prototype Object create Error prototype MyError prototype constructor MyError function copyOwnPropertiesFrom target source Object getOwnPropertyNames source forEach function propKey var desc Object getOwnPropertyDescriptor source propKey Object defineProperty target propKey desc return target In ES all built in constructors can be subclassed which is why the following code achieves what the ES code can only simulate class MyError extends Error From objects to MapsUsing the language construct object as a map from strings to arbitrary values a data structure has always been a makeshift solution in JavaScript The safest way to do so is by creating an objectwhose prototype is null Then you still have to ensure that no key is ever the string proto because that property key triggers special functionality in many JavaScript engines The following ES code contains the function countWords that uses the object dict as a map var dict Object create null function countWords word var escapedWord escapeKey word if escapedWord in dict dict escapedWord else dict escapedWord function escapeKey key if key indexOf proto return key else return key In ES you can use the built in data structure Map and don t have to escape keys As a downside incrementing values inside Maps is less convenient const map new Map function countWords word const count map get word map set word count Another benefit of Maps is that you can use arbitrary values as keys not just strings New string methodsThe ECMAScript standard library provides several new methods for strings From indexOf to startsWith if str indexOf x ESif str startsWith x ESFrom indexOfto endsWith function endsWith str suffix ES var index str indexOf suffix return index gt amp amp index str length suffix length str endsWith suffix ESFrom indexOf to includes if str indexOf x gt ESif str includes x ESFrom join to repeat the ES way of repeating a string is more of a hack new Array join ES repeat ES New Array methodsThere are also several new Array methods in ES From Array prototype indexOf to Array prototype findIndexThe latter can be used to find NaN which the former can t detect const arr a NaN arr indexOf NaN arr findIndex x gt Number isNaN x As an aside the new Number isNaN provides a safe way to detect NaN because it doesn t coerce non numbers to numbers gt isNaN abc true gt Number isNaN abc falseFrom Array prototype slice to Array from or the spread operatorIn ES Array prototype slice was used to convert Array like objects to Arrays In ES you have Array from var arr Array prototype slice call arguments ESconst arr Array from arguments ESIf a value is iterable as all Array like DOM data structure are by now you can also use the spread operator to convert it to an Array const arr abc a b c const arr new Set add a add b a b From apply to Array prototype fill In ES you can use apply as a hack to create in Array of arbitrary length that is filled with undefined Same as Array undefined undefined var arr Array apply null new Array undefined undefined In ES fill is a simpler alternative const arr new Array fill undefined undefined undefined fill is even more convenient if you want to create an Array that is filled with an arbitrary value ESvar arr Array apply null new Array map function x return x x x ESconst arr new Array fill x x x fill replaces all Array elements with the given value Holes are treated as if they were elements From CommonJS modules to ES modulesEven in ES module systems based on either AMD syntax or CommonJS syntax have mostly replaced hand written solutions such as the revealing module pattern ES has built in support for modules Alas no JavaScript engine supports them natively yet But tools such as browserify webpack or jspm let you use ES syntax to create modules making the code you write future proof Multiple exportsIn CommonJS you export multiple entities as follows lib js var sqrt Math sqrt function square x return x x function diag x y return sqrt square x square y module exports sqrt sqrt square square diag diag main js var square require lib square var diag require lib diag console log square console log diag Alternatively you can import the whole module as an object and access square and diag via it main js var lib require lib console log lib square console log lib diag Multiple exports in ESIn ES multiple exports are called named exports and handled like this lib js export const sqrt Math sqrt export function square x return x x export function diag x y return sqrt square x square y main js import square diag from lib console log square console log diag The syntax for importing modules as objects looks as follows line A main js import as lib from lib A console log lib square console log lib diag Single exportsNode js extends CommonJS and lets you export single values from modules via module exports myFunc js module exports function ··· main js var myFunc require myFunc myFunc In ES the same thing is done via a so called default export declared via export default myFunc js export default function ··· no semicolon main js import myFunc from myFunc myFunc I hope this blog helped you learn something new |
2022-06-10 02:18:32 |
海外TECH |
DEV Community |
Ansible For Everyone(Practical) - Part 2 |
https://dev.to/aws-builders/ansible-for-everyonepractical-part-2-58a5
|
Ansible For Everyone Practical Part DAY Ansible For Everyone Practical Part Day Thirty Three days of Cloud on GitHub Read On iCTPro co nz Read on Dev to Please read Part one to understand bits and basics of ANSIBLE Ansible For Everyone Part Anuvindh Sankaravilasam for AWS Community Builders・May ・ min read devops webdev productivity opensource ️Lets setup the environment in AWSWe will spin up one EC as slave and one EC as the Master Node or the control center for ansible Then we use this Master node to connect the other EC instance Slave 🪛PrerequsiteAccess and privilages to launch EC with Ubuntu Putty or any other SSH toolsSecurity group with ports ssh open Port Setup environment Lets launch EC instancesUse AWS EC console or CLI aws ec run instances image id lt ami id gt instance type lt instance type gt subnet id lt subnet id gt security group ids lt security group id gt key name lt ec key pair name gt count Set up Ansible Control CenterRename one EC to Ansible Control Center on consoleNow lets SSH into Ansible Control Center ECRename the server sudo hostnamectl set hostname Ansible Control Center Now lets update and install ANSIBLERun these commandssudo apt get updatesudo apt install software properties common ysudo apt add repository ppa ansible ansiblesudo apt updatesudo apt install ansible y Set up Ansible Slaves Your ProdServerRename one EC to Ansible Slaves Your ProdServer on consoleRename the server sudo hostnamectl set hostname AnsibleSlaves YourProdServerInstall Python sudo apt get update sudo apt get install python y Configure SSH access On Ansible Control CenterGenarate a rsa key cd sshssh keygenPress enter we donot require any changes Now if we ls we will be able to see id rsa amp id rsa pub lets cat id rsa pub cat id rsa pubNote down this key On Ansible Slaves ssh into your slave server then cd sshsudo nano authorized keysNow on next line paste the key we previously noted amp save it Now its play time Goto your Ansible Control Center EC lets ssh into ansible slave Coming Soon Ansible play booksi would like to mention a blog from spacelift which i found very useful for those who wanna jump ahead and start experimenting Connect with me on Twitter Connect with me on LinkedinRead more post on dev to or iCTPro co nzConnect with me on GitHub Anuvindh SankaravilasamFollow Experienced Cloud Technology Specialist with a demonstrated skillset of working with Emergency NZ Police amp Education industry |
2022-06-10 02:10:56 |
海外科学 |
BBC News - Science & Environment |
Elephant tusk ivory sold on eBay a decade after self-imposed ban |
https://www.bbc.co.uk/news/science-environment-61735044?at_medium=RSS&at_campaign=KARANGA
|
bovine |
2022-06-10 02:28:12 |
海外科学 |
BBC News - Science & Environment |
Love Island: Second hand clothes and the trouble with fast fashion |
https://www.bbc.co.uk/news/science-environment-60382624?at_medium=RSS&at_campaign=KARANGA
|
clothes |
2022-06-10 02:44:50 |
ニュース |
@日本経済新聞 電子版 |
中国、太平洋戦争の要衝へ 米豪の怒り誘う南方進出
https://t.co/12whwnODaP |
https://twitter.com/nikkei/statuses/1535080236068786176
|
太平洋戦争 |
2022-06-10 02:03:43 |
海外ニュース |
Japan Times latest articles |
Weak yen pushes up Japan’s wholesale import costs at record pace |
https://www.japantimes.co.jp/news/2022/06/10/business/wholesale-inflation-import-prices/
|
previous |
2022-06-10 11:20:33 |
海外ニュース |
Japan Times latest articles |
Hawks’ Colin Rea tosses shutout against Tigers |
https://www.japantimes.co.jp/sports/2022/06/10/baseball/japanese-baseball/rea-hawks-shutout/
|
pitch |
2022-06-10 11:33:45 |
ニュース |
BBC News - Home |
Shipwreck The Gloucester hailed most important since Mary Rose |
https://www.bbc.co.uk/news/uk-england-norfolk-61734192?at_medium=RSS&at_campaign=KARANGA
|
divers |
2022-06-10 02:38:44 |
ニュース |
BBC News - Home |
Energy costs force owners to give up their pet reptiles |
https://www.bbc.co.uk/news/uk-england-61720142?at_medium=RSS&at_campaign=KARANGA
|
animals |
2022-06-10 02:34:54 |
ニュース |
BBC News - Home |
Menopause home-test kits not worth it, women told |
https://www.bbc.co.uk/news/health-61340988?at_medium=RSS&at_campaign=KARANGA
|
menopause |
2022-06-10 02:29:24 |
ニュース |
BBC News - Home |
Elephant tusk ivory sold on eBay a decade after self-imposed ban |
https://www.bbc.co.uk/news/science-environment-61735044?at_medium=RSS&at_campaign=KARANGA
|
bovine |
2022-06-10 02:28:12 |
ニュース |
BBC News - Home |
Coronavirus: Spending watchdog questions plan to burn unused PPE |
https://www.bbc.co.uk/news/uk-politics-61749657?at_medium=RSS&at_campaign=KARANGA
|
coronavirus |
2022-06-10 02:40:11 |
ニュース |
BBC News - Home |
NSPCC says child cruelty offences rose by a quarter in a year |
https://www.bbc.co.uk/news/uk-61748712?at_medium=RSS&at_campaign=KARANGA
|
england |
2022-06-10 02:32:59 |
ニュース |
BBC News - Home |
Love Island: Second hand clothes and the trouble with fast fashion |
https://www.bbc.co.uk/news/science-environment-60382624?at_medium=RSS&at_campaign=KARANGA
|
clothes |
2022-06-10 02:44:50 |
ニュース |
BBC News - Home |
My Name Is Leon: Sir Lenny Henry brings 'moving' adoption story to screen |
https://www.bbc.co.uk/news/entertainment-arts-61730891?at_medium=RSS&at_campaign=KARANGA
|
actor |
2022-06-10 02:43:34 |
北海道 |
北海道新聞 |
コインロッカー男児遺棄容疑 22歳女逮捕 千歳署 |
https://www.hokkaido-np.co.jp/article/691859/
|
遺棄 |
2022-06-10 11:32:24 |
北海道 |
北海道新聞 |
小樽・蘭島海岸に注射器7本 包装にロシア語 市が注意喚起 |
https://www.hokkaido-np.co.jp/article/691685/
|
小樽市蘭島 |
2022-06-10 11:28:21 |
北海道 |
北海道新聞 |
遠山氏と共謀の役員に有罪判決 コロナ融資巡り東京地裁 |
https://www.hokkaido-np.co.jp/article/691854/
|
新型コロナウイルス |
2022-06-10 11:03:00 |
ビジネス |
東洋経済オンライン |
JR東海グループ「鉄板ナポリタン専門店」の挑戦 創業初の路面店をオープンさせた1人の社員 | 外食 | 東洋経済オンライン |
https://toyokeizai.net/articles/-/594384?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
愛知県名古屋市 |
2022-06-10 11:30:00 |
IT |
週刊アスキー |
もう一度たべたいピザ。ピザーラ「ゲッツ&エビマヨクォーター」復刻 |
https://weekly.ascii.jp/elem/000/004/094/4094082/
|
期間 |
2022-06-10 11:30:00 |
コメント
コメントを投稿