投稿時間:2022-06-08 23:26:46 RSSフィード2022-06-08 23:00 分まとめ(32件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS AWS Government, Education, and Nonprofits Blog Using open data to study the sounds of the ocean and create art https://aws.amazon.com/blogs/publicsector/using-open-data-to-study-the-sounds-of-the-ocean-and-create-art/ Using open data to study the sounds of the ocean and create artCan you see sounds Using open data you can To celebrate this year s World Oceans Day an artist and sustainability application architect at Amazon Web Services AWS created an artwork titled Can You See the Sound of the Ocean To create the art she drew inspiration from the Pacific Ocean Sound Recordings from the Monterey Bay Aquarium Research Institute MBARI available through the Amazon Sustainability Data Initiative ASDI Learn more about the dataset and the art work 2022-06-08 13:28:55
AWS AWS Startups Blog AWS Announces 25 Startups Selected for Inaugural AWS Impact Accelerator for Black Founders https://aws.amazon.com/blogs/startups/aws-announces-25-startups-selected-for-inaugural-aws-impact-accelerator-for-black-founders/ AWS Announces Startups Selected for Inaugural AWS Impact Accelerator for Black FoundersIn April we announced a year million commitment to the AWS Impact Accelerator a series of programs is designed to help high potential pre seed startups led by underrepresented founders succeed We also launched the first of these programs the AWS Impact Accelerator for Black Founders and today we re excited to announce the startups that will make up this inaugural cohort Meet the startups and learn more about this exciting opportunity 2022-06-08 13:08:31
python Pythonタグが付けられた新着投稿 - Qiita SVMの学習セットのフォーマット(CSVファイル) https://qiita.com/netineti512/items/2596d4fbdebd700a7aa0 配列 2022-06-08 22:29:40
python Pythonタグが付けられた新着投稿 - Qiita PythonのMediaPipeを使い、動画ファイルの手を認識し、CSVファイルに座標データを保存する方法 https://qiita.com/netineti512/items/b79ff4f878c7795b6b91 mediapipe 2022-06-08 22:24:18
python Pythonタグが付けられた新着投稿 - Qiita scipy.stats: Brunner-Munzel 検定 brunnermunzel https://qiita.com/WolfMoon/items/9d2c486bca3f09b5e16f unnermunzelxyalternative 2022-06-08 22:12:00
python Pythonタグが付けられた新着投稿 - Qiita 会社の Python プロジェクト Template Repository を1日で作ってみた😆 https://qiita.com/kexi/items/771c9707619992dd823a templaterepository 2022-06-08 22:07:56
js JavaScriptタグが付けられた新着投稿 - Qiita vite 一括ファイルをロードしたい時 glob-import を使おう https://qiita.com/chenmiaochao/items/a207de289990ed0937e8 mainjsmai 2022-06-08 22:23:03
GCP gcpタグが付けられた新着投稿 - Qiita Google Cloud Digital Leaderをオンラインで受けてみた https://qiita.com/mugaki/items/eec91f1c1833fedee06b markdo 2022-06-08 22:46:24
技術ブログ Developers.IO AWSマネジメントコンソールのホームで使えるウィジェットに「開始のお知らせ」が増えました https://dev.classmethod.jp/articles/update-manegement-console-whats-new-widget/ ashissan 2022-06-08 13:28:37
海外TECH MakeUseOf What Is Facebook Dating? How to Get Started https://www.makeuseof.com/what-is-facebook-dating/ footprint 2022-06-08 13:45:13
海外TECH MakeUseOf Is This a Scam Token? Here's How to Identify a Scam Crypto Token in Minutes https://www.makeuseof.com/biggest-signs-scam-token/ minuteslooking 2022-06-08 13:30:13
海外TECH MakeUseOf The 8 Best Practices for Using Monday.com in Remote Work https://www.makeuseof.com/best-practices-using-monday-remote-work/ remote 2022-06-08 13:16:13
海外TECH MakeUseOf Creality Sermoon V1 Pro Review: Safe, Simple 3D Printing for Beginners https://www.makeuseof.com/creality-sermoon-v1-pro-3d-printer-review-beginners/ Creality Sermoon V Pro Review Safe Simple D Printing for BeginnersThough not perfect Creality has set the bar high for beginner friendly printing with an enclosed design smartphone app and built in webcam 2022-06-08 13:05:13
海外TECH DEV Community 50+ hints JS(ES6+) developer must know (8th part) https://dev.to/stormytalent/50-hints-jses6-developer-must-know-8th-part-6nb hints JS ES developer must know th part Almost end of this tips for JS developer must know Today is th part and I will explain about Commas Semicolons Type Casting amp Coercion CommasLeading commas Nope badconst story once upon aTime goodconst story once upon aTime badconst hero firstName Ada lastName Lovelace birthYear superPower computers goodconst hero firstName Ada lastName Lovelace birthYear superPower computers Additional trailing comma Yup bad git diff without trailing commaconst hero firstName Florence lastName Nightingale lastName Nightingale inventorOf coxcomb chart modern nursing good git diff with trailing commaconst hero firstName Florence lastName Nightingale inventorOf coxcomb chart modern nursing badconst hero firstName Dana lastName Scully const heroes Batman Superman goodconst hero firstName Dana lastName Scully const heroes Batman Superman badfunction createHero firstName lastName inventorOf does nothing goodfunction createHero firstName lastName inventorOf does nothing good note that a comma must not appear after a rest element function createHero firstName lastName inventorOf heroArgs does nothing badcreateHero firstName lastName inventorOf goodcreateHero firstName lastName inventorOf good note that a comma must not appear after a rest element createHero firstName lastName inventorOf heroArgs SemicolonsYup eslint semi bad raises exceptionconst luke const leia luke leia forEach jedi gt jedi father vader bad raises exceptionconst reaction No That s impossible async function meanwhileOnTheFalcon handle leia lando chewie r cp bad returns undefined instead of the value on the next line always happens when return is on a line by itself because of ASI function foo return search your feelings you know it to be foo goodconst luke const leia luke leia forEach jedi gt jedi father vader goodconst reaction No That s impossible async function meanwhileOnTheFalcon handle leia lando chewie r cp goodfunction foo return search your feelings you know it to be foo Type Casting amp CoercionPerform type coercion at the beginning of the statement Strings eslint no new wrappers gt this reviewScore badconst totalScore new String this reviewScore typeof totalScore is object not string badconst totalScore this reviewScore invokes this reviewScore valueOf badconst totalScore this reviewScore toString isn t guaranteed to return a string goodconst totalScore String this reviewScore Numbers Use Number for type casting and parseInt always with a radix for parsing strings const inputValue badconst val new Number inputValue badconst val inputValue badconst val inputValue gt gt badconst val parseInt inputValue goodconst val Number inputValue goodconst val parseInt inputValue If for whatever reason you are doing something wild and parseInt is your bottleneck and need to use Bitshift for performance reasons leave a comment explaining why and what you re doing good parseInt was the reason my code was slow Bitshifting the String to coerce it to a Number made it a lot faster const val inputValue gt gt Note Be careful when using bitshift operations Numbers are represented as bit values but bitshift operations always return a bit integer source Bitshift can lead to unexpected behavior for integer values larger than bits Discussion Largest signed bit Int is gt gt gt gt gt gt gt gt gt Booleansconst age badconst hasAge new Boolean age goodconst hasAge Boolean age bestconst hasAge age Thanks for your time 2022-06-08 13:42:16
海外TECH DEV Community 50+ hints JS(ES6+) developer must know (7th part) https://dev.to/stormytalent/50-hints-jses6-developer-must-know-7th-part-5bfj hints JS ES developer must know th part Hi StormyTalent again And today we are going through best usages of Control statements comments whitespace Control statementsIn case your control statement if while etc gets too long or exceeds the maximum line length each grouped condition could be put into a new line The logical operator should begin the line badif foo bar abc amp amp doesItLookGoodWhenItBecomesThatLong amp amp isThisReallyHappening thing badif foo amp amp bar abc thing badif foo amp amp bar abc thing badif foo amp amp bar abc thing goodif foo amp amp bar abc thing goodif foo bar abc amp amp doesItLookGoodWhenItBecomesThatLong amp amp isThisReallyHappening thing goodif foo amp amp bar abc thing Don t use selection operators in place of control statements bad isRunning amp amp startRunning goodif isRunning startRunning CommentsUse for multiline comments bad make returns a new element based on the passed in tag name param String tag return Element elementfunction make tag return element good make returns a new element based on the passed in tag name function make tag return element Use for single line comments Place single line comments on a newline above the subject of the comment Put an empty line before the comment unless it s on the first line of a block badconst active true is current tab good is current tabconst active true badfunction getType console log fetching type set the default type to no type const type this type no type return type goodfunction getType console log fetching type set the default type to no type const type this type no type return type also goodfunction getType set the default type to no type const type this type no type return type Start all comments with a space to make it easier to read bad is current tabconst active true good is current tabconst active true bad make returns a new element based on the passed in tag name function make tag return element good make returns a new element based on the passed in tag name function make tag return element Use FIXME to annotate problems class Calculator extends Abacus constructor super FIXME shouldn t use a global here total Use TODO to annotate solutions to problems class Calculator extends Abacus constructor super TODO total should be configurable by an options param this total WhitespaceUse soft tabs space character set to spaces badfunction foo ∙∙∙∙let name badfunction bar ∙let name goodfunction baz ∙∙let name Place space before the leading brace badfunction test console log test goodfunction test console log test baddog set attr age year breed Bernese Mountain Dog gooddog set attr age year breed Bernese Mountain Dog Place space before the opening parenthesis in control statements if while etc Place no space between the argument list and the function name in function calls and declarations badif isJedi fight goodif isJedi fight badfunction fight console log Swooosh goodfunction fight console log Swooosh Set off operators with spaces badconst x y goodconst x y End files with a single newline character badimport es from AirbnbStyleGuide export default es badimport es from AirbnbStyleGuide export default es ↵ goodimport es from AirbnbStyleGuide export default es ↵Use indentation when making long method chains more than method chains Use a leading dot which emphasizes that the line is a method call not a new statement bad items find selected highlight end find open updateCount bad items find selected highlight end find open updateCount good items find selected highlight end find open updateCount badconst leds stage selectAll led data data enter append svg svg classed led true attr width radius margin append svg g attr transform translate radius margin radius margin call tron led goodconst leds stage selectAll led data data enter append svg svg classed led true attr width radius margin append svg g attr transform translate radius margin radius margin call tron led goodconst leds stage selectAll led data data const svg leds enter append svg svg svg classed led true attr width radius margin const g svg append svg g g attr transform translate radius margin radius margin call tron led Leave a blank line after blocks and before the next statement badif foo return bar return baz goodif foo return bar return baz badconst obj foo bar return obj goodconst obj foo bar return obj badconst arr function foo function bar return arr goodconst arr function foo function bar return arr Do not pad your blocks with blank lines badfunction bar console log foo badif baz console log qux else console log foo badclass Foo constructor bar this bar bar goodfunction bar console log foo goodif baz console log qux else console log foo Do not use multiple blank lines to pad your code badclass Person constructor fullName email birthday this fullName fullName this email email this setAge birthday setAge birthday const today new Date const age this getAge today birthday this age age getAge today birthday goodclass Person constructor fullName email birthday this fullName fullName this email email this setAge birthday setAge birthday const today new Date const age getAge today birthday this age age getAge today birthday Do not add spaces inside parentheses badfunction bar foo return foo goodfunction bar foo return foo badif foo console log foo goodif foo console log foo Do not add spaces inside brackets badconst foo console log foo goodconst foo console log foo Add spaces inside curly braces badconst foo clark kent goodconst foo clark kent Avoid having lines of code that are longer than characters including whitespace Note per above long strings are exempt from this rule and should not be broken up badconst foo jsonData amp amp jsonData foo amp amp jsonData foo bar amp amp jsonData foo bar baz amp amp jsonData foo bar baz quux amp amp jsonData foo bar baz quux xyzzy bad ajax method POST url data name John done gt console log Congratulations fail gt console log You have failed this city goodconst foo jsonData amp amp jsonData foo amp amp jsonData foo bar amp amp jsonData foo bar baz amp amp jsonData foo bar baz quux amp amp jsonData foo bar baz quux xyzzy good ajax method POST url data name John done gt console log Congratulations fail gt console log You have failed this city Require consistent spacing inside an open block token and the next token on the same line This rule also enforces consistent spacing inside a close block token and previous token on the same line badvar foo bar var arr goodvar foo bar var arr 2022-06-08 13:34:48
海外TECH DEV Community Typesense guide for Headless CMS Integration https://dev.to/aviyel/typesense-guide-for-headless-cms-integration-31aa Typesense guide for Headless CMS IntegrationTypesense is a completely free and open source typo tolerant search engine designed for programmers and developers who want to drastically reduce the time it takes to conduct effective and efficient searches Learn more about Typesense and why it s so valuable to modern developers Headless CMS on the other hand is a form of the content management system mostly focused on the backend stack in which the content or the main body is isolated from the presentation layer also known as head Content and data which are stored in a headless CMS are provided or parsed via APIs some traditional and classic CMS platforms also included these headless API features that let users submit content and data to a different presentation layer The main reason it is named as headless because the presentation layer is separated from the body itself hence the name Headless CMS CMS without a head In this article we ll learn how to integrate Typesense with any type of headless CMS We ll start first by configuring and installing the Typesense server then move on to learning how to get started with any type of headless CMS and how to index the data and content provided by the CMS via API and populate it inside our Typesense server We ll do everything from scratch so don t forget to follow along Configuring Headless CMSThere are numerous Headless CMS options available on the market and you are free to choose any type of Headless CMS that provides content and data via REST API The UI and installation of each CMS may differ but the essential structure of practically every CMS is the same Check out the link below for a list of Headless CMS that are currently available on the market and learn how to use each one by visiting their official Documentation site and Github repository only those whose source codes have been made public Note Not every Headless CMS on the market is open sourced in fact the majority of them are closed sourced so choose deliberately and carefully Make sure you know what you re doing and how you re implementing it Setting up Client StorefrontNow that we ve learned what headless is and how to configure it let s set up the client side for our application because headless means no presentation layer we ll need to set up and built our own custom client side storefront for it so without further ado let s get started configuring and setting up our client side application To do so create a folder and named it as client or storefrontmkdir storefrontHead over to that storefront directory that you just created cd storefrontLet s begin by creating our frontend stack with the help of create react app toolchain We will guide you through the designing part of the user interface UI and its functionalities from the ground up Let us get started on building our application from absolute scratch Configuring our react applicationLet s start with the storefront which we ll construct with the help of reactjs So if Node js isn t already installed on your PC that should be your first step So go to the official Node js website and install the correct and appropriate version but I m hoping you ve already done so because we couldn t install and configure our Headless CMS server without it Open your favorite code editor and navigate to the client folder For this tutorial I used VScode Next launch the integrated terminal by hitting ctrl and entering npx create react app This command will create an app called storefront inside the current directory It usually only takes a few minutes to get started and install the react application Normally we would use npm to get packages into the project but in this case we re using npx the package runner which will download and configure everything for us so that we can get started with a great boilerplate react template npx create react app Boilerplate cleanup To begin we must clean up our projects by removing and deleting some of the files provided by the create react app boilerplate template Your src files and folder structure should look like this once you are done with it Installing some third party packagesDepending on the Headless CMS that you are integrating this project may demand the implementation of a few third party packages so install few packages that might be helpfull AxiosAxios is a promise based HTTP client for the browser and node js It is isomorphic which means it can run from the same source in both the browser and nodejs On the server it employs the native Node js http module while on the client side it employs XMLHttpRequests npm install axios Installing TypesenseWe ll be installing Typesense after Axios which is a Javascript client library for using the Typesense HTTP API This library can be used on both the client and server sides Installing typesense instantsearch adapterInstall typesense instantsearch adapter so that we may use it inside our project this adapter simply uses the power of Instantsearch js package to generate sophisticated search interfaces in conjunction with a Typesense Search Server npm install typesense instantsearch adapter Installing react instantsearch domLet s set up and configure the react instantsearch dom package which is a React wrapper for Algolia s instantsearch library To put it simply react instantsearch is a fully open source React UI toolkit that enables you to quickly construct a search experience in your front end application InstantSearch s mission is to make developing amazing search experiences as simple as possible for developers by providing a complete search experience InstantSearch addresses a significant portion of this broad goal by providing front end widgets that can be assembled into a flexible as well as highly customizable search experience npm install react instantsearch domFinally your package jsonfile should look like this once you ve installed all of your project s dependencies Starting up Typesense ServerOnce our project and dependencies have been properly installed we can continue to next step Let s get started and index all of our Headless CMS content and data To begin building our Typesense index we must first set up and start our Typesense server There s one awesome method that you can use fairly easily which is very easy and known to work so let s create a script command from which we can configure our docker image and run the docker container that will basically bind and give it a volume that will connect to where we will be storing the data Let s begin by generating a new script in the scripts folder because we ll have a few scripts loaded in here that will allow us to index the data and start the typesense server or the docker container so you can basically put it inside the script run tag inside the package json So that whenever you want to start the server you simply open a command prompt and run the npm command to fire up the entire script Setting up Server run scriptCreate a new file called server js inside the scripts folder So while this script will simply run the docker command we must first configure it This is what the folder structure should look like The first step is to run and import exec commands from within the node js child process library scripts typesenseServer jsconst exec require child process Let s start our typesense server with our custom script command We ll use the docker run and detach commands to run the docker in the background and then specify the port we want it to run on The most important part of this command is the volume section what we re doing here is binding the volume which is essentially a way for storing the typesense s data which is generally saved inside the container As a result typesense will save the data in the container s data folder and it will expose and connect this data folder to the system location we specify in this case the temporary directory After that we need to provide the image we want to run inside our docker container and once that s done we ll specify the data directory and the api key which you can fill with whatever you want and finally the listen port as well as enable cors to avoid any CORS issues const command docker run d p v tmp typesense server data data typesense typesense data dir data api key headlessCMSTypesense listen port enable cors Finally execute the application and add an error handler just in case something goes wrong As a result your server js code should look like this scripts server jsconst exec require child process const command docker run d p v tmp typesense server data data typesense typesense data dir data api key headlessCMSTypesense listen port enable cors exec command err gt if err console log Typesense Server is up and running if err console log Error running server err Now we can simply update the script tag in our package json file now that we have our server js script ready to go start typesnese node scripts typesenseServer js After you ve configured the script tag your script tag inside package json file should look like this scripts start react scripts start build react scripts build test react scripts test eject react scripts eject start typesense node scripts server js Alternative method to run typesense serverInstead of writing a separate script to launch the server you may run it manually with just one command To do so go to the project terminal and make sure your Docker desktop is running then copy and paste the following command into the terminal docker run d p v tmp typesense server data data typesense typesense data dir data api key headlessCMSTypesense listen port enable cors Running the Typesense server via custom scriptBefore we run our script to start the typesense server make sure your Docker desktop is up and running Finally initialize and start the server by typing npm run start typesense and your docker will start running automatically then you can proceed to the next step of indexing the data collection npm run start typesenseWhenever you start the typesense server you should see something like this inside the Docker desktop application Indexing data on TypesenseNow that both our Headless CMSs and Typesense server are up and running the next step is to populate and index the data from our Headless CMS within the Typesense server so that we can query that typesense server and conduct immediate search in our UI Let s get started with the data indexer script We ll begin by creating an indexer js file in the scripts folder Index data on typesenseThe Typesense library must first be imported into our project scripts indexer jsconst Typesense require typesense Create a self executing function that runs whenever the indexer script is fired and make it asynchronous so we can use the async await feature Simply create module export and make the self executing function inside it asynchronous so that we can write a script that reads the data creates a collection then manages the typesense server before indexing it So the first step is to configure the typesense client which will enable us to connect to the server and begin managing indexing and retrieving data scripts indexer jsconst Typesense require typesense module exports async gt const TYPESENSE CONFIG nodes host localhost port protocol http apiKey headlessCMSTypesense As shown in the code above we established a typesense configuration variable and supplied the node properties to it Note A client can connect to multiple nodes for a single server and since nodes are simply servers these specific nodes are actually an array that holds the actual configuration for each server that you want to connect to and that you want the client to access and since we only have one server running we will only use one node Finally we specified the host typesense port and protocol as well as the api key inside the nodes array Let s utilize the Typesense configuration to create a Typesense client scripts indexer jsconst Typesense require typesense module exports async gt const TYPESENSE CONFIG nodes host localhost port protocol http apiKey headlessCMSTypesense console log Config TYPESENSE CONFIG const typesense new Typesense Client TYPESENSE CONFIG Let s go on to the following stage which is crucial because it s here that we offer the schema that will be utilized to index our data into the typesense database Let s pretend this is the response we ll get from our Headless CMSs API endpoint Typesense Schema has a straightforward syntax and is simple to use A schema is a description of how your data will be stored As a result the schema should only contain the fields you want to index You ll see that this technique is heavily influenced by noSQL databases particularly mongodb if you re familiar with them After that give the schema a name and specify that the num documents is zero Next supply the name type and facet for the fields which will be an array of objects containing every single field that we want to index and save in our database If you re wondering what a facet is it s a feature that allows you to create categories based on a subset of qualities so that users may refine their search results This is how your indexer file collection and schema should appear for now scripts indexer jsconst Typesense require typesense module exports async gt const TYPESENSE CONFIG nodes host localhost port protocol http apiKey headlessCMSTypesense console log Config TYPESENSE CONFIG const typesense new Typesense Client TYPESENSE CONFIG const schema name lt Schema Name gt num documents fields name lt Field Name gt type string facet true name lt Field Name gt type string facet true name lt Field Name gt type string facet false Let s start by fetching data from a Headless CMS API endpoint which we ll do by importing and using the Axios package we installed earlier and then mapping that field and filtering out the data to index it on the Typesense server const rawData await axios get http localhost lt Some endpoint gt const dataToIndex rawData data products map someData gt return id someData id title someData title image someData image description someData description Once that s done it s time to call the Typesense client and establish a connection with a schema within it As a result your indexer file should resemble the following scripts indexer jsconst Typesense require typesense const axios require axios module exports async gt const TYPESENSE CONFIG nodes host localhost port protocol http apiKey headlessCMSTypesense console log Config TYPESENSE CONFIG const typesense new Typesense Client TYPESENSE CONFIG const schema name lt Schema Name gt num documents fields name lt Field Name gt type string facet true name lt Field Name gt type string facet true name lt Field Name gt type string facet false const rawData await axios get http localhost lt Some endpoint gt const dataToIndex rawData data products map someData gt return id someData id title someData title image someData image description someData description try const collection await typesense collections lt Schema Name gt retrieve catch err console error err If data duplication occurs during importing the data simply add the following code to the indexer file before generating the schema since it will simply erase the existing data and replace it with new data if collection num documents dataToIndex length console log Deleting collection await typesense collections lt Schema Name gt delete Your indexer script should now look something like this scripts indexer jsconst Typesense require typesense const axios require axios module exports async gt const TYPESENSE CONFIG nodes host localhost port protocol http apiKey headlessCMSTypesense console log Config TYPESENSE CONFIG const typesense new Typesense Client TYPESENSE CONFIG const schema name lt Schema Name gt num documents fields name lt Field Name gt type string facet true name lt Field Name gt type string facet true name lt Field Name gt type string facet false const rawData await axios get http localhost lt Some endpoint gt const dataToIndex rawData data products map someData gt return id someData id title someData title image someData image description someData description try const collection await typesense collections lt Schema Name gt retrieve if collection num documents dataToIndex length console log Deleting collection await typesense collections lt Schema Name gt delete catch err console error err Finally create a collection called and specify your schema name When we establish a collection we give it a name and specify the fields that will be indexed when a document is added to it A Collection in Typesense is a group of connected Documents that works like a table in a relational database This is what your finished code should look like inside the indexer js file scripts indexer jsconst Typesense require typesense const axios require axios module exports async gt const TYPESENSE CONFIG nodes host localhost port protocol http apiKey headlessCMSTypesense console log Config TYPESENSE CONFIG const typesense new Typesense Client TYPESENSE CONFIG const schema name lt Schema Name gt num documents fields name lt Field Name gt type string facet true name lt Field Name gt type string facet true name lt Field Name gt type string facet false const rawData await axios get http localhost lt Some endpoint gt const dataToIndex rawData data products map someData gt return id someData id title someData title image someData image description someData description try const collection await typesense collections lt Schema Name gt retrieve if collection num documents dataToIndex length console log Deleting collection await typesense collections lt Schema Name gt delete catch err console error err console log Creating schema await typesense collections create schema console log Populating collection data try const returnData await typesense collections lt Schema Name gt documents import dataToIndex console log Return data returnData catch err console error err We can simply update the script tag in our package json file now that we have our indexer js script is ready scripts start react scripts start build react scripts build test react scripts test eject react scripts eject start typesense node scripts server js indexer node scripts indexer js Finally your package json file should look like this once you ve updated the script Finally type npm run indexer to start indexing the data in typesense server and your data will begin to populate inside the typesense server Before starting the script make sure both of your Headless CMS and Typesense servers are up and running npm run indexeryou should see the following response Once you get this response that means you ve successfully indexed all of your data on your Typesense server Testing the indexed data using HoppscotchBoth our Medusa and Typesense servers are up and running and we ve successfully indexed all of our dummy product data provided by Medusa inside Typesense Now it s time to see if we ve successfully indexed our data or not so open your API testing tool enter the following URL and send GET request localhost collections lt collection name gt documents exportNow send a GET request with the header x typesense api key and your Typesense server apikey as Key and once you ve done that you should see a response something similar to this id title Awesome Title description Awesone Description image id title Some Awesome Title description Another Awesone Description image id title Another Awesome Title description Another Awesone Description image Configuring the Storefront and retrieving dataFinally the project can be adjusted to use Typesense In the background we ve got our typesense instance running Create a connection in src App js to have react js use the Typesense adapter Create a TypesenseInstantsearchAdapter object within that and set server as a key Pass the apiKey and nodes inside that and provide the host port and protocol inside the nodes Finally supply the query and queryByWeight that you wish to display the indexed document data to it as an additional search parameter Note These parameters are passed directly to the Typesense search API endpoint The following is an example of what your code should look like within App js file src App jsimport React useState from react import TypesenseInstantSearchAdapter from typesense instantsearch adapter const typesenseInstantsearchAdapter new TypesenseInstantSearchAdapter server apiKey headlessCMSTypesense nodes host localhost port protocol http cacheSearchResultsForSeconds additionalSearchParameters queryBy lt Field Name gt const App gt return lt gt lt div gt App lt div gt lt gt export default App Let s go on to creating an interface for our application now that we ve finished configuring it To do so first import the react instantsearch dom library s InstantSearch component and supply indexName and searchClient as props to it const searchClient typesenseInstantsearchAdapter searchClient const App gt return lt gt lt InstantSearch indexName lt Schema Name gt searchClient searchClient gt lt SearchBox gt lt gt Now let s add the SearchBox and Hits components from the react instantsearch dom library so we can directly incorporate those components inside our application src App jsimport React useState from react import TypesenseInstantSearchAdapter from typesense instantsearch adapter const typesenseInstantsearchAdapter new TypesenseInstantSearchAdapter server apiKey headlessCMSTypesense nodes host localhost port protocol http cacheSearchResultsForSeconds additionalSearchParameters queryBy lt Field Name gt const searchClient typesenseInstantsearchAdapter searchClient const App gt return lt gt lt InstantSearch indexName lt Schema Name gt searchClient searchClient gt lt SearchBox gt lt Hits gt lt InstantSearch gt lt gt export default App Simply re run the application after you ve done that and your react application should display all of the responses provided by Typesense server The response you will receive is in simple JSON format Now you may decorate your application by utilizing the array of widgets provided by the instantsearch js package such as filtering data content refining data sorting data and much more to create a really attractive and wonderful application ConclusionCongrats Now that we ve concluded the Typesense and Headless CMS integration article let s take a quick sneak peek at what we accomplished First we briefly covered the Typesense and Headless CMS use cases followed by instructions on how to set up the Headless CMS server and then we proceed to install the React application using the create react app toolchain Finally we configured our Typesense server indexed all of the data provided by Headless CMS into Typesense and tested whether our data response was working or not Ultimately we configured our application s basic UI part and developed the storefront using react and the instantsearch library and fetched all of the data from the Typesense server and performed blazing fast search operations with it 2022-06-08 13:30:32
海外TECH DEV Community Convert NgModule Angular app to Standalone Component https://dev.to/ussdlover/convert-angular-app-to-standalone-component-angular-app-53lc Convert NgModule Angular app to Standalone ComponentWe are going to convert the fresh Angular app that is generated with Angular cli which is using NgModule to Standalone Component The code available on my Github profile Convert AppComponent to Standalone ComponentTo have standalone component we just need to pass standalone property to Component directive as with true value So the AppComponent will be looks like the followingimport Component from angular core import RouterModule from angular router Component selector app root standalone true template lt router outlet gt lt router outlet gt imports RouterModule export class AppComponent Side noteAs we are using router outlet component to out put the routed views we need to import RouterModule Other dependencies should be imported too Remove AppModuleTo be able to remove AppModule we need to move root initializations to main ts To have cleaner way of managing routes let s create separate file called routes ts that exports first layer of route configs And it should be something like thisimport Routes from angular router const routes Routes path redirectTo appointment pathMatch full path appointment loadComponent gt import app pages appointment appointment page then mod gt mod AppointmentPage export default routes Side noteAs you can see here I ve used loadComponent instead of loadChildren and that s because the AppointmentPage is standalone component Update main tsEarlier the main ts was responsible to bootstrap the AppModule and that was it But now that we have the standalone AppComponent it should bootstrap the application and also initialize the root provider modules For example when we are going to import the RouterModule we actually need to call forRoot method with passing the route configs to it So the final main ts would be something like thisimport enableProdMode importProvidersFrom from angular core import environment from environments environment import bootstrapApplication from angular platform browser import AppComponent from app app component import RouterModule from angular router import routes from routes if environment production enableProdMode bootstrapApplication AppComponent providers importProvidersFrom RouterModule forRoot routes catch err gt console error err That s it Now we have an Angular application which is base on Standalone Component Thank you for your time If you liked this post I guess you would like my posts on Linkedin 2022-06-08 13:19:06
海外TECH DEV Community How many projects do you handle at a time? https://dev.to/sloan/how-many-projects-do-you-handle-at-a-time-4lel How many projects do you handle at a time This is an anonymous post sent in by a member who does not want their name disclosed Please be thoughtful with your responses as these are usually tough posts to write Email sloan dev to if you d like to leave an anonymous comment or if you want to ask your own anonymous question How many projects do you manage work on at a time at your workplace or as a freelancer I got frustrated while handling multiple projects working full time as a dedicated hours resource in one project managing projects which took around hours of my time as some junior developers were working on those projects so I have to guide them a lot I don t know if this is only me or it is really frustrating for anyone Is managing working on different projects at the same time normal Also how will you handle these cases together or will you also get frustrated 2022-06-08 13:15:50
Apple AppleInsider - Frontpage News Daily deals June 8: 50% off refurbished Magic Keyboards for iPad, 12TB WD HDD for $200, more https://appleinsider.com/articles/22/06/08/daily-deals-june-8-50-off-refurbished-magic-keyboards-for-ipad-12tb-wd-hdd-for-200-more?utm_medium=rss Daily deals June off refurbished Magic Keyboards for iPad TB WD HDD for moreWednesday s best deals include discounted Hasbro board games off Nintendo Switch GB SD card and month family membership bundle up to off Teamgroup SATA SSDs and much more AppleInsider searches online stores every day to uncover discounts and offers on Apple hardware smart devices accessories toys and other products The best finds are collected together into our daily deals list Best deals June Read more 2022-06-08 13:09:18
海外TECH Engadget The best gifts for dad under $50 https://www.engadget.com/best-gifts-for-dad-under-50-113033738.html?src=rss The best gifts for dad under Us kids know how hard it is to buy gifts for parents It s either a case of they don t want anything or they ve already gone out and bought the product you had your eye on without telling you Especially tech savvy dads But there are some oft forgotten cheaper gifts that can do the job without breaking the barrier From console controllers to tracking tags smart lights to charging accessories our ideas will tick the list of even the most hard to buy for father figure in your life BitDo Pro controllerBitDoIt might look a bit retro but make no mistake BitDo s Pro controller is crammed full of tech The Bluetooth handheld connects to your Switch PC and mobile device offering a familiar thumbstick and D Pad layout as well as back paddles and a profile switcher That means dads will be able to use the controller in Switch or Android mode or pair it as an X input or D input device Perfect for gaming while on the move Buy BitDo Pro at Amazon Roku Express K EngadgetNow that we re truly in the streaming age finding a TV with Netflix Prime Video HBO Max etc built in is a lot easier But we both know that at least one of your dad s televisions probably doesn t and could use a little help with modernization That s where Roku s Express K streamer comes in With support for all modern streaming services the Express K is easy to set up and with its simple remote just does the job Buy Roku Express K at Amazon LastPass subscriptionLastPassDoes your dad have at least one password with “ in it Instead of shaming him consider getting him a password manager instead While most browsers come with their own built in password tools a LastPass Premium subscription operates across a wide variety of devices browsers and operating systems It ll save all of his passwords and suggest stronger ones all day long but it isn t limited to just that Feed it addresses card details and other important information and it ll reduce the time and effort it takes to fill in those pesky online forms Buy LastPass Premium starting at monthThermoWorks ThermoPop img alt ThermoWorks ThermoPop src ThermoWorks We re big fans of ThermoWorks Thermapen Mk but spending on an instant read thermometer may not be in your budget Luckily you can still upgrade your dad s cooking toolkit with the ThermoPop a compact lollipop like thermometer that is accurate and easy to use It has a single button that turns it on and rotates its backlit digital display so you can always read it properly regardless of how you re holding it Temperature readings pop up in about seconds so it won t take long for dad to figure out if his brisket is cooked to perfection With a temperature range of to °F and a splash proof design the ThermoPop could end up being dad s new favorite kitchen tool Buy ThermoPop at ThermoWorks Anker Nano II GAN ChargerEngadgetIn this day and age gadgets are getting better at holding their charge for most if not all of the day but there are often times when dad s smartphone complete with folding case and belt clip needs a quick top up The good thing about Anker s Nano II GAN Charger is that it isn t just a phone charger you can hook this thing up to a MacBook Air or Pro and have it charged in no time Anker says it ll charge an iPhone up to three times faster than an original W charger and juice Samsung phones at full speed via Super Fast Charging It s also compact saving space on his outlets but also making it a perfect accessory to throw in a backpack or store in a coat pocket for those on the move recharges Buy Anker Nano II W at Amazon Rocketbook Eco Friendly reusable notebookRocketbookIf dad isn t one for to do lists or electronic note taking and instead prefers to write things down for later the Rocketbook line of reusable notebooks are a solid choice It works in two ways the page notebook features special pages that allow the Pilot Frixion pen to write like any normal pen However after fifteen seconds you can use the microfiber cloth to erase any mistakes or wipe it completely leaving a perfectly blank page Before dad does that however Rocketbook s AI app can digitize any of the writing or drawings saving them to a phone or tablet for later reading Buy Rocketbook notebooks at Amazon Nintendo eShop Gift CardEngadgetIf dad has a Nintendo Switch or one of the company s handhelds then he s probably already pretty up to speed on the Nintendo eShop Every so often the company will reduce a wide range of first party and indie games allowing you and dad to build out your collection for a lot less The good news is that throughout the year retailers will often offer discounts on eShop credit which when combined with an existing sale can lighten dad s overall spend on games Deals are often around percent off meaning you ll be able to secure a card for just Buy Nintendo eShop gift card at Amazon Blink Mini CameraBlinkFrom unwanted intruders to porch pirates security cams are a very useful tool not only as a deterrent but also to capture irrefutable proof of wrongdoing Blink from Amazon has a wide range of indoor and outdoor home security products but its basic p indoor plug in camera is a solid choice for keeping an eye on pets but also unwelcome guests in the dead of night It comes with two way audio allowing dad to covertly startle a friend or family member and motion detection letting him focus on the specific areas of the home The Blink Mini also ties in perfectly with Alexa so it s a solid choice for families who already own an Echo device Buy Blink Mini at Amazon iFixit Essential Electronics ToolkitiFixitNot every dad is handy with tools but if yours likes to take things apart just to be able to put them back together again or prefers to fix things rather than buying a new one iFixit s Essential Electronics Toolkit could come in handy With a bunch of precision bits tweezers suction handle SIM eject tool and sorting tray this kit is perfect for DIY screen replacements or opening up a tablet or laptop to fix a worn out component It s also perfect for eyeglasses should dad need to repair them too Buy Essentials Toolkit at Amazon JLab Go Air Pop earbudsJLabListening to music on the go doesn t need to be expensive JLab s Go Air Pop wireless earbuds are a perfect example of that For just sometimes less these small but colorful Bluetooth buds offer on board touch controls the ability to use either earbud independently EQ presets and IPX moisture resistance meaning they ll survive a low pressure spray of water They re also really solid in the battery life department too the Go Air Pops will provide dad up to eight hours on a charge but the case will give you three additional charges before you need to plug the entire set in Buy JLab Go Air Pop at Amazon Fitbit Aria Air smart scaleEngadgetNobody is saying that dad needs to lose or gain weight but he s looking for a better way to track his body measurements then a smart scale could help Make no mistake the Aria Air isn t as fancy as some of the smart scales on the market complete with body composition metrics but it s very accurate and nice looking scale that tracks body weight and BMI If dad already has a Fitbit smartwatch or tracker it ll put it alongside his existing exercise data giving him a nice snapshot of his overall fitness and body health Buy Fitbit Aria Air at Amazon Amazon Smart ThermostatEngadgetNo smart home is complete without a smart thermostat handling all of the family s heating and hot water needs Everyone can argue all they like about the temperature inside the house but dad can control the thermostat remotely with Amazon s cheap Smart Thermostat Sure its usual retail price is normally a tiny bit higher than the limit we ve set here but we have seen it regularly come down to a low of which is when you should probably jump on it The Smart Thermostat itself is backed by Honeywell and ties nicely in with Alexa which can do dad s bidding for him whether it be via an Echo smart speaker display or app Buy smart thermostat at Amazon 2022-06-08 13:31:23
海外TECH Engadget Microsoft will 'scale down' its operations in Russia https://www.engadget.com/microsoft-reduces-operations-in-russia-130950905.html?src=rss Microsoft will x scale down x its operations in RussiaMicrosoft previously halted sales in Russia following the invasion of Ukraine and now it s shrinking its presence in the country The company told Bloomberg in a statement that it will quot significantly scale down quot its Russian operations in response to a bleaker economic forecast stemming from the war Microsoft will still honor its contracts in the country but the reduced footprint will affect over employees The Windows creator said it was quot working closely quot with affected staff to provide support There was no mention of which segments would be impacted It was also unclear how many people the company employed in Russia before the announcement We ve asked Microsoft for comment This isn t the first major tech company to withdraw at least some of its business in Russia in response to the war IBM is now winding down its operations after suspending them in March while software giant SAP said in April that it would exit the country entirely Other firms such as Amazon and Apple have limited some or all of their sales This isn t a huge sacrifice for Microsoft The developer said in March that Russia accounted for less than one percent of its revenue and its local business had been in a steady decline over the past few years Even so it wouldn t be surprising if the cutback prompted similar moves from tech peers either showing support for Ukraine or concerned about their Russian sales prospects 2022-06-08 13:09:50
海外TECH Engadget The newest Roku Ultra drops to a record low of $80 https://www.engadget.com/the-newest-roku-ultra-drops-to-a-record-low-of-80-130530282.html?src=rss The newest Roku Ultra drops to a record low of If you d like to upgrade your dad s TV setup for Father s Day you can snag Roku s latest set top box at its best price yet The Roku Ultra is percent off ahead of Father s Day dropping it down to That s a solid deal for the streamer that just came out just last month and includes a new voice remote among other improvements It s also worth noting that the Roku Streambar remains on sale for which is one of the best prices we ve seen Buy Roku Ultra at Amazon Buy Roku Streambar at Amazon Roku didn t mess with the Ultra s box this time around but rather it focused on adding features to the new Voice Remote Pro The accessory comes bundled with the Ultra and includes a mm headphone jack for private listening two programmable shortcut buttons and a mic disable button The latter refers to the remote s hands free voice control feature which allows you to say quot Hey Roku quot to initiate a command You can then ask the device to show you horror movies sitcoms or pull up the latest episode of Stranger Things You can even say quot Hey Roku find my remote quot and it ll force the remote to play a sound so you can locate it more easily We also appreciate that the Voice Remote Pro is rechargeable via microUSB which means you won t have to scramble to get new disposable batteries when it starts running low As for the set top box itself it s remains largely unchanged from the Ultra It still has K HDR streaming capabilities and supports both Dolby Vision and Atmos It also has AirPlay and Bluetooth support plus a handy selection of ports a power jack an HDMI out port an Ethernet jack and one USB port While the Ultra has up to percent better WiFi range some will appreciate the Ethernet jack since it will allow you to hardware the device and get the best signal possible While the Roku Ultra is the company s most powerful streaming device the Roku Streambar is a good option if you want K streaming abilities along with a sound upgrade We gave it a score of for its compact size solid audio quality and Dolby Audio support It sounds leaps and bounds better than most built in TV speakers making it a good option for those that want a a streaming device that does a bit more than just play Netflix and Disney Follow EngadgetDeals on Twitter for the latest tech deals and buying advice 2022-06-08 13:05:30
金融 金融庁ホームページ CrossBridge Venture Partners LLCに対する行政処分について公表しました。 https://www.fsa.go.jp/news/r3/shouken/20220608.html bridgeventurepartnersllc 2022-06-08 15:00:00
ニュース @日本経済新聞 電子版 「塗る太陽電池」事業化へ 栃木の高専発スタートアップ https://t.co/q4B8uatlcy https://twitter.com/nikkei/statuses/1534521184074600454 太陽電池 2022-06-08 13:02:14
ニュース BBC News - Home Petrol prices see biggest daily jump in 17 years https://www.bbc.co.uk/news/business-61731161?at_medium=RSS&at_campaign=KARANGA average 2022-06-08 13:33:58
ニュース BBC News - Home Ex-soldier Collin Reeves stabbed neighbours with Army dagger, court hears https://www.bbc.co.uk/news/uk-england-somerset-60874533?at_medium=RSS&at_campaign=KARANGA hears 2022-06-08 13:16:49
ニュース BBC News - Home Dame Paula Rego: Celebrated Portuguese-British artist dies at 87 https://www.bbc.co.uk/news/entertainment-arts-61734182?at_medium=RSS&at_campaign=KARANGA london 2022-06-08 13:44:17
ニュース BBC News - Home Fuel prices: Why is petrol so expensive in the UK? https://www.bbc.co.uk/news/business-52188448?at_medium=RSS&at_campaign=KARANGA highs 2022-06-08 13:41:33
北海道 北海道新聞 細田氏側から労務費受領 昨年衆院選で地方議員 違法性は否定 https://www.hokkaido-np.co.jp/article/691212/ 地方議員 2022-06-08 22:22:30
北海道 北海道新聞 帯広電子第2工場建設へ AT車変速機の部品製造 来年6月ごろ稼働 https://www.hokkaido-np.co.jp/article/691214/ 機械設備 2022-06-08 22:18:00
北海道 北海道新聞 ロ9―6中(8日) 安田が勝ち越し打 https://www.hokkaido-np.co.jp/article/691213/ 勝ち越し 2022-06-08 22:18:00
北海道 北海道新聞 出産立ち会いやみとりなど受け入れを コロナ専門家組織が提言 https://www.hokkaido-np.co.jp/article/691209/ 厚生労働省 2022-06-08 22:02: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件)