投稿時間:2023-02-07 07:14:33 RSSフィード2023-02-07 07:00 分まとめ(16件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia News] Google、OpenAIの「ChatGPT」競合「Bard」を限定公開 https://www.itmedia.co.jp/news/articles/2302/07/news081.html chatgpt 2023-02-07 06:39:00
IT ビジネス+IT 最新ニュース 【2023年版】ITパスポート試験とはどんな資格? 合格率や勉強法などわかりやすく解説 https://www.sbbit.jp/article/cont1/37840?ref=rss 2023-02-07 06:10:00
AWS AWS Machine Learning Blog Create powerful self-service experiences with Amazon Lex on Talkdesk CX Cloud contact center https://aws.amazon.com/blogs/machine-learning/create-powerful-self-service-experiences-with-amazon-lex-on-talkdesk-cx-cloud-contact-center/ Create powerful self service experiences with Amazon Lex on Talkdesk CX Cloud contact centerThis blog post is co written with Bruno Mateus Jonathan Diedrich and Crispim Tribuna at Talkdesk Contact centers are using artificial intelligence AI and natural language processing NLP technologies to build a personalized customer experience and deliver effective self service support through conversational bots This is the first of a two part series dedicated to the integration of … 2023-02-06 21:01:46
海外TECH MakeUseOf Rock On: Upcoming Sonos Speakers Will Reportedly Be Named Era 300, Era 100 https://www.makeuseof.com/upcoming-sonos-speakers-era-300-era-100/ atmos 2023-02-06 21:45:16
海外TECH MakeUseOf The Last of Us TV Show: Questions, Answered https://www.makeuseof.com/the-last-of-us-show-questions-answered/ answerednot 2023-02-06 21:45:16
海外TECH DEV Community STM32F4 Embedded Rust at the PAC: svd2rust https://dev.to/apollolabsbin/stm32f4-embedded-rust-at-the-pac-svd2rust-457d STMF Embedded Rust at the PAC svdrust IntroductionWhen I set out on learning embedded Rust I recall one of my struggles is material spanning multiple abstraction levels As might be known in embedded Rust the abstraction level sitting directly on top of the controller is the peripheral access crate PAC The PAC gives access to the controller registers to configure and control controller functions On top of the PAC sits the hardware abstraction layer HAL providing higher level abstractions and safe code assurances as well Although some resources would mention that they target for example the HAL the material would mix in code from other levels like the PAC The ease with which one can mix abstraction levels in Rust is something to admire though in the context of learning it was a confusing factor It really made me wonder if I correctly understood the abstractions In a prior blog series I wrote STMF with Embedded Rust at the HAL I covered examples of various peripherals sticking to the HAL In this post I will be starting a new series doing something similar but rather sticking to the PAC This would mean something a bit different in which context about the STM peripheral registers is required At the HAL this wasn t required as we used methods that described configurations and functions Register manipulations happened under the hood and other than knowing controller features not much understanding of the registers was required Developing code at the PAC well requires a PAC crate for the targeted controller For the STM there exists a repo for all the supported PACs These PACs are all generated using a command line tool called svdrust svdrust grabs what is called an svd file and converts it into a PAC exposing API allowing access to peripheral registers An SVD file is an Extensible Markup Language XML formatted file describing the hardware features of a device listing all the peripherals and the registers associated with them SVD files typically are released by microcontroller manufacturers In the context of STMF there is already a PAC available publicly so it can be leveraged directly in the project dependencies However there are cases one might run into for a newer controller or one that does not have an existing PAC As such one would have to go through generating a PAC using svdrust In this post I go through an example of the steps to generate a PAC from an SVD file for the STMF device The steps should be more or less the same for any other device as long as an SVD file exists If you find this post useful and to keep up to date with similar posts here s the list of channels you can follow subscribe to Twitter → apollolabsbin Newsletter →SubscribeGit Repo All Code Examples →Link Step Install svdrust svdrust can be easily installed in the command line using the following cargo command cargo install svdrust Step Create a Library Package The files generated by svdrust need to be contained in a library package This is done through cargo using the new command and named the crate stmf pac cargo new stmf pac lib Step Locate and Download SVD File ️ST microelectronics keeps a full list of zip files containing SVDs for different families of the STM on their own website Consequently I downloaded the STMF System View Description zip file and unzipped it After that I navigated to find the STMF svd file and placed it in the library package folder I created in step Step Generate Rust Files ️In this step I execute all the commands as indicated by the svdrust documentation Here there are two things to note First the controller core architecture needs to be known so that the correct target can be specified Cortex M for the STMF Second if the form command line tool needs to be installed if it s not this is done through cargo as follows cargo install formNext one needs to execute the commands as indicated by svdrust documentation svdrust i STMFx svd rm rf src form i lib rs o src amp amp rm lib rs cargo fmtAdditionally in the same library package Cargo toml the necessary dependencies and features need to be added dependencies critical section version optional true cortex m cortex m rt version optional true vcell features rt cortex m rt device At this point we essentially have a PAC that can be imported into other projects Step Import PAC into Project Now we would need to create a new binary project and import the PAC we just created so that we can use it I navigated to the same folder I placed the stmf pac folder in and ran the following command cargo new stmf pactest binIn Cargo toml of the new binary I included the necessary dependencies package name stm pactest version edition dependencies cortex m version features critical section single core stmf pac path stmf pac features rt critical section panic halt cortex m rt There are a few things to note here In the stmf pac dependency a path is provided to the stmf pac package that was created earlier Also note the features included The svdrust documentation states that the take method used to get an instance of the device peripherals needs a critical section implementation provided As such the implementation of critical section is provided through the cortex m dependency through critical section single core After that I wanted to do a test to make sure that everything builds ok In main rs I wrote the code below The code doesn t necessarily do anything useful It only obtains a handle for the peripherals and then loops forever no std no main use cortex m rt entry use panic halt as use stmf pac Peripherals entry fn main gt let per Peripherals take unwrap loop The code is then built with cargo specifying the target architechture cargo build target thumbvem none eabihfNote At first I tried to achieve step by naievly placing a main rs in the stmf pac folder thinking I can build my code from there This created a conflict where the features specified in the cargo toml did not get recognized The PAC APIIn Rust a singleton pattern is adopted This means that only one instance of a device peripherals can exist As such access to peripherals is obtained through the take method In the earlier code this was done in the let per Peripherals take unwrap line The take method provides an instance to the Peripherals struct and returns an Option Due to the singleton pattern any subsequent calls beyond the first one will return a None The per handle is later used to create instances to specific peripherals After obtaining access to the peripherals the PAC provides read modify and write methods to manipulate device registers Essentially giving access to individual bits The type of manipulation allowed in a register depends on what is specified in the datasheet More detail on this will follow in example posts Generally as will be seen going forward PAC code takes the following form Peripheral Handle Peripheral Register Name Operation Operation being one of the read modify and write methods In the following posts examples will be demonstrated for using this PAC access API to control and configure peripherals ConclusionThe peripheral access crate PAC is a lower lever of abstraction in embedded Rust PACs provide type safe access to peripheral registers through API that allows manipulation of individual bits PACs can also be generated using manufacturer SVD files that describe controllers and a command line tool called svdrust In this post I walk through the steps of creating a PAC using the svdrust tool This post is also the first part of a series experimenting with STM peripherals using PAC access API Have any questions comments Share your thoughts in the comments below Reminder if you found this post useful and to keep up to date with similar posts here s the list of channels you can follow subscribe to Twitter → apollolabsbin Newsletter →SubscribeGit Repo All Code Examples →Link 2023-02-06 21:21:27
海外TECH DEV Community Authentication and Authorization in a Node API using Fastify, tRPC and Supertokens https://dev.to/franciscomendes10866/authentication-and-authorization-in-a-node-api-using-fastify-trpc-and-supertokens-3cgn Authentication and Authorization in a Node API using Fastify tRPC and Supertokens IntroductionIn today s article we are going to create an API using tRPC along with a super popular Supertokens recipe to authenticate using email and password Just as we are going to create a middleware to define whether or not we have authorization to consume certain API procedures The idea of today s article is to have the necessary tools to extend the example API or simply apply what you learn today in an existing API PrerequisitesBefore going further you need NodeYarnTypeScriptIn addition you are expected to have basic knowledge of these technologies Getting StartedOur first step will be to create the project folder mkdir apicd apiyarn init yNow we need to install the base development dependencies yarn add D types node typescriptNow let s create the following tsconfig json compilerOptions target esnext module CommonJS allowJs true removeComments true resolveJsonModule true typeRoots node modules types sourceMap true outDir dist strict true lib esnext baseUrl forceConsistentCasingInFileNames true esModuleInterop true emitDecoratorMetadata true experimentalDecorators true moduleResolution Node skipLibCheck true include src exclude node modules With TypeScript configured let s install the necessary dependencies yarn add fastify fastify formbody fastify cors trpc server zod supertokens node dev dependenciesyarn add D tsup tsxNow in package json let s add the following scripts scripts dev tsx watch src main ts build tsup src start node dist main js Finishing the project configuration we can now initialize Supertokens src auth supertokens tsimport supertokens from supertokens node import Session from supertokens node recipe session import EmailPassword from supertokens node recipe emailpassword supertokens init framework fastify supertokens connectionURI http localhost appInfo appName trpc auth apiDomain http localhost websiteDomain http localhost apiBasePath api auth websiteBasePath auth recipeList EmailPassword init Session init As you can see in the code snippet above we defined the base url of our Supertokens instance we kept the default as well as some other configurations related to the API auth routes and frotend domain Without forgetting to mention that the recipe that we are going to implement today is the Email and Password Next let s define the tRPC context in which we ll return the request and response objects src context tsimport inferAsyncReturnType from trpc server import CreateFastifyContextOptions from trpc server adapters fastify export const createContext req res CreateFastifyContextOptions gt return req res export type IContext inferAsyncReturnType lt typeof createContext gt With the context created and its data types inferred we can work on the API router starting with making the necessary imports as well as creating the instance of the base procedure src router tsimport initTRPC TRPCError from trpc server import Session from supertokens node recipe session import z from zod import IContext from context export const t initTRPC context lt IContext gt create The next step will be to create the middleware to verify whether or not we have authorization to consume some specific procedures If we have a valid session we will obtain the user identifier and add it to the router context src router tsimport initTRPC TRPCError from trpc server import Session from supertokens node recipe session import z from zod import IContext from context export const t initTRPC context lt IContext gt create Middlewareconst isAuthenticated t middleware async ctx next gt const session await Session getSession ctx req ctx res if session throw new TRPCError code UNAUTHORIZED return next ctx session userId session getUserId const authenticatedProcedure t procedure use isAuthenticated With the middleware created we can now define the router procedures In today s example we are going to create two procedures getHelloMessage which will have public access and getSession which will require that we have a valid session started so that we can consume its data src router tsimport initTRPC TRPCError from trpc server import Session from supertokens node recipe session import z from zod import IContext from context export const t initTRPC context lt IContext gt create Middlewareconst isAuthenticated t middleware async ctx next gt const session await Session getSession ctx req ctx res if session throw new TRPCError code UNAUTHORIZED return next ctx session userId session getUserId const authenticatedProcedure t procedure use isAuthenticated Routerexport const router t router getHelloMessage t procedure input z object name z string query async input gt return message Hello input name getSession authenticatedProcedure output z object userId z string uuid query async ctx gt return userId ctx session userId export type IRouter typeof router Last but not least we have to create the API entry file and in addition to having to configure tRPC together with Fastify we have to make sure that we import the file where we initialize Supertokens In order for all of this to work we also need to ensure that we have the ideal CORS setup and that each of the plugins middlewares are defined in the correct order src main tsimport fastify from fastify import cors from fastify cors import formDataPlugin from fastify formbody import fastifyTRPCPlugin from trpc server adapters fastify import supertokens from supertokens node import plugin errorHandler from supertokens node framework fastify import auth supertokens import router from router import createContext from context async gt try const server await fastify maxParamLength await server register cors origin http localhost allowedHeaders Content Type supertokens getAllCORSHeaders credentials true await server register formDataPlugin await server register plugin await server register fastifyTRPCPlugin prefix trpc trpcOptions router createContext server setErrorHandler errorHandler await server listen port catch err console error err process exit If you are using monorepo yarn link or other methods you can go to package json and add the following key main src router This way when importing the router data types to the trpc client it goes directly to the router ConclusionI hope you found this article helpful whether you re using the information in an existing project or just giving it a try for fun Please let me know if you notice any mistakes in the article by leaving a comment And if you d like to see the source code for this article you can find it on the github repository linked below Github Repo 2023-02-06 21:19:51
Apple AppleInsider - Frontpage News Beats Fit Pro getting three new colors soon https://appleinsider.com/articles/23/02/06/beats-fit-pro-getting-three-new-colors-soon?utm_medium=rss Beats Fit Pro getting three new colors soonAn easily verifiable leak shows Apple will introduce three new Beats Fit Pro colors soon ーVolt Yellow Coral Pink and Tidal Blue Beats Fit Pro getting three new colorsThe leak itself contained very little information other than the color names but users were able to verify the existence of such colors in some European storefronts The Beats Fit Pro were first released in with four colors for Read more 2023-02-06 21:26:59
海外TECH CodeProject Latest Articles Running a standalone PHP app in Windows https://www.codeproject.com/Articles/5353969/Running-a-standalone-PHP-app-in-Windows windows 2023-02-06 21:30:00
海外TECH CodeProject Latest Articles Simple Secrets for Access to the dotnet Record Type https://www.codeproject.com/Articles/5353889/Simple-Secrets-for-Access-to-the-dotnet-Record-Typ Simple Secrets for Access to the dotnet Record TypeIn C we received access to a great quality of life type called the record You can read more about that from Microsoft here Record types allowed us as dotnet programmers to skip a lot of boiler plate code thereby saving us time and making code more readable Wins all around 2023-02-06 21:06:00
ニュース BBC News - Home Chris Mason: Sunak's backseat-driving former prime ministers https://www.bbc.co.uk/news/uk-politics-64547349?at_medium=RSS&at_campaign=KARANGA Chris Mason Sunak x s backseat driving former prime ministersRishi Sunak has a minibus full of predecessors who could end up as backseat drivers with Liz Truss the latest to lurch towards the wheel 2023-02-06 21:02:38
ニュース BBC News - Home Beyoncé North America pre-sale begins with Ticketmaster under scrutiny https://www.bbc.co.uk/news/entertainment-arts-64533856?at_medium=RSS&at_campaign=KARANGA ticketmaster 2023-02-06 21:21:06
ニュース BBC News - Home Turkey earthquake: Aleppo among worst-hit areas in Syria https://www.bbc.co.uk/news/world-middle-east-64544478?at_medium=RSS&at_campaign=KARANGA earthquake 2023-02-06 21:09:16
ニュース BBC News - Home UK rescue workers heading to Turkey after quake https://www.bbc.co.uk/news/uk-64547116?at_medium=RSS&at_campaign=KARANGA international 2023-02-06 21:43:28
ビジネス ダイヤモンド・オンライン - 新着記事 米バイオ医薬品アッヴィ、新薬で増収目指す - WSJ発 https://diamond.jp/articles/-/317344 新薬 2023-02-07 06:04:00
海外TECH reddit DeSantis to Take Control of Disney’s Orlando District Under New Bill https://www.reddit.com/r/politics/comments/10vi7j8/desantis_to_take_control_of_disneys_orlando/ DeSantis to Take Control of Disney s Orlando District Under New Bill submitted by u Ok Flamingo to r politics link comments 2023-02-06 21:07:11

コメント

このブログの人気の投稿

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