投稿時間:2022-02-06 20:16:30 RSSフィード2022-02-06 20:00 分まとめ(22件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita 【メモ】reshapeについてjuliaとpythonの違い https://qiita.com/RhT/items/b9c9548d9c5292d8095d abreshape結果は、×reshapeUnitRangeIntwitheltypeIntの配置を見てわかるように、juliaでは行が最初に変わることになるので、行列の行が優先して変わることになる。 2022-02-06 19:31:16
python Pythonタグが付けられた新着投稿 - Qiita ElasticNetの概要とパラメータチューニングについて https://qiita.com/c60evaporator/items/d0356fca12b37a82fe57 私の環境では、以下のライブラリを使用しています・Python本体動作確認時はを使用・Matplotlibで表示可能な環境Jupyter等・下記ライブラリ参考として動作確認時のライブラリバージョンも記載lightgbmscikitlearnbayesianoptimizationoptunanumpypandasseabornmatplotlib・こちらの回帰可視化ライブラリチューニング前後のモデル可視化にのみ使用するので、なくともチューニング自体はできます使用するサンプルデータこちらの記事の、大阪都構想選挙データを使用しますハードウェアチューニング速度はCPU等の性能に大きく依存します参考までに本記事で使用したPCLenovoのモバイルのスペックを下記しますデバイススペックCPUIntelCoreiUGHzメモリGBDDRMHzSODIMMストレージSSDPCIeMOSWindowsProbitコードの実行にはVSCodeのJupyter拡張を使用しております。 2022-02-06 19:10:56
python Pythonタグが付けられた新着投稿 - Qiita conda installでインストールできなかった場合の対応 https://qiita.com/nabe_oct/items/10ce38654319de043fac condainstallでインストールできなかった場合の対応ここでは筆者が直面したパッケージのインストール失敗の際に行なった解消方法についてまとめる。 2022-02-06 19:03:28
js JavaScriptタグが付けられた新着投稿 - Qiita NextAuthを完全に理解する #2 https://qiita.com/kage1020/items/e5b0053d7046a9b1f628 2022-02-06 19:50:42
js JavaScriptタグが付けられた新着投稿 - Qiita Webの勉強はじめてみた その28 〜脆弱性の対策〜 https://qiita.com/mybrother_jake/items/b14a3ed4c94308893b65 クライアントから受け取ったデータを使ってコマンドを実行しないことが重要XSS脆弱性Webサービスの外部からの入力で表示が変化する機能において、意図しないHTMLJavaScriptCSSの変更ができる脆弱性postspugeachpostinpostsppostcontentp投稿日時postcreatedAthrタグとして認識させるは非推奨とのこと。 2022-02-06 19:24:58
Linux Ubuntuタグが付けられた新着投稿 - Qiita Ubuntu Server 20.04.3 LTS 構築#10 セキュリティ設定5-3 https://qiita.com/art22/items/cbb6f4942c3c911d0dc4 この箇所は次回の記事で準備していたものを事前に記述していました。 2022-02-06 19:18:56
AWS AWSタグが付けられた新着投稿 - Qiita AWS DBまとめ https://qiita.com/yoshiki_mbp/items/83cdebc43c073b692376 半構造データログ、センサーデータ、位置情報、設定ファイルなど非構造データテキストファイルメモ書き、音声データキーバリュー型データモデルNoSQLの代表的なデータモデルデータはキーとバリューから構成される⇒RDBのような数値や文字列ではなく、JSONのようなデータもバリューとして格納できるマルチAZDynamoDBでは、自動でヶ所のAZに保存される結果整合性モデルマルチAZにより、ヶ所への書きこみ完了に時間がかかる。 2022-02-06 19:39:23
Git Gitタグが付けられた新着投稿 - Qiita Gitコマンドまとめ https://qiita.com/nabe_oct/items/1a461588f85d4f05db11 gitpushuoriginmaster・既存のプロジェクトから始る・既存のGitHub上のプロジェクトのURLをコピーする任意の場所にディレクトリを用意・移動するGitcloneコマンドでリモートリポジトリから情報をコピーするGitのデータの持ち方・圧縮ファイルファイル・ツリーコミットしたときのスナップショットファイル、圧縮ファイル・コミットツリー、作成者、日付、コミットメッセージ、親コミットリポジトリについて・リモートリポジトリは複数登録することができるGitの準備をするローカルリポジトリを新規作成する。 2022-02-06 19:04:11
海外TECH DEV Community How to make a sponsors site with Next.js, Tailwind CSS, and Stripe 💵 https://dev.to/avneesh0612/how-to-make-a-sponsors-site-with-nextjs-tailwind-css-and-stripe-32fj How to make a sponsors site with Next js Tailwind CSS and Stripe Hello everyone ever thought of creating a site that can allow you to accept sponsors Let s build a site to accept sponsors today Setup Setting up Next js appI am going to use Tailwind CSS for styling our app so I will use the with tailwindcss template npx create next app e with tailwindcss sponsors site Setting up StripeFor accepting the payments I am going to use Stripe So go to Stripe and sign in up Go ahead and create a new account this account is like a store and it would be different for every app Getting the API keysClick on the Developers tab at the top If you click on API keys then you would be able to see your API keys Making the frontendI am going to make a simple UI for the front end Feel free to change this UI to what you like This is what I am building Delete everything inside the main div and add the following styles to the div lt div className flex h screen w screen items center justify evenly bg slate p gt lt div gt You should now see a blank screen with a dark blue background Adding the textIf you see there is some text in the left part so add the following lt div className w gt lt h className text xl font bold text cyan gt Love what I do Feel free to support me with a donation lt h gt lt p className mt text gray gt Thanks in advance Each donation of yours means a lot however little it might be lt p gt lt div gt This will add some basic text It is more or less in the center because there is nothing for the right side so let s build the card Building the sponsor cardCreating the containerThis is going to hold all the content inside of the card So create a div with some basic stylings lt div className flex w flex col items center space y rounded md bg blue p gt lt div gt Adding an InputWe want people to be able to type how much they wanna sponsor and also show the currency we are using So inside the div add this lt div className flex w full items center rounded lg bg gray text white focus outline none gt lt p className rounded l lg bg gray px py text lg text black gt INR lt p gt lt input type number className w full rounded lg bg transparent px py text white placeholder gray transition duration focus outline none placeholder Enter Amount value amount amount onChange e gt setAmount parseInt e target value gt lt div gt Since we need to store the input we are going to use the useState hook const amount setAmount useState lt number null gt Typescript comes out of the box with the new Next Tailwind template so I have also added the types You should now see a card like this Adding a submit buttonI have created a simple button that does nothing for now lt button className w full rounded lg bg cyan py text xl font semibold hover bg cyan gt lt span gt Sponsor lt span gt lt button gt It now shows the button Adding buttons with amountI am also adding buttons that show a recommended price like and inr To keep the code clean we will use a map So create a new variable defaultAmountsconst defaultAmounts Between the input and submit button add a map now lt div className flex w full items center space x gt defaultAmounts map buttonAmount gt lt button className amount buttonAmount bg cyan bg gray rounded full px py transition duration onClick gt setAmount buttonAmount key buttonAmount gt ₹ buttonAmount lt button gt lt div gt This will add buttons between the input and the button which change the amount Creating Stripe checkout Installing the packages neededWe need packages so install them npm i axios stripe stripe js stripe npmyarn add axios stripe stripe js stripe yarnI am going to use stripe checkout so after the user clicks the button they will be redirected to a stripe page Adding the env variablesCreate a new env local file and add the API keys that you got from the stripe dashboard STRIPE SECRET KEY lt secret key gt NEXT PUBLIC STRIPE PUBLIC KEY lt public key gt You also need to restart the server after adding in the env variables Making an API endpointTo interact with stripe we have to create an API endpoint So inside pages api create a new file create checkout session ts And add the following const stripe require stripe process env STRIPE SECRET KEY import NextApiRequest NextApiResponse from next const URL http localhost const handler async req NextApiRequest res NextApiResponse gt const amount req body const items price data currency inr product data name Sponsoring Avneesh unit amount amount quantity const session await stripe checkout sessions create line items items mode payment success url URL success cancel url URL res status json id session id export default handler Here you can replace the currency and the name According to your use Using the API in frontendCreate a new async function createCheckOutSession and add it to the button const createCheckOutSession async gt lt button onClick createCheckOutSession className w full rounded lg bg cyan py text xl font semibold hover bg cyan gt lt span gt Sponsor lt span gt lt button gt Now let s write out the function const createCheckOutSession async gt const stripe await stripePromise const checkoutSession await axios post api create checkout session amount amount const result await stripe redirectToCheckout sessionId checkoutSession data id if result error alert result error message We also need to add stripePromise like this const stripePromise loadStripe process env NEXT PUBLIC STRIPE PUBLIC KEY Finally add the following imports import loadStripe from stripe stripe js import axios from axios The payment now works But the success shows a page so let s create that Creating a success pageCreate a new file success tsx in the pages folder and add the following const Success gt return lt div className flex h screen w screen items center justify center bg slate gt lt h className text xl font bold text cyan gt Thank you for sponsoring me lt h gt lt div gt export default Success This will give you a simple page like this Feel free to change this to match your theme Deploying Changing the URL in create checkout sessionGo to create checkout session ts and replace the URL variable with this const URL process env NODE ENV development http localhost Here replace my URL with yours Adding code to a GitHub repoCommitting the code git add git commit m built my sponsor site Create a new repo on GitHub Copy the commands in pushing to an existing repo and paste it into your terminalIf you refresh the site you will be able to see your code Switching to production in StripeClick on Activate account in stripe dashboardNow fill out all your detailsSwitch off the test mode and get your API keys We are going to need this while deploying our app to vercel Deploying to vercelGo to Vercel and create a new project Select your GitHub repo and hit deployWait for some time for it to be deployed After it is deployed go to Environment variables inside of settings And add in the stripe variables Go to deployments and redeploy the latest version Your sponsors app is ready show it to the world ConclusionHope you liked this tutorial and were able to build out your sponsor s site If you did then feel free to share it in the comments See ya next time ️ Useful linksGitHub repoMy sponsor s siteLet s connect 2022-02-06 10:15:03
ニュース BBC News - Home Queen backs Camilla to be Queen Consort on Jubilee https://www.bbc.co.uk/news/uk-60274816?at_medium=RSS&at_campaign=KARANGA charles 2022-02-06 10:42:23
ニュース BBC News - Home Levi Bellfield confesses to Lin and Megan Russell murders, lawyer says https://www.bbc.co.uk/news/uk-england-kent-60278013?at_medium=RSS&at_campaign=KARANGA bellfield 2022-02-06 10:55:10
ニュース BBC News - Home Neighbours under threat after Channel 5 drops show https://www.bbc.co.uk/news/entertainment-arts-60277939?at_medium=RSS&at_campaign=KARANGA australian 2022-02-06 10:46:58
ニュース BBC News - Home 'Scotland were world class but England fly-half Smith should have stayed on' https://www.bbc.co.uk/sport/rugby-union/60275340?at_medium=RSS&at_campaign=KARANGA x Scotland were world class but England fly half Smith should have stayed on x Ex England scrum half Matt Dawson hails Scotland s performance but questions why England fly half Marcus Smith was replaced 2022-02-06 10:45:48
サブカルネタ ラーブロ 旭川ラーメン ありこま 塩篇 http://ra-blog.net/modules/rssc/single_feed.php?fid=196231 一味唐辛子 2022-02-06 10:11:29
サブカルネタ ラーブロ 幸楽苑@相模原 南橋本 http://ra-blog.net/modules/rssc/single_feed.php?fid=196230 相模原南 2022-02-06 10:05:06
北海道 北海道新聞 支笏湖ブルーと外輪山一望、イチャンコッペ山 https://www.hokkaido-np.co.jp/article/642551/ 登山者 2022-02-06 19:12:00
北海道 北海道新聞 西武の山川、1軍キャンプ合流 柵越え連発「楽しかった」 https://www.hokkaido-np.co.jp/article/642550/ 宮崎県日南市 2022-02-06 19:11:00
北海道 北海道新聞 日本ハム、初実戦は全て1死満塁 新庄監督「一番力む場面」 https://www.hokkaido-np.co.jp/article/642549/ 日本ハム 2022-02-06 19:11:00
北海道 北海道新聞 スノボ村瀬、本来の力発揮できず 「悔しいの一言」と唇かむ https://www.hokkaido-np.co.jp/article/642548/ 発揮 2022-02-06 19:11:00
北海道 北海道新聞 元島民の体験を漫画に 根室 北方領土の日の7日にユーチューブで公開 https://www.hokkaido-np.co.jp/article/642547/ 北方領土の日 2022-02-06 19:04:00
北海道 北海道新聞 高校の観光甲子園、2部門で決勝 兵庫・篠山鳳鳴、高知・檮原がV https://www.hokkaido-np.co.jp/article/642546/ 鳳鳴 2022-02-06 19:03:00
ビジネス 東洋経済オンライン 「不眠症に苦しむ2人」が深夜の街に出て見た光景 漫画「君は放課後インソムニア」第1集・第3話 | 君は放課後インソムニア | 東洋経済オンライン https://toyokeizai.net/articles/-/504782?utm_source=rss&utm_medium=http&utm_campaign=link_back 富士山さんは思春期 2022-02-06 19:30: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件)