投稿時間:2022-01-22 01:30:38 RSSフィード2022-01-22 01:00 分まとめ(34件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
js JavaScriptタグが付けられた新着投稿 - Qiita シンプルなファイルアーカイブフォーマットの設計と実装 https://qiita.com/dojyorin/items/e24ff05ba8c5ea3d8e8a バイナリ構造ファイルアーカイブとして機能させるには、ファイル個数ぶん存在するファイルヘッダと本体を列挙し、最終的にひとつのバイナリへ結合させる必要があります。 2022-01-22 00:37:48
Ruby Rubyタグが付けられた新着投稿 - Qiita memcachedの概要と動作確認 https://qiita.com/nokiPro/items/267bc4aab06f0cbbd8fd 格納する値の大きさによって使うchunkが変わってくるみたいです。 2022-01-22 00:23:37
Linux Ubuntuタグが付けられた新着投稿 - Qiita WSL2のUbuntuでRustを経由してexaやbatコマンドを使えるようにする https://qiita.com/t_serizawa/items/b9a5579a520a0cd86e96 WSLのUbuntuでRustを経由してexaやbatコマンドを使えるようにするはじめにWSLの環境でexaやbatコマンドを使いたいなと思ってインストールしたのですが、度Rustをインストールしてから導入する方が良さそうだったので載せておきます。 2022-01-22 00:25:49
AWS AWSタグが付けられた新着投稿 - Qiita EKSでRayクラスター作成 https://qiita.com/TKsaku/items/e807397f1c64820a052c HelmChartRay公式が紹介しているものを利用前提AWSアカウントを持っていること踏み台サーバECが作成済み手順eksctlでEKSClusterEKSNodegroup作成Rayクラスター作成EKSCluster、EKSNodegroupを作成注意踏み台サーバEC上でeksctlを実行する、すなわち踏み台サーバがAWSリソースやEKSClusterNodegroupを作成するので、踏み台サーバのIAMロールに権限を付与しておいてあげる必要がある。 2022-01-22 00:51:36
AWS AWSタグが付けられた新着投稿 - Qiita Amazon WorkMail を構築してみた https://qiita.com/sugimount-a/items/ee3369b43369d525c72e SPFDMARCの対応のために各種レコードを作成する必要があるが、Routeで管理すると自動的にレコードを作成してくれるため、とても楽WorkMailのWebUIは、日本語言語は対応していない。 2022-01-22 00:16:16
Ruby Railsタグが付けられた新着投稿 - Qiita memcachedの概要と動作確認 https://qiita.com/nokiPro/items/267bc4aab06f0cbbd8fd 格納する値の大きさによって使うchunkが変わってくるみたいです。 2022-01-22 00:23:37
技術ブログ Mercari Engineering Blog 高い堅牢性と可用性を支えるメルペイコード決済チームの取り組みと工夫 #TeamInterview https://engineering.mercari.com/blog/entry/20220121-9e083be116/ hellip 2022-01-21 15:35:44
海外TECH Ars Technica Researchers date the oldest known human skull at 233,000 years https://arstechnica.com/?p=1827402 human 2022-01-21 15:22:44
海外TECH MakeUseOf Microsoft Store Not Opening in Windows 11? Here are 8 Ways to Fix It https://www.makeuseof.com/microsoft-store-not-opening-fix/ itthe 2022-01-21 15:46:12
海外TECH MakeUseOf How to Save Money on a Spotify Premium Subscription https://www.makeuseof.com/save-money-on-spotify-premium/ spotify 2022-01-21 15:31:44
海外TECH MakeUseOf Windows Security Center Won't Start? Here's How to Fix It https://www.makeuseof.com/windows-security-center-wont-start-fix/ Windows Security Center Won x t Start Here x s How to Fix ItThe Windows Security Center is the heart of your online protection so it can be worrying if it can t start Here s how to get it open again 2022-01-21 15:15:23
海外TECH MakeUseOf 6 Reasons Why Mobile Gaming Actually Sucks https://www.makeuseof.com/why-mobile-gaming-sucks/ gaming 2022-01-21 15:02:13
海外TECH DEV Community Document Express API with Swagger https://dev.to/przpiw/document-express-api-with-swagger-51in Document Express API with Swagger What is an API API documentation is a technical manual containing information on how to consume API and how to use it Documentation also describes what type of data format API is expecting in request and what types are returned from it Why do we need API documentation As with every technology there must be a guide to help understand others how to use it API documentation helps people do understand what type of operation can be performed and what resources they can be accepted amp retrieved Swagger will help us to make our API easy to ready and test some of the functionality Today we will focus on creating a simple REST API and integrating swagger with Open API specification Our documentation will be available in a graphical form accessible through the browser and downloadable JSON format file JSON file could be imported later to the API testing tool or Postman For this example we will use nodejs with express What our API documentation will consist of Docs for GET POST PUT DELETEDescription of resourcesEndpoints and methodsSchema of Request ResponseDatatypes and parameters acceptedExamples Lets get started ├ーcontrollers│  └ーhero controller js├ーindex js├ーpackage json├ーroutes│  ├ーhero routes js│  └ーindex js└ーswagger jsIn our directory npm initnpm install express swagger jsdoc swagger ui expressIn package json we will add type module to enable ES modules In index js we create basic express app and import our swagger config import express from express import router from routes index js import swaggerDocs from swagger js const app express const port app use express json app use router app listen port gt console log Example app listening at http localhost port swaggerDocs app port swagger js contains our configuration import swaggerJsdoc from swagger jsdoc import swaggerUi from swagger ui express const options definition openapi info title Hero API description Example of CRUD API version looks for configuration in specified directories apis routes js const swaggerSpec swaggerJsdoc options function swaggerDocs app port Swagger Page app use docs swaggerUi serve swaggerUi setup swaggerSpec Documentation in JSON format app get docs json req res gt res setHeader Content Type application json res send swaggerSpec export default swaggerDocsNow we setup our API routes along with OpenAPI specification represented in YAML format All fields in the specification are case sensitive For better accessibility amp readability we will place specifications just above the API routes mkdir routes amp amp cd routesindex jsimport express from express import heroRoutes from hero routes js const router express Router openapi healthcheck get tags Healthcheck description Returns API operational status responses description API is running router get healthcheck req res gt res sendStatus router use heroRoutes export default routeOur Hero API will consist of requests GET POST PUT DELETE For each of requests we will write specification that will let API users know what type of input our API expect and what it returns along with response codes We will keep our logic separately in controllers directory import express from express import getHeroesHandler addHeroHandler deleteHeroHandler editHeroHandler from controllers hero controller js const router express Router openapi api heroes get tags Hero summary Get all heroes responses description Success content application json schema type array items type object properties id type number name type string description Bad request router get api heroes getHeroesHandler openapi api hero post tags Hero summary Create a hero requestBody required true content application json schema type object required id name properties id type number default name type string default New Hero Name responses description Created description Conflict description Not Found router post api hero addHeroHandler openapi api hero put tags Hero summary Modify a hero requestBody required true content application json schema type object required id name properties id type number default name type string default Hulk responses description Modified description Bad Request description Not Found router put api hero editHeroHandler openapi api hero id delete tags Hero summary Remove hero by id parameters name id in path description The unique id of the hero required true responses description Removed description Bad request description Not Found router delete api hero id deleteHeroHandler export default routerNext we will create functions responsible for handling incoming requests and returning appropriate data hero controler jslet heroes id name Batman id name Spiderman export async function getHeroesHandler req res res status json heroes export async function addHeroHandler req res if heroes find hero gt hero id req body id res status json Hero id must be unique else heroes push req body res status json heroes export async function deleteHeroHandler req res const index heroes findIndex hero gt hero id req params id if index gt heroes splice index res status json heroes else res status send export async function editHeroHandler req res const index heroes findIndex hero gt hero id req body id if index gt heroes splice index req body res status json heroes else res status send Now we can start our API with node index jsand navigate to localhost docs to view our documentation or we can also get JSON format from localhost docs json which can be used for testing or perhaps imported to POSTMAN To sum up this is only a simple demo to demonstrate how to use swagger with OpenAPI in our express application I think the swagger is a great tool because it helps us to create clear and neat documentation provide an excellent visual page for users who could effortlessly and quickly test API functionality themselves I hope this article was helpful to some of you guys Thanks for reading Github repoLive example 2022-01-21 15:29:55
海外TECH DEV Community Chrome DevTools: Recorder https://dev.to/dailydevtips1/chrome-devtools-recorder-1f1i Chrome DevTools RecorderEvery new major release of Chrome I check the release notes and this time I got super excited to see Recorder being added This feature can be used to record replay and measure user flows End to end testing in the browser Doesn t that sound amazing Finding the Chrome DevTools RecorderTo find the recorder you first open up the Chrome DevTools Mac Cmd Shift C or Windows Ctrl Shift C Then you can click on the More options button find the Mote tools dropdown and search for Recorder Once you open the recorder it will have some details on how it works So basically we can define user flows that we can re test over time This is great for testing essential flows in the application And more importantly measure if they did not deprecate performance in new versions I ll be using daily dev as my guinea pig for testing user flows I will be testing the flow of switching between feeds adjusting the feed settings and clicking an article after which we can upvote it In the recorder panel click the Start new recording button It will ask you to give the recording a new name and at the bottom there is a big red button to start recording Once you hit the record button you can click the elements you want And once you are done hit the End recording button at the bottom of the recorder panel Once you are done you should see your actions in a neat overview From here you will be able to Replay the recording This will look through each step to see if the flow still works Remember this recording will stay here so you can test it over time Another thing we can do here is to click the Measure performance button This will loop through the flow you defined and measure that specific recording as you might have seen before in the Performance tab I find it amazing that we now have a browser way of testing user flows and even measuring those specific flows over time Bonus thingsWe can now do some cool bonus things with this recorder panel First we can manually change selectors by using the little select icon for each event The next thing we can manually add specific events to our workflow Another thing we can do is define a throttle setting for the replay which is excellent if you want to test out slow connections for instance And last but not least we can export a recording This will generate a Puppeteer script you can further modify and use Let me know what you think of this new feature 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-01-21 15:20:09
海外TECH DEV Community Wrapping React Query's useMutation (A Use Case for Wrapping External Libraries) https://dev.to/michaelmangial1/wrapping-react-querys-usemutation-a-use-case-for-wrapping-external-libraries-4nj8 Wrapping React Query x s useMutation A Use Case for Wrapping External Libraries React Query is a library for fetching and mutating server state via React hooks In addition to the perk of caching it also neatly returns metadata representing the various lifecycles of a network request for both querying read operations and mutating create update delete operations const data error isError isFetched isLoading etc useQuery todos getTodos const data error isError isIdle isSuccess mutate etc useMutation deleteTodo This cuts down on the boilerplate when using React local state to track this metadata manually As shown in the example above the useQuery and useMutation hooks both have an argument for a function that will presumably make the network request getTodos and deleteTodo respectively in our example I have previously written about alternatives to the signature of this hook that you can achieve by wrapping it In this post I d like to ponder on potential ways to improve the signature of the useMutation hook First there is currently no way of enforcing that all mutation functions go through the same API client Imagine you wanted to set a pattern in the codebase to make all API requests through a wrapper around the native fetch API That way some common logic can be encapsulated like stringifying the request body Let s say this wrapper is called fetcher We would want to avoid one mutation function using the native fetch API and the other using fetcher Of course this could be enforced via code reviews but what if there was a way to document the expected behavior through a design pattern A slight improvement to inlining the functions in the file where useMutation is called would be to colocate all the operations for an API endpoint in a single file exporting each function individually Then each operations file the file with all the operations for an API endpoint including queries and mutations would have a pattern of importing the fetcher module and consuming api todos js import fetcher from fetcher export async function getTodos await fetcher api v todos export async function deleteTodo id await fetcher api v todos id method DELETE some component js import useQuery useMutation from react query import getTodos deleteTodo from api todos function SomeComponent const todos useQuery todos getTodos const removeTodo useMutation deleteTodo not necessary but wanted to showcase the mutate in action function handleRemoveTodo id removeTodo mutate id if todos isLoading return return Looks fine but there s something else to consider It is very common to refresh or requery after doing a mutation In this example you would want to refresh the todos after deleting one you could do optimistic updates but I m ignoring that for the sake of simplicity To do this you have to obtain access to queryClient via the useQueryClient hook and then invalidate the todos query using queryClient invalidateQueries function const queryClient useQueryClient queryClient invalidateQueries todos The name of invalidateQueries captures the technical sense of what s going on To refresh your todos you mark the todos as stale effectively saying Hey I may need to update the cached query results via an API request Here s what that would look like in our previous example some component js import useQuery useMutation useQueryClient from react query import getTodos deleteTodo from api todos function SomeComponent const todos useQuery todos getTodos const removeTodo useMutation deleteTodo const queryClient useQueryClient async function handleRemoveTodo id await removeTodo mutateAsync id queryClient invalidateQueries todos if todos isLoading return return We can potentially improve this by encapsulating useQueryClient and the query invalidation into a custom hook and it provides an opportunity to come up with a preferred name to describe this logic api index js export function useRefetch const queryClient useQueryClient return query gt queryClient invalidateQueries query some component js import useQuery useMutation from react query import useRefresh getTodos deleteTodo from api function SomeComponent const todos useQuery todos getTodos const removeTodo useMutation deleteTodo const refresh useRefresh async function handleRemoveTodo id await removeTodo mutateAsync id refresh todos if todos isLoading return return Lastly if we wanted to inline the mutation function deleteTodo while ensuring the same fetch client is used every time we could expose a hook from the same file as useRefresh that returns the fetch client for mutations api index js import fetcher from fetcher export function useRequest Add any mutation specific request logic here return fetcher some component js import useQuery useMutation from react query import useRefresh getTodos deleteTodo from api function SomeComponent const todos useQuery todos getTodos const request useRequest const refresh useRefresh const removeTodo useMutation async id gt await request api v todos id method DELETE refresh todos function handleRemoveTodo id removeTodo mutate id if todos isLoading return return ConclusionMaybe you like these changes maybe you don t Either way I hope this gets the brain juices flowing to consider ways to wrap React Query s useMutation to fit the needs of your codebase 2022-01-21 15:05:26
海外TECH Engadget DeepMind co-founder Mustafa Suleyman leaves Google https://www.engadget.com/deepmind-ai-mustafa-suleyman-google-greylock-partners-152049755.html?src=rss DeepMind co founder Mustafa Suleyman leaves GoogleMustafa Suleyman a co founder of artificial intelligence research company DeepMind has left Google to join venture capital firm Greylock Partners Suleyman has brought to an end an eight year run at Google where he was most recently the company s vice president of AI product management and policy He joined Google when it bought DeepMind in and became the latter s head of applied AI Suleyman was reportedly placed on administrative leave in following allegations that he bullied employees Suleyman who moved to Google at the end of that year said on a podcast with Greylock partner Reid Hoffman this week that he quot really screwed up quot and that “I remain very sorry about the impact that that caused people and the hurt that people felt there As The New York Times notes Suleyman was among those who resisted Google s AI endeavors with the US Department of Defense Google ended up backing out of that project though in November it said it was making a bid for the Pentagon s Joint Warfighting Cloud Capability cloud contract DeepMind may be best known for its AI systems that can compete with the best human players of certain games Google has also employed DeepMind s knowhow to improve arrival time estimates in Google Maps track wildlife and detect breast cancer 2022-01-21 15:20:49
海外科学 NYT > Science Their DNA Hides a Warning, but They Don’t Want to Know What It Says https://www.nytimes.com/2022/01/21/health/dna-biobanks-mutations.html Their DNA Hides a Warning but They Don t Want to Know What It SaysSome volunteers for biobanks which collect genetic information to study health across populations have been surprised to be informed they carry risky mutations 2022-01-21 15:19:41
金融 金融庁ホームページ 「金融商品取引法施行令の一部を改正する政令(案)」等について公表しました。 https://www.fsa.go.jp/news/r3/shouken/20220121/20220121.html 金融商品取引法施行令 2022-01-21 17:00:00
金融 金融庁ホームページ 「特定目的会社の監査に関する規則及び投資法人の会計監査に関する規則の一部を改正する内閣府令(案)」及び「貸金業法施行規則等の一部を改正する内閣府令(案)」について公表しました。 https://www.fsa.go.jp/news/r3/shouken/20220121-2/20220121-2.html 会計監査 2022-01-21 17:00:00
金融 金融庁ホームページ 金融審議会「市場制度ワーキング・グループ」(第14回)の議事次第について公表しました。 https://www.fsa.go.jp/singi/singi_kinyu/market-system/siryou/20220121.html 金融審議会 2022-01-21 17:00:00
金融 金融庁ホームページ 「サステナブルファイナンス有識者会議(第10回)」を開催します。 https://www.fsa.go.jp/news/r3/singi/20220121.html 有識者会議 2022-01-21 17:00:00
金融 金融庁ホームページ 審判期日の予定を更新しました。 https://www.fsa.go.jp/policy/kachoukin/06.html 期日 2022-01-21 16:00:00
金融 金融庁ホームページ (株)梅の花における有価証券報告書の虚偽記載に対する課徴金納付命令の決定について公表しました。 https://www.fsa.go.jp/news/r3/shouken/20220121-02.html 有価証券報告書 2022-01-21 16:00:00
金融 金融庁ホームページ 前田建設工業(株)役員による内部者取引に対する課徴金納付命令の決定について公表しました。 https://www.fsa.go.jp/news/r3/shouken/20220121-01.html 内部者取引 2022-01-21 16:00:00
金融 ニュース - 保険市場TIMES カーディフ損保、三井住友信託銀行の住宅ローンに「災害時の住宅ローン返済保障」を提供開始 https://www.hokende.com/news/blog/entry/2022/01/22/010000 カーディフ損保、三井住友信託銀行の住宅ローンに「災害時の住宅ローン返済保障」を提供開始保障範囲を「半壊」まで拡大カーディフ損害保険は月日から、三井住友信託銀行の住宅ローン「住まいのアシスト」の利用客に「災害時の住宅ローン返済保障」居住不能信用費用保険の提供を開始した。 2022-01-22 01:00:00
ニュース BBC News - Home Ukraine tension: US and Russia hold 'frank' talks https://www.bbc.co.uk/news/world-us-canada-60077776?at_medium=RSS&at_campaign=KARANGA action 2022-01-21 15:41:54
ニュース BBC News - Home Met Police detective Neil Corbel jailed for three years for voyeurism https://www.bbc.co.uk/news/uk-england-london-59131036?at_medium=RSS&at_campaign=KARANGA hotel 2022-01-21 15:09:03
ニュース BBC News - Home Freda and Ken Walker: Murder charge after couple in 80s attacked at home https://www.bbc.co.uk/news/uk-england-derbyshire-60081436?at_medium=RSS&at_campaign=KARANGA husband 2022-01-21 15:23:01
ニュース BBC News - Home Covid-19: 'We'll be second-class citizens if self-isolation rules go' https://www.bbc.co.uk/news/uk-60072080?at_medium=RSS&at_campaign=KARANGA isolation 2022-01-21 15:21:50
ニュース BBC News - Home Nadal advances while Berrettini fights off Alcaraz comeback https://www.bbc.co.uk/sport/tennis/60080342?at_medium=RSS&at_campaign=KARANGA Nadal advances while Berrettini fights off Alcaraz comebackRafael Nadal continues his pursuit of a record breaking st Grand Slam title with a third round victory over Karen Khachanov at the Australian Open 2022-01-21 15:43:19
ニュース BBC News - Home Covid passports: Where do I still need to use one? https://www.bbc.co.uk/news/explainers-55718553?at_medium=RSS&at_campaign=KARANGA covid 2022-01-21 15:12:24
ニュース BBC News - Home Covid: What are the social distancing rules? https://www.bbc.co.uk/news/uk-51506729?at_medium=RSS&at_campaign=KARANGA wales 2022-01-21 15:27:58
北海道 北海道新聞 連合、共産と協力の候補推薦せず 参院選方針案 https://www.hokkaido-np.co.jp/article/636462/ 基本方針 2022-01-22 00:18:00
北海道 北海道新聞 ミートローフさんが死去 地獄のロック・ライダー https://www.hokkaido-np.co.jp/article/636460/ 死去 2022-01-22 00:06:00

コメント

このブログの人気の投稿

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