投稿時間:2022-08-12 14:27:45 RSSフィード2022-08-12 14:00 分まとめ(35件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… Apple、「macOS Ventura」の新機能紹介ページから他社製アプリで「メールを非公開」が利用出来る機能の記述を削除 https://taisy0.com/2022/08/12/160078.html apple 2022-08-12 04:10:44
IT バズ部 Google Search Consoleとは?初心者向けにキャプチャ付で解説 https://lucy.ne.jp/bazubu/consolesearch-42635.html google 2022-08-12 04:19:15
ROBOT ロボスタ 動く対象物をセンシングして把持部を自動追従「近接覚センサー」、協働ロボット用ハンドに搭載「考える手」 大阪大発スタートアップ Thinker https://robotstart.info/2022/08/12/thinker-tracking-manipulator.html 2022-08-12 04:27:28
IT @IT 全フォーラム 最新記事一覧 Pythonの人気はどこから来るのか 開発言語ランキングから分かること https://atmarkit.itmedia.co.jp/ait/articles/2208/12/news067.html python 2022-08-12 13:20:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 「牛カツ京都勝牛」がタイに進出、店の特徴は? https://www.itmedia.co.jp/business/articles/2208/12/news095.html itmedia 2022-08-12 13:53:00
TECH Techable(テッカブル) 「出前館」の商品が空から届く! 新潟・万代テラスでドローンデリバリー実施 https://techable.jp/archives/183805 tompla 2022-08-12 04:00:51
IT 情報システムリーダーのためのIT情報専門サイト IT Leaders 積水ハウス、11月完成の分譲マンションに顔認証システム、解錠や施設予約、置き配などに活用 | IT Leaders https://it.impress.co.jp/articles/-/23620 itleaders 2022-08-12 13:14:00
AWS AWS Management Tools Blog Viewing Amazon CloudWatch metrics with Amazon Managed Service for Prometheus and Amazon Managed Grafana https://aws.amazon.com/blogs/mt/viewing-amazon-cloudwatch-metrics-with-amazon-managed-service-for-prometheus-and-amazon-managed-grafana/ Viewing Amazon CloudWatch metrics with Amazon Managed Service for Prometheus and Amazon Managed GrafanaMonitoring AWS services comprising of a customer workload with Amazon CloudWatch is important for resiliency of a workload Customers can bring their CloudWatch data alongside their existing Prometheus data sources to improve their ability to join or query across for a holistic view of their systems The Amazon Managed Service for Prometheus is a serverless … 2022-08-12 04:58:46
AWS AWS Japan Blog AWS Config に北米電力信頼度協議会 NERC CIP BCSI 用の新しい適合パックテンプレートが追加されました https://aws.amazon.com/jp/blogs/news/aws-config-adds-nerccip-conformance-pack/ onformancepacktemplatefo 2022-08-12 04:39:54
python Pythonタグが付けられた新着投稿 - Qiita PIP Package 依存関係エラーの調査例を詳しく解説しました https://qiita.com/uturned0/items/1ef5b1e257bf0766473d pippackage 2022-08-12 13:26:50
python Pythonタグが付けられた新着投稿 - Qiita Pythonの移動データ解析パッケージまとめ https://qiita.com/kageazusa/items/7be11f5f213751353bf4 movingpandas 2022-08-12 13:24:11
python Pythonタグが付けられた新着投稿 - Qiita AtCoderのワークフローをVSCode内で完結させよう! https://qiita.com/shun198/items/6dffbb119a3a133b8e3c atcoder 2022-08-12 13:13:39
js JavaScriptタグが付けられた新着投稿 - Qiita 毎朝Qiitaトレンド記事が届くLINE Botを開発してみた https://qiita.com/taraosan/items/688bd4e0ee07296b39fd googleapps 2022-08-12 13:54:24
js JavaScriptタグが付けられた新着投稿 - Qiita #学び3 forEachメソッド https://qiita.com/Hibiki24/items/29caf9e403cf24db409b foreach 2022-08-12 13:19:56
js JavaScriptタグが付けられた新着投稿 - Qiita 【React / Next】動的な値でメディアクエリのブレイクポイントを変更してレスポンシブ対応する https://qiita.com/tak001/items/41d701f87ed497b99817 sivebetasasschakrauirea 2022-08-12 13:02:35
Program @IT Coding Edgeフォーラム 最新記事一覧 Pythonの人気はどこから来るのか 開発言語ランキングから分かること https://atmarkit.itmedia.co.jp/ait/articles/2208/12/news067.html python 2022-08-12 13:20:00
AWS AWSタグが付けられた新着投稿 - Qiita 【AWS】AWSのSNSとFirebaseのFCM連携でプッシュ通知する https://qiita.com/ling350181/items/64073e521f996a8357d0 fcmfirebasecloudmessaging 2022-08-12 13:59:48
AWS AWSタグが付けられた新着投稿 - Qiita Salesforce のAPIをChromeプラグイン「API Tester」で実行する https://qiita.com/Syoji_Yonemoto/items/322366c96a1424daaf4f sales 2022-08-12 13:57:03
技術ブログ Developers.IO [書評] 「アルゴリズム的思考力が身につく! プログラミングコンテストAtCoder入門」は競プロ・アルゴリズム勉強したいけど何をしたら良いかわからない人におすすめの一冊 https://dev.classmethod.jp/articles/bookreview-introduction-atcoder/ atcoder 2022-08-12 04:19:31
海外TECH DEV Community Build a full stack app with create-t3-app https://dev.to/nexxeln/build-a-full-stack-app-with-create-t3-app-5e1e Build a full stack app with create t appHey there Today we ll be building an application with the T stack We re going to building a Guestbook inspired by Lee Robinson s Guestbook Let s get right into it Getting StartedLet s set up a starter project with create t app npx create t app latestWe re going to utilize all parts of the stack Let s also set up a Postgres database on Railway Railway makes it super simple to quickly set up a database Go to Railway and log in with GitHub if you haven t already Now click on New Project Now provision Postgres It s as simple as that Copy the connection string from the Connect tab Let s start coding Open the project in your favourite code editor There are a lot of folders but don t be overwhelmed Here s a basic overview prisma The prisma schema public Static assets including fonts and images src env Validation for environment variables src pages All the pages of the website src server The backend which is a tRPC server src styles Global CSS files but we re going to be using Tailwind CSS for most of our styles src types Next Auth type declarations src utils Utility functions Open the env file and paste the connection string in DATABASE URL You ll notice we have Discord OAuth set up using next auth so we also need a DISCORD CLIENT ID and DISCORD CLIENT SECRET Let s set that up Setting up authenticationGo to the Discord Developers Portal and create a new application Go to OAuth General and add all of callback URLs to Redirects For localhost the callback URL is http localhost api auth callback discord I also added the production URL ahead of time Copy the client ID and secret and paste that into env Set the NEXTAUTH SECRET as some random string too Now we have all of out environment variables configured Let s also change the database to postgresql and uncomment the db Text annotations in the Account model in prisma schema prisma All the models you see in the schema are necessary for Next Auth to work Let s push this schema to our Railway Postgres database This command will push our schema to Railway and generate type definations for the Prisma client npx prisma db pushNow run the dev server npm run devGo to the src pages index tsx and delete all the code let s just render a heading src pages index tsxconst Home gt return lt main gt lt h gt Guestbook lt h gt lt main gt export default Home I can t look at light theme so lets apply some global styles in src styles globals css to make this app dark theme src styles globals css tailwind base tailwind components tailwind utilities body apply bg neutral text neutral Much better If you look at src pages api auth nextauth ts you can see we have Discord OAuth already set up using Next Auth Here is where you can add more OAuth providers like Google Twitter etc Now let s create a button to let users login with Discord We can use the signIn function from Next Auth src pages index tsximport signIn from next auth react const Home gt return lt main gt lt h gt Guestbook lt h gt lt button onClick gt signIn discord gt Login with Discord lt button gt lt main gt export default Home We can use the useSession hook to get the session for the user While we re at it we can also use the signOut function to implement log out functionality src pages index tsximport signIn signOut useSession from next auth react const Home gt const data session status useSession if status loading return lt main gt Loading lt main gt return lt main gt lt h gt Guestbook lt h gt session lt div gt lt p gt hi session user name lt p gt lt button onClick gt signOut gt Logout lt button gt lt div gt lt div gt lt button onClick gt signIn discord gt Login with Discord lt button gt lt div gt lt main gt export default Home Great We now have auth working Next Auth really makes it stupidly simple BackendLet s work on the backend now We ll be using tRPC for our API layer and Prisma for connecting and querying our database We re going to have to modify our prisma schema and add a Guestbook model Each message in the guestbook will have a name and a message Here s how the model will look like prisma schema prismamodel Guestbook id String id default cuid createdAt DateTime default now name String message String db VarChar Let s push this modified to our Railway Postgres database npx prisma db pushNow let s get to the fun part its tRPC time Go ahead and delete the protected example router ts and protected router ts and example ts in src server router First we re going to define a mutation to post messages to our database src server router guestbook tsimport z from zod import createRouter from context export const guestbookRouter createRouter mutation postMessage input z object name z string message z string async resolve ctx input try await ctx prisma guestbook create data name input name message input message catch error console log error Here we have a tRPC mutation that uses zod to validate the input and has a resolve function that runs a simple prisma query to create a new row in the Guestbook table Working with prisma is an absolutely wonderful example The autocomplete and typesafety is amazing We also want this mutation to be protected Here we can use tRPC middlewares If you take a look at the src server context ts we re using unstable getServerSession from Next Auth that gives us access to the session on the server We re passing that into our tRPC context We can use this session to make our mutation protected src server router guestbook tsexport const guestbookRouter createRouter middleware async ctx next gt Any queries or mutations after this middleware will raise an error unless there is a current session if ctx session throw new TRPCError code UNAUTHORIZED return next mutation postMessage Next let s write a query to get all messages in the guestbook this one will be pretty simple too This doesn t need to be protected so we can put it above the middleware src server router guestbook tsexport const guestbookRouter createRouter query getAll async resolve ctx try return await ctx prisma guestbook findMany select name true message true orderBy createdAt desc catch error console log error error middleware async ctx next gt Here getting just the name and message from all the rows from the Guestbook model and sorting it in descending order by the createdAt field Now merge this router in the main appRouter src server router index tsimport superjson from superjson import createRouter from context import guestbookRouter from guestbook export const appRouter createRouter transformer superjson merge guestbook guestbookRouter export type definition of APIexport type AppRouter typeof appRouter And we re pretty much done here on the backend part Let s work on the UI now FrontendLet s first center everything src pages index tsximport signIn signOut useSession from next auth react const Home gt const data session status useSession if status loading return lt main className flex flex col items center pt gt Loading lt main gt return lt main className flex flex col items center gt lt h className text xl pt gt Guestbook lt h gt lt p gt Tutorial for lt code gt create t app lt code gt lt p gt lt div className pt gt session lt div gt lt p gt hi session user name lt p gt lt button onClick gt signOut gt Logout lt button gt lt div gt lt div gt lt button onClick gt signIn discord gt Login with Discord lt button gt lt div gt lt div gt lt main gt export default Home I also made the heading bigger and added some padding between the elements Let s use our tRPC query to get all the messages for the guestbook in the database But we don t have any data right now We can use Prisma Studio to some data manually npx prisma studioIt will automatically open on http localhost Go to the Guestbook table and add a bunch of records like this Now that we have data we can use the query and display the data For this we can use the tRPC react query wrapper Let s create a component for this in src pages index tsx src pages index tsximport trpc from utils trpc const Messages gt const data messages isLoading trpc useQuery guestbook getAll if isLoading return lt div gt Fetching messages lt div gt return lt div className flex flex col gap gt messages map msg index gt return lt div key index gt lt p gt msg message lt p gt lt span gt msg name lt span gt lt div gt lt div gt Here we re using useQuery and mapping over the array it returns Of course here too we have wonderful typesafety and autocomplete Now render this component in the Home component src pages index tsx lt main className flex flex col items center gt lt h className text xl pt gt Guestbook lt h gt lt p gt Tutorial for lt code gt create t app lt code gt lt p gt lt div className pt gt session lt div gt lt p gt hi session user name lt p gt lt button onClick gt signOut gt Logout lt button gt lt div className pt gt lt Messages gt lt div gt lt div gt lt div gt lt button onClick gt signIn discord gt Login with Discord lt button gt lt div className pt gt lt Messages gt lt div gt lt div gt lt main gt Let s now create a form and use our tRPC mutation there src pages index tsxconst Home gt const data session status useSession const message setMessage useState const postMessage trpc useMutation guestbook postMessage if status loading return lt main className flex flex col items center pt gt Loading lt main gt return lt main className flex flex col items center gt lt h className text xl pt gt Guestbook lt h gt lt p gt Tutorial for lt code gt create t app lt code gt lt p gt lt div className pt gt session lt div gt lt p gt hi session user name lt p gt lt button onClick gt signOut gt Logout lt button gt lt div className pt gt lt form className flex gap onSubmit event gt event preventDefault postMessage mutate name session user name as string message setMessage gt lt input type text value message placeholder Your message maxLength onChange event gt setMessage event target value className px py rounded md border border zinc bg neutral focus outline none gt lt button type submit className p rounded md border border zinc focus outline none gt Submit lt button gt lt form gt lt div gt lt div className pt gt lt Messages gt lt div gt lt div gt lt div gt lt button onClick gt signIn discord gt Login with Discord lt button gt lt div className pt gt lt Messages gt lt div gt lt div gt lt main gt Here we have a form and we re using useMutation to post the data to the database But you ll notice one problem here When we click on the submit button it does post the message to the database but the user doesn t get any immediate feedback Only on refreshing the page the user can see the new message For this we can use optimistic UI updates react query makes this trivial to do We just need to add some stuff to our useMutation hook src pages index tsxconst ctx trpc useContext const postMessage trpc useMutation guestbook postMessage onMutate gt ctx cancelQuery guestbook getAll let optimisticUpdate ctx getQueryData guestbook getAll if optimisticUpdate ctx setQueryData guestbook getAll optimisticUpdate onSettled gt ctx invalidateQueries guestbook getAll The code is pretty much self explanatory You can read more about optimistic updates with react query here We re pretty much done with the coding part That was pretty simple wasn t it The T stack makes it super easy and quick to build full stack web apps Let s now deploy our guestbook DeployementWe re going to use Vercel to deploy Vercel makes it really easy to deploy NextJS apps they are the people who made NextJS First push your code to a GitHub repository Now go to Vercel and sign up with GitHub if you haven t already Then click on New Project and import your newly created repository Now we need to add environment variables so copy paste all the environment variables to Vercel After you ve done that click Deploy Add a custom domain if you have one and you re done Congratulations All the code can be found here You can visit the website at guestbook nxl sh CreditsLee Robinson for the idea of a guestbook JAR and Krish for proof reading 2022-08-12 04:27:39
金融 ニッセイ基礎研究所 世界の時差に関する話題 https://www.nli-research.co.jp/topics_detail1/id=72047?site=nli この理由としては、もちろん中国が中央集権的な社会主義国家であることが挙げられると思うが、加えて、中国の人口の割以上の人々がハルピン東経度分と成都東経度分の間に住んでおり、このつの都市の経度の差が約度であることから、つの都市のほぼ中間に位置している首都北京をベースに統一時間を採用することのメリットが大きく、合理性があるということが挙げられるようだ。 2022-08-12 13:11:48
金融 ニュース - 保険市場TIMES セゾン自動車火災、サービスサイト『SA・PO・PO』に防災に関するサービスを提供開始 https://www.hokende.com/news/blog/entry/2022/08/12/140000 2022-08-12 14:00:00
ニュース BBC News - Home Donald Trump does not oppose US bid to unseal Mar-a-Lago search warrant https://www.bbc.co.uk/news/world-us-canada-62512360?at_medium=RSS&at_campaign=KARANGA florida 2022-08-12 04:43:15
ニュース BBC News - Home Anne Heche: US actress not expected to survive, says family https://www.bbc.co.uk/news/entertainment-arts-62515457?at_medium=RSS&at_campaign=KARANGA brain 2022-08-12 04:23:53
ニュース BBC News - Home Argentina rate hiked to 69.5% as inflation hits 20-year high https://www.bbc.co.uk/news/business-62514970?at_medium=RSS&at_campaign=KARANGA america 2022-08-12 04:31:19
ニュース BBC News - Home The Papers: 'Energy bills to hit £5,000' and 'heatwave UK' https://www.bbc.co.uk/news/blogs-the-papers-62514078?at_medium=RSS&at_campaign=KARANGA declaration 2022-08-12 04:04:18
ビジネス ダイヤモンド・オンライン - 新着記事 サムスン電子の李在鎔副会長、15日に恩赦=韓国大統領府 - WSJ発 https://diamond.jp/articles/-/308050 韓国大統領府 2022-08-12 13:19:00
北海道 北海道新聞 霊感商法の検討会設置へ 消費者庁に、河野担当相 https://www.hokkaido-np.co.jp/article/717041/ 世界平和 2022-08-12 13:19:00
北海道 北海道新聞 <記録ファイル>卓球 室蘭地区選手権一般の部 https://www.hokkaido-np.co.jp/article/717040/ 選手権 2022-08-12 13:19:00
北海道 北海道新聞 <記録ファイル>陸上 第13回斎藤修弥記念競技大会 https://www.hokkaido-np.co.jp/article/717038/ 入江運動公園 2022-08-12 13:18:00
北海道 北海道新聞 安倍氏国葬、差し止め求め提訴 市民団体、横浜地裁に https://www.hokkaido-np.co.jp/article/717028/ 市民団体 2022-08-12 13:07:32
ビジネス 東洋経済オンライン 経費精算めんどうな人はゲーム感覚でやるといい 「めんどくさい」はちょっとした工夫で消せる | リーダーシップ・教養・資格・スキル | 東洋経済オンライン https://toyokeizai.net/articles/-/605970?utm_source=rss&utm_medium=http&utm_campaign=link_back 日常生活 2022-08-12 13:30:00
IT 週刊アスキー DMM GAMES、「御城プロジェクト:RE」の「第14回 公式生放送」を8月26日に配信! https://weekly.ascii.jp/elem/000/004/101/4101613/ dmmgames 2022-08-12 13:40:00
IT 週刊アスキー 衝撃のシーン多数収録!『英雄伝説 黎の軌跡II』の新ロングトレイラーが公開 https://weekly.ascii.jp/elem/000/004/101/4101614/ iicrimsonsin 2022-08-12 13:40:00
IT 週刊アスキー 3DタクティクスRPG「天啓パラドクス」にて、ユーザー登録者数100万人突破記念キャンペーンを開催! https://weekly.ascii.jp/elem/000/004/101/4101615/ exnoa 2022-08-12 13:40:00

コメント

このブログの人気の投稿

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