投稿時間:2021-04-11 04:24:31 RSSフィード2021-04-11 04:00 分まとめ(30件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
Ruby Rubyタグが付けられた新着投稿 - Qiita Ruby on Rails × Shopify Multipass APIでSSOを試してみる https://qiita.com/kazama1209/items/7e16b2701cf9e27b1ca9 というのも、両者は別にデータベースを共有しているわけではないため、たとえばSSO基盤側のメールアドレスを変更した際、同時にShopify側のメールアドレスも変更される仕組みを作っておかないと整合性が取れなくなり、全く別のユーザーとしてログインする事になってしまいます。 2021-04-11 03:44:23
AWS AWSタグが付けられた新着投稿 - Qiita TerraformでAWS環境にApacheサーバを作成 https://qiita.com/ryu022304/items/9d820c5e4229e0966f89 インフラ環境をコード化するのは楽しいですね。 2021-04-11 03:59:47
Ruby Railsタグが付けられた新着投稿 - Qiita Ruby on Rails × Shopify Multipass APIでSSOを試してみる https://qiita.com/kazama1209/items/7e16b2701cf9e27b1ca9 というのも、両者は別にデータベースを共有しているわけではないため、たとえばSSO基盤側のメールアドレスを変更した際、同時にShopify側のメールアドレスも変更される仕組みを作っておかないと整合性が取れなくなり、全く別のユーザーとしてログインする事になってしまいます。 2021-04-11 03:44:23
海外TECH DEV Community The Best Code Editors For HTML, CSS, And JavaScript! https://dev.to/cristoferk/the-best-code-editors-for-html-css-and-javascript-5e8b The Best Code Editors For HTML CSS And JavaScript Here is the video tDon t forget to like share and subscribe 2021-04-10 18:54:10
海外TECH DEV Community Neural Network Learns to Drive https://dev.to/lukegarrigan/neural-network-learns-to-drive-2gpm Neural Network Learns to DriveThis week I ve been playing around with neural networks or more specifically neuroevolution of augmenting topologies NEAT which is nowhere near as complicated as it sounds I ll go over the ins and outs of NEAT in a future blog For now just know that NEAT is a matter of combining the strengths of a genetic algorithm and a neural network to form something quite powerful as this blog will show Starting simpleAs with anything I know nothing about I like to try and implement it in the simplest way possible and then iterate and expand on the implementation I did this in my previous blog where I developed a simple genetic algorithm for a game where the goal was for the protagonist to move up and that s it This week was no different Flappy birdOne of the simplest games I could think of to get the ball rolling is Flappy bird as the rules and actions are quite simple the bird must go through the pipes and the bird does that by choosing one of two actions flap wings or don t flap wings Luckily I coded my own flappy bird for a YouTube video I did a while back I ll grab that and attempt an implementation of NEAT Generation I spawn a population of birds with a random neural network The neural network takes as input the x y of the bird and the x and y of the top pipe As you can see the first generation only bird makes it through the first set of pipes this means that bird is more likely to pass on its genetic material Generation By generation the bird is getting through a few pipes now and seems to have developed an understanding of the game and its objective Generation By generation the bird has mastered the game and continues on indefinitely The bird likes to live on the edge though look how close it gets to the top pipes Self driving carOkay so now I ve got a pretty good idea of the implementation let s bring this code into my car game If you re interested in how the reward mechanism works I cover it in detail in this blog but basically there are checkpoints and if the car drives over a checkpoint their score increments InputsSo I think the only inputs the neural network really needs are some sensors similar but more primitive than the sensors your car might have So I m going to choose points that ll represent the sensors The value of each sensor will be either or where represents on track and represents you re about to die I do this by taking the pixels of the track and then determine the RGB of the pixel at the location of the sensor and if that RGB is not the same colour as the track then it s safe to assume that going that way is probably not a good idea but can my neural network figure that out The green dots represent the sensors The code for determining whether a sensor is still on the road looks like the following let infrontCollision const index floor this s y width floor this s x if pixels index amp amp pixels index amp amp pixels index infrontCollision Generation Let s create a population of with a mutation rate of and see how it fairs I must admit when I first ran this I was blown away To get this far using just a traditional genetic algorithm took way over generations It s as though the car knew its purpose from the get go Generation By generation we already have cars that can complete a full circuit of the track Which took over generations in my previous blog quite remarkable Can it race another track One of the drawbacks of using just a genetic algorithm was that it adapted to the environment it was in each generation had to learn how to get around a corner and then pass on that genetic information so that its children could get around the corner and attempt the next Here though we re using live information and teaching the car to stay on the track and hopefully any track provided the grey is the same 😁 Exporting the modelThe neural network is essentially the brains of the car when a car is successful I can essentially export their brain and inject it into another car In the example below I inject the brain of a successful car from the other track onto this brand new track and it already knows what it s got to do ConclusionWell that concludes this week s hacking If you enjoyed my writing please sign up for my newsletter All the code written in this blog can be found here although I very likely will have edited it by the time this blog is live As mentioned in my previous blog thanks to Daniel Shiffman for the inspiration and great tutorials opening my eyes to this mysterious world I hope you ve enjoyed this blog if you do by some miracle enjoy my blabbering then head over to my blogging site at codeheir com where I write weekly blogs about whatever in the world of programming has my attention 2021-04-10 18:49:43
海外TECH DEV Community 10+ BEST AMAZING 404 PAGE TEMPLATE https://dev.to/mike37/10-best-amazing-404-page-template-2leb BEST AMAZING PAGE TEMPLATEIF YOU LIKE AIRTICLE THEN CHECK MORE PAGE TEMPLATES   Title No Vacancy Author Riley ShawUsing novacancy js to test out a page concept Feel free to use it and if you re feeling nice give me a shout out   Title Fargo Author Nate WatsonMade With HTML CSS Fargo inspired page for DailyUI   Title No signal Author Adem ilter  Title Page Author Kasper De Bruyne  Title Yeti Page Author Darin  Title Error Author Swarup Kumar KuilaError animation  Title Only CSS Rolling Box Author Yusuke NakayaRolling loop   Title page Author Naved khan  Title Ghost Page Author Diogo Gomes  Title Space Author Jared RoweAnimated SVG for the page on Vecteezy com  Title Error page Author Vineeth TRError page in Pure css inspired from Bons   Title My Error Page Author Taufik Nurrohman  Title code for fun day error page Caveman mode pure CSS Author Sergiocode for fun day project error page an animation exercise in css no JS no svg I hope u enjoy  IF YOU LIKE AIRTICLE THEN CHECK MORE PAGE TEMPLATES 2021-04-10 18:15:32
海外TECH DEV Community Getting my SvelteKit website on Netlify https://dev.to/crinkle/getting-my-sveltekit-website-on-netlify-26m0 Getting my SvelteKit website on NetlifyAfter tackling the development of a SvelteKit version of my website it is time to get it running in production Or in this case hosted on Netlify It was in this part I found out the hard way that SvelteKit is in beta and not production ready Let me take you on my journey to get the website deployed on Netlify and see if I was successful spoiler you are reading this on the SvelteKit version Hosting on NetlifyNow that I had my website locally working I had to get it deployed on Netlify SvelteKit has an adapter netlify package This package creates a Netlify function that acts as the server for the SSR website So I swapped the default adapter node to the Netlify version and let GitHub and Netlify do the magic And errors This is the moment I found out why SvelteKit is still in beta In general all the packages are devDependencies But the Netlify Functions could not find the packages needed So I moved the packages from devDependencies into dependencies and hit deploy again Progress The Netlify function can now find the package Some issues remained but progress nonetheless Back to the local version to fix them But wait a minute The local version is not working anymore Apparently Vite the local build tool did not like it when I moved the packages After trying several things I gave up As SvelteKit is still in beta community resources are scarce I did found a few Sapper examples the predecessor of SvelteKit using the adapter static Success Well kind of I found that a few of my markdown files got transformed into pages correctly but not all After searching and debugging I found the issue The adapter static traverses all links starting from the index route and generates pages for all the linked pages it can find If a markdown file is not present as a link on a page yet it does not get generated The adapter static changes the solution from SSR to SSG the pre rendered HTML is generated on build time instead of runtime Optimizing the website for SEOIn general SSR and SSG are SEO friendly ways to create modern websites Both Gatsby and Svelte Kit should enable me to create an SEO friendly website I used the web dev measure tool to determine my website score The homepage of the Gatsby version scored a on all categories But so does the SvelteKit version But the scores are not the only metrics found in this tool Most metrics were the same for both versions of the website except time to interactivity For the Gatsby version this was around seconds while the SvelteKit version has a time of around seconds Both good scores but SvelteKit is superior Time to interactivity the actual time it takes to load everything allowing the user to interact with the pageThis is driven by the files transferred on loading the page The Gatsby version had to download around kB across files The SvelteKit version only needs around kB over files A big win for SvelteKit But we can test more than the homepage Other pages did not score that well for SvelteKit One of the bigger issues found by web dev is redirects At the moment of building the website SvelteKit has no trailing slashes in URLs by design But Netlify normalizes all URLs to a version with trailing slashes It adds the below redirect headers to each page post title post title By playing around with the Asset optimization settings on Netlify I was able to turn off this normalization After redeploying and re evaluating the web dev scores increased significantly Now individual post pages score much better compared to their Gatsby counterpart Especially on the time to interactivity metric Turning off all asset optimizations on Netlify increased performance on my website But it can have unwanted side effect due to the lack of URL normalization Use with caution ConclusionWhen moving from the stable Gatsby to the unstable SvelteKit public beta I took a risk Not only did I have to learn a new framework I had to build logic to replace community plugins I was at risk of encountering bugs that few encountered before me With the knowledge that I could not rely on Google or Stack Overflow I jumped into the deep But in the end it all paid off I build a new website that is not only faster but more enjoyable for me to work on The experience that Svelte and SvelteKit bring is promising and now I cannot shut up about it If you are curious about the result check the code on the open GitHub repository 2021-04-10 18:15:16
海外TECH DEV Community Converting my Gatsby website to SvelteKit https://dev.to/crinkle/my-journey-from-gatsby-to-sveltekit-5g32 Converting my Gatsby website to SvelteKitFor the last few weeks or months I was getting restless about everything my work my website the environment the World I had to find something to change my focus to restore my energy Around a week or two ago I found the news of SvelteKit going into public beta This sparked excitement in myself I had not felt in a long time So during Easter weekend while in a Corona lockdown I started with a new journey An exciting journey I was going to learn a new framework and rebuild this website Or at least try Introducing Svelte and SvelteKitReact is a JavaScript library that makes it easy to write UIs As it is a library your code plus the library is shipped to the browser and executed there Also you have to write your HTML or JSX inside the return of a function while other lifecycle information is also encapsulated inside that function Gatsby is a static site generation SSG solution build on top of React and was used in the previous version of this website An easy next step would be migrating to Next js a static site rendering SSR solution build on React But then I came across the news of the SvelteKit public beta SSG vs SSR in both cases the server is responsible to pre render the requested HTML page in contrast to client side rendering CSR With SSG this happens at build time all possible pages get pre rendered With SSR this happens at runtime upon a page visit the HTML gets pre rendered using a template Svelte is not a library or a framework it is a compiler This means that your code is not shipped in combination with packages to a browser but it gets compiled to something else This something is shipped to the browser Because all code gets compiled the total size decreases but the performance increases Besides it allows you to break away from writing everything inside a JavaScript function and have its optimized format SvelteKit is for Svelte what Gatsby and NextJS are for React It is an opinionated framework build on top of Svelte that allows you to create SSR and SSG websites and applications At its core it uses a flexible filesystem based routing in the routes directory Not only do the templates for the pages in this directory but the code that runs on the server is co located here as well It is the next iteration of the Sapper framework So a great choice for a blog driven website Working with S CSS in SvelteKitI am a big fan of CSS and have a strong opinion on how it should be applied to websites projects My setup allows me to extract general layout patterns and combine them with general utility first CSS When I read about the scoped styles of Svelte I got a bit anxious Would my way of working deviate too much from Svelte Kit But quickly it hit me The combination could work perfectly It could allow me to create global layout and utility CSS and use the scoped CSS of Svelte to add styles specific to components or pages The styles defined in the Svelte component could replace the entire block directory of my framework This means that components would look something like shown below On the div instead of the header tag you see various utility classes applied but also the defined inner class lt header gt lt div class inner flex row items center mb gt lt Logo gt lt div gt lt header gt lt style lang scss gt header inner lt style gt This worked beautifully for the most part The compiler of Svelte is smart enough to identify unused local styles and not bundle them However in SvelteKit you can render an HTML string using the html flag The compiler cannot link the two and will flag local styles as unused This results in styles not being applied but also not bundled You cannot find the styles with the browser Inspection Tool they do not exist To solve this issue the global helper has to be used But except for that even my opinionated way of working just works lt style gt global post h lt style gt I think I am good at CSS but bad at animations I know my way around CSS transitions but that is as far as I go Luckily Svelte got a lot of sweet stuff built in The svelte transition svelte animate svelte easing and potentially more packages really make your life easier They enabled me to implement page transitions with the code below or logo hover animation with ease These little touches credit the name of my website Crinkle lt script gt import fly from svelte transition lt script gt lt main in fly y duration gt Setting up the markdown file handlingBut I do not write my articles in HTML Svelte or React I write them in markdown With Gatsby several steps had to be taken to make it all work The markdown files inside the pages directory needed to have a template name indicated as an attribute in the front matter section In the gatsby node js file you put the code on how the actual files should be handled With a GraphQL query all pages can be retrieved and you can transform the data into the format you require in your template file e g in my case I had to extract the next and previous articles The template file located in a templates directory allows query again through GraphQL an object defined in my case an article and the adjacent articles in the previous step can be obtained and transformed into an HTML page through React components Configure a shit tone of plugins to handle images code highlighting relocation of files etc in the gatsby config js file I don t know about you but I found it not developer friendly Things are scattered everywhere it is unclear why you have to use GraphQL everywhere and the plugins obfuscate the actual logic SvelteKit is much more intuitive The routes directory holds the code for rendering the pages not the markdown files It combines the templates and parts of the gatsby node js corresponding to a page in one place This co location makes much more sense The slug json js file contains the logic of transforming a markdown file in a JSON structure that can be sent to a browser slug corresponds to the filename without the extension Instead of installing several plugins I only had to install three npm packages nothing more nothing less front matter to read additional attributes at the top of the markdown file markedjs parse markdown into HTML prismjs add code highlighting The resulting JSON string is returned at the end of the function On the slug svelte side we need to fetch the generated JSON and return it in the props We can then expose the property as shown below This allows us to use the article object in the rendering code of this svelte plugin lt script context module gt export async function load page fetch const article await fetch writing amp page params slug json if res ok return props article lt script gt lt script gt export let article lt script gt All the above was sufficient to have my Gatsby website transformed into a SvelteKit website almost There were small issues left For instance images on the articles were wrapped in a lt p gt lt p gt tag which made a styling element I used impossible until the has gets released But luckily you can alter how markedjs works import marked from markedjs marked Renderer prototype paragraph function text if text startsWith lt img return text return lt p gt text lt p gt With a few more of these alterations lazy loading of images and anchor tags on headings I was able to create the same website in SvelteKit Or even a better website with less code ConclusionUp until this moment the development experience DX of Svelte and SvelteKit has been tremendous Don t get me wrong I loved Gatsby the first time I used it But after working with Svelte Kit I found its DX inferior to SvelteKit For UI components that do not require a lot of state management Svelte is also superior to React But when moving to SvelteKit you loose the community and plugins of Gatsby This makes Gatsby superior for less tech savvy people or when you want to move quicker and do not want to control each detail If you are curious about the result check the code on the open GitHub repository 2021-04-10 18:09:03
海外TECH Engadget NASA delays Mars helicopter flight to at least April 14th https://www.engadget.com/nasa-ingenuity-mars-helicopter-flight-delay-184140652.html april 2021-04-10 18:41:40
海外TECH Engadget Biden's first budget proposal would fight chip shortages with US factories https://www.engadget.com/biden-budget-proposal-domestic-chip-manufacturing-180310697.html shortages 2021-04-10 18:03:10
海外TECH CodeProject Latest Articles How to Create an ASP.NET Core API Project with Page Rendering, TypeScript, and "require" https://www.codeproject.com/Articles/5299530/How-to-Create-an-ASP-NET-Core-API-Project-with-Pag How to Create an ASP NET Core API Project with Page Rendering TypeScript and quot require quot Set up an ASP NET Core API project with TypeScript and require to render pages and and load JavaScript files in the browser 2021-04-10 18:23:00
海外ニュース Japan Times latest articles Leonys Martin, Manabu Mima help Marines tame Lions https://www.japantimes.co.jp/sports/2021/04/10/baseball/japanese-baseball/martin-mima-marines-lions/ lionsmartin 2021-04-11 03:24:09
ニュース BBC News - Home Prince Philip: Charles says dear papa was very special https://www.bbc.co.uk/news/uk-56702886 edinburgh 2021-04-10 18:48:32
ニュース BBC News - Home Rachael Blackmore makes Grand National history https://www.bbc.co.uk/sport/horse-racing/56701659 aintree 2021-04-10 18:52:56
ニュース BBC News - Home Big Brother star Nikki Grahame dies aged 38 https://www.bbc.co.uk/news/entertainment-arts-56705671 brother 2021-04-10 18:38:51
ニュース BBC News - Home NI riots: Fourteen police hurt in another night of violence https://www.bbc.co.uk/news/uk-northern-ireland-56699716 agreement 2021-04-10 18:30:25
ニュース BBC News - Home In pictures: Tributes continue for the duke https://www.bbc.co.uk/news/in-pictures-56700587 edinburgh 2021-04-10 18:13:40
ニュース BBC News - Home Chelsea beat Palace to move back into top four https://www.bbc.co.uk/sport/football/56622156 crystal 2021-04-10 18:40:08
ニュース BBC News - Home Prince Philip: What are the plans for his funeral? https://www.bbc.co.uk/news/uk-56694327 edinburgh 2021-04-10 18:38:50
ビジネス ダイヤモンド・オンライン - 新着記事 日本の預金封鎖の“黒歴史” 投資先のリスク分散を考える - 10万円から始める! 小型株集中投資で1億円 実践バイブル https://diamond.jp/articles/-/264799 日本の預金封鎖の“黒歴史投資先のリスク分散を考える万円から始める小型株集中投資で億円実践バイブル大好評シリーズ万部突破ふつうの会社員でも年あれば、気づいたときには億円小型株は伸びしろが大きいわりに、目を付けている投資家が少ない。 2021-04-11 04:00:00
ビジネス ダイヤモンド・オンライン - 新着記事 不動産投資の 勝利の方程式 「Creating α」とは? - ハーバード式不動産投資術 https://diamond.jp/articles/-/268022 筆者の出身地、高知の駅前マンションの利回りは、だいたいくらいの利回りがないと誰も投資しないだろう。 2021-04-11 03:55:00
ビジネス ダイヤモンド・オンライン - 新着記事 宇宙を覆う無秩序へと向かう力…生命が抵抗できる「納得の理由」 - WHAT IS LIFE?(ホワット・イズ・ライフ?)生命とは何か https://diamond.jp/articles/-/268016 2021-04-11 03:50:00
ビジネス ダイヤモンド・オンライン - 新着記事 低価格でもサクサク動く! Chromebook を選ぶ 7つの視点 - Google 式10Xリモート仕事術 https://diamond.jp/articles/-/264739 低価格でもサクサク動くChromebookを選ぶつの視点Google式Xリモート仕事術“日本一のマーケッターの神田昌典氏マーケティングの世界的権威ECHO賞・国際審査員大絶賛初の単著がたちまち刷決定。 2021-04-11 03:45:00
ビジネス ダイヤモンド・オンライン - 新着記事 アウェイの地で覚悟! 1万人の若者に 120億円集めた理由 - スタンフォード式生き抜く力 https://diamond.jp/articles/-/266495 2021-04-11 03:40:00
ビジネス ダイヤモンド・オンライン - 新着記事 【SHOCK EYE】瞬間瞬間を大切にすれば、幸運を引き寄せられる - SHOCK EYEの強運思考 https://diamond.jp/articles/-/268093 2021-04-11 03:35:00
ビジネス ダイヤモンド・オンライン - 新着記事 初心者でもわかるExcelマクロ入門! Ifを使ったマクロの使い方をマスター - 4時間のエクセル仕事は20秒で終わる https://diamond.jp/articles/-/267834 初心者でもわかるExcelマクロ入門Ifを使ったマクロの使い方をマスター時間のエクセル仕事は秒で終わるエクセルマクロの学び方、使い方を徹底解説マクロを仕事で使うための、ポイントのみを押さえた省力的で効率的な学び方を伝授します。 2021-04-11 03:30:00
ビジネス ダイヤモンド・オンライン - 新着記事 「空気」をつくれば、指示がなくても子どもは自分で動きだす - 中竹竜二のウィニングカルチャー https://diamond.jp/articles/-/268015 中竹竜二 2021-04-11 03:20:00
ビジネス ダイヤモンド・オンライン - 新着記事 【中学受験】 大学付属校で 伸びる子と つぶれる子の違いは? - 中学受験 大学付属校 合格バイブル https://diamond.jp/articles/-/266844 2021-04-11 03:15:00
ビジネス ダイヤモンド・オンライン - 新着記事 「ゲラ」「ゴリ」「ワラ」?? 英語を聞き取れない人が 知っておきたいこと - 7時間で英語が突然ハッキリ聞こえて会話が続く本 https://diamond.jp/articles/-/267491 「ゲラ」「ゴリ」「ワラ」英語を聞き取れない人が知っておきたいこと時間で英語が突然ハッキリ聞こえて会話が続く本英単語はそこそこ知っている。 2021-04-11 03:10:00
ビジネス ダイヤモンド・オンライン - 新着記事 ワークマン式 新型コロナ後の ブルーオーシャン市場の読み方 - ワークマン式「しない経営」 https://diamond.jp/articles/-/265860 2021-04-11 03:05:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)