python |
Pythonタグが付けられた新着投稿 - Qiita |
2022年のPythonの組み込みvenvツールについて |
https://qiita.com/daydream_believer/items/d93516fb0626381cd118
|
pipenvpipenv |
2022-07-01 21:42:47 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
JavaScriptのカリー化について |
https://qiita.com/hu-yu/items/3107abbfaf44fbe4e84a
|
treturnbgtreturncgtreturn |
2022-07-01 21:46:21 |
golang |
Goタグが付けられた新着投稿 - Qiita |
【Go-sqlx】INSERT、UPDATEなどでプレースフォルダを使う時に、構造体に`db:***`タグを打てばそのまま使える |
https://qiita.com/rikimaru-odd-person/items/48539c093258dc098e38
|
gosqlx |
2022-07-01 21:56:06 |
Linux |
CentOSタグが付けられた新着投稿 - Qiita |
【Laravel 】専用サーバにデプロイした時のメモ |
https://qiita.com/monji586/items/433b19d0e8c42660cf33
|
laravel |
2022-07-01 21:57:13 |
技術ブログ |
Developers.IO |
セッションマネージャーを利用してローカル PC と プライベートサブネットにある EC2 間でデータ転送したときのデータ転送料を調べてみた |
https://dev.classmethod.jp/articles/session-manager-data-transfer-fees/
|
rsync |
2022-07-01 12:57:35 |
海外TECH |
Ars Technica |
The world can’t wean itself off Chinese lithium |
https://arstechnica.com/?p=1863691
|
white |
2022-07-01 12:00:51 |
海外TECH |
MakeUseOf |
How to Make Your Instagram More Private: 8 Useful Tips |
https://www.makeuseof.com/tag/make-instagram-more-private/
|
instagram |
2022-07-01 12:33:32 |
海外TECH |
MakeUseOf |
7 Ways to Fix Excel Opening a Blank Document |
https://www.makeuseof.com/ways-to-fix-excel-opening-blank-document/
|
excel |
2022-07-01 12:30:14 |
海外TECH |
MakeUseOf |
How to Add a Passcode to Your Kindle for Added Security |
https://www.makeuseof.com/how-to-add-passcode-kindle/
|
people |
2022-07-01 12:15:14 |
海外TECH |
DEV Community |
tsParticles 2.1.3 Released |
https://dev.to/matteobruni/tsparticles-213-released-42dk
|
tsParticles Released tsParticles Changelog Bug FixesFix Fixed typo in readme for react tsparticles thanks to brainsaysno closes Fix Fixed issue with OutMode bounce when particles are moved outside the canvas bounds from other sources closes matteobruni tsparticles tsParticles Easily create highly customizable particles confetti and fireworks animations and use them as animated backgrounds for your website Ready to use components available for React js Vue js x and x Angular Svelte jQuery Preact Inferno Solid Riot and Web Components tsParticles TypeScript ParticlesA lightweight TypeScript library for creating particles Dependency free browser ready and compatible withReact js Vue js x and x Angular Svelte jQuery Preact Inferno Riot js Solid js and Web Components Table of Contents️️This readme refers to upcoming vversion read here for v documentation ️️Use for your websiteLibrary installationOfficial components for some of the most used frameworksAngularInfernojQueryPreactReactJSRiotJSSolidJSSvelteVueJS xVueJS xWeb ComponentsWordPressPresetsBig CirclesBubblesConfettiFireFireflyFireworksFountainLinksSea AnemoneSnowStarsTrianglesTemplates and ResourcesDemo GeneratorCharacters as particlesMouse hover connectionsPolygon maskAnimated starsNyan cat flying on scrolling starsBackground Mask particlesVideo TutorialsMigrating from Particles jsPlugins CustomizationsSponsorsDo you want to use it on your website Documentation and Development references here This library is available on… View on GitHub |
2022-07-01 12:31:37 |
海外TECH |
DEV Community |
Setup Laravel 9 with JWT-Authentification |
https://dev.to/elayachiabdelmajid/setup-laravel-9-with-jwt-authentification-2hb1
|
Setup Laravel with JWT AuthentificationAre you looking to start building a project with backend laravel and send API requests using Rest API here is a good tutorial In this tutorial I will build a simple backend project with laravel and Tymon JWT auth Setup a Laravel Project using ComposerThere are a few options when it comes to installing Laravel We will be using Composer to setup the Laravel framework For this you will need to install the following ComposerNodeAnd for development you will be needing PHP After installing all of this we can simply run the following command to scaffold a complete Laravel project composer create project Laravel laravel laravel jwt rest apiSetup a env file database connexionFirst create a database by the same name of the project laravel jwt rest api add connexion to env file DB CONNECTION mysqlDB HOST DB PORT DB DATABASE laravel jwt rest apiDB USERNAME rootDB PASSWORD Now Let s Install JWT Authcomposer require tymon jwt auth ignore platform reqsAnd you need to install laravel to generate jwt encryption keys This command will create the encryption keys needed to generate secure access tokens php artisan jwt secretAfter successfully install laravel jwt register providers Open config app php and put the bellow code providers gt … Tymon JWTAuth Providers LaravelServiceProvider class aliases gt … JWTAuth gt Tymon JWTAuth Facades JWTAuth JWTFactory gt Tymon JWTAuth Facades JWTFactory JWT auth package comes up with middlewares that we can use Register auth jwt middleware in app Http Kernel phpprotected routeMiddleware auth gt App Http Middleware Authenticate class auth basic gt Illuminate Auth Middleware AuthenticateWithBasicAuth class auth session gt Illuminate Session Middleware AuthenticateSession class cache headers gt Illuminate Http Middleware SetCacheHeaders class can gt Illuminate Auth Middleware Authorize class guest gt App Http Middleware RedirectIfAuthenticated class jwtAuth gt App Http Middleware JWTMiddleware class password confirm gt Illuminate Auth Middleware RequirePassword class signed gt Illuminate Routing Middleware ValidateSignature class throttle gt Illuminate Routing Middleware ThrottleRequests class verified gt Illuminate Auth Middleware EnsureEmailIsVerified class Now we need to modify User model Open App Models User php file and implement Tymon JWTAuth Contracts JWTSubject interface We also need to add two model methods getJWTIdentifier and getJWTCustomClaims lt phpnamespace App Models use Illuminate Contracts Auth MustVerifyEmail use Illuminate Database Eloquent Factories HasFactory use Illuminate Foundation Auth User as Authenticatable use Illuminate Notifications Notifiable use Tymon JWTAuth Contracts JWTSubject class User extends Authenticatable implements JWTSubject use HasFactory Notifiable Get the identifier that will be stored in the subject claim of the JWT return mixed public function getJWTIdentifier return this gt getKey Return a key value array containing any custom claims to be added to the JWT return array public function getJWTCustomClaims return Next the default authentication guard is web We need to change it to api Open config auth php file and change default guard to api lt phpreturn defaults gt guard gt api passwords gt users guards gt web gt driver gt session provider gt users api gt driver gt jwt provider gt users hash gt false providers gt users gt driver gt eloquent model gt App Models User class passwords gt users gt provider gt users table gt password resets expire gt throttle gt password timeout gt Add Authentication routesWe need to register authentication routes into routes api php file Open the file and add below routes into it userRoute post login AuthController class login Route post register AuthController class register Route get logout AuthController class logout gt middleware jwtAuth Route post refresh AuthController class refresh gt middleware jwtAuth Route get user profile AuthController class getUser gt middleware jwtAuth Create AuthController controller classWe have defined routes for authentication so far We need to create a controller class to build application logic The below Artisan command will generate a controller class at App Http Controllers Api directory php artisan make controller AuthControllerIn the controller class add the methods as per routes lt phpnamespace App Http Controllers API use App Http Controllers Controller use Validator use App Models User use Exception use Illuminate Http Request use Illuminate Support Facades Auth use Tymon JWTAuth Exceptions JWTException use Symfony Component HttpFoundation Response use Tymon JWTAuth Facades JWTAuth class AuthController extends Controller public token true public function register Request request validator Validator make request gt all name gt required email gt required email password gt required c password gt required same password if validator gt fails return response gt json error gt validator gt errors user new User user gt name request gt name user gt email request gt email user gt password bcrypt request gt password user gt save if this gt token return this gt login request return response gt json success gt true data gt user Response HTTP OK public function login Request request input request gt only email password jwt token null if jwt token JWTAuth attempt input return response gt json success gt false message gt Invalid Email or Password Response HTTP UNAUTHORIZED return response gt json success gt true token gt jwt token user gt Auth user public function logout Request request try JWTAuth invalidate JWTAuth parseToken request gt token return response gt json success gt true message gt User logged out successfully catch JWTException exception return response gt json success gt false message gt Sorry the user cannot be logged out Response HTTP INTERNAL SERVER ERROR public function getUser Request request try user JWTAuth authenticate request gt token return response gt json user gt user catch Exception e return response gt json success gt false message gt something went wrong We have created methods for authenticating APIs for Login Register getUser Token Refresh and Logout routes Create JWTMiddleware controller classWe need to protect our routes before the user gets into the controllers for that we need to create a middleware JWTMiddleware using the command php artisan make middleware JWTMiddlewareThe JWTMiddleware contains the verification of the Token sent with API lt phpnamespace App Http Middleware use Closure use Illuminate Http Request use Tymon JWTAuth Facades JWTAuth class JWTMiddleware Handle an incoming request param Illuminate Http Request request param Closure Illuminate Http Request Illuminate Http Response Illuminate Http RedirectResponse next return Illuminate Http Response Illuminate Http RedirectResponse public function handle Request request Closure next message try check validation of the token JWTAuth parseToken gt authenticate return next request catch Tymon JWTAuth Exceptions TokenExpiredException e message Token expired catch Tymon JWTAuth Exceptions TokenInvalidException e message Invalid token catch Tymon JWTAuth Exceptions JWTException e message Provide token return response gt json success gt false message gt message Do the migrationFirst you need to create a database by the name laravel jwt rest api then run this command php artisan migrate Test application in PostmanWe have completed the application coding Start the Laravel server using below Artisan command php artisan serveFor testing APIs we will use Postman application Postman is an API platform for building and using APIs We will test all API Lets start from register API Register APIAll API routes are prefixed with api namespace In the postman use api register API endpoint Pass name email password and c password parameters into request You will get message and user details into response Login APIUse api login API endpoint with email password parameter with request If the email and password matches with registered user you will receive token json object into response GetUser APIAll JWTMiddleware middleware routes are protected with api guard You need to pass access token in Header as bearer token Logout APITo logout the user you need to invalidate the current token You can simply call auth gt logout method to invalidate current access token Once user logged out it can t access protected routes ConclusionEventually our tutorial is over We have learned how to implement JWT authentication in Laravel application In the next tutorial we will use JWT token for REST API I hope this tutorial will help on your development If you liked this tutorial please consider to share with your friends |
2022-07-01 12:23:54 |
Apple |
AppleInsider - Frontpage News |
M2 MacBook Pro and 15 years of iPhone on the AppleInsider Podcast |
https://appleinsider.com/articles/22/07/01/m2-macbook-pro-and-15-years-of-iphone-on-the-appleinsider-podcast?utm_medium=rss
|
M MacBook Pro and years of iPhone on the AppleInsider PodcastThere s so much to look forward to in iOS and more but there s also time on this AppleInsider Podcast episode to look back so fondly at the iPhone on its th birthday Yes we ve got the new M inch MacBook Pro and are trying hard to work out why anyone would buy one On the other hand though there s the forthcoming M MacBook Air to dream about Then at least a year or two away there s the promise of TSMC manufacturing even more powerful nm processors ーand all that could bring to future Apple devices Read more |
2022-07-01 12:50:51 |
Apple |
AppleInsider - Frontpage News |
Apple hikes iPhone 13 prices in Japan |
https://appleinsider.com/articles/22/07/01/apple-hikes-iphone-13-prices-in-japan?utm_medium=rss
|
Apple hikes iPhone prices in JapanApple has raised the price of the iPhone range by around a fifth in Japan as the country faces inflation and a weakening currency Alpine Green iPhone ProInternational pricing for Apple devices obviously varies depending on currency values and logistical issues Until this week however the iPhone has actually been slightly cheaper in Japan than the US Read more |
2022-07-01 12:48:21 |
海外TECH |
Engadget |
Anova's Precision Cooker Nano drops to $99 at Amazon |
https://www.engadget.com/anovas-precision-cooker-nano-drops-to-99-at-amazon-123301963.html?src=rss
|
Anova x s Precision Cooker Nano drops to at AmazonIf you re looking to experiment more in the kitchen sous vide cooking could be a way to do that Anova makes a couple of WiFi connected sous vide machines that we like and our favorite the Precision Cooker Nano is back on sale for That s percent off and one of the best prices we ve seen it making it a good time to grab the entry level device Buy Precision Cooker Nano at Amazon You ll need a couple of things to give sous vide a try but the one that you probably don t already have at home is a machine like the Nano This method of cooking involves putting food in a sealable bag and then cooking it in a water bath Devices like the Nano constantly circulate that water while keeping it at a precise temperature so your food comes out perfectly done not over or undercooked Anova s Precision Cooker Nano earned a spot on our list of favorite kitchen gadgets because it combines affordability and precision in a compact device Normally priced at the Nano comes in at only pounds and its small enough to fit in your kitchen s utensil drawer It uses watts of power to heat water for up to hours before you ll need to recharge it so you ll be able to conduct a number of sous vide tests before it needs more juice The Nano has onboard controls that you can use to adjust temperature and timing or you can connect it via Bluetooth to your phone and do so via its companion mobile app Unlike more expensive Anova machines the Nano doesn t connect via WiFi and it also has a fixed clamp that attaches to your cooking pot rather than an adjustable one Aside from those features the biggest differences between the Nano and Anova s standard Precision Cooker lie in wattage and size But we think the Nano is a great option for all home cooks and sous vide newbies will find it especially easy to use Follow EngadgetDeals on Twitter and subscribe to the Engadget Deals newsletter for the latest tech deals and buying advice |
2022-07-01 12:33:01 |
海外TECH |
Engadget |
NVIDIA's new Shield update can stop late-night movies waking up the entire house |
https://www.engadget.com/shield-tv-update-night-listening-mode-120502488.html?src=rss
|
NVIDIA x s new Shield update can stop late night movies waking up the entire houseNVIDIA has rolled out Experience Upgrade v for all Shield TV and TV Pro units and one of the features it brings will make watching action movies without earphones more feasible for night owls The new Night Listening mode can optimize sounds when it s switched on so that loud explosions are subdued while quiet dialogue gets emphasized even while the volume is on low quot Enjoy watching movies or playing games at night without disturbing your family quot the company said in its announcement To note the new model is available while using HDMI audio only nbsp In addition to Night Listening the latest update also enables Shield TVs to automatically switch to low latency game mode on all supported television and display models So long as a display has Automatic Low Latency Mode ALLM the streaming media device will be able to ensure that it s activated while a user is playing whether it s a local game or something from the GeForce NOW cloud gaming service By reducing latency ALLM reduces lag and allows a smoother more responsive gaming experience Upgrade comes with a few more features that include the ability to disable displaying HDR Dolby Vision content and to get notifications when the microphone is turned on nbsp Shield TV s previous update brought Android to all models and added access to a new Google Keyboard with support for voice searches It also fixed a a vulnerability that allowed remote attackers to cause a permanent denial of service While doesn t come with a big security fix it does include a bunch of bug fixes for both Shield TV app and devices |
2022-07-01 12:05:02 |
海外TECH |
CodeProject Latest Articles |
Schafkopf Starter Kit 2.3 |
https://www.codeproject.com/Articles/5334235/Schafkopf-Starter-Kit-2-3
|
schafkopf |
2022-07-01 12:22:00 |
金融 |
金融庁ホームページ |
人事異動(令和4年7月1日現在)を掲載しました。 |
https://www.fsa.go.jp/common/about/jinji/index.html
|
人事異動 |
2022-07-01 14:00:00 |
ニュース |
BBC News - Home |
Chris Pincher: Call to suspend Tory MP after groping allegations |
https://www.bbc.co.uk/news/uk-politics-62008197?at_medium=RSS&at_campaign=KARANGA
|
formal |
2022-07-01 12:13:55 |
ニュース |
BBC News - Home |
Zara Aleena: Woman killed on street was loved by everybody, says family |
https://www.bbc.co.uk/news/uk-england-london-62008828?at_medium=RSS&at_campaign=KARANGA
|
attack |
2022-07-01 12:53:33 |
ニュース |
BBC News - Home |
Wimbledon 2022: Jelena Ostapenko reaches fourth round with three-set win over Irina-Camelia Begu |
https://www.bbc.co.uk/sport/av/tennis/62013242?at_medium=RSS&at_campaign=KARANGA
|
Wimbledon Jelena Ostapenko reaches fourth round with three set win over Irina Camelia BeguWatch Jelena Ostapenko s marvellous third set display against Irina Camelia Begu taking it to advance into the fourth round of Wimbledon |
2022-07-01 12:54:56 |
北海道 |
北海道新聞 |
胆振管内27人感染 新型コロナ |
https://www.hokkaido-np.co.jp/article/700790/
|
新型コロナウイルス |
2022-07-01 21:53:00 |
北海道 |
北海道新聞 |
上川管内58人感染 新型コロナ |
https://www.hokkaido-np.co.jp/article/700565/
|
上川管内 |
2022-07-01 21:50:29 |
北海道 |
北海道新聞 |
首相、物価対策で外交成果 泉氏、自民へ対抗勢力必要 |
https://www.hokkaido-np.co.jp/article/700755/
|
岸田文雄 |
2022-07-01 21:34:53 |
北海道 |
北海道新聞 |
宇野、坂本、鍵山らが魅了 トップ選手がアイスショー |
https://www.hokkaido-np.co.jp/article/700788/
|
魅了 |
2022-07-01 21:49:00 |
北海道 |
北海道新聞 |
ヤ4―6D(1日) DeNAが2度目の4連勝 |
https://www.hokkaido-np.co.jp/article/700787/
|
連勝 |
2022-07-01 21:49:00 |
北海道 |
北海道新聞 |
最高路線価過去最低14万円 函館税務署管内 前年比3.4%減、2年連続下落 人口、観光客の減少要因 |
https://www.hokkaido-np.co.jp/article/700778/
|
過去最低 |
2022-07-01 21:50:07 |
北海道 |
北海道新聞 |
札幌市選管、点字の名簿で候補者名誤る 7人が使用 参院選 |
https://www.hokkaido-np.co.jp/article/700786/
|
期日前投票所 |
2022-07-01 21:48:00 |
北海道 |
北海道新聞 |
ニトリ増収減益 円安、コスト上昇が利益圧迫 3~5月期 家具値上げ検討 |
https://www.hokkaido-np.co.jp/article/700779/
|
増収減益 |
2022-07-01 21:45:16 |
北海道 |
北海道新聞 |
自治体の業務で情報漏えい NTTデータ関西 |
https://www.hokkaido-np.co.jp/article/700762/
|
関西 |
2022-07-01 21:22:27 |
北海道 |
北海道新聞 |
マルコス氏、基地で演説 「紛争念頭に空軍強化を」 |
https://www.hokkaido-np.co.jp/article/700761/
|
紛争 |
2022-07-01 21:20:27 |
北海道 |
北海道新聞 |
DF吉田、サンプドリア退団 サッカー日本代表主将 |
https://www.hokkaido-np.co.jp/article/700781/
|
退団 |
2022-07-01 21:35:00 |
北海道 |
北海道新聞 |
バスケW杯、日本、豪州に完敗 アジア1次予選 |
https://www.hokkaido-np.co.jp/article/700780/
|
豪州 |
2022-07-01 21:35:00 |
北海道 |
北海道新聞 |
全日空のハワイ定期便が再開 空飛ぶウミガメ、2年ぶり |
https://www.hokkaido-np.co.jp/article/700777/
|
新型コロナウイルス |
2022-07-01 21:27:00 |
北海道 |
北海道新聞 |
日2―1オ(1日) 日本ハム、連敗2で止める 上沢5勝目 |
https://www.hokkaido-np.co.jp/article/700774/
|
日本ハム |
2022-07-01 21:23:00 |
北海道 |
北海道新聞 |
室工大の太田香准教授、女性では歴代最年少で教授に就任 情報通信分野で世界でも注目 |
https://www.hokkaido-np.co.jp/article/700772/
|
室蘭工業大 |
2022-07-01 21:20:12 |
北海道 |
北海道新聞 |
オデッサ州攻撃、20人死亡 ミサイル3発、ロシアの報復か |
https://www.hokkaido-np.co.jp/article/700773/
|
高官 |
2022-07-01 21:15:00 |
北海道 |
北海道新聞 |
中山、西矢ら準決勝進出 スケートボード五輪予選開幕戦 |
https://www.hokkaido-np.co.jp/article/700769/
|
準決勝進出 |
2022-07-01 21:02:00 |
ニュース |
Newsweek |
頭部を銃で撃たれた可能性のあるホホジロザメが撮影される |
https://www.newsweekjapan.jp/stories/world/2022/07/post-99012.php
|
サメの傷が銃創であったとしても、どういった状況で銃撃されたのかは分からない。 |
2022-07-01 21:15:00 |
コメント
コメントを投稿