投稿時間:2023-01-28 00:20:03 RSSフィード2023-01-28 00:00 分まとめ(22件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS AWS Partner Network (APN) Blog Prometeia Launches New Wealth Management SaaS Platform with Support from AWS SaaS Factory https://aws.amazon.com/blogs/apn/prometeia-launches-new-wealth-management-saas-platform-with-support-from-aws-saas-factory/ Prometeia Launches New Wealth Management SaaS Platform with Support from AWS SaaS FactoryAs with most industry segments financial services are experiencing a shift towards the software as a service business and delivery model Explore how partnering with the AWS SaaS Factory team Prometeia created a new platform as a SaaS solution on AWS Prometeia is a leading provider of advisory services tech solutions and research insights A unique combination of skills has made Prometeia a leading European company for risk and wealth management solutions as well as services for institutional investors 2023-01-27 14:50:48
python Pythonタグが付けられた新着投稿 - Qiita DeepLearning基礎技術まとめ https://qiita.com/DaigakuinnseiNo/items/3f76b7f3a137a2ab0f1c deeplearning 2023-01-27 23:44:14
python Pythonタグが付けられた新着投稿 - Qiita PostgreSQLを起動しようとしたらエラーが出た。Error: Failure while executing; https://qiita.com/labokgs/items/6a72e4ed494c2ab120b3 error 2023-01-27 23:35:46
Ruby Rubyタグが付けられた新着投稿 - Qiita Mysql2::Error: Table 'users' already exists schema.rb https://qiita.com/nktyn_frtn0906/items/194b8704567a22168d6f tableusersalreadyexis 2023-01-27 23:15:45
技術ブログ Developers.IO Node-REDをローカル端末(M1 Mac)で動かしてみた https://dev.classmethod.jp/articles/running-node-red-on-a-local-terminal-m1-mac/ nodered 2023-01-27 14:55:53
海外TECH MakeUseOf How to Program a Google Nest Thermostat https://www.makeuseof.com/how-to-program-google-nest-thermostat/ bills 2023-01-27 14:45:15
海外TECH MakeUseOf Adobe Lightroom vs. Camera Raw: What Are the Similarities and Differences? https://www.makeuseof.com/adobe-lightroom-vs-camera-raw/ Adobe Lightroom vs Camera Raw What Are the Similarities and Differences Using Camera Raw should be a breeze if you re familiar with Lightroom because they re quite similar But there are also some key differences 2023-01-27 14:30:15
海外TECH MakeUseOf Doogee V30: Finally, a Rugged Phone Deserving of the Flagship Moniker https://www.makeuseof.com/doogee-v30-rugged-smartphone-review/ doogee 2023-01-27 14:05:16
海外TECH DEV Community NestJS Authentication with OAuth2.0: Fastify Local OAuth https://dev.to/tugascript/nestjs-authentication-with-oauth20-fastify-local-oauth-5gn9 NestJS Authentication with OAuth Fastify Local OAuth Series IntroThis series will cover the full implementation of OAuth Authentication in NestJS for the following types of APIs Express REST API Fastify REST API Apollo GraphQL API And it is divided in parts Configuration and operations Express Local OAuth REST API Fastify Local OAuth REST API Apollo Local OAuth GraphQL API Adding External OAuth Providers to our API Lets start the third part of this series Tutorial IntroOn this tutorial we will change the adapter from our previous REST API from Express to Fastify TLDR if you do not have minutes to read the article the code can be found on this repo Set UpStart by removing express and its dependencies yarn remove types express types express serve static core nestjs platform express cookie parser helmet types cookie parserAnd install the fastify ones yarn add nestjs platform fastify fastify fastify cookie fastify cors fastify csrf protection fastify helmet Auth Module GuardsWe need to remove express d ts and add fastify d ts import FastifyRequest as Request from fastify declare module fastify interface FastifyRequest extends Request user number Auth GuardOnly one of the types change from Request to FastifyRequest import CanActivate ExecutionContext Injectable UnauthorizedException from nestjs common import Reflector from nestjs core import isJWT from class validator import FastifyRequest from fastify import isNull isUndefined from common utils validation util import TokenTypeEnum from jwt enums token type enum import JwtService from jwt jwt service import IS PUBLIC KEY from decorators public decorator Injectable export class AuthGuard implements CanActivate constructor private readonly reflector Reflector private readonly jwtService JwtService public async canActivate context ExecutionContext Promise lt boolean gt const isPublic this reflector getAllAndOverride lt boolean gt IS PUBLIC KEY context getHandler context getClass const activate await this setHttpHeader context switchToHttp getRequest lt FastifyRequest gt isPublic if activate throw new UnauthorizedException return activate Sets HTTP Header Checks if the header has a valid Bearer token validates it and sets the User ID as the user private async setHttpHeader req FastifyRequest isPublic boolean Promise lt boolean gt const auth req headers authorization if isUndefined auth isNull auth auth length return isPublic const authArr auth split const bearer authArr const token authArr if isUndefined bearer isNull bearer bearer Bearer return isPublic if isUndefined token isNull token isJWT token return isPublic try const id await this jwtService verifyToken token TokenTypeEnum ACCESS req user id return true catch return isPublic Optional Throttler GuardWe can no longer use the NestJS default ThrottlerGuard as that one is implemented for express so create a custom one fastify throttler guard tsimport ExecutionContext Injectable from nestjs common import ThrottlerGuard from nestjs throttler import FastifyReply FastifyRequest from fastify Injectable export class FastifyThrottlerGuard extends ThrottlerGuard public getRequestResponse context ExecutionContext const http context switchToHttp return req http getRequest lt FastifyRequest gt res http getResponse lt FastifyReply gt And add it to the auth controller import FastifyThrottlerGuard from guards fastify throttler guard ApiTags Auth Controller api auth UseGuards FastifyThrottlerGuard export class AuthController Controller Private MethodsThere is a slight change on the refresTokenFromReq method import Controller UseGuards from nestjs common import ConfigService from nestjs config import ApiTags from nestjs swagger import FastifyReply FastifyRequest from fastify import isNull isUndefined from common utils validation util ApiTags Auth Controller api auth UseGuards FastifyThrottlerGuard export class AuthController private refreshTokenFromReq req FastifyRequest string const token string undefined req cookies this cookieName if isUndefined token isNull token throw new UnauthorizedException const valid value req unsignCookie token if valid throw new UnauthorizedException return value And since fastify does not have the json method we need to set the Content Type header to application json ApiTags Auth Controller api auth UseGuards FastifyThrottlerGuard export class AuthController private saveRefreshCookie res FastifyReply refreshToken string FastifyReply return res cookie this cookieName refreshToken secure this testing httpOnly true signed true path this cookiePath expires new Date Date now this refreshTime header Content Type application json EnpointsThere aren t that many changes that we need to implement on our previous express API we just need to change from Request to FastifyRequest on the Req decorator Response to FastifyReply on the Res decorator json to send method ApiTags Auth Controller api auth UseGuards FastifyThrottlerGuard export class AuthController Public Post sign up ApiCreatedResponse type MessageMapper description The user has been created and is waiting confirmation ApiConflictResponse description Email already in use ApiBadRequestResponse description Something is invalid on the request body public async signUp Origin origin string undefined Body signUpDto SignUpDto Promise lt IMessage gt return await this authService signUp signUpDto origin Public Post sign in ApiOkResponse type AuthResponseMapper description Logs in the user and returns the access token ApiBadRequestResponse description Something is invalid on the request body ApiUnauthorizedResponse description Invalid credentials or User is not confirmed public async signIn Res res FastifyReply Origin origin string undefined Body singInDto SignInDto Promise lt void gt const result await this authService signIn singInDto origin this saveRefreshCookie res result refreshToken status HttpStatus OK send AuthResponseMapper map result Public Post refresh access ApiOkResponse type AuthResponseMapper description Refreshes and returns the access token ApiUnauthorizedResponse description Invalid token ApiBadRequestResponse description Something is invalid on the request body or Token is invalid or expired public async refreshAccess Req req FastifyRequest Res res FastifyReply Promise lt void gt const token this refreshTokenFromReq req const result await this authService refreshTokenAccess token req headers origin this saveRefreshCookie res result refreshToken status HttpStatus OK send AuthResponseMapper map result Post logout ApiOkResponse type MessageMapper description The user is logged out ApiBadRequestResponse description Something is invalid on the request body ApiUnauthorizedResponse description Invalid token public async logout Req req FastifyRequest Res res FastifyReply Promise lt void gt const token this refreshTokenFromReq req const message await this authService logout token res clearCookie this cookieName path this cookiePath header Content Type application json status HttpStatus OK send message Public Post confirm email ApiOkResponse type AuthResponseMapper description Confirms the user email and returns the access token ApiUnauthorizedResponse description Invalid token ApiBadRequestResponse description Something is invalid on the request body or Token is invalid or expired public async confirmEmail Origin origin string undefined Body confirmEmailDto ConfirmEmailDto Res res FastifyReply Promise lt void gt const result await this authService confirmEmail confirmEmailDto this saveRefreshCookie res result refreshToken status HttpStatus OK send AuthResponseMapper map result Public Post forgot password HttpCode HttpStatus OK ApiOkResponse type MessageMapper description An email has been sent to the user with the reset password link public async forgotPassword Origin origin string undefined Body emailDto EmailDto Promise lt IMessage gt return this authService resetPasswordEmail emailDto origin Public Post reset password HttpCode HttpStatus OK ApiOkResponse type MessageMapper description The password has been reset ApiBadRequestResponse description Something is invalid on the request body or Token is invalid or expired public async resetPassword Body resetPasswordDto ResetPasswordDto Promise lt IMessage gt return this authService resetPassword resetPasswordDto Patch update password ApiOkResponse type AuthResponseMapper description The password has been updated ApiUnauthorizedResponse description The user is not logged in public async updatePassword CurrentUser userId number Origin origin string undefined Body changePasswordDto ChangePasswordDto Res res FastifyReply Promise lt void gt const result await this authService updatePassword userId changePasswordDto origin this saveRefreshCookie res result refreshToken status HttpStatus OK send AuthResponseMapper map result Get me ApiOkResponse type AuthResponseUserMapper description The user is found and returned ApiUnauthorizedResponse description The user is not logged in public async getMe CurrentUser id number Promise lt IAuthResponseUser gt const user await this usersService findOneById id return AuthResponseUserMapper map user User Module ControllerThere is just one change on the return type of the Res decorator from Response to FastifyReply on the delete endpoint import FastifyReply from fastify ApiTags Users Controller api users export class UsersController Delete ApiNoContentResponse description The user is deleted ApiBadRequestResponse description Something is invalid on the request body or wrong password ApiUnauthorizedResponse description The user is not logged in public async deleteUser CurrentUser id number Body dto PasswordDto Res res FastifyReply Promise lt void gt await this usersService delete id dto res clearCookie this cookieName path this cookiePath status HttpStatus NO CONTENT send MainFinally change the main file to a NestFastifyApplication and register all the plugins we installed earlier import fastifyCookie from fastify cookie import fastifyCors from fastify cors import fastifyCsrfProtection from fastify csrf protection import fastifyHelmet from fastify helmet import ValidationPipe from nestjs common import ConfigService from nestjs config import NestFactory from nestjs core import FastifyAdapter NestFastifyApplication from nestjs platform fastify import DocumentBuilder SwaggerModule from nestjs swagger import AppModule from app module async function bootstrap const app await NestFactory create lt NestFastifyApplication gt AppModule new FastifyAdapter const configService app get ConfigService app register fastifyCookie secret configService get lt string gt COOKIE SECRET app register fastifyHelmet app register fastifyCsrfProtection cookieOpts signed true app register fastifyCors credentials true origin https configService get lt string gt domain app useGlobalPipes new ValidationPipe transform true const swaggerConfig new DocumentBuilder setTitle NestJS Authentication API setDescription An OAuth authentication API made with NestJS setVersion addBearerAuth addTag Authentication API build const document SwaggerModule createDocument app swaggerConfig SwaggerModule setup api docs app document await app listen configService get lt number gt port configService get lt boolean gt testing bootstrap ConclusionI hope that I have shown just how easy it is to change an API from Express to Fastify with NestJS The github for this tutorial can be found here About the AuthorHey there my name is Afonso Barracha I am a Econometrician made back end developer that has a passion for GraphQL I used to try to post once a week but I am diving into more advance topics which take more time to write but I still try to post at least twice a month If you do not want to lose any of my posts follow me here on dev or on LinkedIn 2023-01-27 14:29:59
海外TECH DEV Community Is this a scam or legit? https://dev.to/hyunseunglee2008/is-this-a-scam-or-legit-479h Is this a scam or legit StoryThe other day I got an email from someone named samuel essel The only time I revealed my email was through GitHub so when he said he wanted to talk to me to work with something I thought this guy was asking about programming or coding EmailAfter replying what he wanted to do he replied back several days later My thoughtsWell I don t have many experience with these emails My first thought was that it was a scam I mean who contacts a random person from the internet because they have the same surname My second thought was that it may even be legit Though it was my first time receiving emails like this I was pretty sure there were better ways to spam people than simply making up stories 2023-01-27 14:17:25
Apple AppleInsider - Frontpage News TV app on Apple TV hardware frustrating users with large libraries https://appleinsider.com/articles/23/01/27/tv-app-on-apple-tv-hardware-frustrating-users-with-large-libraries?utm_medium=rss TV app on Apple TV hardware frustrating users with large librariesMost users with giant movie or TV show libraries accumulated since when iTunes media purchases began are having problems loading content on Apple TV hardware ーan issue that has persisted for years Long load times in Apple TV Library brings everything to a haltApple has offered movies on iTunes since and avid users have taken advantage Thanks to Apple s ecosystem integration and customer focused moves like automatic K movie upgrades it has been a compelling platform for buying digital movies Read more 2023-01-27 14:57:16
海外TECH Engadget The best midrange smartphones for 2023 https://www.engadget.com/the-engadget-guide-to-the-best-midrange-smartphones-120050366.html?src=rss The best midrange smartphones for As one of Engadget s resident mobile geeks I ve reviewed dozens of midrange phones and have found that a great smartphone doesn t have to cost a fortune Years of commoditization have brought features once exclusive to high end devices including big batteries multi camera arrays and high refresh rate displays down to their more affordable siblings If your budget is less than I can help you figure out what features to prioritize when trying to find the best midrange phone for the money What is a midrange phone anyway While the term shows up frequently in articles and videos there isn t an agreed upon definition for “midrange beyond a phone that isn t a flagship or an entry level option For this guide our recommendations for the best phone in this category cost between and Any less and you should expect significant compromises If your budget is higher though you should consider flagships like the Apple iPhone and Samsung Galaxy S What factors should you consider when buying a midrange smartphone Buying a new device can be intimidating but a few questions can help guide you through the process First what platform do you want to use If the answer is iOS that narrows your options down to exactly one phone Thankfully it s great And if you re an Android fan there s no shortage of compelling options Both platforms have their strengths so you shouldn t rule either out Obviously also consider how much you re comfortable spending Even increasing your budget by more can get you a dramatically better product And manufacturers tend to support their more expensive devices for longer It s definitely worth buying something toward the top limit of what you can afford Having an idea of your priorities will help inform your budget Do you want a long battery life Do you value speedy performance above all else Or would you like the best possible cameras While they continue to improve every year midrange phones still involve some compromises and knowing what s important to you will make choosing one easier Lastly pay attention to wireless bands and network compatibility If you don t want to worry about that your best bet is to buy directly from your carrier To make things easier all the phones we recommend are compatible with every major US wireless provider and can be purchased unlocked nbsp What won t you get from a midrange smartphone Every year the line between midrange and flagship phones gets blurrier as more upmarket features trickle down When we first published this guide in it was difficult to find devices with waterproofing or G Now the biggest thing you might miss out on is wireless charging Just remember to budget for a power adapter too many companies have stopped including them Performance has improved in recent years but can still be hit or miss as most midrange phones use slower processors that can struggle with multitasking Thankfully their cameras have improved dramatically and you can typically expect at least a dual lens system on most midrange smartphones below The best midrange Android phone Pixel aThere s a lot to like about Google s Pixel a For one the Pixel a features the best cameras at this price It may not have as many lenses as some of the other options on this list but thanks to Google s expertise in computational photography the a delivers pictures that are on par with phones that cost hundreds more Nighttime photos in particular are stellar thanks in part to Night Sight which helps brighten up dim environments and bring out more detail The Google Pixel a has a few other things going for it Thanks to its large battery and efficient chipset you won t have to worry about running out of juice It lasted just over hours in our battery testing and Google s Tensor chipset allows the a to run very similarly to the Pixel and Pro handsets And those who plan to hang on to their smartphone for as long as possible will appreciate that Google plans to support the a with software updates for the next five years In addition to its solid battery life and performance the Google Pixel a even has some advanced features you may not expect to see on a midrange phone Its design looks very similar to the flagship models with the striking camera bar on the handset s rear top half and it has a x resolution OLED touchscreen with an under display fingerprint sensor You ll only get a refresh rate of Hz on the a but that s a small sacrifice to make when you re getting a number of other features at a killer price The best and only iPhone under iPhone SEIf you can get past its dated design and small inch display the Apple iPhone SE is the fastest phone you can buy for less than No other device on this list has a processor that comes close to the SE s A Bionic What s more you can expect Apple to support the model for years to come The company is only just ending support for the first generation SE after six years The company hasn t said how long it intends to furnish the latest SE with new software but it s likely to support the device for a similar length of time For all its strengths the iPhone SE is held back by a dated display Not only is the SE s screen small and slow but it also uses an IPS panel instead of an OLED meaning it can t deliver deep blacks Additionally that screen is surrounded by some of the largest bezels you ll find on a modern phone That s not surprising The SE uses the design of the iPhone which will be a decade old in two years And if the SE looks dated now it will only feel more tired in a few years The midrange phone with the best screen Samsung Galaxy A GFor the best possible display at this price look no further than Samsung s Galaxy A G It features a inch Super AMOLED display that is ideal for watching TV shows and movies Plus the Hz panel is the fastest on this list Other standout features of this Samsung phone include a mAh battery and versatile camera system The A s three cameras may not deliver photos with the same detail and natural colors as the Pixel a but it can capture bigger scenes with its two wide angle lenses Like the other Android smartphones on this list the Samsung Galaxy A isn t the fastest performer At best Samsung s Exynos is a lateral move from the Qualcomm Snapdragon G found in the Galaxy A G And though the A is cheaper than its predecessor this Samsung phone no longer comes with a power adapter and headphone jack so the difference may not end up being much An ultra budget G option OnePlus Nord N GIf you only have around to spend on your next phone you could do a lot worse than the OnePlus Nord N To start this budget phone features a big mAh battery that will easily last you a full day The N also has a Hz display and G connectivity which are tricky to find at this price Best of all it doesn t look like a cheap phone But the N is also a good illustration of why you should spend more on a budget phone if you can It s the slowest device on this list due to its Snapdragon chipset and paltry GB of RAM Its triple main camera system is serviceable during the day but struggles in low light and doesn t offer much versatility beyond a disappointing macro lens OnePlus also doesn t plan to update the phone beyond the soon to be outdated Android In short the N is unlikely to last you as long as any of the other recommendations on this list Chris Velazco contributed to this report 2023-01-27 14:16:57
Cisco Cisco Blog Data science and data privacy work hand-in-hand to improve the world https://blogs.cisco.com/csr/data-science-and-data-privacy-work-hand-in-hand-to-improve-the-world global 2023-01-27 14:00:45
海外TECH CodeProject Latest Articles ASP.NET Core SPA with Preact and HTM https://www.codeproject.com/Articles/5353140/ASP-NET-Core-SPA-with-Preact-and-HTM ASP NET Core SPA with Preact and HTMHow to create light weight Visual Studio ASP NET Core SPA template with React style components supporting type checking shared models bundling and minification but no compile round 2023-01-27 14:16:00
海外TECH CodeProject Latest Articles Minimize delivery risk with progressive release https://www.codeproject.com/Articles/5353104/Minimize-delivery-risk-with-progressive-release Minimize delivery risk with progressive releaseThis article is mainly about using feature flags to enhance delivery stability and speed in a microservice based SaaS platform This article combined traffic routing and feature flags to realize Testing in production Progressive Delivery to minimize the release risk 2023-01-27 14:04:00
海外科学 NYT > Science Why Experts Are Urging Swifter Treatment for Children With Obesity https://www.nytimes.com/2023/01/27/health/obesity-children-guidelines.html intensive 2023-01-27 14:45:02
ニュース BBC News - Home Jeremy Hunt says significant tax cuts in Budget unlikely https://www.bbc.co.uk/news/business-64417101?at_medium=RSS&at_campaign=KARANGA march 2023-01-27 14:26:37
ニュース BBC News - Home Wynter Andrews: NHS trust fined £800k over baby's neglect death https://www.bbc.co.uk/news/uk-england-nottinghamshire-64422598?at_medium=RSS&at_campaign=KARANGA demonstrates 2023-01-27 14:03:21
ニュース BBC News - Home Taylor Swift's Lavender Haze video teases album re-release https://www.bbc.co.uk/news/entertainment-arts-64428443?at_medium=RSS&at_campaign=KARANGA album 2023-01-27 14:15:45
ニュース BBC News - Home U19s Women's World Cup: England reach final by beating Australia https://www.bbc.co.uk/sport/cricket/64430040?at_medium=RSS&at_campaign=KARANGA australia 2023-01-27 14:43:09
ニュース BBC News - Home Moises Caicedo: Arsenal have £60m bid for Brighton midfielder rejected https://www.bbc.co.uk/sport/football/64424348?at_medium=RSS&at_campaign=KARANGA caicedo 2023-01-27 14:39:53
IT 週刊アスキー Apple Watchがプロ公式競技用端末に初採用 https://weekly.ascii.jp/elem/000/004/122/4122462/ applewatch 2023-01-27 23:35: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件)