IT |
ITmedia 総合記事一覧 |
[ITmedia News] ポケモンGOに「メガラティアス/ラティオス」初登場 難易度アップ 不具合も発生 |
https://www.itmedia.co.jp/news/articles/2205/04/news045.html
|
itmedia |
2022-05-04 17:07:00 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
TweepyとTwitter API V2を利用して100件以上のツイートを一度に取る方法 |
https://qiita.com/daisuke-aoki/items/30e3d6e84637326ef1da
|
tweepy |
2022-05-04 17:26:35 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
レコメンドシステム:アイテムベース協調フィルタリング |
https://qiita.com/tan0ry0shiny/items/b1916f4e31566753c278
|
edfashionrecommendations |
2022-05-04 17:10:55 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
Laravel sail の文字化け問題を解消する |
https://qiita.com/Junio616/items/bf8ddea7bdd99a5124b9
|
docker |
2022-05-04 17:38:54 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
Rails API + React による開発ではまった点 |
https://qiita.com/tono029/items/f4c98d8eb0d666044f91
|
firebase |
2022-05-04 17:46:50 |
海外TECH |
DEV Community |
This Week In React #104: Zag, Next.js, Remix, Ultra, ClickToComponent, Tilg, Component Party, Expo, Skia, TypeScript... |
https://dev.to/sebastienlorber/this-week-in-react-104-zag-nextjs-remix-ultra-clicktocomponent-tilg-component-party-expo-skia-typescript-5g8i
|
This Week In React Zag Next js Remix Ultra ClickToComponent Tilg Component Party Expo Skia TypeScript Hi everyone Lots of links this week The newsletter is late due to Twitter technical issues on the Twitter thread Hopefully I was able to publish it now I d really appreciate a retweet the issues didn t help giving it a good start Great news for Next js a router upgrade has just been announced React Native is also in the spotlight this week with in RC Expo SDK and React Native Skia ️There will be no edition for the next weeks Next one will be May th Support the newsletter Recommend it to your friends it really helps Sponsor This Week In React Write testimonials on Twitter Retweet the latest Twitter thread Reply to this email feedback is welcome Follow on LinkedInIf you like this newsletter subscribe in priority there ThisWeekInReact com ReactHebdo fr ReactClick To ComponentNew very practical lib which allows to easily open the source file of a React component with a simple Option Click on the interface Supports CRA Next js Vite Only works with VS Code but other IDEs could be supported like Intellij ZagZag is a collection of primitive components based on state machines This makes it possible to decouple the logic from the framework and to offer a binding for React Vue Solid This new solution will allow the React Chakra UI lib to be adapted more easily to other frameworks while sharing a lot more behavior code Why I don t miss React a story about using the platformJack has worked at Google on Chrome DevTools for years Since then he no longer uses React and shares his feedback on his transition to standardized web APIs that do not require dependencies forms custom elements Moving from Next to RemixKristofer migrated his personal site from Next js to Remix for fun He gives his feedback and shares the impact on the Lighthouse score He lists the main changes he had to make Chakra integration Link component routing data fetching metadata How HashiCorp developers iterate faster with ISRFeedback on the use of Incremental Static Regeneration from Next js to reduce build times for documentation sites at HashiCorp The new on demand ISR mode makes it possible to invalidate the Next js cache and therefore to give immediate feedback when an update is published Extras Next js Router Upgrade Next js is going to get nested routes and a new design to work with Server Components and React features The D design too Spline can now export to React Three Fiber this can enable you to make your scenes interactive and add physics Component Party site to easily compare the syntax of React with other frameworks Vue Svelte Solid on different use cases Convex new serverless real time database with a React binding They just raised m and integrates well with Netlify or Vercel The Story of Concurrent React minutes on the story bind Concurrent React from to today Great research work Ultra the modern React meta framework for Deno just annonced its v React mostly bugfixes useTilg convenient React hook for debugging zustand v rc Gatsby Using useReducer to manage one way boolean state Building a Terminal Wordle Game with React Ink Managing React Monorepos with Nx React NativeExpo SDK beta is now availableThe new SDK Expo goes into beta for a week Some cool new stuff React Native Expo upgrades to the latest version but without enabling the Fabric renderer yet redesign of Expo Go with better integration of EAS Update and the ability to see open branches several libs migrated to JSI and or Expo Sweet Module API a brand new expo CLI beta that will be versioned and installed locally rather than globally Expo wrapper libs are deprecated original native libs can be used via config pluginsReact Native Skia For Us For You and For FunSkia is Google s D engine and you most certainly use it Chrome Flutter Android Shopify supports the development of React Native Skia to provide graphics D primitives missing from React Native and not be limited when implementing a complex design The lib offers an expressive declarative API but also an imperative low level Flutter compatible API which could help with web support via React Native Web and CanvasKit Extras React Native rc first version based on React with the possibility of using concurrent features if you enable the new architecture React Native Graph new graph library with animations based on React Native Skia Charts with React Native Skia latest video from William Candillon related to the lib above React Native WishList preview Marc Rousavy is working on a new powerful virtualized list lib which should fix the perf shortcomings of the existing ones RN live Jamon Holmgren s livestream channel ️ RNR React and the Future of React Native Using RevenueCat with Expo s Managed Workflow shows how easy it is to integrate a native lib into Expo Twitter going all in on Jetpack Compose It still fascinates me so much to know that Twitter uses React Native on the web but not React Native on mobile Apple Gets Ready to Eliminate Almost of Apps in the App Store take care your old app could be unpublished What is the performance of your users device A performant way to use PouchDB on React Native in OtherTypeScript Error TranslatorNew work in progress tool that translates your TypeScript errors into human language easy to understand with additional explanations source It can even integrate with your IDE VS Code extension Keeping TypeScript Type Guards safe and up to dateBrings up a problem that I never if you have a type guard based on an object attribute and you add a nd attribute your type guard becomes stale but TypeScript still compiles Extras Web Scraping via Javascript Runtime Heap Snapshots original scraping technique which consists of extracting JS objects directly in memory Node experimental fetch support backported Lerna is now an officially dead project The project is officially unmaintained but there are alternatives like Nx and Turborepo Nx freshly released Zaplib post mortem feedback that demonstrates once again that Rust and Wasm is not always faster than JavaScript WebAssembly vs Javascript don t use WebAssembly primarily for performance Detecting UI components with TypeScript Compiler API Misusing TypeScript Assertion Functions for Fun and Profit SemVer for TS in Practice Narrowing Types in TypeScript google wireit upgrades your npm scripts to make them smarter and more efficient Four Eras of JavaScript Frameworks |
2022-05-04 08:21:49 |
海外TECH |
DEV Community |
Learn How to Use Lambda Layers by Building an Image Resize Function Using Sharp |
https://dev.to/webiny/learn-how-to-use-lambda-layers-by-building-an-image-resize-function-using-sharp-bj4
|
Learn How to Use Lambda Layers by Building an Image Resize Function Using SharpLambda Layer is a true gem in the Lambda function realm It provides a convenient way to package your libraries and other dependencies that can be used with the Lambda functions Our open source project Webiny which has k downloads and k stars on GitHub uses Lambda layers It helps us reduce our Lambda function size by MB and enable us to share the image processing library sharp across all the Webiny deployments By the time you finish reading this article you will know how to create and use Lambda layers As an example we will create a sharp library Layer and use it in a Lambda function to create thumbnail images In this tutorial we will create a Lambda function that will create a thumbnail image using the sharp library This library will be packaged into the Lambda function using a Lambda Layer The workflow will be like this for each image file uploaded to an S bucket source bucket the lambda function will be invoked It will read the image object from the source S bucket create a thumbnail image and save it to the target S bucket PrerequisitesAWS account To use various AWS services you will need an AWS account Please follow this link to create an AWS account AWS command line We will use the AWS command line for creating Lambda Function and Lambda Layer The AWS CLI installation guide is available here Step Create two S bucketsLet s start by creating two buckets the source and the target As mentioned earlier for each image file uploaded to a source bucket the Lambda function will create a corresponding thumbnail image and save it in the target S bucket Please follow these steps to create S buckets Open the Amazon S console Create two S buckets source and target The target bucket name should be source bucket name plus suffixed by resized For example if the source bucket is named mybucket then the target bucket should be named as mybucket resized Please follow this naming convention because we will be using this naming logic in the Lambda function Step Create the IAM policyNow let s create an IAM policy that specifies the permissions for the Lambda function The Lambda function must have permission for the following operations Get the object from the source S bucket Put the resized object into the target S bucket Write logs to Amazon CloudWatch Logs To create an IAM policy Open the Policies page in the IAM console Choose Create policy Choose the JSON tab and then paste the following policy Be sure to replace mybucket with the name of the source bucket that you created previously Version Statement Effect Allow Action logs PutLogEvents logs CreateLogGroup logs CreateLogStream Resource arn aws logs Effect Allow Action s GetObject Resource arn aws s mybucket Effect Allow Action s PutObject Resource arn aws s mybucket resized Choose Next Tags Choose Next Review Under Review policy for Name enter AWSLambdaSPolicy Choose Create policy Step Create the execution roleCreate the execution role that gives your Lambda function permissions to access AWS resources To create an execution role Open the Roles page in the IAM console Choose Create role Create a role with the following properties Trusted entity type AWS Service Allow AWS services like EC Lambda or others to perform actions in this account Use case Lambda Allows Lambda functions to call AWS services on your behalf Permissions policy AWSLambdaSPolicy Role name lambda s role Step Create a sharp Lambda LayerHere comes the special part of this tutorial We will create the sharp Lambda Layer in this section You will perform this part of the tutorial on your machine Please ensure you have npm installed we will need the npm to install the sharp package Create a directory with the name nodejs Install the sharp dependency in the nodejs directory by running the following commands npm installSHARP IGNORE GLOBAL LIBVIPS npm install arch x platform linux sharpAfter this step you will get the following directory structure nodejs node modules package lock json Create a zip file archive of the nodejs directory zip r nodejs zip nodejs Now let s publish the Layer Run the following command to create and publish the Layer aws lambda publish layer version layer name sharp description Sharp dependency for image transformation zip file fileb nodejs zip compatible runtimes nodejs x region us east output json After successful execution of the command above you will see an output similar to this one Please note the LayerVersionArn we will use it while creating the Lambda function Content Location X Amz Security Token IQoJbJpZluXVjEJz F F F F F F F F F FwEaCXVzLWVhcQtMSJHMEUCIQDulMXWxGcydyDHbmtJktnqLLxfRbCYqPtAwiwAIgAtKpyhdECsIamSGNPjknfqBKjAiOmBxOquUq BgMIRBAAGgwNDkNzgMDIMzkiDOjvGzyeEXkicvNUirXAYvAlIvZPEWdpgIYpYClISReLpaFfqBCIguHOz BctOGPMwScVjUVBUBEqTiGXYTbBGkjCzTvgDENfXdMqQYWXCdzDpqOIcZqVTQPIFdjoJZUTfuBkIynFNLIiXYWvBqxpJoFUlrmOcU FtuXhSmiWExyQus F BTqAnJaJXgKOKPyINyOOBDZsonHjiZwDjtjkIgvwMjWVLbGnc BGbLKsHHWaUnRaNEYSdhWejPpzQEUlcOKpAkLIkAgTMPCsljZMujUgWxozAthhWebjXoEOHUFxjscKhpMHDfJhaOCOsmymejpqc FENjTWGjIGxlfUnxBDpNBjkPguXFyghOHFlhRbpRomoWXOriNjnbxSZqyQsqDFwbruaoKtOcJJrzDnUGmhKAlWPMkwEwDyxXSB BGYlYQb F BXScqvqsieBtIpNKOfAlBVuoNgiBFXsPePaGeJPZMJCOQtmnXdvclUcENcxPfwl BVWe BzME FIIBSclgTuyNSNcqrSxVxbVVZMZfFrmMpXpUFDchXDGTvtOPx BthjDLvtWSBjqlATnNWnlBoAfJJECZqVOgRZUEvDCpLchTmHT FLoBvqYUUqospRVTpGKtfBBEuNGgg FDkjlqpmlxwt BENpVpQOczzjCDCjMgEjnsVGNzCoPeYiEExqLBMEOMcmsSSVjNeVNRhTFrFch FCteFFIlr FTHWpbpJCaOOuJ FMZIpXywCtOXxbO BkGkHHDarzMw D D amp X Amz Algorithm AWS HMAC SHA amp X Amz Date TZ amp X Amz SignedHeaders host amp X Amz Expires amp X Amz Credential ASIADCYHYSVTGYGI F Fus east Fs Faws request amp X Amz Signature dcfecfeafafdaeacbafaeb CodeSha fIchJrdtftKIlcSZzZRbfhOxVYCdUxhs CodeSize LayerArn arn aws lambda us east layer sharp LayerVersionArn arn aws lambda us east layer sharp Description Sharp dependency for image transformation CreatedDate T Version CompatibleRuntimes nodejs x Step Create Lambda functionNow let s create a Lambda function that will use the sharp Lambda Layer As discussed earlier this Lambda function will be invoked when an object is created in the source bucket Then it will create the respective thumbnail image and store it in the target bucket The code example below assumes that you are following the S bucket name convention that is mentioned in Step Step Create the function codeCopy the following code example into a file named index js dependenciesconst AWS require aws sdk const util require util const sharp require sharp get reference to S clientconst s new AWS S exports handler async event context callback gt Read options from the event parameter console log Reading options from event n util inspect event depth const srcBucket event Records s bucket name Object key may have spaces or unicode non ASCII characters const srcKey decodeURIComponent event Records s object key replace g const dstBucket srcBucket resized const dstKey resized srcKey Infer the image type from the file suffix const typeMatch srcKey match if typeMatch console log Could not determine the image type return Check that the image type is supported const imageType typeMatch toLowerCase if imageType jpg amp amp imageType png console log Unsupported image type imageType return Download the image from the S source bucket try const params Bucket srcBucket Key srcKey var origimage await s getObject params promise catch error console log error return set thumbnail width Resize will set the height automatically to maintain aspect ratio const width Use the sharp module to resize the image and save in a buffer try var buffer await sharp origimage Body resize width toBuffer catch error console log error return Upload the thumbnail image to the destination bucket try const destparams Bucket dstBucket Key dstKey Body buffer ContentType image const putResult await s putObject destparams promise catch error console log error return console log Successfully resized srcBucket srcKey and uploaded to dstBucket dstKey Step Create the deployment packageThe deployment package is a zip file archive containing your Lambda function code and its dependencies Open a command line terminal or shell in a Linux environment Save the function code as index js in a directory named lambda s After this step you have the following directory structure lambda s index js Create a deployment package with the function code and its dependencies Set the r recursive option for the zip command to compress the subfolders Run this command from the lambda s directory zip r function zip Step Create a Lambda functionWe will use the AWS CLI command aws lambda create function to create the Lambda function Please replace the role parameter with your AWS account ID and layers ARN with the one we got in Step LayerVersionArn aws lambda create function function name CreateThumbnail zip file fileb function zip handler index handler runtime nodejs x timeout memory size role arn aws iam role lambda s role region us east layers arn aws lambda us east layer sharp With the successful execution of the above command you will see an output similar to this FunctionName CreateThumbnail FunctionArn arn aws lambda us east function CreateThumbnail Runtime nodejs x Role arn aws iam role lambda s role Handler index handler CodeSize Description Timeout MemorySize LastModified T CodeSha yQVpF WNwHZp sbpbYlQEeAdkBuSfpaJVSc Version LATEST TracingConfig Mode PassThrough RevisionId dccab adf bb e Layers Arn arn aws lambda us east layer sharp CodeSize State Pending StateReason The function is being created StateReasonCode Creating PackageType Zip Architectures x EphemeralStorage Size Step Configure Amazon S TriggerSo far we have created all the building blocks Now let s add the final piece where we will configure the Amazon S Trigger to invoke the Lambda function When a file is uploaded to S it should trigger the Lambda function that will resize create a thumbnail and upload it to the target S bucket To create an Amazon S Trigger Open the Lambda page in the AWS console Open the CreateThumbnail function Choose Add trigger under the Function overview section Create a trigger with the following properties Select a trigger S Bucket mybucket your source bucket name Event type PUT Step All set let s test it Nice we are all set with our Lambda function which uses the sharp Layer and creates thumbnail images Please upload an image jpg or png to the source S bucket Once the upload is complete you should be able to see the thumbnail version of the image in the target S bucket Lambda Layer is a very efficient and convenient way to package libraries and other dependencies that you can use with your Lambda functions It offers great benefits in reducing the deployment archives size and faster deployment layers enable code sharing and separation of responsibilities to create maintainable Lambda functions In case you want to explore and learn more about best coding practices and code examples related to Lambda you can check out the Webiny code repository Webiny is an open source enterprise grade serverless CMS If you have any questions related to this tutorial or have any feedback please feel free to ping us on the Community Slack CreditsAs this tutorial aims to explain and demonstrate the use of Lambda Layer we didn t reinvent the wheel and write a new Lambda function to create thumbnail images The Lambda function code used in this article to create thumbnail images is taken from this official AWS Lambda tutorial Huge thanks to the authors of this great tutorial on the Lambda function |
2022-05-04 08:18:45 |
海外TECH |
Engadget |
AMD teases new 'Dragon Range' CPUs for high-end gaming laptops |
https://www.engadget.com/amd-targets-gaming-laptops-with-the-upcoming-ryzen-7000-dragon-range-cp-us-084400093.html?src=rss
|
AMD teases new x Dragon Range x CPUs for high end gaming laptopsWith the release of its Q financial results AMD also revealed plans for its upcoming Ryzen Zen series laptop CPUs as seen in a slide tweeted by former Anandtech editor Dr Ian Cutress It s planning to target quot extreme gaming laptops quot with the new quot Dragon Range quot series promising the quot highest core thread and cache ever for a mobile gaming CPU quot It also unveiled the Phoenix series for thin and light gaming laptops Well there we go AMD Dragon Range replaces the HX market DDR Phoenix in the more traditional H market LPDDR only Process node not mentioned Graphics not mentioned AMDpic twitter com BCYQSMezー𝐷𝑟 𝐼𝑎𝑛𝐶𝑢𝑡𝑟𝑒𝑠𝑠 IanCutress May The Dragon Range features a gt watt TDP and is designed for laptops thicker than mm that are largely designed to be used while plugged in The Verge reported They ll feature a PCIe architecture and DDR RAM though some models could work with more efficient but lower performing LPDDR AMD told Cutress nbsp As with the Ryzen HS chip the Dragon Range will use the quot HS quot suffix Despite the relatively high watt TDP they ll be quot notably more power efficient than other laptops in that competing timeframe quot according to AMD s technical marketing director Robert Hallock nbsp Along with the Dragon Range AMD will launch the Ryzen Zen quot Phoenix quot series APUs designed for thin and light laptops under mm thick with watt TDPs Those will also use a PCIe architecture but come primarily with LPDDR RAM As with the Dragon Range some models could employ DDR memory too Ryzen will launch first on desktop later this year with the the Raphael series replacing the Ryzen lineup Those will be the first Zen AM platform chips using TSMC s nanometer process node to come to the mainstream market AMD didn t reveal other details about the Dragon Range and Phoenix laptop chips but they re expected to launch sometime in nbsp On the earnings side AMD beat market expectations with revenue at billion a percent boost in sales year over year It also said that starting next quarter it will break out gaming into a separate financial segment showing sales of chips for consoles PS Xbox Series X etc plus Radeon graphics for PCs as part of a single gaming business separate from Ryzen chips The company will explain all that in more detail next month nbsp |
2022-05-04 08:44:00 |
ラズパイ |
Raspberry Pi |
299 experiments from young people run on the ISS in Astro Pi Mission Space Lab 2021/22 |
https://www.raspberrypi.org/blog/299-experiments-young-people-iss-astro-pi-mission-space-lab-2021-22/
|
experiments from young people run on the ISS in Astro Pi Mission Space Lab We and our partners at ESA Education are excited to announce that teams have achieved flight status in Mission Space Lab of the European Astro Pi Challenge This means that these young people s programs are the first ever to run on the two upgraded Astro Pi units on board the International Space Station The post experiments from young people run on the ISS in Astro Pi Mission Space Lab appeared first on Raspberry Pi |
2022-05-04 08:38:33 |
海外ニュース |
Japan Times latest articles |
EU plans to ban Russian oil by the end of the year due to Ukraine invasion |
https://www.japantimes.co.jp/news/2022/05/04/world/eu-russia-oil-ban-proposal/
|
EU plans to ban Russian oil by the end of the year due to Ukraine invasionThe EU is also proposing to cut off Sberbank and other lenders from the SWIFT international payment system European Commission President Ursula von der Leyen |
2022-05-04 17:35:26 |
ニュース |
BBC News - Home |
Dave Chappelle: US comedian attacked on stage in Los Angeles |
https://www.bbc.co.uk/news/entertainment-arts-61317901?at_medium=RSS&at_campaign=KARANGA
|
hollywood |
2022-05-04 08:44:39 |
ニュース |
BBC News - Home |
Crossrail: Elizabeth line due to open on 24 May |
https://www.bbc.co.uk/news/uk-england-london-61095510?at_medium=RSS&at_campaign=KARANGA
|
budget |
2022-05-04 08:55:08 |
ニュース |
BBC News - Home |
Sir Keir Starmer: Police have not been in touch over Durham Covid beer |
https://www.bbc.co.uk/news/uk-politics-61318257?at_medium=RSS&at_campaign=KARANGA
|
durham |
2022-05-04 08:52:38 |
ニュース |
BBC News - Home |
Maradona shirt: Why the 1986 World Cup kit is so special |
https://www.bbc.co.uk/news/world-61318287?at_medium=RSS&at_campaign=KARANGA
|
diego |
2022-05-04 08:08:01 |
ニュース |
BBC News - Home |
Who should I vote for in Northern Ireland? |
https://www.bbc.co.uk/news/uk-northern-ireland-61100316?at_medium=RSS&at_campaign=KARANGA
|
issues |
2022-05-04 08:29:42 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
ロシア経済支える政府系ファンド、潤沢な資金源 - WSJ発 |
https://diamond.jp/articles/-/302816
|
政府系ファンド |
2022-05-04 17:05:00 |
北海道 |
北海道新聞 |
D7―1中(4日) 牧の3ランで突き放す |
https://www.hokkaido-np.co.jp/article/677116/
|
連敗 |
2022-05-04 17:34:00 |
北海道 |
北海道新聞 |
日1―5楽(4日) ハム負け越し最多11 |
https://www.hokkaido-np.co.jp/article/677112/
|
適時 |
2022-05-04 17:27:00 |
北海道 |
北海道新聞 |
道南156人感染 新型コロナ |
https://www.hokkaido-np.co.jp/article/677114/
|
道南 |
2022-05-04 17:29:00 |
北海道 |
北海道新聞 |
アフガン人元留学生が山口に避難 市民団体の支援で実現 |
https://www.hokkaido-np.co.jp/article/677095/
|
市民団体 |
2022-05-04 17:12:30 |
北海道 |
北海道新聞 |
北京で地下鉄駅や大学を封鎖 上海の感染は5千人下回る |
https://www.hokkaido-np.co.jp/article/677113/
|
地下鉄駅 |
2022-05-04 17:27:00 |
北海道 |
北海道新聞 |
大幸薬品、広告表示で違反認める ウイルス除去の「クレベリン」 |
https://www.hokkaido-np.co.jp/article/677092/
|
大幸薬品 |
2022-05-04 17:14:29 |
北海道 |
北海道新聞 |
EU、ロシア産石油禁輸を提案 段階的に、追加制裁 |
https://www.hokkaido-np.co.jp/article/677109/
|
欧州連合 |
2022-05-04 17:14:00 |
北海道 |
北海道新聞 |
子どもの数、41年連続減 1465万人で最少更新 |
https://www.hokkaido-np.co.jp/article/677111/
|
連続 |
2022-05-04 17:19:00 |
北海道 |
北海道新聞 |
陸上の桐生、セイコーGP欠場 右脚に違和感 |
https://www.hokkaido-np.co.jp/article/677110/
|
桐生祥秀 |
2022-05-04 17:14:00 |
北海道 |
北海道新聞 |
琴ノ若、自己最高位も冷静 稽古十分「いい相撲を」 |
https://www.hokkaido-np.co.jp/article/677108/
|
両国国技館 |
2022-05-04 17:09:00 |
コメント
コメントを投稿