投稿時間:2022-12-04 22:16:33 RSSフィード2022-12-04 22:00 分まとめ(20件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita 歌詞付きMIDIをMusicXMLに変換 その2:音符の整理 https://qiita.com/shimajiroxyz/items/0efeec7b026562a8b228 musicxml 2022-12-04 21:25:01
AWS AWSタグが付けられた新着投稿 - Qiita DynamoDBへの大量の読み込みリクエストによるスロットリングエラーの解消 https://qiita.com/KeiFunahashi/items/88353c7e6ac974cb0ec0 dynamodb 2022-12-04 21:26:01
Ruby Railsタグが付けられた新着投稿 - Qiita 【Rails devise】Couldn't find User with 'id' = sign_out https://qiita.com/Co-0/items/df121ddbf375d6b92d48 devise 2022-12-04 21:20:34
技術ブログ Developers.IO [レポート]Achieving developer productivity in the cloud at Capital One (sponsored by Accenture)#PRT270 #reinvent https://dev.classmethod.jp/articles/report-achieving-developer-productivity-in-the-cloud/ レポート A c h i e v i n g d e v e l o p e r p r o d u c t i v i t y i n t h e c l o u d a t C a p i t a l O n e s p o n s o redbyAccenturePRTreinvent はじめ に こんにちは 、 おお はしり き たけ です 。 2022-12-04 12:36:01
技術ブログ Developers.IO [今さら]Amazon Forecastで2022年末、2023年始の新型コロナウイルスの都道府県別・日別感染者数を予測する[今だからこそ] https://dev.classmethod.jp/articles/covid19-forecast-2022-to-2023-powered-by-amazon-forecast/ verte 2022-12-04 12:13:07
技術ブログ Developers.IO AWS Transfer Family のSFTPをパスワード方式で接続してみた(IP制限有り) https://dev.classmethod.jp/articles/aws-transfer-family-sftp-with-password-method/ awstransferfamily 2022-12-04 12:11:45
海外TECH Ars Technica As the Arctic warms, beavers are moving in https://arstechnica.com/?p=1901741 beaver 2022-12-04 12:12:17
海外TECH DEV Community AI can be fun https://dev.to/maurerkrisztian/ai-can-be-fun-4f89 AI can be funWe often worry about the potential dangers of artificial intelligence But let s not forget that AI can also be used for some good old fashioned fun Here are a few ideas for how we can use AI to bring some laughs into our lives Use AI to create hilarious memes We ve all seen those memes where a picture is captioned with a clever phrase But with AI you can take it to the next level by generating absurd or nonsensical captions that will have your friends rolling on the floor with laughter Train an AI to be a stand up comedian Okay this one might take a while but imagine the possibilities An AI comedian could analyze the latest news and trends and come up with fresh jokes that no human could have thought of Plus it would never bomb on stage it would just keep iterating and improving until it becomes the next big thing in comedy Have AI create funny videos for you If you re not a natural born comedian don t worry AI can help you out With the right training an AI can create funny sketches or remix existing videos to create something entirely new and hilarious In conclusion while we should definitely take the potential dangers of AI seriously we should also remember that it can be a source of endless entertainment 2022-12-04 12:37:42
海外TECH DEV Community Hoverable Card with CSS https://dev.to/shubhamtiwari909/hoverable-card-with-css-2p4b Hoverable Card with CSSHello Everyone today i will show you a hoverable Card created with CSS What it does is it will show the contacts icons at the bottom when we hover over the card Let s get started What i did is i created a card component with a heading a paragraph a button and contact links at the bottom Contact icons are hidden with opacity set to They will be visible only when we hover over the card I used the hover pseudo class with descendend selector card hover bottom links opacity It says when we hover over the card then make the container with class bottom links opacity to making it visibleYou can contact me on Instagram LinkedIn Email shubhmtiwri gmail com You can help me by some donation at the link below Thank you gt lt Also check these posts as well 2022-12-04 12:25:33
海外TECH DEV Community “THIS” in Javascript. https://dev.to/piyushsh/this-in-javascript-174d “THIS in Javascript Prerequisites Function declaration expression and arrow functionObjectsWhat exactly is “this keyword The execution context contains three components variable environment scope chain and this this is a special variable that takes the value of the owner of the function and is created for every function execution context The value of the keyword is only assigned only when the function is called and also the value depends on how the function is called and is not static If we simply console log this It will return the global object this keyword doesn t NOT point to the function itself or the variable environment We will look at the ways functions are called and the value the keyword takes Method call If a function is called through this method the this keyword will point to the object in which it is called for example code const student name Piyush logThis function console log this console log student logThis Output this point to the object where it is calledname Piyush print ƒ Simple function callThere are two different values this might point to it depends on whether the strict mode is enabled or not a If strict mode is enabled It returns undefined code use strict function print console log this console log print outputundefined b Without strict modeIt returns the global object code function print console log this console log print output window objectWindow  window Window self Window document document name location Location  … Arrow function Arrow functions do not get their own “this keyword Using this keyword inside the arrow function will simply point to the surrounding function It is also called the “lexical this keyword codeconst student name Piyush age print gt console log this console log student print output window objectWindow  window Window self Window document document name location Location  … Here “this does not point to this object where the function is called but points to the surrounding function here the global object Method borrowing and this keyword Say we have two objects student and student Student has “printage method and we copy it to student codeconst student name Piyush age printage function console log this console log Your birth year this age const student name ABC age copying student printage method to studentstudent printage student printageconsole log student printage output name ABC age printage ƒ Your birth year When this line is executed “printage method even though it is in student “this points to the object that is calling the method here student is invoking the method so we get the above output Call apply and bind method We can explicitly set up the value of “this using these methods a CallThe first argument in the call method should always be the object we want the “this keyword to point to Here we have two students student and student We copy “printage method from student and store it in birthyear birthyear is a regular function After that we use birthyear call method the first argument student is the object we want this to reference After that we can pass the required arguments for the function Example const student name Piyush age printage score console log this console log Hi this name You scored score const student name ABC age copy print ageconst birthyear student printage call methodbirthyear call student output name ABC age Hi ABC You scored So we get the output Hi ABC You scored b Apply The apply method is similar to the call method The only difference here is that while calling the apply method the arguments of the function are passed in an array Example codeconst student name Piyush age printage score console log this console log Hi this name You scored score const student name ABC age copy print ageconst birthyear student printage apply methodbirthyear apply student output name ABC age Hi ABC You scored c bind The bind method is a bit different from the call and apply method It takes in one argument i e the object for this and returns a new function Now we can use the function to pass arguments Example codeconst student name Piyush age printage score console log this console log Hi this name You scored score const student name ABC age the bind method will return a function while this will point to studentconst birthyear student printage bind student use the function to pass argumentsbirthyear output name ABC age Hi ABC You scored 2022-12-04 12:17:06
海外TECH DEV Community Open Graph images https://dev.to/krasun/open-graph-images-38lg Open Graph imagesAlso known as social cards or link previews these images make a difference between the click and the visit to your site or ignoring it Boost your brand awareness by generating Open Graph images In this article I share with you a few quick ways how you can easily add support the Open Graph images to your site If you already have an imageIf you already have an image for social media upload it to your server or any other file hosting and add the following tags to your HTML head section lt Open Graph Meta Facebook gt lt meta property og type content website gt lt meta property og url content gt lt meta property og title content Your title gt lt meta property og description content Your description gt lt meta property og image content gt lt Twitter gt lt meta property twitter card content summary large image gt lt meta property twitter url content gt lt meta property twitter title content Your title gt lt meta property twitter description content Your description gt lt meta property twitter image content gt There are a few requirements and recommendations to avoid common pitfalls Don t use a relative URL Always use an absolute URL of the images in tags Not every social network or app knows how to resolve it The recommended image size is xpx for most social networks and the file size must not exceed a few hundred kilobytes And there are a few downsides to using static OG images They are not updated dynamically to reflect the updates on a page You need manually set up OG images for different pages You need to spend time and periodically update them These downsides can be solved by generating images dynamically Generate open graph images dynamicallyThere are two ways to generate Open Graph images dynamically building a custom solution with a rendering engine like Puppeteer or using a well established API or product that solves that problem What to choose depends on your preferences and resource limitations If you like building and writing code go with a custom solution If you are short on time go with a proven solution Generate Open Graph images with a custom solutionYou can draw pictures using low level libraries or render HTML with browsers and take screenshots There are so many ways to generate images dynamically I will show quickly two options on how to easily render HTML as an image for open graph images Using Puppeteer And using satori by Vercel Why HTML as images Because it is a declarative language that is easy to read and edit In addition to that you can use modern CSS frameworks to style your OG image quickly And you can easily scale elements to larger or lesser image sizes if needed Using Puppeteer to generate OG imagesI have written a complete guide on how to render URLs or HTML as images screenshots with Puppeteer Before rendering an HTML let s create a simple example of a dynamic HTML template for our OG image lt doctype html gt lt html gt lt head gt lt meta charset UTF gt lt meta name viewport content width device width initial scale gt lt script src gt lt script gt lt head gt lt body class bg violet h screen flex gt lt div class m auto gt lt h class text white text xl font serif gt lt span class underline decoration sky gt Open Graph lt span gt images lt h gt lt h class text white text xl mt font light gt Are easy and powerful way to increase your brand awarness lt h gt lt div gt lt body gt lt html gt And now let s render it with Puppeteer use strict npm i puppeteerimport puppeteer from puppeteer async gt const content lt doctype html gt lt html gt lt head gt lt meta charset UTF gt lt meta name viewport content width device width initial scale gt lt script src gt lt script gt lt head gt lt body class bg violet h screen flex gt lt div class m auto gt lt h class text white text xl font serif gt lt span class underline decoration sky gt Open Graph lt span gt images lt h gt lt h class text white text xl mt font light gt Are easy and powerful way to increase your brand awareness lt h gt lt div gt lt body gt lt html gt const browser await puppeteer launch try const page await browser newPage await page setViewport width height deviceScaleFactor await page setContent content await page screenshot path screenshot png catch e console log e finally await browser close And the result is Let s create a simple API around it use strict npm i puppeteerimport puppeteer from puppeteer npm i expressimport express from express const template prefix title subtitle gt lt doctype html gt lt html gt lt head gt lt meta charset UTF gt lt meta name viewport content width device width initial scale gt lt script src gt lt script gt lt head gt lt body class bg violet h screen flex gt lt div class m auto gt lt h class text white text xl font serif gt lt span class underline decoration sky gt prefix lt span gt title lt h gt lt h class text white text xl mt font light gt subtitle lt h gt lt div gt lt body gt lt html gt const app express app get ogi async function req res const content template req query prefix req query title req query subtitle const browser await puppeteer launch try const page await browser newPage await page setViewport width height deviceScaleFactor await page setContent content const image await page screenshot type png encoding binary res set Content Type image png res send image catch e console error e res status send Failed to render the Open Graph image see error logs finally await browser close app listen I start and close a browser on every request because these requests from social networks might be rare if the number of pages you have is minimal But running a browser in the background might cause many issuesーit is a complex case to handle Let s test it http localhost ogi prefix Open Graph amp title images amp subtitle are easy and powerful way to increase your awarenessAnd the result is Once it works specify URLs in your HTML meta tags lt Open Graph Meta Facebook gt lt meta property og type content website gt lt meta property og url content gt lt meta property og title content Your title gt lt meta property og description content Your description gt lt meta property og image content title images amp subtitle are easy and powerful way to increase your awareness gt lt Twitter gt lt meta property twitter card content summary large image gt lt meta property twitter url content gt lt meta property twitter title content Your title gt lt meta property twitter description content Your description gt lt meta property twitter image content title images amp subtitle are easy and powerful way to increase your awareness gt Use your domain where you deployed the API instead of example com And the last is you need to deploy an API or integrate it as part of your app But be careful because deploying Puppeteer manually to a server has a few pitfalls that you should be aware of It might have memory leaks It consumes a lot of CPU and memory It might periodically crash There is a new and lightweight alternative tailored for rendering OG imagesーsatori by Vercel Or if you don t want to deal with infrastructure and code feel free to jump to the section about how to use API to render HTML Using satori by Vercel to generate OG imagessatori is an engine made by Vercel to generate SVG images from simple HTML code that can be used in many use cases And Vercel provides native support for satori to render Open Graph images If you need to generate OG images for your Next js app consider hosting your app on Vercel and using their OG image solution Install satori and friends npm i satori satori html resvg resvg jsLet s render a simple HTML use strict import satori from satori import Resvg from resvg resvg js import html as toReactElement from satori html npm i expressimport express from express import fsPromises from fs promises const template prefix title subtitle gt lt div style background color rgb color white height vh width display flex align items center justify content center flex direction column gt lt h style font size px gt prefix title lt h gt lt h style font size px gt subtitle lt h gt lt div gt const app express at least one font file is requiredconst fontFile await fsPromises readFile inter latin ext normal woff const font fontFile app get ogi async function req res const content template req query prefix req query title req query subtitle try const width const svg await satori toReactElement content width height fonts name Inter Latin data font style normal const resvg new Resvg svg fitTo mode width value width const image resvg render res set Content Type image png res send image asPng catch e console error e res status send Failed to render the Open Graph image see error logs app listen To properly render the example download the font and place it in the same directory as the script And for a request http localhost ogi prefix Open Graph amp title images amp subtitle are easy and powerful way to increase your awarenessThe result is And updating the HTML meta tags lt Open Graph Meta Facebook gt lt meta property og type content website gt lt meta property og url content gt lt meta property og title content Your title gt lt meta property og description content Your description gt lt meta property og image content title images amp subtitle are easy and powerful way to increase your awareness gt lt Twitter gt lt meta property twitter card content summary large image gt lt meta property twitter url content gt lt meta property twitter title content Your title gt lt meta property twitter description content Your description gt lt meta property twitter image content title images amp subtitle are easy and powerful way to increase your awareness gt Use your domain where you deployed the API instead of example com The beauty of using satori instead of Puppeteer is that it works faster consumes less memory and can be embedded into your main app But the downside is that satori is a comparatively new library so it might have a lot of rendering issues and it doesn t fully support all the latest HTML and CSS properties If your rendering capabilities for you are enough to use satori I would advise going with it But if you want to make sure that everything works like a charm and supports the latest HTML features I would advice using an established API to render images Using simple and tailored solution for Open Graph imagesIn case you want to save time and money and don t want to deal with HTML rendering engines and headless browsers You can use a well established screenshot API to generate OG imagesーScreenshotOne Let s examine how easier it is use an API rather Puppeteer or rendering engine like satori First sign up at ScreenshotOne to get an API key Then install an official SDK for JavaScript but it is available for many languages npm i screenshotone api sdkLet s render an image import as screenshotone from screenshotone api sdk create API client const client new screenshotone Client MPaLOClchKQ VjuscNqAfGCCA const template prefix title subtitle gt lt doctype html gt lt html gt lt head gt lt meta charset UTF gt lt meta name viewport content width device width initial scale gt lt script src gt lt script gt lt head gt lt body class bg violet h screen flex gt lt div class m auto gt lt h class text white text xl font serif gt lt span class underline decoration sky gt prefix lt span gt title lt h gt lt h class text white text xl mt font light gt subtitle lt h gt lt div gt lt body gt lt html gt const generateOGImageURL prefix title subtitle gt client generateTakeURL screenshotone TakeOptions html template prefix title subtitle const url generateOGImageURL Open Graph images Are easy and powerful way to increase your brand awareness console log url expected output html E The result is I hide the chat widgets to make a clean screenshot If needed you can also block ads and block cookie banners Let s update the meta tags lt Open Graph Meta Facebook gt lt other Open Graph tags gt lt Use your template engine to render the URL You don t need API routes browsers engines or additional libraries gt lt meta property og image content generateOGImageURL Open Graph images Are easy and powerful way to increase your brand awareness gt lt Twitter gt lt other Twitter Graph tags gt lt Use your template engine to render the URL You don t need API routes browsers engines or additional libraries gt lt meta property twitter image content generateOGImageURL Open Graph images Are easy and powerful way to increase your brand awareness gt You don t need hosting API routes handling memory issues and care about bugs Most of the problems are already covered You can also dynamically generate an OG image based on the site s screenshot or selector You can block cookie banners ads and chats to make the screenshot look clean It is a headache less API Sign up It is free to start Test Open Graph imagesOnce you finish your solution test it and it works fine Test and validate your open graph images with official debuggers Use a debugger from Meta Facebook Try a social card validator from Twitter Test with a LinkedIn Post Inspector Use a Pinterest URL debugger For Telegram WhatsApp or iMessage send the link to your friend Known issuesI encountered many issues while rendering and working with OG images And I want to share them with you Open Graph image requirementsThe recommended image size is xpx for most social networks and the file size must not exceed a few hundred kilobytes Refresh cache for OG image in TelegramIn order to refresh the cache if the image has been changed go to webpagebot and send the URL is maximum you want to clear the cache for Telegram servers automatically will scan your site and generate a new Open Graph image preview site name and description Remember to have the OG prefix in your HTML tag as lt html prefix og gt or the Telegram bot will not update the graph cache Always use an absolute URLIt might be a simple task for you but many apps don t crawl an OG image path right if it is specified as relative Always specify an absolute URL including the host and protocol to the image lt Not this gt lt meta property og image content image png gt lt meta property twitter image content image png gt lt But this gt lt meta property og image content gt lt meta property twitter image content gt A few tips on the social card designI prepared a few tips that you might find helpful to increase the click rate for the link to your site on social media networks They are not proven to be always working it is not a science and you need to test it Place a button on the imageMany reported that placing a button on the OG image increased click through rate Nothing is guaranteed You may want to test it Increase the font sizeUnless it is an intention or design effect to attract attention don t use small fonts and make the font size as large as possible Test if you can read the text on the resulting image Brand colors and fontsObvious but many forget to reuse their brand colors and fonts Social cards aim to increase your brand awareness and if possible to invite users for a click Adapt to social networks if possibleAlways test how it looks in social networks white and back styles And you might try to adapt to Twitter because twitter has a special meta tag You can try to play with Twitter colors and button styles to make it feels native A closing thoughtIn case you like building I advise you to use Puppeteer or satori from Vercel especially if you use Next js But if you want a quick and hassle free solution feel free to use ScreenshotOne API which is ready to render any kind of HTML for your needs I hope you enjoyed our journey to link previews and how to generate them Have a nice day 2022-12-04 12:07:47
Apple AppleInsider - Frontpage News Daily deals Dec. 4: $749 M2 11-inch iPad Pro, $600 off Sennheiser HD800S, Up to 50% off Garmin Smartwatches, more https://appleinsider.com/articles/22/12/04/daily-deals-dec-4-749-m2-11-inch-ipad-pro-600-off-sennheiser-hd800s-up-to-50-off-garmin-smartwatches-more?utm_medium=rss Daily deals Dec M inch iPad Pro off Sennheiser HDS Up to off Garmin Smartwatches moreSunday s best deals include off a inch MacBook Pro a Klipsch channel soundbar system for Refurbished Shark Robot Vacuum and much more Best deals for December Every day AppleInsider checks online stores daily to uncover discounts and offers on hardware and other products including Apple devices smart TVs accessories and other items The best offers are compiled into our regular list for our readers to use and save money Read more 2022-12-04 12:49:48
ニュース @日本経済新聞 電子版 Tinder・Bumble…アプリで恋人探し、3年で市場規模2倍 https://t.co/fw2N4BoHzs https://twitter.com/nikkei/statuses/1599388102820257792 bumble 2022-12-04 13:00:13
ニュース @日本経済新聞 電子版 屋外変色レンズ アウトドア好きに人気 https://t.co/xPMgxX1j19 https://twitter.com/nikkei/statuses/1599384939916857344 屋外 2022-12-04 12:47:39
ニュース @日本経済新聞 電子版 OPECプラス、減産維持を決定 G7の対ロ制裁見極め https://t.co/rJ2zfvYnkb https://twitter.com/nikkei/statuses/1599381412381347844 維持 2022-12-04 12:33:38
ニュース @日本経済新聞 電子版 権田修一、前田大然がクロアチア戦へ闘志 サッカーW杯 https://t.co/s1p5bYkjLB https://twitter.com/nikkei/statuses/1599380683431899136 権田修一 2022-12-04 12:30:44
ニュース @日本経済新聞 電子版 都心10億円マンション、現金一括で 海外の個人投資拡大 【この1週間で読まれた記事】 https://t.co/xDVkKR2Z8E https://twitter.com/nikkei/statuses/1599380536811724800 都心 2022-12-04 12:30:09
ニュース @日本経済新聞 電子版 北京・上海、コロナ対策を一部緩和 地下鉄利用で https://t.co/QCqWLOEpRz https://twitter.com/nikkei/statuses/1599377142911238144 緩和 2022-12-04 12:16:40
ニュース BBC News - Home Strikes unfair at Christmas, Tory chairman Nadhim Zahawi says https://www.bbc.co.uk/news/uk-politics-63851251?at_medium=RSS&at_campaign=KARANGA outlines 2022-12-04 12:02:08
ニュース BBC News - Home Mount Semeru: Indonesia raises alert to highest level as volcano erupts on Java island https://www.bbc.co.uk/news/world-asia-63850653?at_medium=RSS&at_campaign=KARANGA avalanches 2022-12-04 12:26:02

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

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

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