投稿時間:2022-08-17 01:23:12 RSSフィード2022-08-17 01:00 分まとめ(26件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita iphoneで撮った4K動画から動画情報を取得する https://qiita.com/yngwie6120/items/2fc0215a095363f576f8 iphone 2022-08-17 00:40:01
js JavaScriptタグが付けられた新着投稿 - Qiita あるWebサービスの開発メモ・JavaScript チート https://qiita.com/ishi32/items/aa1db70e2176652dc97f javascript 2022-08-17 00:36:09
js JavaScriptタグが付けられた新着投稿 - Qiita JavaScript で if - else ってどう書くんだっけ? https://qiita.com/ishi32/items/2a6128924e0c7c364a7c ifelse 2022-08-17 00:35:36
Docker dockerタグが付けられた新着投稿 - Qiita Docker上にOracle環境を構築してみた https://qiita.com/princessechamp/items/b132992bb9661063141a docker 2022-08-17 00:02:38
海外TECH DEV Community My developer workflow using WSL, tmux and Neovim https://dev.to/nexxeln/my-developer-workflow-using-wsl-tmux-and-neovim-55f5 My developer workflow using WSL tmux and NeovimHi Today I m gonna talk about my daily developer workflow and all the tools I use to set up a productive enviroment for coding I think having a nice looking terminal and some tools to save time are really helpful to keep you productive in daily coding sessions Operating SystemI use Windows and it s pretty much unusable for programming Thankfully Microsoft understood that and made Windows Subsystem for Linux also known as WSL in short It lets you run a Linux distribution inside of Windows I use Ubuntu it s the default distribution that is installed with WSL Ubuntu is really simple to use and has a huge community so getting support is very easy I highly recommend it for anyone who wants to start using Linux and get familiar with basic Linux commands ShellUbuntu by default comes with the bash shell Bash is great but I personally find it harder to customize That is why I use Z shell more commonly known as zsh To manage my zsh configuration I use Oh My Zsh It has a huge community and makes it trivial to install and use plugins I used to use fish which is also a great shell It has very sensible defaults and comes with a lot of cool features like autosuggestions tab completions etc out of the box without the need to set up anything The only problem with fish is that it is not POSIX compliant POSIX is a set of standards that define how to develop programs for UNIX based operating systems So in fish things like bash scripts do not work They have their own scripting language zsh on the other hand is fully POSIX compliant This is why I switched to zsh and I m quite happy with it so far PromptI use Starship for my prompt and it is AMAZING Written in Rust Starship is a minimal highly customizable and super fast prompt The default look of it is really good but literally every little detail is customizable to your liking To install Starship refer to these docs The configuration file for Starship lives in config starship toml Here s my starship toml config starship toml aws symbol  conda symbol  dart symbol  format via symbol style directory read only  truncation length docker context symbol  elixir symbol  format via symbol style elm symbol  git branch symbol  golang symbol  format via symbol style hg branch symbol  java symbol  format via symbol style julia symbol  memory usage symbol  nim symbol  nix shell symbol  nodejs symbol  format via symbol style package symbol  perl symbol  php symbol  python symbol  format via symbol style ruby symbol  rust format via symbol style scala symbol  shlvl symbol  swift symbol ﯣ format via symbol style git status disabled trueThe icons aren t showing up here because you need a nerd font for that If you set up a Nerd Font I recommend JetBrains Mono and copy this configuration you ll get a very minimal looking prompt like this For more information on configuring Starship you can look at the docs here Having a nice looking terminal always helps Persistent Terminal Sessions with tmuxtmux is a terminal multiplexer It lets you have multiple persistent terminal sessions and come back to them without terminating the existing running processes So you can return to a workspace exactly where you left it It also allows you to manage multiple windows and panes inside a session For example to go to my website s workspace I just have to type website and I m there Here website is an alias I ve set up to open the website tmux session zshrcalias website tmux attach session t website This way I can jump into any one of my workspaces really quickly and start coding It also helps that I m exactly where I left off I highly recommend tmux for local development it has changed how I work and increased my productivity by a massive amount NeovimI had been using VSCode as my code editor since the first day I started learning programming but recently I have switched to Neovim It is a modern version of Vim Neovim is the best code editor for me because of its speed and ease of customization All the configuration is written in Lua which is very easy to learn and write It helps me be really fast and productive because I never have to take my hands off of my keyboard You can find my Neovim configuration here It s just a fork of craftzdog s configuration zoxideYou might have seen in some of the screenshots that I just have to run z license generator to jump to that directory That is zoxide Also written in Rust it s a smarted cd command that remembers which directories you visit frequently so you can jump to those directories with just one command The above GIF is from the zoxide GitHub repository Use zoxide to never go back to cd hell again exaexa is a modern replacement of the ls command I always find myself using exa to get familiar with the files in a new codebase As you can see in the screenshot exa has a more readable output with colors and icons which you can look at and instantly know the filetypes of different files It is also noticeably faster than ls It also has a lot of flags which display the data is different formats Here are the aliases I ve set up for exa zshrcalias ll exa l g icons git alias llt exa icons tree git ignore ConclusionThat was a quick overview of all the tools I use on a day to day basis for coding I think it s really important to spend some time working on your workflow and coding setup it will make you faster over time I hope you found the tools I listed useful and will incorporate them in your workflow too Thanks for reading 2022-08-16 15:53:54
海外TECH DEV Community Mocking API calls in React Tests with Nock https://dev.to/pankod/mocking-api-calls-in-react-tests-with-nock-41if Mocking API calls in React Tests with Nock IntroductionWriting unit tests is very important for the development process Testing components that use HTTP requests sometimes may be a real pain In testing we often want to make mock requests to test our code without actually making an HTTP request This can be especially important when we are testing code that makes external API calls since we don t want to rely on the availability of the external API We ll use a third party package called nock that helps us to mock HTTP requests With nock we can specify the desired behavior of our mock HTTP requests including the URL headers and body This allows us to test our code against a known data set making debugging and testing much more straightforward I ll show how to write unit tests for API calls by mocking method in the simple React app Steps we ll cover Why mocking HTTP requests during testing is important What is Nock Bootstrapping the example appAdding a unit testNock installation and configurationCustom requests in NockAll HTTP methods like GET POST PUT DELETE can be mock To handle query parameters the query option can be used Mocking server ErrorsRecording in NockAlternative API mocking libraries Why mocking HTTP requests during testing is important Mock testing is a great way to speed up running tests because you can eliminate external systems and servers These are all possible errors that you might encounter when running tests with the API The data returned from API can be different on each request It takes a longer time to finish running the test You may get a big size of data that you don t need to use in tests You may have issues like rate limiting and connectivity We ll use the Nock to find a solution for these problems We ll create a simple react app and request an external API We will implement how to mock API calls and write a unit test for API calls using Nock in a React application What is Nock Nock is an HTTP server mocking and expectations library Nock works by overriding Node s http request function It helps us mock calls to API and specifies what URLs we want to listen for and responds with predefined responses just like real APIs would We can use nock to test React components that make HTTP requests Bootstrapping the example appWe ll use superplate CLI wizard to create and customize the React application fastly Run the following command npx superplate cli example appSelect the following options when taking the CLI steps Select your project type❯react Testing Framework❯React Testing LibraryCLI should create a project and install the selected dependencies Create a component with the following code index tsxexport const Main gt const state setState React useState lt firstName string gt firstName const fetchData async gt const response await fetch const result await response json return result React useEffect gt async gt const data await fetchData setState data return lt div gt state firstName lt div gt Above we can see that we do fetch call to refine s fake REST API URL and thereafter returned data shows on the screen Adding a unit testNow we are going to create a test file We want to add a test case for the function that makes an HTTP request to a URL and returns the data provided Waiting for the data returned by API to be rendered on screen is a typical way of testing it Using React Testing Library the expected unit test vase will be the following index spec tsximport Main from index import render screen waitFor from testing library react describe expectedData gt it checks if returned data from API rendered into component async gt render lt Main gt await waitFor gt expect screen getByText value from the api toBeInTheDocument At this point if run the test it will fail It ll attempt to perform a network request Since we are calling a real database it will return all the data rather than only the specific data that we need Also the API will respond with different values for each request Testing this HTTP request related architecture in that way can be a headache With the nock mock service we can intercept requests to the API and return custom responses Nock installation and configurationInstall the nock with the following command if you don t have it npm install save dev nockWe ll add the highlighted codes to initialize the nock index spec tsximport Main from index import render screen waitFor from testing library react gt import nock from nock lt describe expectedData gt it checks if returned data from API rendered into component async gt gt nock defaultReplyHeaders access control allow origin get users reply id firstName value from the api lt render lt Main gt await waitFor gt expect screen getByText value from the api toBeInTheDocument At this point our test works The test runner creates a mock server with nock and the fetchData method will trigger Rather than calling the API to test our app we provide a set of known responses that mock it Nock intercepts GET requests to followed by the path users with the HTTP method get The response should be like defined in the reply method We also set the CORS policy to the header with defaultReplyHeaders Custom requests in NockWe can specify the mock requests All HTTP methods like GET POST PUT DELETE can be mock Simple POST request nock post users username test status true reply To handle query parameters the query option can be used nock get users query username test status true reply When an HTTP request is made with specified query nock will intercept and return with a status code Mocking server ErrorsError replies can be returned from the mocking server with replyWithError prop nock get users replyWithError message Server ERROR You may want to handle errors by only replying with a status code nock post users username test status true reply Note It s important to note we are using afterAll nock restore and afterEach nock cleanAll to make sure interceptors do not interfere with each other afterAll gt nock cleanAll nock restore Recording in NockRecording relies on intercepting real requests and responses and then persisting them for later use Nock prints the code to the console which we can use as a response in tests with nock recorder rec method Comment out the nock function and let s add nock recorder rec in to the test file When the test runs the console logs all the service calls that nock has recorded Instead of defining nock method and reply values manually we can use recorded values Alternative API mocking librariesMSW Mock Service Worker Mock Service Worker is an API mocking library that uses Service Worker API to intercept actual requests Mirage JS Mirage JS is an API mocking library that lets you build test and share a complete working JavaScript application without having to rely on any backend services fetch mock fetch mock allows mocking HTTP requests made using fetch or a library imitating its API ConclusionIn this article we ve implemented API mocking and explained how useful it can be We used nock to mock HTTP requests in our test and some useful properties are shown We have seen how to test only the behavior of an application in isolation Avoid any external dependencies that may affect our tests and ensure they are running on stable versions at all times Build your React based CRUD applications without constraintsLow code React frameworks are great for gaining development speed but they often fall short of flexibility if you need extensive styling and customization for your project Check out refine if you are interested in a headless framework you can use with any custom design or UI Kit for control over styling refine is a React based framework for building CRUD applications without constraints It can speed up your development time up to X without compromising freedom on styling customization and project workflow refine is headless by design and it connects backend services out of the box including custom REST and GraphQL API s Visit refine GitHub repository for more information demos tutorials and example projects 2022-08-16 15:12:21
Apple AppleInsider - Frontpage News Hyper 245W GaN Desktop Charger review: All the bells and whistles https://appleinsider.com/articles/22/08/16/hyper-245w-gan-desktop-charger-review-all-the-bells-and-whistles?utm_medium=rss Hyper W GaN Desktop Charger review All the bells and whistlesThe new Hyper W GaN Desktop Charger is compact sleek and the most powerful multi charger you can have at the ready You ll have no issue charging your USB C gear with four outputs including multiple Apple laptops at full speed Power four devices with the new Hyper W GaN chargerAs devices grow in size and performance the power requirements also drift upward Here in Apple has its highest capacity charger to date outputting W Read more 2022-08-16 15:46:07
海外TECH Engadget Amazon Air freight hub workers walked out to protest pay and conditions https://www.engadget.com/amazon-air-worker-walkout-california-154638160.html?src=rss Amazon Air freight hub workers walked out to protest pay and conditionsDozens of workers at a key Amazon Air cargo hub in California walked out mid shift on Monday to protest pay and safety conditions More than of the employees at the San Bernardino facility took part in the stoppage according to The Washington Post Amazon has disputed that figure by claiming that roughly people walked off the job This was said to be the first coordinated labor action in the company s air freight division taking place at the largest Amazon Air hub in California The action was led by workers who are organizing as a group called Inland Empire Amazon Workers United The alliance has urged Amazon to increase the base pay rate from per hour to at the facility which is known as KSBD Amazon said that full time workers have benefits and can earn up to per hour Inland Empire Amazon Workers United has also called out working conditions claiming that temperatures reached degrees at the airport on days in July as CNBC reports Managers are said to have opened more rest areas after previous complaints about the heat “They say there is air conditioning but you can only feel it in some sections quot Daniel Rivera a leader of the stoppage told the Post An Amazon spokesperson claimed the highest recorded temperature in the hub is degrees The workers who walked out don t currently have plans to file for a union election with the National Labor Relations Board but they are open to the idea amid a wave of unionization efforts across the company Amazon has appealed against a union victory in Staten Island New York The results of a second election at a warehouse in Bessemer Alabama were too close to call and hundreds of votes have been challenged 2022-08-16 15:46:38
海外TECH Engadget AMD will unveil its Ryzen 7000 desktop CPUs on August 29th https://www.engadget.com/amd-ryzen-7000-zen-4-release-date-livestream-153238049.html?src=rss AMD will unveil its Ryzen desktop CPUs on August thYou won t have to wait much longer to learn more about AMD s Ryzen desktop processors The company has announced that it will unveil the new CPU line in a YouTube livestream on August th at PM The event will share more about the new Zen architecture and the supporting AM platform There are already some clues as to what to expect AMD inadvertently shared some of the first Ryzen model numbers on its website in July including one Ryzen chip X one Ryzen variant X and two Ryzen releases X and X As with past launches the company appears focused on gaming friendly enthusiast CPUs while leaving budget parts for later releases Zen and AM meanwhile promise meaningful architectural changes You ll see more Level cache boost speeds beyond GHz AI hardware acceleration and support for newer standards like DDR memory and PCIe expansion AMD claimed a percent boost to single threaded performance in early testing Effectively AMD is responding to Intel s th gen Core ーit s just a question of whether or not Ryzen is fast enough to keep up or edge ahead 2022-08-16 15:32:38
Cisco Cisco Blog Improving the Economics of Broadband and Content Delivery https://blogs.cisco.com/sp/improving-the-economics-of-broadband-and-content-delivery Improving the Economics of Broadband and Content DeliveryLast year the NCTC and Qwilt announced a program for qualifying broadband providers to upgrade their infrastructure on Cisco UCS hardware preconfigured with Qwilt content delivery software and services at no cost This program is transforming the business model of content delivery for rural broadband providers With over providers participating we are excited by the momentum the program is achieving and the subscriber experiences it enables 2022-08-16 15:25:27
海外TECH CodeProject Latest Articles "Method can be made static" May Hide OO Design Flaw https://www.codeproject.com/Tips/1229658/Method-can-be-made-static-May-Hide-OO-Design-Flaw analysis 2022-08-16 15:32:00
海外科学 NYT > Science F.D.A. Clears Path for Over-the-Counter Hearing Aids https://www.nytimes.com/2022/08/16/health/fda-hearing-aids.html medical 2022-08-16 15:32:26
金融 RSS FILE - 日本証券業協会 PSJ予測統計値 https://www.jsda.or.jp/shiryoshitsu/toukei/psj/psj_toukei.html 統計 2022-08-16 16:00:00
金融 金融庁ホームページ 鈴木財務大臣兼内閣府特命担当大臣繰上げ閣議後記者会見の概要(令和4年8月15日)を掲載しました。 https://www.fsa.go.jp/common/conference/minister/2022b/20220815-1.html 内閣府特命担当大臣 2022-08-16 15:01:00
ニュース BBC News - Home Rwanda asylum scheme: Warning over rights record before UK flight https://www.bbc.co.uk/news/uk-62566194?at_medium=RSS&at_campaign=KARANGA opponents 2022-08-16 15:52:12
ニュース BBC News - Home Darius Campbell Danesh: Pop Idol and West End star dies aged 41 https://www.bbc.co.uk/news/entertainment-arts-62564721?at_medium=RSS&at_campaign=KARANGA gareth 2022-08-16 15:52:07
ニュース BBC News - Home Giggs admits being unfaithful but denies abuse https://www.bbc.co.uk/news/uk-wales-62554229?at_medium=RSS&at_campaign=KARANGA giggs 2022-08-16 15:56:00
ニュース BBC News - Home UK weather: Thunderstorms warning as heavy rain hits and roads flood https://www.bbc.co.uk/news/uk-62558667?at_medium=RSS&at_campaign=KARANGA wales 2022-08-16 15:54:38
ニュース BBC News - Home Train and tube strikes: What are the dates and where is affected? https://www.bbc.co.uk/news/business-61634959?at_medium=RSS&at_campaign=KARANGA august 2022-08-16 15:29:23
北海道 北海道新聞 空知管内222人感染 新型コロナ https://www.hokkaido-np.co.jp/article/718500/ 空知管内 2022-08-17 00:32:03
北海道 北海道新聞 胆振管内527人感染 日高管内は60人 新型コロナ https://www.hokkaido-np.co.jp/article/718512/ 新型コロナウイルス 2022-08-17 00:31:19
北海道 北海道新聞 オホーツク管内213人感染 新型コロナ https://www.hokkaido-np.co.jp/article/718514/ 新型コロナウイルス 2022-08-17 00:30:47
北海道 北海道新聞 十勝管内479人感染 新型コロナ https://www.hokkaido-np.co.jp/article/718515/ 十勝管内 2022-08-17 00:30:00
北海道 北海道新聞 難病の八木君、日本ハム戦で堂々の始球式 「野球への気持ち強くなった」 https://www.hokkaido-np.co.jp/article/718511/ 厚生労働省 2022-08-17 00:20:02
北海道 北海道新聞 日本ハム、打線不発で先制弾フイ(16日) https://www.hokkaido-np.co.jp/article/718509/ 日本ハム 2022-08-17 00:11:00
仮想通貨 BITPRESS(ビットプレス) ビットバンク、2022/9/15付で対BTCペアの取扱終了へ https://bitpress.jp/count2/3_10_13335 取扱 2022-08-17 00:38:29

コメント

このブログの人気の投稿

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