投稿時間:2023-03-13 08:17:29 RSSフィード2023-03-13 08:00 分まとめ(24件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… 「Google Pixel 7a」のより高解像度のハンズオン画像 https://taisy0.com/2023/03/13/169545.html google 2023-03-12 22:30:54
IT ITmedia 総合記事一覧 [ITmedia News] SF小説を使った議論は“脳を刺激”した――LIXILが「SFプロトタイピング」で見つけたアイデアと希望 https://www.itmedia.co.jp/news/articles/2303/13/news064.html itmedianewssf 2023-03-13 07:30:00
IT ビジネス+IT 最新ニュース 2分でわかる半導体業界、「半導体不足になる原因は?」「主要企業は?」「種類は?」 https://www.sbbit.jp/article/cont1/108663?ref=rss 分でわかる半導体業界、「半導体不足になる原因は」「主要企業は」「種類は」トヨタやアップル、任天堂など、世界的な企業が半導体不足により業績を落とすなど、半導体不足が与える影響が無視できなくなってきています。 2023-03-13 07:10:00
python Pythonタグが付けられた新着投稿 - Qiita 【まとめ】CKANをDockerで構築するための手順をまとめてみた! https://qiita.com/To-Ki-O/items/ecd1795cbdecad18ce66 ckanckanextension 2023-03-13 07:00:46
js JavaScriptタグが付けられた新着投稿 - Qiita 1分でわかる!last-of-typeの適応方法についてわかりやすく解説 https://qiita.com/Tetsu_Oikawa/items/f997dfd173f6aa0cb59a lastoftype 2023-03-13 07:41:51
js JavaScriptタグが付けられた新着投稿 - Qiita 1分でわかる!last-of-typeについてわかりやすく解説 https://qiita.com/Tetsu_Oikawa/items/112ee6fd5a821130238f lastoftype 2023-03-13 07:41:07
js JavaScriptタグが付けられた新着投稿 - Qiita 1分でわかる!first-of-typeの適応方法についてわかりやすく解説 https://qiita.com/Tetsu_Oikawa/items/8df3a4ac82c9df90ad1a firstoftype 2023-03-13 07:39:42
js JavaScriptタグが付けられた新着投稿 - Qiita 1分でわかる!first-of-typeについてわかりやすく解説 https://qiita.com/Tetsu_Oikawa/items/864cc1b19ae7aed89877 firstoftype 2023-03-13 07:39:00
Ruby Rubyタグが付けられた新着投稿 - Qiita 誤ってhas_manyの後に単数系で記載してしまった後のエラー https://qiita.com/takumifujiwaradairy/items/f9d6e57bdc957710f5df failureerrorle 2023-03-13 07:52:32
Docker dockerタグが付けられた新着投稿 - Qiita RustのWebAssemblyフレームワーク、Yew環境をDockerで構築 https://qiita.com/kamekame85/items/537be2951141c43a2e7e docker 2023-03-13 07:05:43
Docker dockerタグが付けられた新着投稿 - Qiita 【まとめ】CKANをDockerで構築するための手順をまとめてみた! https://qiita.com/To-Ki-O/items/ecd1795cbdecad18ce66 ckanckanextension 2023-03-13 07:00:46
Ruby Railsタグが付けられた新着投稿 - Qiita 誤ってhas_manyの後に単数系で記載してしまった後のエラー https://qiita.com/takumifujiwaradairy/items/f9d6e57bdc957710f5df failureerrorle 2023-03-13 07:52:32
海外TECH DEV Community TypeScript Mapped Union Type https://dev.to/nartc/typescript-mapped-union-type-haf TypeScript Mapped Union TypeRecently a coworker at Nx approaches me with a TypeScript problemthat we both thought It seems simple at first We soon find that it s not as simple as we thought In this blog post I ll walk you through the problem the seems to be solution the solution and the thought process behind them The Problemdeclare function table items any fieldOptions any void We have a function that accepts some collection of items and a collection of fieldOptions that should be strongly typed to the type of each individual itemsdeclare function table items any fieldOptions any void const items foo some foo bar foo some foo two bar From this usage items has a type of Array lt foo string bar number gt and fieldOptions needs to be strongly typed against foo string bar number Usage of table can be as followconst items foo some foo bar foo some foo two bar table items foo field bar mapFn val gt should return something eg a string Here we can see that fieldOptions can accept each key of foo string bar number aka foo bar In addition fieldOptions can also accept a FieldOption object that has a field foo bar as well as mapFn callback that will be invoked with the value at foo string bar number key In other words when we pass field bar mapFn then needs to have type value number gt string because bar has number as its valuet type The seems to be SolutionAt first glance it seems easy We ll go through each step First table needs to accept a generic to capture the type of each item in items collection declare function table items any fieldOptions any void declare function table lt TItem gt items TItem fieldOptions any void In addition we also like to constraint TItem to an object so the consumers can only pass in a collection of objects declare function table lt TItem gt items TItem fieldOptions any void declare function table lt TItem extends Record lt string unknown gt gt items TItem fieldOptions any void TItem extends Record lt string unknown gt is the constraintSecond we need a type for fieldOptions This type needs to accept a generic that is an object so that we can iterate through the object keys type FieldOption lt TObject extends Record lt string unknown gt gt keyof TObject field keyof TObject mapFn value TObject keyof TObject gt string declare function table lt TItem extends Record lt string unknown gt gt items TItem fieldOptions any fieldOptions FieldOption lt TItem gt void With the above type declaration FieldOption lt foo string bar number is as followtype Test FieldOption lt foo string bar number gt foo bar field foo bar mapFn value string number gt string This seems correct but when we apply it we find that the type isn t as strict as we likeconst items foo some foo bar table items field foo mapFn value gt value string number We like for value to have type of string instead of a union string number because we specify the foo for field Hence foo string bar number foo should be stringThe problem is that TypeScript cannot narrow down mapFn from field because we cannot constraint them the way we currently have our type Our next step is to try having keyof TItem as a generic as well hoping that TypeScript can infer it from fieldtype FieldOption lt TItem extends Record lt string unknown gt TKey extends keyof TItem keyof TItem gt TKey field TKey mapFn value TKey gt string But it still won t work because we can never pass a generic in for TKey and TKey is always defaulted to keyof TItem which will always be foo bar for our foo string bar number item type So as of this moment we re stuck We spent a good minutes trying things out but to no avail The SolutionOut of frustration I asked for help in trashh dev Discord and Tom Lienard provided the solution with a super neat trick I ll attempt to go through the thought process to understand the solutionWhat we re stuck on is we re so hung up on the idea of FieldOption needs to be an object type field keyof TItem mapFn but in reality what we actually need is as follow let s assume we re working with foo string bar number for now instead of a generic to simplify the explanation what we think we needtype FieldOption field foo bar mapFn value string number gt string what we actually needtype FieldOption field foo mapFn value string gt string field bar mapFn value number gt string Yes we need a Mapped Union from our TItem instead of a single object with union properties The question is how we get to the Mapped Union Well it is a step processWe need to convert TItem into a Mapped Typetype FieldOption lt TItem extends Record lt string unknown gt gt TField in keyof TItem field TField mapFn value TItem TField gt string type Test FieldOption lt foo string bar number gt foo field foo mapFn value string gt string bar field bar mapFn value number gt string We need to map over the Mapped Type with keys of TItem to get the Mapped Uniontype FieldOption lt TItem extends Record lt string unknown gt gt TField in keyof TItem field TField mapFn value TItem TField gt string keyof TItem type Test FieldOption lt foo string bar number gt field foo mapFn value string gt string field bar mapFn value number gt string Now let s try using table with our Mapped Union type to see if it workstype FieldOption lt TItem extends Record lt string unknown gt gt keyof TItem TField in keyof TItem field TField mapFn value TITem TField gt string keyof TItem declare function table lt TItem extends Record lt string unknown gt gt items TTem fields FieldOption lt TItem gt void const items foo string bar foo string bar table items field foo mapFn value gt value string return field bar mapFn value gt value number return And that is our solution So simple yet so powerful trick Here s the TypeScript Playground that you can play with If anyone knows the correct term for Mapped Union please do let me know so I can update the blog post 2023-03-12 22:34:26
海外TECH Engadget Mental health startup Cerebral shared private patient data with Google, Meta and TikTok https://www.engadget.com/mental-health-startup-cerebral-shared-private-patient-data-with-google-meta-and-tiktok-223806251.html?src=rss Mental health startup Cerebral shared private patient data with Google Meta and TikTokCerebral a telehealth startup that gained popularity during the early days of the pandemic disclosed this week that it shared the personal data of more than million US patients with social media companies and advertisers including Google Meta and TikTok As first reported by TechCrunch via The Verge a recently uploaded notice on Cerebral s website reveals the company had been using “pixels tracking scripts companies like Meta offer to third party developers for advertising purposes to collect user data since it began operating in October Following a recent review of its software Cerebral “determined that it had disclosed certain information that may be regulated as protected health information under the Health Insurance Portability and Accountability Act Among the data Cerebral shared are names phone numbers birth dates and insurance information In some instances the company may have also exposed information it collected through the mental health self assessment patients completed to schedule counseling appointments and access other services According to Cerebral it did not disclose social security numbers bank information or credit card numbers After learning of the oversight Cerebral says it “disabled reconfigured and or removed the tracking pixels that caused the data exposure “In addition we have enhanced our information security practices and technology vetting processes to further mitigate the risk of sharing such information in the future The US Department of Health and Human Services is investigating Cerebral News of the data exposure comes after the Federal Trade Commission fined discount drug app GoodRx million for sharing patient information with Meta and Google Earlier this month the agency announced a million settlement with online counseling company BetterHelp and said it was seeking to ban the company from sharing health data for ad targeting This article originally appeared on Engadget at 2023-03-12 22:38:06
ニュース BBC News - Home Gary Lineker: BBC talks with presenter 'moving in right direction', sources say https://www.bbc.co.uk/news/uk-64930957?at_medium=RSS&at_campaign=KARANGA direction 2023-03-12 22:41:04
ニュース BBC News - Home Fashion on parade as stars arrive for the Oscars https://www.bbc.co.uk/news/entertainment-arts-64935067?at_medium=RSS&at_campaign=KARANGA oscars 2023-03-12 22:50:58
ニュース BBC News - Home Rishi Sunak announces £5bn extra defence spending during US trip https://www.bbc.co.uk/news/uk-politics-64932951?at_medium=RSS&at_campaign=KARANGA security 2023-03-12 22:30:04
ニュース BBC News - Home San Diego: Eight dead after boats, possibly used for people smuggling, capsize https://www.bbc.co.uk/news/world-us-canada-64932817?at_medium=RSS&at_campaign=KARANGA california 2023-03-12 22:18:27
ニュース BBC News - Home Good Friday Agreement: PM to invite Joe Biden to NI for 25th anniversary https://www.bbc.co.uk/news/uk-northern-ireland-64934106?at_medium=RSS&at_campaign=KARANGA event 2023-03-12 22:30:46
ニュース BBC News - Home Scottie Scheffler wins Players Championship at Sawgrass, Tyrrell Hatton second https://www.bbc.co.uk/sport/golf/64935087?at_medium=RSS&at_campaign=KARANGA Scottie Scheffler wins Players Championship at Sawgrass Tyrrell Hatton secondAmerican Scottie Scheffler will return to the top of the world rankings after winning the Players Championship by five shots from England s Tyrrell Hatton 2023-03-12 22:37:20
ビジネス 東洋経済オンライン 「盛りすぎた日本株上昇論」が行き詰まりそうだ アメリカ株も景気や業績悪化による下落へ | 市場観測 | 東洋経済オンライン https://toyokeizai.net/articles/-/659047?utm_source=rss&utm_medium=http&utm_campaign=link_back 東洋経済オンライン 2023-03-13 07:30:00
マーケティング MarkeZine 【3/15 13時締切】しまむら・サザビーリーグなどが探る「#タグる」の可能性に迫るウェビナー http://markezine.jp/article/detail/41656 締切 2023-03-13 07:30:00
ニュース THE BRIDGE Z世代が考える「自由な働き方」(2)——僕と私と株式会社代表・今瀧氏 https://thebridge.jp/2023/03/boku-to-watashi-and2-mugenlabo-magazine Z世代が考える「自由な働き方」ー僕と私と株式会社代表・今瀧氏本稿はKDDIが運営するサイト「MUGENLABOMagazine」に掲載された記事からの転載前編からの続きZ世代が「Z世代起業家の原動力って何」を聞いてきたー僕と私と株式会社代表・今瀧氏Z世代の価値観や生き方をお聞きするキーマンインタビュー後半です。 2023-03-12 22:30:37
ニュース THE BRIDGE Z世代が「Z世代起業家の原動力って何?」を聞いてきた(1)——僕と私と株式会社代表・今瀧氏 https://thebridge.jp/2023/03/boku-to-watashi-and1-mugenlabo-magazine Z世代が「Z世代起業家の原動力って何」を聞いてきたー僕と私と株式会社代表・今瀧氏本稿はKDDIが運営するサイト「MUGENLABOMagazine」に掲載された記事からの転載Z世代ー。 2023-03-12 22:15:50

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)