IT |
気になる、記になる… |
【セール】スマホ版「ドラゴンクエストVII エデンの戦士たち」が約33%オフ(11月20日まで) |
https://taisy0.com/2022/11/17/165107.html
|
石版 |
2022-11-17 08:57:41 |
IT |
気になる、記になる… |
Amazon、オーディオブック配信サービス「Audible」の2ヶ月無料&100ポイント贈呈キャンペーンを開催中(12月26日まで) |
https://taisy0.com/2022/11/17/165104.html
|
amazon |
2022-11-17 08:40:02 |
ROBOT |
ロボスタ |
Amazon「Kindle (第11世代) 電子書籍リーダー」実機レビュー 特徴と改良点、課題と注意点 比較機種は「Fire HD8」!? |
https://robotstart.info/2022/11/17/kindle-11-review.html
|
Amazon「Kindle第世代電子書籍リーダー」実機レビュー特徴と改良点、課題と注意点比較機種は「FireHD」シェアツイートはてブ電子書籍や電子ブックを利用する機会が増えていると思います。 |
2022-11-17 08:01:30 |
IT |
ITmedia 総合記事一覧 |
[ITmedia Mobile] ドコモ、防水タブレット「dtab d-51C」を店頭で11月23日から販売 |
https://www.itmedia.co.jp/mobile/articles/2211/17/news166.html
|
android |
2022-11-17 17:23:00 |
TECH |
Techable(テッカブル) |
声で睡眠不足がわかる?交通事故減少のための実証実験がスタート |
https://techable.jp/archives/186672
|
交通事故 |
2022-11-17 08:08:46 |
TECH |
Techable(テッカブル) |
会社の命運を握る「経営人材」育成の3つのポイント |
https://techable.jp/archives/186568
|
意思決定 |
2022-11-17 08:00:29 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
[ROS2 foxy] c++とpython共存パッケージのテンプレート |
https://qiita.com/ousagi_sama/items/e1eb921f1b2e6b890133
|
rosfoxyc |
2022-11-17 17:56:06 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
AtCoder Beginner Contest(ABC) 275 - Pythonでのバーチャル参加結果と内容整理 |
https://qiita.com/tk226/items/9d71b5b74dacb641c198
|
atcoder |
2022-11-17 17:37:47 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
PythonからVantageに接続する |
https://qiita.com/tmsky/items/880c8a9ffb69b73cd325
|
adata |
2022-11-17 17:30:27 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
eradata VantageのPythonライブラリ(teradataml)をさわってみよう |
https://qiita.com/tmsky/items/6afa933579da490f93c0
|
adata |
2022-11-17 17:28:36 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
【JavaScript】setTimeoutから返るIDは絶対0じゃないし、clearTimeoutに0を渡しても何もしない |
https://qiita.com/silane1001/items/a29602c7c8c507349e4e
|
cleartimeout |
2022-11-17 17:45:43 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
input type="file"の「ファイル名」を表示させたくない時はbutton要素で装飾しよう! |
https://qiita.com/shiba_it/items/ae95d9e1d0977fc0bf22
|
button |
2022-11-17 17:16:48 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
【React】UseEffectで取得した値をUseContextに渡す |
https://qiita.com/Engineer_Grotle/items/43de6d634547ba15c2bf
|
createcontext |
2022-11-17 17:10:16 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
【Ruby on Rails】デプロイ手順 |
https://qiita.com/slamdunkducksky/items/af186d7a8adbe7fb43a4
|
renderbuildsh |
2022-11-17 17:00:53 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
【Ruby on Rails】デプロイ手順 |
https://qiita.com/slamdunkducksky/items/af186d7a8adbe7fb43a4
|
renderbuildsh |
2022-11-17 17:00:53 |
技術ブログ |
Developers.IO |
AWS WAF によってブロックされたリクエストを確認する方法を教えてください |
https://dev.classmethod.jp/articles/tsnote-confirm-blocked-request-by-aws-waf/
|
awswaf |
2022-11-17 08:36:20 |
技術ブログ |
Developers.IO |
Unreal Engine5で弊社公式キャラの3Dモデル(VRM)を操作できるようにしてみた |
https://dev.classmethod.jp/articles/unreal-engine5-methoko-control/
|
engine |
2022-11-17 08:27:21 |
海外TECH |
DEV Community |
Web Development JWT Practices |
https://dev.to/baize1998/web-development-jwt-practices-59cn
|
Web Development JWT Practices ForewordThe previous post briefly introduced a high performance Go HTTP framework Hertz This article is based on a demo from the Hertz open source repository tree main bizdemo hertz jwt which describes how to use Hertz to complete the JWT authentication and authorization process It should be noted here that hertz jwt is one of many external extensions to Hertz and that Hertz s rich extension ecosystem is a great convenience for developers and worth exploring beyond this article IntroductionUse hz to generate codeUse JWT to complete login and authenticationUse Gorm and MySQL Downloadgit clone cd bizdemo hertz jwt Architecturehertz jwt├ーMakefile Generate hertz scaffolding code using the hz command line tool├ーbiz│ ├ーdal│ │ ├ーinit go │ │ └ーmysql│ │ ├ーinit go Initialising database connections│ │ └ーuser go Database operations│ ├ーhandler│ │ ├ーping go│ │ └ーregister go Register handler│ ├ーmodel│ │ ├ーsql│ │ │ └ーuser sql│ │ └ーuser go Defining the database model│ ├ーmw│ │ └ーjwt go Initialising the hertz jwt middleware│ ├ーrouter│ │ └ーregister go│ └ーutils│ └ーmd go MD├ーdocker compose yml MySQL container├ーgo mod├ーgo sum├ーmain go Hertz startup functions├ーreadme md├ーrouter go Routing Registration└ーrouter gen go AnalysisThe list of interfaces for this demo is as follows customizeRegister registers customize routers func customizedRegister r server Hertz r POST register handler Register r POST login mw JwtMiddleware LoginHandler auth r Group auth mw JwtMiddleware MiddlewareFunc auth GET ping handler Ping User RegistrationThe user data of the current demo is persisted through mysql by gorm so before logging in the user needs to be registered The registration process is as follows get the username password and email addressdetermine if the user existscreate the user User log in Authentication The server needs to validate the user account and password and sign a jwt token when the user logs in for the first time JwtMiddleware err jwt New amp jwt HertzJWTMiddleware Key byte secret key Timeout time Hour MaxRefresh time Hour Authenticator func ctx context Context c app RequestContext interface error var loginStruct struct Account string form account json account query account vd len gt amp amp len lt msg Illegal format Password string form password json password query password vd len gt amp amp len lt msg Illegal format if err c BindAndValidate amp loginStruct err nil return nil err users err mysql CheckUser loginStruct Account utils MD loginStruct Password if err nil return nil err if len users return nil errors New user already exists or wrong password return users nil PayloadFunc func data interface jwt MapClaims if v ok data model User ok return jwt MapClaims jwt IdentityKey v return jwt MapClaims Authenticator A function that sets up the user information to be authenticated when logging in The demo defines a loginStruct structure that receives the user login information and authenticates the validity The return value of this function users will provide the payload data source for the subsequent generation of the jwt token PayloadFunc Its input is the return value of Authenticator which is responsible for parsing users and injecting the username into the payload part of the token Key specifies the key used to encrypt the jwt token as secret key Timeout specifies that the token is valid for one hour MaxRefresh sets the maximum token refresh time allowing the client to refresh the token within TokenTime MaxRefresh appending a Timeout duration Return of TokenJwtMiddleware err jwt New amp jwt HertzJWTMiddleware LoginResponse func ctx context Context c app RequestContext code int token string expire time Time c JSON http StatusOK utils H code code token token expire expire Format time RFC message success LoginResponse After a successful login jwt token information is returned with the response you can customize the content of this part but be careful not to change the function signature as it is strongly bound to LoginHandler Token ValidationWhen a client requests a route with a jwt middleware configured the server verifies the jwt token it carries JwtMiddleware err jwt New amp jwt HertzJWTMiddleware TokenLookup header Authorization query token cookie jwt TokenHeadName Bearer HTTPStatusMessageFunc func e error ctx context Context c app RequestContext string hlog CtxErrorf ctx jwt biz err v e Error return e Error Unauthorized func ctx context Context c app RequestContext code int message string c JSON http StatusOK utils H code code message message TokenLookup This is used to set the source of the token you can choose header query cookie or param the default is header Authorization the first one read from the left side takes precedence The current demo will use header as the data source so when accessing the ping interface you will need to store the token information in the HTTP Header TokenHeadName This is used to set the prefix used to retrieve the token from the header the default is Bearer HTTPStatusMessageFunc This is used to set the error message that will be included in the response when an error occurs in the jwt validation process you can wrap these yourself Unauthorized used to set the response function for a failed jwt validation process the current demo returns the error code and error message Extracting User InformationJwtMiddleware err jwt New amp jwt HertzJWTMiddleware IdentityKey IdentityKey IdentityHandler func ctx context Context c app RequestContext interface claims jwt ExtractClaims ctx c return amp model User UserName claims IdentityKey string Ping func Ping ctx context Context c app RequestContext user c Get mw IdentityKey c JSON utils H message fmt Sprintf username v user model User UserName IdentityHandler The function used to set the identity information to be retrieved In the demo here the payload of the token is extracted and the username is stored in the context information with the IdentityKey IdentityKey sets the key used to retrieve the identity the default is identity Ping Constructs the response Retrieves the username information from the context information and returns it Other Components Code GenerationMost of the code above is scaffolded code generated through the hz command line tool so developers don t need to spend a lot of time building a good code structure and just focus on writing the business hz new mod github com cloudwego hertz examples bizdemo hertz jwtMost of the code above is scaffolded code generated through the hz command line tool so developers don t need to spend a lot of time building a good code structure and just focus on writing the business Sample Code Sourced from hz Official Document idl hello thriftnamespace go hello examplestruct HelloReq string Name api query name api annotations to facilitate parameter binding struct HelloResp string RespBody service HelloService HelloResp HelloMethod HelloReq request api get hello execute under GOPATHhz new idl idl hello thrift Parameter BindingHertz uses the open source library go tagexpr for parameter binding and validation which the current demo uses for user registration and login registervar registerStruct struct Binding and validation of parameters by declaring tags Username string form username json username query username vd len gt amp amp len lt msg Illegal format Email string form email json email query email vd len gt amp amp len lt amp amp email msg Illegal format Password string form password json password query password vd len gt amp amp len lt msg Illegal format loginvar loginStruct struct Binding and validation of parameters by declaring tags Account string form account json account query account vd len gt amp amp len lt msg Illegal format Password string form password json password query password vd len gt amp amp len lt msg Illegal format if err c BindAndValidate amp loginStruct err nil return nil err vd used to validate the data format e g string length checks email type checks email form binds the body content of the request content type gt multipart form data or application x www form urlencoded binds the key value of the formjson bind the body content of the request content type gt application json bind the json parametersquery binds the query parameter of the requestThe parameter bindings need to be in accordance with the priority path gt form gt query gt cookie gt header gt json gt raw bodyFurther usage can be found in Documentation GormFor more information on Gorm s operation of MySQL please refer to Gorm RunRunning the mysql containercd bizdemo hertz jwt amp amp docker compose upCreating a mysql databaseAfter connecting to mysql execute user sqlrun the democd bizdemo hertz jwt amp amp go run main go API Requests Register requestcurl location request POST localhost register header Content Type application json data raw Username admin Email admin test com Password admin response code message success Login requestcurl location request POST localhost login header Content Type application json data raw Account admin Password admin response code expire T message success token eyJhbGciOiJIUzINiIsInRcCIIkpXVCJ eyJleHAiOjENjgNjcMjQsImlkIjoyLCJvcmlnXlhdCIMTYODUNDMyNH qzbDJLQvsedOHNpRpDjVLfl kcKWk Routing Access requestcurl location request GET localhost auth ping header Authorization Bearer token response message username admin References |
2022-11-17 08:42:15 |
海外TECH |
Engadget |
Blizzard games like 'World of Warcraft' will go offline in China next year |
https://www.engadget.com/blizzard-games-like-world-of-warcraft-will-go-offline-in-china-next-year-084952778.html?src=rss
|
Blizzard games like x World of Warcraft x will go offline in China next yearBlizzard Entertainment will be suspending key games like Overwatch and World of Warcraft in China because it failed to reach an agreement with partner NetEase it announced Those titles along with Hearthstone Starcraft Heroes of the Storm Diablo III and Warcraft III Reforged will be unavailable in China starting on January Diablo Immortal which arrived earlier this year won t be affected as it s covered by a separate agreement according to NetEase nbsp The two parties have not reached a deal to renew the agreements that is consistent with Blizzard s operating principles and commitments to players and employees and the agreements are set to expire in January Blizzard said in the press release We will suspend new sales in the coming days and Chinese players will be receiving details of how this will work soon Upcoming releases for World of Warcraft Dragonflight Hearthstone March of the Lich King and season of Overwatch will proceed later this year NetEase is China s second largest gaming company and has partnered with Blizzard since It s a key player for Blizzard in the nation helping guarantee that its games meet China s strict content requirements The deal wasn t just about money but also who owned the the intellectual property and player data according to Bloomberg nbsp The longstanding agreement didn t appear to end amicably One day when what has happened behind the scene could be told developers and gamers will have a whole new level understanding of how much damage a jerk can make said NetEase s president of global investment and partnership Simon Zhu in a LinkedIn post spotted by TechCrunch Blizzard meanwhile said we are looking for alternatives to bring our games back to players in the future |
2022-11-17 08:49:52 |
医療系 |
医療介護 CBnews |
首都圏4都県で梅毒患者の増加に歯止めかからず-過去最多上回る状況、早めの受診や予防促す |
https://www.cbnews.jp/news/entry/20221117171407
|
感染症法 |
2022-11-17 17:45:00 |
金融 |
ニュース - 保険市場TIMES |
損保ジャパン、小量乗合輸送サービス「ハコモビ」実証実験を実施 |
https://www.hokende.com/news/blog/entry/2022/11/17/180000
|
損保ジャパン、小量乗合輸送サービス「ハコモビ」実証実験を実施宮城野地域と仙石原地域間の移動支援損害保険ジャパン株式会社以下、損保ジャパンは、産学官で連携して、小量乗合輸送サービス「ハコモビ」の実証実験を、宮城野地域と仙石原地域間の移動支援といて実施すると年月日に発表した。 |
2022-11-17 18:00:00 |
海外ニュース |
Japan Times latest articles |
Opportunities for women return to Japan’s job market, but inequalities persist |
https://www.japantimes.co.jp/news/2022/11/17/business/women-workforce-post-pandemic/
|
Opportunities for women return to Japan s job market but inequalities persistThe bulk of part time and irregular jobs in Japan are performed by women an imbalance that academics say must be addressed |
2022-11-17 17:23:01 |
海外ニュース |
Japan Times latest articles |
Shohei Ohtani and Naomi Osaka among star athletes sued over collapse of crypto exchange FTX |
https://www.japantimes.co.jp/sports/2022/11/17/more-sports/ohtani-osaka-ftx-lawsuit/
|
Shohei Ohtani and Naomi Osaka among star athletes sued over collapse of crypto exchange FTXLos Angeles Angels superstar Shohei Ohtani and four time Grand Slam winner Naomi Osaka were among high profile celebrities who have been sued in a U S class |
2022-11-17 17:10:36 |
海外ニュース |
Japan Times latest articles |
Resetting Southeast Asia’s climate agenda |
https://www.japantimes.co.jp/opinion/2022/11/17/commentary/world-commentary/asean-climate-change-efforts/
|
Resetting Southeast Asia s climate agendaAs they grapple with a cascade of economic challenges from high inflation to volatile energy prices the region s governments have scaled back efforts to combat |
2022-11-17 17:33:44 |
ニュース |
BBC News - Home |
G20: Xi accuses Trudeau of leaks to media about China-Canada relations |
https://www.bbc.co.uk/news/world-asia-china-63654337?at_medium=RSS&at_campaign=KARANGA
|
canadian |
2022-11-17 08:05:33 |
ニュース |
BBC News - Home |
What do we know will be in the Autumn Statement? |
https://www.bbc.co.uk/news/uk-politics-63622032?at_medium=RSS&at_campaign=KARANGA
|
kwarteng |
2022-11-17 08:44:56 |
ニュース |
Newsweek |
韓国で、ふたたび盛り上がる「日本就職」。日本を目指す若者は日本人が考えるよりはるかに多い |
https://www.newsweekjapan.jp/stories/world/2022/11/post-100140.php
|
韓国企業はSKY出身者を優遇するが、日本企業は新卒者を大学や国籍で区別することはない。 |
2022-11-17 17:40:19 |
ニュース |
Newsweek |
「冬将軍はウクライナに味方する」──専門家 |
https://www.newsweekjapan.jp/stories/world/2022/11/post-100139.php
|
|
2022-11-17 17:21:52 |
ニュース |
Newsweek |
「この人はできる」と周囲に思わせる近道...「説明」のテクニックが学べる本 |
https://www.newsweekjapan.jp/stories/business/2022/11/post-100126.php
|
「できる人」に近づきたいなら、まずはこの本を読むことからはじめませんか『一番伝わる説明の順番』著者田中耕比古出版社フォレスト出版要約を読む最後にご紹介するのは『一番伝わる説明の順番』です。 |
2022-11-17 17:11:00 |
IT |
週刊アスキー |
AirTrunkが東京圏西部に110MW超のデータセンターを新設 |
https://weekly.ascii.jp/elem/000/004/113/4113549/
|
airtrunk |
2022-11-17 17:50:00 |
IT |
週刊アスキー |
イルミネーション装飾の連節バス「ベイサイドブルー」「あかいくつ」が夜の横浜を走る! 「ヨルノヨ」特別デザインの「みなとぶらりチケット」もノベルティー付きで販売 |
https://weekly.ascii.jp/elem/000/004/113/4113575/
|
baysideblue |
2022-11-17 17:40:00 |
IT |
週刊アスキー |
エルザ ジャパン、GeForce RTX 4090/RTX 4080搭載のミニタワーPC「ELSA GALUDA G5-ND G450E」受注開始 |
https://weekly.ascii.jp/elem/000/004/113/4113554/
|
elsagaludagndge |
2022-11-17 17:30:00 |
コメント
コメントを投稿