技術ブログ |
Developers.IO |
CodePenで実装したFlutterアプリのサンプルをDevelopersIOに埋め込んでみる |
https://dev.classmethod.jp/articles/embed-the-flutter-app-implemented-in-codepen-into-developersio/
|
codepen |
2022-11-26 17:19:17 |
海外TECH |
MakeUseOf |
7 Ways to Fix Spotify Local Files Not Showing on Windows |
https://www.makeuseof.com/windows-spotify-local-files-not-showing/
|
windows |
2022-11-26 17:15:16 |
海外TECH |
DEV Community |
Zod Typesafe User Input |
https://dev.to/perkinsjr/zod-typesafe-user-input-4pll
|
Zod Typesafe User Input What is Zod Zodis a TypeScript first schema declaration and validation library It ensures that your data is valid before it is submitted to the server which means less invalid data and fewer errors on your end Additionally Zod allows you to create custom input types to tailor the user experience to your specific needs Overall using Zod can help streamline your development process by making sure that your forms inputs and API requests are error free from the start If you re looking for a reliable way to create typesafe forms and inputs Zod is worth checking out How can Zod help with type safety in forms and input from users Zod can help ensure that your forms and input are type safe so you won t accidentally allow incorrect data types to be entered into your system This can help prevent errors from happening in the first place and means that you don t have to write custom validation code for your forms and input fields Zod can also help enforce rules around what data can be entered into your forms and input fields ensuring that only valid data is accepted By using Zod you can avoid having to write any extra code or manually check user input against these rules it will all be handled automatically by Zod This makes your forms and inputs more reliable and robust against errors Overall using Zod can help improve the quality of your forms and input making them easier to use more accurate and less prone to error Why should developers consider using Zod Zod offers type checking for JavaScript which can be helpful for developers who want to ensure their code is error free Zod s validation methods can also be used to enforce input from users ensuring that only valid data is submitted Using Zod can help make your development process more efficient and reduce the risk of introducing bugs into your codebase How to get started with ZodFirst you need to make sure you have strict mode enabled in your Typescript project Then install the Zod package npm install zod Simple schemasNow you can create a schema to handle your needs lets s say we want all inputs to be a string we can do that import z from zod my schema should be a stringconst mySchema z string mySchema parse Zod is awesome mySchema parse throws an error because it is not a stringNow in some cases we don t want to throw an error we want Zod to tell us we have had an invalid input so we can handle it somewhere else in the stackimport z from zod const mySchema z string mySchema safeParse Zod is still really cool This will return success true data Zod is still really cool mySchema safeParse This will return success false error ZodError Object schemasObject schemas allow you to handle complex inputs and validate them and give you an inferred type import z from zod const User z object name z string username z string age z number email z string User parse name James Perkins username jamesperkins age email contactme jamesperkins dev extract the inferred typetype User z infer lt typeof User gt name string username string age number email string Built in string validationOne part no one wants to write is the regex to validate strings I wrote a regex package a few years ago because who wants to remember how to validate the user input of an email Zod provides a handful of validators lets s improve our User object import z from zod const User z object name z string username z string min age z number email z string email User parse name James Perkins username jamesperkins age email contactme jamesperkins dev extract the inferred typetype User z infer lt typeof User gt name string username string age number email string Now a user has to input an email in our email field which will be validated and our username must be at least five characters Custom error messagesZod allows you to provide a custom error to present to the user so they understand why they need to change input import z from zod const User z object name z string username z string min message The username must be at least characters age z number email z string email message The inputted email is invalid please enter a valid email User parse name James Perkins username jamesperkins age email contactme jamesperkins dev extract the inferred typetype User z infer lt typeof User gt name string username string age number email string This is just the beginning of Zod if you are interested you can check out theirdocumentation |
2022-11-26 17:24:50 |
Apple |
AppleInsider - Frontpage News |
Black Friday deal extended: get AirPods Pro 2 for $199.99 ($50 off) at Amazon |
https://appleinsider.com/articles/22/11/26/black-friday-deal-extended-get-airpods-pro-2-for-19999-50-off-at-amazon?utm_medium=rss
|
Black Friday deal extended get AirPods Pro for off at AmazonOne of the year s hottest Black Friday deals has been extended at Amazon as you can still grab Apple AirPods Pro for a discount of off retail Black Friday pricing is live on AirPods Pro Featured in Amazon s list of Top ish Trending Deals Apple AirPods Pro are a hot seller this Black Friday weekend At after a discount the earbuds are an excellent value with improved audio and active noise cancellation ANC compared to the first generation Read more |
2022-11-26 17:31:49 |
Apple |
AppleInsider - Frontpage News |
Daily deals Nov. 26: $500 off 16-inch M1 Pro MacBook Pro, $60 off Apple Watch Ultra, $169 Smart Keyboard Folio, more |
https://appleinsider.com/articles/22/11/26/daily-deals-nov-26-500-off-16-inch-m1-pro-macbook-pro-60-off-apple-watch-ultra-169-smart-keyboard-folio-more?utm_medium=rss
|
Daily deals Nov off inch M Pro MacBook Pro off Apple Watch Ultra Smart Keyboard Folio moreSaturday s best deals include up to off an M MacBook Air off a inch MacBook Pro a second generation Apple Pencil for and much more Best deals for November 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-11-26 17:27:33 |
Apple |
AppleInsider - Frontpage News |
Top 10 MacBook Black Friday Weekend Deals |
https://appleinsider.com/articles/22/11/26/top-10-macbook-black-friday-weekend-deals?utm_medium=rss
|
Top MacBook Black Friday Weekend DealsBlack Friday weekend deals deliver impressive discounts on Apple MacBook computers We ve rounded up our top picks across the MacBook Air and MacBook Pro lines The best Black Friday weekend deals include MacBook savings Black Friday may be over technically but weekend deals are in full swing To make your holiday shopping a bit easier we ve rounded up the top Black Friday MacBook deals for the weekend Read more |
2022-11-26 17:37:44 |
海外TECH |
Engadget |
NASA’s Orion spacecraft breaks Apollo 13 flight record |
https://www.engadget.com/nasa-orion-spacecraft-break-apollo-13-flight-record-172235996.html?src=rss
|
NASA s Orion spacecraft breaks Apollo flight recordThe Artemis Orion crew vehicle has set a new record for a NASA flight At approximately AM ET on Saturday Orion flew farther than any spacecraft designed to carry human astronauts had ever before surpassing the previous record set by Apollo back in As of AM ET Orion was approximately miles from kilometers from Earth Artemis I was designed to stress the systems of Orion and we settled on the distant retrograde orbit as a really good way to do that said Jim Geffre Orion spacecraft integration manager “It just so happened that with that really large orbit high altitude above the moon we were able to pass the Apollo record But what was more important though was pushing the boundaries of exploration and sending spacecraft farther than we had ever done before Mission Time days hrs minOrion is miles from Earth miles from the Moon cruising at miles per hour P V O º º ºWhat s this TrackArtemispic twitter com wuFgDqWaQーOrion Spacecraft NASA Orion November Of all the missions that could have broken the record it s fitting that Artemis was the one to do it As Space com points out Apollo s original flight plan didn t call for a record setting flight It was only after a mid mission explosion forced NASA to plot a new return course that Apollo s Odyssey command module set the previous record at miles kilometers from Earth With a limited oxygen supply on the Aquarius Lunar Module NASA needed to get Apollo back to Earth as quickly as possible The agency eventually settled on a flight path that used the Moon s gravity to slingshot Apollo back to Earth One of the NASA personnel who was critical to the safe return of astronauts Jim Lovell Jack Swigert and Fred Haise was Arturo Campos He wrote the emergency plan that gave the Command and Service Module enough power to make it back to Earth Artemis is carrying a “Moonikin test dummy named after the late Arturo Earlier this week Orion completed a flyby of the Moon After the spacecraft completes half an orbit around the satellite it will slingshot itself toward the Earth NASA expects Orion to splash down off the coast of San Diego on December th |
2022-11-26 17:22:35 |
海外TECH |
WIRED |
136 Absolute Best Black Friday Deals Right Now (2022) |
https://www.wired.com/story/best-black-friday-deals-2022-2/
|
robot |
2022-11-26 17:24:00 |
ニュース |
BBC News - Home |
London firefighters face sack over bullying and racist behaviour |
https://www.bbc.co.uk/news/uk-england-london-63767823?at_medium=RSS&at_campaign=KARANGA
|
london |
2022-11-26 17:28:39 |
ニュース |
BBC News - Home |
Scotland rugby legend Weir dies after MND battle |
https://www.bbc.co.uk/sport/rugby-union/63768331?at_medium=RSS&at_campaign=KARANGA
|
disease |
2022-11-26 17:22:18 |
ニュース |
BBC News - Home |
Australia fight back from 21-point deficit to beat Wales |
https://www.bbc.co.uk/sport/rugby-union/63767267?at_medium=RSS&at_campaign=KARANGA
|
australia |
2022-11-26 17:48:28 |
ニュース |
BBC News - Home |
World Cup 2022: 'Let's show the world what Wales are really about - Ashley Williams |
https://www.bbc.co.uk/sport/football/63762877?at_medium=RSS&at_campaign=KARANGA
|
World Cup x Let x s show the world what Wales are really about Ashley WilliamsFormer Wales captain Ashley Williams explains why Wales can still end their World Cup on a high when they face England on Tuesday |
2022-11-26 17:34:41 |
ニュース |
BBC News - Home |
World Cup 2022: Poland's Robert Lewandowski knew 'time was running out' to break tournament duck |
https://www.bbc.co.uk/sport/football/63769352?at_medium=RSS&at_campaign=KARANGA
|
World Cup Poland x s Robert Lewandowski knew x time was running out x to break tournament duckRobert Lewandowski says he knew time was running out to fulfil his dream of scoring at a World Cup finals after netting in Poland s Group C win over Saudi Arabia on Saturday |
2022-11-26 17:53:16 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
【ワークマン仕掛け人・特別講義】 #ワークマン女子は、なぜ大ヒットしたのか? - ワークマン式「しない経営」 |
https://diamond.jp/articles/-/312928
|
【ワークマン仕掛け人・特別講義】ワークマン女子は、なぜ大ヒットしたのかワークマン式「しない経営」たちまち万部今、最も注目を集める急成長企業ワークマン。 |
2022-11-27 02:50:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
脳の特性を生かした、やり始めたら止まらない脳トレドリル - 1分間瞬読ドリル 超かんたん!入門編 |
https://diamond.jp/articles/-/313503
|
脳の特性を生かした、やり始めたら止まらない脳トレドリル分間瞬読ドリル超かんたん入門編「認知症、ボケ予防に役立つ」「記憶力や思考力がアップし、勉強に活かせる」「頭の回転が速くなった」「本が速く読めて、判断スピードがあがった」「モチベーションの向上、習慣化につながる」「持続力が増して途中で投げ出さなくなった」などの声が届いた、くり返し楽しんで使える『分間瞬読ドリル』に、超入門編が登場。 |
2022-11-27 02:35:00 |
コメント
コメントを投稿