AWS |
AWS Partner Network (APN) Blog |
Digitalize Your Factory Performance on AWS with Metrodata Electronics |
https://aws.amazon.com/blogs/apn/digitalize-your-factory-performance-on-aws-with-metrodata-electronics/
|
Digitalize Your Factory Performance on AWS with Metrodata ElectronicsIn a manufacturing process reports are critical for tracing problems and improvement Technologies such as Industrial IoT IIoT can help companies improve reporting accuracy and traceability during the manufacturing process Learn how Metrodata s solution architecture aims for easy access as a reliable durable secure platform so customers no longer need to think about problems that may arise due to limited storage and lack of computing capabilities |
2022-11-26 06:41:34 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
PythonでSubversionのファイルやフォルダ情報をCSV形式で保存する |
https://qiita.com/Kchan/items/e1dc34adff31354256d2
|
httpsgithu |
2022-11-26 15:34:16 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
[python3 / gym] Colaboratory上でmatplotlibを使って、強化学習ライブラリgymの出力を描画 |
https://qiita.com/siruku6/items/9b6347ad6c5a891b61f1
|
matplotlib |
2022-11-26 15:22:48 |
Linux |
Ubuntuタグが付けられた新着投稿 - Qiita |
PythonでSubversionのファイルやフォルダ情報をCSV形式で保存する |
https://qiita.com/Kchan/items/e1dc34adff31354256d2
|
httpsgithu |
2022-11-26 15:34:16 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
PythonでSubversionのファイルやフォルダ情報をCSV形式で保存する |
https://qiita.com/Kchan/items/e1dc34adff31354256d2
|
httpsgithu |
2022-11-26 15:34:16 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
Docker composeでAPI,MySQLサーバーを立てる |
https://qiita.com/bear05/items/83a5058c18dfc5cda1a0
|
dockercompose |
2022-11-26 15:17:00 |
海外TECH |
DEV Community |
Form Validation with JS and Tailwind |
https://dev.to/shubhamtiwari909/form-validation-with-js-and-tailwind-38ab
|
Form Validation with JS and TailwindHello today i will share with you the form validation i created using HTML Javascript and TailwindCSS I will give a brief description about it and then you can check the entire code in the codepen below at the bottom Let s get started I put the required attribute in all the inputs to make them required field For the Name input field i am checking whether it is empty or not For the Email input field i have taken a regular expression from the web and test it on my email For the Phone number input field i am checking that whether it has a length of digits or not For the Password input field i am checking multiple things like does it contain lowercase and uppercase letters number it s length is greated than or equal to or not I am showing these all errors separately and using conditional statements hiding and showing each one of them using css display property For the Confirm password input field i am checking the same thing as password except one extra thing here which is whether the confirm password is matching the password or not These functions are called on each keyup event so it is dynamic and will show the error if there is any on each character or letter or number you type I hope you will like this simple validation and if there is any correction or suggestion you can write it in the comment section You 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-11-26 06:50:05 |
海外TECH |
DEV Community |
Storybook - mocking API calls |
https://dev.to/dailydevtips1/storybook-mocking-api-calls-2b14
|
Storybook mocking API callsSometimes our components might call API endpoints which could add unnecessary load to our Storybook side of things In those cases we might want to intercept those calls and mock them instead of returning them And luckily for us Storybook has a mocking addon we can use for this Setting up the loaderI will add a super simple data loader to the demo stories Page jsx file It s simply to demo the use case so I ll be adding a data fetching mechanism like so export const Page gt const user setUser React useState const data setData useState null const loading setLoading useState true const error setError useState false useEffect gt fetch then response gt response json then formattedData gt setLoading false setData formattedData catch gt setLoading false setError true if loading return lt p gt loading lt p gt if error return lt p gt Something went wrong try again later lt p gt return lt article gt lt Header user user onLogin gt setUser name Jane Doe onLogout gt setUser undefined onCreateAccount gt setUser name Jane Doe gt lt section gt lt h gt Pages in Storybook lt h gt lt ul gt data map post gt return lt li key post id gt post title lt li gt lt ul gt lt section gt lt article gt This will call the API and render a list of post titles When it fails it shows an error message As you can see this would call every single time we call this story So let s see how we can mock this instead Installing the MSW addonAs mentioned we ll be using the MSW addon which stands for Mock Service Worker it adds a service worker that will intercept and mock our requests To install it run the following command npm i msw msw storybook addon DThen we ll need to initialize the service worker npx msw init public Now you ll need to head over to the storybook preview js file and add the following lines import initialize mswDecorator from msw storybook addon Initialize MSWinitialize Provide the MSW addon decorator globallyexport const decorators mswDecorator And now we ll be able to mock specific requests in our stories Mocking on component levelLet s start by mocking on a component level This is common as we will have multiple stories that need the same mock As we learned before we can use the parameters option and mock the call we have export default title Example Page component Page parameters msw rest get req res ctx gt return res ctx json userId id title sunt aut facere repellat provident occaecati excepturi optio reprehenderit body quia et suscipit nsuscipit recusandae consequuntur expedita et cum nreprehenderit molestiae ut ut quas totam nnostrum rerum est autem sunt rem eveniet architecto If we run our story we can see the component will render only one item That s always the one we describe here Mocking a failWe might also want to test what happens when the API returns an error and for this we can use a per story option Let s create a new story so we have it separate from the existing ones export const FailedResponse Template bind FailedResponse parameters msw rest get req res ctx gt return res ctx delay ctx status And if we open that story we see the loading text for milliseconds after which the error is presented As you can see this per story idea overwrites our main component loading Thank you for reading and let s connect Thank you for reading my blog Feel free to subscribe to my email newsletter and connect on Facebook or Twitter |
2022-11-26 06:49:26 |
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 06:51:22 |
海外TECH |
CodeProject Latest Articles |
Conversation over HTTP |
https://www.codeproject.com/Articles/1223375/Conversation-over-HTTP
|
conversation |
2022-11-26 06:04:00 |
ニュース |
@日本経済新聞 電子版 |
「米国のインフレはピークアウトしたのか」動画で解説
https://t.co/Ylw7PCZeLx |
https://twitter.com/nikkei/statuses/1596390226209144832
|
米国 |
2022-11-26 06:27:44 |
ニュース |
BBC News - Home |
England v South Africa: Spectre of absent Rassie Erasmus sets mood at Twickenham |
https://www.bbc.co.uk/sport/rugby-union/63758189?at_medium=RSS&at_campaign=KARANGA
|
England v South Africa Spectre of absent Rassie Erasmus sets mood at TwickenhamSouth Africa are without their figurehead director of rugby Rassie Erasmus as they prepare to face England at Twickenham but a sense of grievance is powering them into the meeting |
2022-11-26 06:07:57 |
コメント
コメントを投稿