投稿時間:2023-08-17 12:12:42 RSSフィード2023-08-17 12:00 分まとめ(15件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia Mobile] 「HONOR 90 Pro」はミッドハイとは思えない仕上げ? カメラとデザインに注目 https://www.itmedia.co.jp/mobile/articles/2308/17/news093.html honor 2023-08-17 11:36:00
IT ITmedia 総合記事一覧 [ITmedia News] 暑すぎるのでクーラー搭載リュックを試してみた 酷暑の外出、快適になるか https://www.itmedia.co.jp/news/articles/2308/01/news175.html itmedia 2023-08-17 11:04:00
Ruby Rubyタグが付けられた新着投稿 - Qiita Google Place APIを使用して情報を取得(Rails) https://qiita.com/cheetah_02/items/d7c62be909ac4edca5d2 googleplaceapi 2023-08-17 11:21:14
golang Goタグが付けられた新着投稿 - Qiita Go言語向けNCMB SDKの使い方(プッシュ通知のCRUD操作) https://qiita.com/goofmint/items/083b4698aab8ba740ee6 ncmbsdk 2023-08-17 11:06:28
Ruby Railsタグが付けられた新着投稿 - Qiita Google Place APIを使用して情報を取得(Rails) https://qiita.com/cheetah_02/items/d7c62be909ac4edca5d2 googleplaceapi 2023-08-17 11:21:14
技術ブログ Developers.IO GuardDutyが大阪リージョンで5つのS3の検知タイプが追加されたのでリージョン毎の差分を確認してみた https://dev.classmethod.jp/articles/guardduty-region-specific/ amazonguardduty 2023-08-17 02:46:58
技術ブログ Developers.IO 【Security Hub修復手順】[Redshift.10] Redshift クラスターは保存時に暗号化する必要があります https://dev.classmethod.jp/articles/securityhub-fsbp-remediation-redshift-10/ awssecurityhub 2023-08-17 02:46:12
海外TECH DEV Community Generating Optimized Image Formats with Node.js https://dev.to/brainiacneit/generating-optimized-image-formats-with-nodejs-hj3 Generating Optimized Image Formats with Node js IntroductionImages are an important part of any web application but they can also be a major source of performance issues if not optimized properly In this article we ll cover how to use Node js and React to automatically generate optimized image formats and display them in the best format for the user s browser Setting upFirst we need a library that handle image processing for us and sharp is what I chosenpm i sharpSharp is a high performance Node js library for image processing and manipulation It is designed to be fast and memory efficient making it ideal for processing large images and generating multiple image formats Generation ScriptThe first step in optimizing images for the web is to generate multiple formats of each image each with its own advantages and disadvantages Some formats such as JPEG are good for complex images with many colors while others such as WebP are better for simpler images with fewer colors To generate different image formats we can use Node js and the Sharp image processing library Here s an example script that generates avif and webp formats for each image in the images folder const sharp require sharp const fs require fs const inputFolder images const outputFolder output const formats avif webp if fs existsSync outputFolder fs mkdirSync outputFolder fs readdir inputFolder err files gt if err console error err return files forEach file gt if file endsWith jpg file endsWith jpeg file endsWith png const inputPath inputFolder file const name file substring file lastIndexOf formats forEach format gt const outputPath outputFolder name format if fs existsSync outputPath sharp inputPath toFormat format quality toFile outputPath err gt if err console error err else console log name format saved Explanation const sharp require sharp const fs require fs const inputFolder images const outputFolder output const formats avif webp In these lines the script imports the sharp and fs libraries sets the input folder to images the output folder to output and defines the formats to be generated as avif and webp if fs existsSync outputFolder fs mkdirSync outputFolder Here the script checks if the outputFolder exists and if it doesn t creates it using fs mkdirSync This ensures that the output folder exists before generating any images fs readdir inputFolder err files gt if err console error err return This code reads the contents of the inputFolder using fs readdir If there is an error it logs the error to the console and returns files forEach file gt if file endsWith jpg file endsWith jpeg file endsWith png This code loops through each file in the inputFolder using files forEach If the file name ends with jpg jpeg or png it proceeds to generate the corresponding avif and webp files const inputPath inputFolder file const name file substring file lastIndexOf Here the script defines the input file path as inputPath and extracts the file name without the extension to be used as the output file name formats forEach format gt const outputPath outputFolder name format if fs existsSync outputPath sharp inputPath toFormat format quality toFile outputPath err gt if err console error err else console log name format saved Here the script loops through each format i e avif and webp using formats forEach For each format it defines the output file path as outputPath If the output file does not already exist it uses Sharp s toFormat function to generate the corresponding image in the specified format with a quality of It then saves the output file using toFile and logs a message to the console indicating that the file has been saved Display Optimized Images in ReactOnce we have generated multiple optimized image formats for each input image we can display them in our React application To do this we can use the HTML lt picture gt and lt source gt elements to specify the different image sources for different formats Here s an example React component that takes an image name as a prop and displays the image in the best format for the user s browser import React from react const Image name gt const avifSrc images name avif const webpSrc images name webp const jpgSrc images name jpg return lt picture gt lt source srcSet avifSrc type image avif gt lt source srcSet webpSrc type image webp gt lt img src jpgSrc alt name gt lt picture gt export default Image This code defines three different image source URLs based on the name prop passed in avifSrc corresponds to the avif format of the image webpSrc corresponds to the webp format of the image jpgSrc corresponds to the standard jpg format of the image which will be used as a fallback for browsers that do not support avif or webp return lt picture gt lt source srcSet avifSrc type image avif gt lt source srcSet webpSrc type image webp gt lt img src jpgSrc alt name gt lt picture gt Here the script returns a lt picture gt element that displays the image in the best format for the user s browser based on the available formats Inside the lt picture gt element there are two lt source gt elements one for avif and one for webp These elements specify the different image sources for different formats using the srcSet attribute and the type attribute to indicate the MIME type of each format Finally there is a fallback lt img gt element that displays the image in the standard jpg format for browsers that do not support avif or webp This element uses the src attribute to specify the image source and the alt attribute to provide alternate text for the image ConclusionImages on websites can be slow to load and don t always look good on different devices It s important to make them load faster and look better so people can enjoy your website more We learned how to use special tools like Sharp and HTML s lt picture gt and lt source gt to make different versions of the same image and show the best one for each device By doing this our website will be faster and look better for everyone who uses it 2023-08-17 02:24:19
金融 ニュース - 保険市場TIMES チューリッヒ、京都銀行の口座保有者へダイレクトメールで傷害保険の案内を開始 https://www.hokende.com/news/blog/entry/2023/08/17/120000 チューリッヒ、京都銀行の口座保有者へダイレクトメールで傷害保険の案内を開始幅広い顧客との接点拡大にチューリッヒ保険会社以下、チューリッヒは年月日、京都銀行と提携し、口座保有者へダイレクトメールによる傷害保険の案内を開始したことを発表した。 2023-08-17 12:00:00
ニュース BBC News - Home More than 60 migrants feared dead at sea off Cape Verde coast https://www.bbc.co.uk/news/world-africa-66528273?at_medium=RSS&at_campaign=KARANGA senegal 2023-08-17 02:24:36
ビジネス 東洋経済オンライン 栗山氏「二刀流正しかったか"わからない"」の本音 侍ジャパンの監督を終えた今、考える「今後の展望」 | リーダーシップ・教養・資格・スキル | 東洋経済オンライン https://toyokeizai.net/articles/-/693247?utm_source=rss&utm_medium=http&utm_campaign=link_back 侍ジャパン 2023-08-17 11:30:00
マーケティング MarkeZine 最先端のトレンドと事例に学ぶ!顧客に愛されるブランデッドコンテンツの築き方【視聴無料】 http://markezine.jp/article/detail/43096 顧客 2023-08-17 11:15:00
マーケティング AdverTimes 次の100年に向けて、八海山が原研哉氏デザインによるコーポレートロゴを制定 https://www.advertimes.com/20230817/article430700/ 八海醸造 2023-08-17 02:41:16
海外TECH reddit [Post Game Thread] Light That Baby Up! Angels defeat Rangers! https://www.reddit.com/r/angelsbaseball/comments/15taa7y/post_game_thread_light_that_baby_up_angels_defeat/ Post Game Thread Light That Baby Up Angels defeat Rangers Angels Rangers First Pitch PM at Globe Life Field Team Starter TV Radio Angels Reid Detmers ERA BSW KLAA Rangers Jon Gray ERA BSSW KFLC ES Game Preview r angelsbaseball Discord Reddit Stream for this post Line Score Game Over R H E LOB LAA TEX Box Score TEX AB R H RBI BB SO BA B Semien SS Seager RF García Ad B Lowe N C Garver PR Smith J B Duran E PH Martínez DH Grossman PH Heim LF Jankowski CF Taveras TEX IP H R ER BB SO P S ERA Gray Jn Chapman Sborz LAA AB R H RBI BB SO BA CF Moniak DH Ohtani B Drury B Moustakas SS Rengifo C Thaiss RF Renfroe B Escobar Edu LF Grichuk LAA IP H R ER BB SO P S ERA Detmers López R Estévez Scoring Plays Inning Event Score T Shohei Ohtani homers on a fly ball to center field T Matt Thaiss homers on a fly ball to center field Highlights Description Length Video Bullpen availability for Texas August vs Angels Video Bullpen availability for Los Angeles August vs Rangers Video Fielding alignment for Los Angeles August vs Rangers Video Fielding alignment for Texas August vs Angels Video Starting lineups for Angels at Rangers August Video The distance behind Shohei Ohtani s home run Video A deep dive into Shohei Ohtani s home run Video Breaking down Jon Gray s pitches Video Jon Gray s outing against the Angels Video Breaking down Reid Detmers s pitches Video Reid Detmers outing against the Rangers Video Matt Thaiss Home Run Statcast Analysis Video Shohei Ohtani cracks a solo homer to center field Video Mickey Moniak makes a great sliding catch in center Video Shohei Ohtani s nd home run Creator Cuts Video Reid Detmers finishes seven hitless innings Video Marcus Semien breaks up the no hitter in the th Video Matt Thaiss cranks a solo home run Video Mickey Moniak atrapa la pelota deslizándose Video Decisions Winning Pitcher Losing Pitcher Save Detmers ERA Gray Jn ERA Estévez SV ERA Game ended at PM submitted by u angelsbaseball to r angelsbaseball link comments 2023-08-17 02:35:30
海外TECH reddit Neuvillette Burst slow-mo via Mero https://www.reddit.com/r/Genshin_Impact_Leaks/comments/15t9soz/neuvillette_burst_slowmo_via_mero/ Neuvillette Burst slow mo via Mero submitted by u box of sourballs to r Genshin Impact Leaks link comments 2023-08-17 02:14:24

コメント

このブログの人気の投稿

投稿時間: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件)