TECH |
Engadget Japanese |
最大5万Amazonポイントがもらえる! ブラックフライデー連動「プライムスタンプラリー」に参加しよう |
https://japanese.engadget.com/amazon-black-friday-stamp-rally-055313934.html
|
amazon |
2021-11-23 05:53:13 |
TECH |
Engadget Japanese |
Spotifyユーザー、HomePodネイティブ非対応に不満が募り一部に解約の動き |
https://japanese.engadget.com/spotify-users-impatient-cancelling-lack-of-homepod-support-053048195.html
|
apple |
2021-11-23 05:30:48 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
JavaScriptで"await"を使わずにsleep(sec); |
https://qiita.com/freddiefujiwara/items/7ef29ac9d5194095e35b
|
JavaScriptでquotawaitquotを使わずにsleepsec背景皆さんテレワークで、仕事中に、届け物が来て、わざわざインターホンの場所に向かってやり取りしないといけないことはないですか特に会議中にこのイベントが発生すると大変ですよねゴールswitchbotを使って、インターホンを押されたら通話終話を押して、カメラをオンにするゲートを開けるボタンを押す通話終話を押して、カメラをオフにするこれを自動化したいです。 |
2021-11-23 14:52:20 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
Web APIを使って、特定の音声に対して返答するWebアプリの作成 |
https://qiita.com/tomosukesan/items/a8b7a2bd18a968e52157
|
今回は、WebAPIを使用し、特定の入力音声に応じて音声が出力されるように作成しました。 |
2021-11-23 14:03:43 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
NTPサーバ時間とPC時間のズレが検出できない |
https://teratail.com/questions/370622?rss=all
|
NTPサーバ時間とPC時間のズレが検出できない前提・実現したいことpythonでPC時刻とNTP時間のズレを検出したいです。 |
2021-11-23 14:47:47 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
git push -u origin main から前に進めない |
https://teratail.com/questions/370621?rss=all
|
gitpushuoriginmainから前に進めないgithubについて質問です。 |
2021-11-23 14:46:47 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Python で Google vision API をImportしたい |
https://teratail.com/questions/370620?rss=all
|
PythonでGooglevisionAPIをImportしたい前提・実現したいこと『前提』使用機種MnbspMacbooknbsppro使用言語python『実現したいこと』GooglenbspvisionnbspAPInbspを使用して、画像認識を行いたい。 |
2021-11-23 14:41:27 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
pandas データを分割したい |
https://teratail.com/questions/370619?rss=all
|
pandas |
2021-11-23 14:39:11 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
css positionについて詳しく知りたいです |
https://teratail.com/questions/370618?rss=all
|
position |
2021-11-23 14:38:11 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
計算量O(N^2)に減らすには? |
https://teratail.com/questions/370617?rss=all
|
計算量ONに減らすには配列Aのなかから、成立する三角形の個数をカウントする問題で、ONにするアルゴリズム、以下のほぼ同じつのコードで計算量が変わるのはなぜでしょうか下の場合、Aの配列が大きいとタイムオーバーになります。 |
2021-11-23 14:22:39 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Vagrant,virtualbox PHPファイルをブラウザで開けない。 |
https://teratail.com/questions/370616?rss=all
|
VagrantvirtualboxPHPファイルをブラウザで開けない。 |
2021-11-23 14:16:20 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
複素数の積を構造体を用いて表したいです。 |
https://teratail.com/questions/370615?rss=all
|
複素数の積を構造体を用いて表したいです。 |
2021-11-23 14:10:39 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
cssの縦書きコードについて教えてください。 |
https://teratail.com/questions/370614?rss=all
|
cssの縦書きコードについて教えてください。 |
2021-11-23 14:06:48 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
unity hubでプロジェクトを起動出来ない |
https://teratail.com/questions/370613?rss=all
|
unityhubでプロジェクトを起動出来ないunitynbsphubでプロジェクトが起動出来ません。 |
2021-11-23 14:02:25 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
インストールしたのにcommand not found |
https://teratail.com/questions/370612?rss=all
|
インストールしたのにcommandnotfoundこちらの記事によるとnpmnbspinstallnbspgnbspnpmcheckupdatesするとncuコマンドが使えるようになるそうなのですが、その後ncuとやってもcommandnbspnotnbspfoundと表示されてしまい、whichnbspanbsprbenv僕の場合はここはncuで実行ファイルがあるか確認するという記事の通りやってもnucnbspnotnbspfoundと出てきてしまって実行ファイルがなさそうなのです。 |
2021-11-23 14:00:51 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
Could not reach host index.rubygems.org. Check your network connection and try again. と言うエラーについて。 |
https://qiita.com/kotetsu09/items/41ac819633b13a27524a
|
発生している問題・エラーbundleinstallbundleupdateなどを叩くとCouldnotreachhostindexrubygemsorgCheckyournetworkconnectionandtryagainと表示されます。 |
2021-11-23 14:58:08 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
CloudFormationでImportValueを使うとJSONObjectが見つかったと言われる |
https://qiita.com/show2214/items/e528760b3dad662cad25
|
CloudFormationでImportValueを使うとJSONObjectが見つかったと言われる経緯セキュリティグループをクロススタックで使いたくてyamlでテンプレートを書いていたものの、Outputsの結果がIDになっているのは確認できているのにSecurityGroupsexpectedtypeStringfoundJSONObjectとか言われてぐぬぬ…となっていた。 |
2021-11-23 14:43:18 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
作成したEC2インスタンスにTerminalからssh接続する |
https://qiita.com/papas_kazuki/items/f8b2f5f68163a74bb38e
|
作成したECインスタンスにTerminalからssh接続する前提ECインスタンスの作成やpemkeyのダウンロードなどは省いています。 |
2021-11-23 14:15:00 |
GCP |
gcpタグが付けられた新着投稿 - Qiita |
GCP Compute Engine その③ |
https://qiita.com/TAROIMO-YY/items/9f23fc860eac82f60455
|
本来であれば、上記の方法にてGCEのsshにauthorizedkeysが作成されるらしいがされないので全て自分で設定する方法を以下に記載します。 |
2021-11-23 14:39:31 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
Could not reach host index.rubygems.org. Check your network connection and try again. と言うエラーについて。 |
https://qiita.com/kotetsu09/items/41ac819633b13a27524a
|
発生している問題・エラーbundleinstallbundleupdateなどを叩くとCouldnotreachhostindexrubygemsorgCheckyournetworkconnectionandtryagainと表示されます。 |
2021-11-23 14:58:08 |
海外TECH |
DEV Community |
18 Python one-liners that will speed up your coding process. |
https://dev.to/yash_makan/18-python-one-liners-that-will-speed-up-your-coding-process-21md
|
Python one liners that will speed up your coding process Hi folks I am Yash Makan and in today s blog we are going to talk about one liners in python I clearly remember when I chose to learn python it was just because of the simplicity and readability But you know what you can make the python code even more easy with less lines of code Yup thats right my friend These one liner code can save you a lot of time memory and can impress your friends what is a one liner code You can think of one liner code as a block of code compressed together so that it fits inside one line It is the concise useful programs packed in just one single line why do I need them So if you are not a big fan of writing one liners or you are just curious that why do I have to know these then below are some pretty convincing topics Understanding One liners will make a python expert as you will get a much better understanding of the language This will help you to write the code faster You can write the piece of code much faster than others which will help you in competitive programming On liners will improve your basics and roots of programming as they strengthen your basics You will write the code more in a pythonic way Generally people who come from different languages often write code in an un pythonic way in python for example they don t use list comprehension multiple assignments and slicing etc You can impress your friends colleagues and you can give a good impression in your interview if you have a good grasp of one liners But also it can be a little hard as well Imagine programming as chess You know the basics is like knowing what is variables loops conditions data structures classes but learning the master movies and creating your own strategy is like one liners In the beginning it can be hard and quite overwhelming but once you get to know them You can achieve greatness and win matches faster than a lot of other players Everything has a price to pay my friend Basics If elseBeforeif lt var else var Aftervar if lt else ElifBefore gt gt gt x gt gt gt if x gt gt gt gt print no gt gt gt elif x gt gt gt print yes gt gt gt else gt gt gt print maybe yesAfter gt gt gt print no if x gt else print yes if x else print maybe yes If without elseBeforecondition Trueif condition print hi Afterif condition print hello print hello if condition else None FunctionBeforedef f x return hello xAfterf lambda x hello xf exec def f x n return hello x LoopBeforesquares for i in range squares append i Aftersquares i for i in range Loop with IfBeforesquares for i in range if i squares append i Aftersquares i for i in range if i Loop with if elseBeforesquares for i in range if i squares append i else squares append False Aftersquares i if i else False for i in range While Loop with if elseBeforec while c lt if c print c else print FIVE c Afterwhile c lt c print c if c else print FIVE swap variablesBefore gt gt gt def swap x y x x y y x y x x y return x y gt gt gt swap After gt gt gt x y gt gt gt x y y x Multiple AssignmentBeforea ONE b c Aftera b c One Write String In FileBeforetext Helllloooooo fileName hello txt f open fileName a f write text f close Aftertext Helllloooooo fileName hello txt print text file open fileName a QuicksortBefore Source def partition array start end pivot array start low start high end while True while low lt high and array high gt pivot high high while low lt high and array low lt pivot low low if low lt high array low array high array high array low else break array start array high array high array start return highdef quick sort array start end if start gt end return p partition array start end quick sort array start p quick sort array p end array quick sort array len array print array Afterarray q lambda l q x for x in l if x lt l l q x for x in l if x gt l if l else print q array FibonacciBeforedef fib x if x lt return return fib x fib x Afterfib lambda x x if x lt else fib x fib x HTTP ServerBeforeimport http serverimport socketserverPORT Handler http server SimpleHTTPRequestHandlerwith socketserver TCPServer PORT Handler as httpd print serving at port PORT httpd serve forever Afterpython m http server Nested For LoopsBeforeiter iter a b c for x in iter for y in iter print x y After print x y for x in iter for y in iter Print Without NewlineBeforefor i in range print i end Afterprint range ClassBeforeclass School fun AfterSchool type School object fun Walrus Python Beforecommand input gt while command quit print You entered command Afterwhile command input gt quit print You entered command ConclusionSo now you have some understanding of python one liners and this will help to speed up your coding process I hope that you ve learnt something new from this article as I myself get to know some cool tricks and one liners that I didn t know earlier If this is the case with you as well then do click the heart button when increases my motivation like good karma Also share the post with your friends so that they too can learn something new don t be selfish Hope to be in your mind again till then b bye SocialsMy WebsiteTwitterBanner |
2021-11-23 05:41:19 |
海外TECH |
DEV Community |
Live Event: Building RESTful APIs with Node JS & Hoppscotch |
https://dev.to/aviyel/live-event-building-restful-apis-with-node-js-hoppscotch-1oll
|
Live Event Building RESTful APIs with Node JS amp HoppscotchIt all began when I failed miserably with my bulky monolithic web application which I developed for a client when working at a startup I felt so disappointed that I even thought of quitting programming completely But the hunger for knowledge pushed me harder and made me work on building scalable web applications and that was how I came across RESTful APIs If you are planning to get into Backend Development it is a must to understand what RESTful APIs are and how they work for building a robust reliable and scalable web application Despite googling for hours you are still chaotic about RESTful APIs Time to relax as Aviyel is coming with an amazing event to answer all of your questions Why you should join this event You will learn how to make CRUD API endpoints with Node js and Express js You will learn how to test your backend APIs with Hoppscotch You will learn how to set up your database using HarperDBAyodele Samuel Adebayo unclebigbay is coming live on Aviyel to clear all your doubts about RESTful APIs Unclebigbay is a Nigerian software developer technical writer and content creator who writes about programming concepts and project based articles on his blog He graduated from Tiidelab s coding Bootcamp and currently works as a freelancer where he enjoys participating in open source projects and hackathons with two of his projects making it to the winning list of hackathons on Hashnode Unclebigbay can be seen playing volleyball with his sports team if he is not coding or writing Join us to get hands on experience with APIs and open source Date November th Time AM PST AM ESTRegister Here Impressed Check out the rest of our events Let s build open source together Team AviyelAyodele Samuel Adebayo Socials Twitter unclebigbayHashnode unclebigbayDev to UnclebigbayLinkedIn Ayodele Samuel Adebayo |
2021-11-23 05:29:41 |
海外TECH |
DEV Community |
Getting started with Remix |
https://dev.to/codegino/getting-started-with-remix-28d6
|
Getting started with Remix What is Remix Remix is a relatively new framework which was open sourced on rd of November It was originally created by the awesome Ryan Florence and Michael Jackson and with the recent addition of Kent C Dodds it allows the framework to sell itself As per their websiteRemix is a full stack web framework that let s you focus on the user interface and work back through web fundamentals to deliver a fast slick and resilient user experience Let s get started with the actual coding Create a basic Remix appThis is my interpretation after scratching the surface of the documentation InstallationMake sure you have node installednpx create remix latest follow the promptscd whatever you named the project NOTE There will be an option to run npm install to install the dependencies immediately This will create a package lock json If you want to use yarn you can skip this step Running the appBased on what you choose in the image below a custom README md file is created at the project s root Make sure to check the steps on how to run the application locally Running examplesYou can use yarn for the steps below if you preferFor Remix App Servernpm run devFor Express Server Start the Remix development asset server npm run dev In a new tab start your express app npm run start devYou should see something like this If you don t make sure to check README md for specific instructions on how to run the app locally I will be using TypeScript for this blog if you prefer to use vanilla JavaScript remove the type usages and change the extensions from tsx to jsx Cleaning upLet s start coding with a clean slate Remove demo filesrm rf app routes demos app styles demos We ll recreate this files laterrm app routes index tsx app root tsx Create a file named root tsx file under app folder This file will serve as the global container for the app app root tsximport Links LiveReload Meta Outlet Scripts ScrollRestoration from remix export default function App return lt Document gt lt Layout gt lt Outlet gt lt Layout gt lt Document gt Here is the blueprint of our document It looks like our typical HTML but with a few extra tags I will discuss in another blog post those Components coming from the remix packagefunction Document children title children React ReactNode title string return lt html lang en gt lt head gt lt meta charSet utf gt lt meta name viewport content width device width initial scale gt title lt title gt title lt title gt null lt Meta gt lt Links gt lt head gt lt body gt children lt ScrollRestoration gt lt Scripts gt process env NODE ENV development amp amp lt LiveReload gt lt body gt lt html gt Layout is a wrapper component that provides a consistent layout for all pages function Layout children React PropsWithChildren lt gt return lt div gt children lt div gt Create the index route file index tsx under app routes folder Let s proceed with the mandatory hello world example app routes index jsxexport default function Index return lt div gt lt h gt Hello World lt h gt lt div gt Adding the two files above will yield the following result Create a linkWe ll add the links inside Layout since it will be reusable across all pages app root tsx function Layout children React PropsWithChildren lt gt return lt div gt lt header gt lt ul gt lt li gt lt Link to pokemons gt Pokemons lt Link gt lt li gt lt ul gt lt header gt children lt div gt Result After clicking the link or navigating to the URL you should see something like this It is expected since we have not created a route handler for the pokemons page Before creating that route let us use CatchBoundary to create a custom error message as a fallback for all Not Found routes app root tsximport useCatch other imports from remix export function CatchBoundary let caught useCatch let message switch caught status case message lt p gt This is a custom error message for pages lt p gt break You can customize the behavior for other status codes default throw new Error caught data caught statusText return lt Document title caught status caught statusText gt lt Layout gt lt h gt caught status caught statusText lt h gt message lt Layout gt lt Document gt Here is the customized error page To fix this error let s create the pokemons route app routes pokemons index tsxexport default function Pokemons return lt div gt lt h gt Pokemons lt h gt lt div gt Adding meta tagsMeta tags are used here to update the title and description of the page To learn more what meta is used for check this app routes pokemons index tsxexport function meta return title Pokemons description List of Pokemons export default function Pokemons We should see an updated head Fetching DataUnlike the vanilla React where usually fetch the data from the client side in Remix we can load data from the server using a the concept of a loader Create a Loader app routes pokemons index tsx previous importsimport type LoaderFunction from remix export const loader LoaderFunction gt return fetch export default function Pokemons If you are wondering where is the then res gt res json part you are not alone I m still cheking how they allow this magic to happen We can still write the typical fetch as usual Accessing data in ReactUse the useLoaderData hook to access the data in React land app routes pokemons index tsx import useLoaderData Link other imports from remix export let loader LoaderFunction export default function Pokemons const data useLoaderData Try to use console log here return lt div gt lt h gt Pokemons lt h gt lt ul gt data results map pokemon gt lt li key pokemon name gt lt Link to pokemons pokemon name gt pokemon name lt Link gt lt li gt lt ul gt lt div gt Combining the two previous codes will result to Creating a dynamic routeFor this demo let s use the file path convention Under the pokemons folder create a folder named pokemonName tsx Yes it s not a typo add a before the file name We ll see how to use it later app routes pokemons pokemonName tsxexport default function Pokemon return lt div gt lt h gt Specific Pokemon Route lt h gt lt div gt If we click bulbasaur in the list we should see something like this Now how do we customize the page to show the details of a Pokemon By naming the file pokemonName tsx inside the file we can access pokemonName inside the params object We can use this information to fetch the specific data from the server see line app routes pokemons pokemonName tsximport useLoaderData from remix import type LoaderFunction from remix export let loader LoaderFunction async params gt const pokemonName params pokemonName OR const pokemonName params const details await fetch pokemonName then res gt res json We ll map the data based on our needs return name pokemonName weight details weight img details sprites front default id details id export default function Pokemon const pokemon useLoaderData return lt div gt lt h gt pokemon name pokemon id lt h gt lt img src pokemon img alt pokemon name gt lt p gt Weight pokemon weight lt p gt lt div gt With the code above we can show these details in our page Update meta of pokemon routeBefore wrapping this up let s update the meta of the Pokemon details page app routes pokemons pokemonName tsximport type MetaFunction from remix export const meta MetaFunction data gt return title data id data name description Details of data name And here is a page with a better title and description Putting it all togetherLink to the repoHere s a demo What s next StylingDeploymentForm HandlingMDXConfiguration ConclusionThis is still a pretty small application for me to assess what Remix really can do and there s still much to learn So far I like how easy it is to create an application from scratch and I find the convention easy to follow I also like how they provide hooks to make working with the data errors and such Having said that I definitely will explore more about Remix and the ecosystem in the future |
2021-11-23 05:14:28 |
海外科学 |
NYT > Science |
To Breed or Not to Breed? |
https://www.nytimes.com/2021/11/20/style/breed-children-climate-change.html
|
catastrophe |
2021-11-23 05:35:55 |
海外ニュース |
Japan Times latest articles |
Government to nix Shinsei Bank’s defensive steps against SBI takeover bid |
https://www.japantimes.co.jp/news/2021/11/23/business/corporate-business/sbi-shinsei-takeover/
|
Government to nix Shinsei Bank s defensive steps against SBI takeover bidThe government which owns an about stake in Shinsei Bank is believed to have given some credit to a growth plan proposed by SBI |
2021-11-23 14:38:32 |
海外ニュース |
Japan Times latest articles |
Australia to reopen to foreign visa holders and travelers from Japan |
https://www.japantimes.co.jp/news/2021/11/23/national/australia-entry/
|
Australia to reopen to foreign visa holders and travelers from JapanTo take advantage of the changed rules travelers will need to provide proof of vaccination and to return a negative PCR test hours or |
2021-11-23 14:03:31 |
ニュース |
BBC News - Home |
Social care: MPs back change to funding cost cap in England |
https://www.bbc.co.uk/news/uk-politics-59365729?at_medium=RSS&at_campaign=KARANGA
|
people |
2021-11-23 05:54:51 |
ニュース |
BBC News - Home |
Dozens killed in Bulgaria bus fire |
https://www.bbc.co.uk/news/world-europe-59383852?at_medium=RSS&at_campaign=KARANGA
|
bulgaria |
2021-11-23 05:51:06 |
ニュース |
BBC News - Home |
NHS could give therapy before anti-depressants, under new guidelines |
https://www.bbc.co.uk/news/health-59383722?at_medium=RSS&at_campaign=KARANGA
|
advice |
2021-11-23 05:01:45 |
ニュース |
BBC News - Home |
Newspaper headlines: PM's Peppa Pig speech 'stokes Tory anger' |
https://www.bbc.co.uk/news/blogs-the-papers-59382507?at_medium=RSS&at_campaign=KARANGA
|
address |
2021-11-23 05:24:33 |
ニュース |
BBC News - Home |
Nurses' mental health: 'Most people in the NHS, they are sad' |
https://www.bbc.co.uk/news/uk-england-london-59104738?at_medium=RSS&at_campaign=KARANGA
|
carers |
2021-11-23 05:51:14 |
コメント
コメントを投稿