投稿時間:2022-02-14 23:33:39 RSSフィード2022-02-14 23:00 分まとめ(36件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS AWS Compute Blog Building custom connectors using the Amazon AppFlow Custom Connector SDK https://aws.amazon.com/blogs/compute/building-custom-connectors-using-the-amazon-appflow-custom-connector-sdk/ Building custom connectors using the Amazon AppFlow Custom Connector SDKThis blog post shows how to extend the Amazon AppFlow service to move data between SaaS endpoints and custom APIs You can now build custom connectors using the Amazon AppFlow Custom Connector SDK 2022-02-14 13:33:47
python Pythonタグが付けられた新着投稿 - Qiita NameError: name ‘os’ is not definedが表示される場合の2つの解決法 https://qiita.com/Subliminal-Gorira/items/a3318ea7e50c37e29fef NameErrornameosisnotdefinedが表示される場合のつの解決法はじめに僕はこのエラーに回遭遇した経験があります。 2022-02-14 22:42:47
python Pythonタグが付けられた新着投稿 - Qiita 【FastAPI】親子関係を持つテーブルのデータを同時に作成する https://qiita.com/nata_water/items/ee671836817c9b64dd74 【FastAPI】親子関係を持つテーブルのデータを同時に作成するやりたいこといわゆるNの関係にあるデータ売上・売上明細などをFastAPI経由で作成する必要があり、その方法をメモします。 2022-02-14 22:36:56
js JavaScriptタグが付けられた新着投稿 - Qiita 【JavaScript関数ドリル】を毎日やる【勉強用】その5 https://qiita.com/maruyama1991/items/3ae289837e90d787d2de 2022-02-14 22:37:59
Ruby Rubyタグが付けられた新着投稿 - Qiita Railsのscopeとは https://qiita.com/ta-mu-_/items/0c1ed958612b3e52d79e Railsのscopeとはscopeスコープとは特定のSQL文をメソッドのように呼び出すことができる機能のことです。 2022-02-14 22:31:55
Ruby Rubyタグが付けられた新着投稿 - Qiita rails heroku上のDBをリセットする https://qiita.com/Kmashi/items/8ae74c053aef72cde87f ターミナルherokurunrailsdbmigrateresetDISABLEDATABASEENVIRONMENTCHECK環境railsrubyMySQLherokuherokurunでDBリセットのコマンドを実行heroku上のDBをリセットしようと以下のコマンドを実行した。 2022-02-14 22:05:58
Linux Ubuntuタグが付けられた新着投稿 - Qiita IFTTTのレシピの節約方法(1つのレシピでPCの音楽、Youtube音楽、youtube動画を操作) https://qiita.com/kobbeko/items/81421645f1ebc3635f8f IFTTTのレシピの節約方法つのレシピでPCの音楽、Youtube音楽、youtube動画を操作はじめに「WSLのUbuntuでPC内の音楽データをGoogleHomeで操作する」「WSLのUbuntuでyoutube音楽をGoogleHomeで操作する」「WSLのUbuntuでyoutube動画をGoogleHomeで操作する」をつのIFTTTのレシピで操作する方法です。 2022-02-14 22:29:14
Linux Ubuntuタグが付けられた新着投稿 - Qiita Ubuntu20.04にphpenvを入れる https://qiita.com/kanchi/items/638e5f515aaa44d688e9 かも他にも同じような内容でQiitaに記事を方がいらっしゃいますが、「PHPのバージョンが古いのでもしかしたら必要なライブラリが違うのかも」、とか「書いた人の環境ではそうだったのかな」とか思ったので編集リクエストではなく新規で記事を書きました。 2022-02-14 22:06:32
AWS AWSタグが付けられた新着投稿 - Qiita AWSの学習をするうえでわからなかった横文字をひたすらまとめておく https://qiita.com/m6mmsf/items/fd161a8c49fe99c42eaa 2022-02-14 22:37:52
Docker dockerタグが付けられた新着投稿 - Qiita exitedになったコンテナを丸ごと削除する方法 https://qiita.com/__Rayleigh__/items/14a0e5b09171fcb00c49 exited 2022-02-14 22:25:03
Ruby Railsタグが付けられた新着投稿 - Qiita Railsのscopeとは https://qiita.com/ta-mu-_/items/0c1ed958612b3e52d79e Railsのscopeとはscopeスコープとは特定のSQL文をメソッドのように呼び出すことができる機能のことです。 2022-02-14 22:31:55
Ruby Railsタグが付けられた新着投稿 - Qiita rails heroku上のDBをリセットする https://qiita.com/Kmashi/items/8ae74c053aef72cde87f ターミナルherokurunrailsdbmigrateresetDISABLEDATABASEENVIRONMENTCHECK環境railsrubyMySQLherokuherokurunでDBリセットのコマンドを実行heroku上のDBをリセットしようと以下のコマンドを実行した。 2022-02-14 22:05:58
海外TECH DEV Community Watch the birds on your backyard with a Raspberry Pi, Edge Impulse and balena https://dev.to/mpous/meet-the-birds-on-your-backyard-with-a-raspberry-pi-edge-impulse-and-balena-58hm Watch the birds on your backyard with a Raspberry Pi Edge Impulse and balenaI love birds but to be honest with you I don t have any clue about birds My parents installed an Amazon camera in their backyard and we started to get video streams of birds going to a bird feeder that was awesome However I couldn t tell my children what type of bird was on the camera Then at the childrens school we installed a nest for birds with sensors but we couldn t get any image when a bird was detected And by serendipity the balena Ambassador Mithun Das was working on a Bird Watcher project In this post I would like to share how you can build a Bird Watcher at home Once you have it you will be able to watch birds eating on your bird feeder Plus detect with a Machine Learning model running on Edge Impulse the type of the bird Everything runs on a Raspberry Pi using balena and a camera Some of the goals of building a Bird Watcher are related to learning about birds around us plus experimenting with different materials to build the bird feeder But lately as well to introduce IoT and AI to children Cameras are not just cameras that take pictures anymore Requirements HardwareRaspberry Pi or balenaFinSD card in case of the RPi Power supply and optionally ethernet cablePi Camera or USB Camera SoftwareA balenaCloud account sign up here An Edge Impulse account clone Mithun s ML model balenaEtcherInstall Telegram on your mobile device Deploy the fleet One click deploy using Balena DeployRunning this project is as simple as deploying it to a balenaCloud application You can do it in just one click by using the button below Follow instructions click Add a Device and flash an SD card with that OS image dowloaded from balenaCloud Enjoy the magic Over The Air Join the balenaHub fleetKeep it even more simple and join the BirdWatcher fleet on balenaHub Train your machine learning model to detect birdsFirst thing needed is to have your own Birds Machine Learning model made with Edge Impulse My recommendation is to start with Mithun s ML model here Clone it on your Edge Impulse free account If you prefer to start from scratch Just create an Edge Impulse project and choose Images Then select that you would like to Classify multiple objects object detection With this you will be able to detect the location of multiple objects in an image For example to detect many birds eating at the bird feeder together Have in mind that the object detection is more compute intensive than image classification method and it s only available for Linux based devices like the Raspberry Pi or Jetson Nano Remember on this project we are going to use the Raspberry Pi running on balena Data acquisitionNow it s time to create the Training Data and the Test Data acquiring data from the sensors In our case our sensor will be a camera My recommendation is to upload pictures from birds that you know that live in your region In the future the best will be to train your model with pictures from the Bird Watcher device with your background and label them on Edge Impulse Remember to add the correct labels to all the birds From my experience to get a good Machine Learning model from pictures you will need dozens of pictures for each type of bird so be patient Impulse DesignNext step is to create the Impulse An impulse takes raw data a picture in our case and uses signal processing to extract features and then uses a learning block to classify the new data Once the impulse is saved it s time to check the raw data of the sample and Generate features When you click “Generate features you will see the feature explorer diagram with all the samples represented on a X Y Z axis This will enable you to see if the samples from the model are properly separated on the system and that means that the ML model will properly detect the birds Finally it s time to click Object detection and train your Neural Network MobileNetV Once you have fine tined the training settings number of training cycles learning rate and validation set size click Start Training As a training output you will get the last training performance with a precision score and more information about the model generated Deploy with balenaNow you are ready to deploy your device with balena Go to the BirdWatcher Github repository and click Deploy with balena If you don t have a balenaCloud account create a free account you will be able to connect up to devices for free and create a fleet The BirdWatcher project will deploy the latest release of the source code on your fleet Click Add a new device configure the balenaOS add WiFi credentials and download it or flash directly the SD card of your Raspberry Pi using balenaEtcher Introduce the flashed SD card into the Raspberry Pi and power it up You should be able to see your device on your fleet getting online and all the BirdWatcher services getting released Open your birdwatcher local websiteOnce you see the device online and ready on balenaCloud Check that your laptop mobile device is connected to the same WiFi as your Bird Watcher Type into your browser On the local UI you will be able to see the stream from the camera on the BirdWatcher Watched birdsClick on Snaps to see all the watched birds plus Birds detected that are unknown as we are using the camera of the Raspberry Pi as a motion sensor From Snaps you will be able to send pictures to Edge Impulse to retrain the ML model The picture sent to Edge Impulse is going to be a picture without any square on it SettingsGo to Settings and start defining your settings as your Edge Impulse keys On the other hand enable the motion flag if you want to watch the unknown birds record the images to feed your Edge Impulse ML model to retrain it Add Y to the ENABLE MOTION variable Finally if you would like to send the pictures and results from the ML model over Telegram turn on the telegram notifications Set the ENABLE TG to Y and add the keys of your Telegram bot Print your Bird FeederDownload STL files from here bird watcher D print zip AttributionsThank you to Mithun Das for developing this amazing application and Edge Impulse to provide support on the balena Linux integration 2022-02-14 13:44:27
海外TECH DEV Community Always green community! 💚 – Vue Storefront from 2021 to 2022 upwards https://dev.to/vue-storefront/always-green-community-vue-storefront-from-2021-to-2022-upwards-1if Always green community Vue Storefront from to upwardsWe all know the saying the grass is always greener on the other side but we believe it doesn t relate to the Vue Storefront community What do we mean by that Plants need love and attention In exchange for that they will produce oxygen you breathe or the food you eat Being in nature by itself has a very positive impact on your mental health and creativity We believe that we can say a similar thing about our community We offer our software resources and knowledge In exchange we receive your engagement contribution ideas and positivity unfortunately no food So did we make our side greener retrospectiveWe strived to do more Since Q of we were exploring new ways to engage with our community ーto engage with you Vue Storefront conferenceWe had our first Vue Storefront conference where we officially released Vue Storefront With this new version we wanted to boost creating new eCommerce integrations and modules for CMSs and payment gateways Our goal was to ensure that Headless eCommerce could reach new extremes in the coming years Building on top of the Nuxt framework allowed us to leverage the powerful nature of all existing modules and plugins to move forward even faster VSF Discord serverAt the conference we also introduced our Discord server as a new primary communication platform with the community It grew enormously like in the last six months We were helping you daily ーanswering questions supporting with development needs and creating new connections each day Thanks to Discord we removed the gap between the community our core team and partners Vue Storefront GitHub repositoriesWe made massive changes to our GitHub repositories  We broke the barriers for newcomers to the OpenSource world We defined repository rules and practices across our vuestorefront and community owned vuestorefront community repositories making it easier for everyone to contribute VSF GitHub organizationAt the end of the community got its own GitHub organization  vuestorefront community making it easier for everyone to join the Vue Storefront community projects At the same time we felt that even more could be done and our community could benefit greatly Vue Storefront s community plans for We have some Big Plans for Yet we don t want to spoil the surprise so we will reveal them little by little Maybe we will stun you once or twice First our motto for this year is Closer to the Community This year has just begun and we already have some accomplishments to share We started by introducing our first Developer Advocate Marc Backes who will bring a new voice energy and creativity to our projects For the Vue Storefront developers we announced a Sponsorship program to support the further development of FOSS and create a great ecosystem around Vue Storefront Still this is only the beginning of this year and much more is on the way Ambassador Program We will create an entirely new Vue Storefront Ambassador program We are committed to making headless commerce even more powerful and agile We believe that the development of Vue Storefront can bring further benefits to the developer and business world Developer Community Portal We know that documentation is only part of education sharing knowledge requires larger initiatives We will create a new developer community portal We want to set a full focus on bringing the e commerce and Vue Storefront knowledge together This will be a dedicated space for the top developers The idea is to keep this portal OpenSource so you can participate in its development Vue Storefront SWAG Who doesn t like a new notebook sticker or an awesome hoodie We will have our very own SWAG store that will be Open Source with branded unique Vue Storefront products BOTs We will create new ways to showcase Vue Storefront projects We want to help recognize our contributors in Discord and other social media There is no better way than to create unique BOTs to assist us in this process New Developer Experiences We have already taken actions to enhance the Vue Storefront Developer Experience this year We are talking about new CLIs integrations experiences better workflows for integrators and templates Events Yeah We will be present at all Vue events this year and we will host a lot of our own meetups summits and conferences Whether online on site or hybrid we ll be there sharing our knowledge and making good friends along the way Hackathons ‍Get your brains ready because the Vue Storefront hackathons are about to begin We have many of those prepared in our calendar and fantastic prize pools Join us in this incredible journey and let s make the world green 2022-02-14 13:44:13
海外TECH DEV Community Distributed storage in 30 minutes https://dev.to/tarantool/distributed-storage-in-30-minutes-1a9f Distributed storage in minutesAuthor Igor ZolotarevHello my name is Igor and I am a part of the Tarantool DB team When developing I often need rapid prototypes of database applications for example to test code or to create an MVP Of course I would like such a prototype to require minimal effort to refine in case it is decided to use it in production I don t like wasting my time configuring an SQL database thinking about how to manage data sharding or spending even more time studying connector interfaces I prefer just to write a few lines of code run it and have everything working out of the box To develop distributed applications rapidly I use Cartridge a framework for managing cluster applications based on Tarantool a NoSQL database Today I will show how to quickly write a Cartridge based application cover it with tests and run it The article will be of interest to anyone tired of spending a lot of time prototyping applications as well as those who want to try a new NoSQL technology ContentsFrom this article you will learn what Cartridge is and what principles to have in mind when writing cluster business logic in it We will write a cluster application for storing data about employees of a company The steps to accomplish it are Creating an application from a template with cartridge cli Describing your business logic in Lua in terms of Cartridge cluster roles Data Storage Custom HTTP API Writing tests Launching and configuring a small cluster locally Downloading configuration Configuring failover Cartridge frameworkCartridge is a framework for developing cluster applications It manages several instances of the Tarantool NoSQL database and shards data using the vshard module Tarantool is a persistent in memory database It is very fast due to storing data in RAM but also reliable since Tarantool dumps all data to the hard disk and allows you to set up replication Cartridge takes care of configuring Tarantool nodes and sharding cluster nodes which leaves a developer with only writing the business logic of the applications and configuring the failover Advantages of Cartridge Sharding and replication out of the box Built in failover support CRUD a NoSQL cluster query language Integration testing of the entire cluster Ansible based cluster management Cluster administration utility Monitoring tools Creating the first applicationTo do this we will need cartridge cli It is a utility for working with Cartridge applications It allows you to create an application from a template manage a locally running cluster and connect to Tarantool instances Installing Tarantool and cartridge cliOn Debian or Ubuntu curl L bashsudo apt install cartridge cliOn CentOS Fedora or ALT Linux curl L bashsudo yum install cartridge cliOn macOS brew install tarantoolbrew install cartridge cliLet s create a template application named myapp cartridge create name myappcd myapptree Now we get a project structure similar to this myapp├ーapp│└ーroles│└ーcustom lua├ーtest├ーinit lua├ーmyapp scm rockspec the init lua file is the entry point of the Cartridge application It defines the cluster s configuration and calls the functions required at the start of each application node the app roles directory contains roles describing the application s business logic the myapp scm rockspec file specifies the application s dependenciesBy now we already have a working Hello world application It can be started with the following commandscartridge buildcartridge start dcartridge replicasets setup bootstrap vshardAfter that access to localhost hello will show Hello world Let s now create a small template based application a sharded storage with an HTTP API for storing and receiving data To do this we need to understand how to implement cluster business logic in Cartridge Writing business logic in CartridgeEach cluster application is based on roles Lua modules describing the application s business logic For example they can be modules that store data provide HTTP API or cache data from an Oracle database A role is assigned to a set of instances joined by replication a replica set and it is enabled at each instance Replica sets can have different set of roles In Cartridge on each cluster node there is a cluster configuration It describes the cluster s topology and optionally the configuration that your role would use Such configuration can be changed in runtime to affect the role s behavior Each role has a structure similar to this return role name your role name init init validate config validate config apply config apply config stop stop rpc function rpc function dependencies another role name Role lifecycle An instance is starting The role named role name waits for the start of all its dependent roles specified in dependencies The validate config function is called to check whether the role s configuration is valid The role initialization function init is called This function performs the actions that need to be done once when the role is started for the first time The apply config function is called to apply the configuration if it is specified The validate config and apply config functions are also called whenever the role s configuration changes The role is saved in the registry From there it will be available to other roles on the same node viacartridge service get your role name The functions declared in a role will be available from other nodes viacartridge rpc call your role name rpc function Before a role is stopped or restarted the stop function is launched It terminates the role for example removing the fibers created by the role Cluster NoSQL queriesThere are several ways to write cluster queries in Cartridge Calling functions via the vshard API this is a complicated but flexible way vshard router callrw bucket id app roles myrole my rpc func Tarantool CRUD Simple function calls crud insert get replace Support for calculating bucket id is limited Roles must depend on crud router crud storage Application structureSuppose we want a cluster with one router and two groups of storages with two instances each This topology is typical for both Redis Cluster and MongoDB Cluster For the stateful failover to save the state of the current masters the cluster will include stateboard yet another instance When increased reliability is required it is better to use an etcd cluster instead of stateboard The router will distribute requests across the cluster and manage the failover Writing custom rolesWe will need to write two roles one for data storage and one for HTTP API In the app roles directory we create two new files app roles storage lua and app roles api lua Data StorageLet s describe the role for data storage In the init function we will create a table and indexes for it then add crud storage to its dependencies The Lua code in the init function is equivalent to the following pseudo SQL code CREATE TABLE employee bucket id unsigned employee id string name string department string position string salary unsigned CREATE UNIQUE INDEX primary ON employee employee id CREATE INDEX bucket id ON employee bucket id Add the following code to the app roles storage lua file local function init opts opts has the attribute indicating if the function is called at the master or at the replica we create tables only at the master instance they will appear automatically at the replica if opts is master then Creating a table with employees local employee box schema space create employee if not exists true setting the format employee format name bucket id type unsigned name employee id type string comment ID сотрудника name name type string comment Р¤Р˜РћСЃРѕС‚СЂСѓРґРЅРёРєР° name department type string comment Отдел name position type string comment Ролжность name salary type unsigned comment Рーарплата Create the primary index employee create index primary parts field employee id if not exists true Indexing by bucket id it is necessary for sharding employee create index bucket id parts field bucket id unique false if not exists true end return trueendreturn init init lt lt lt remembering the crud storage dependency dependencies cartridge roles crud storage We will not need the rest of the functions from the role s API since our role has no configuration and it does not allocate resources to be cleaned after the role s work is complete HTTP APIWe will need the second role to fill the tables with data and retrieve this data on request The role will access the Cartridge s built in HTTP server It depends on crud router Let s define a function to handle POST requests The request body will contain the object to be saved to the database local function post employee request getting an object from the request body local employee request json writing it to the database local err crud insert object employee employee if an error occurs writing it to the log and returning if err nil then log error err return status end return status endThe GET method will take the employees salary values as a parameter The expected response is a JSON with a list of employees whose salary is higher than the one specified in the request SELECT employee id name department position salaryFROM employeeWHERE salary gt salarylocal function get employees by salary request get the salary parameter from the query local salary tonumber request query param salary or selecting the employee data local employees err crud select employee gt salary salary if an error occurs writing it to the log and returning if err nil then log error err return status end the employees table stores the list of rows that meet the condition and the space format the unflatten rows function converts a table row to a key value table employees crud unflatten rows employees rows employees metadata employees fun iter employees map function x return employee id x employee id name x name department x department position x position salary x salary end totable return request render json employees endNow let s write the init function for the role Here we will turn to the Cartridge s registry to get an HTTP server and use it to assign the HTTP endpoints for the application local function init getting an HTTP server from the Cartridge s registry local httpd assert cartridge service get httpd Failed to get httpd serivce setting the routes httpd route method GET path employees get employees by salary httpd route method POST path employee post employee return trueendPutting everything together app roles api lualocal cartridge require cartridge local crud require crud local log require log local fun require fun the GET employees method returns a list of employees with salaries greater than the one specified in the requestlocal function get employees by salary request getting the salary parameter from the query local salary tonumber request query param salary or selecting the employee data local employees err crud select employee gt salary salary if an error occurs writing it to the log and returning if err nil then log error err return status end the employees table stores the list of rows that meet the condition and the space format the unflatten rows function converts a table row to a key value table employees crud unflatten rows employees rows employees metadata employees fun iter employees map function x return employee id x employee id name x name department x department position x position salary x salary end totable return request render json employees endlocal function post employee request getting an object from the request body local employee request json writing it to the database local err crud insert object employee employee if an error occurs writing it to the log and returning if err nil then log error err return status end return status endlocal function init getting an HTTP server from the Cartridge s registry local httpd assert cartridge service get httpd Failed to get httpd service setting the routes httpd route method GET path employees get employees by salary httpd route method POST path employee post employee return trueendreturn init init addind the crud storage dependency dependencies cartridge roles crud router init luaLet s describe the init lua file It is the entry point of a Cartridge application To configure a cluster instance the function cartridge cfg should be called in the init file of the cartridge cartridge cfg lt opts gt lt box opts gt lt opts gt the default cluster parameters the list of available roles all roles must be specified even the permanent ones to have them appear in the cluster sharding parameters WebUI configuration etc lt box opts gt the Tarantool default parameters passed to the instance s box cfg usr bin env tarantoolrequire strict on specifying the path to search for modulesif package setsearchroot nil then package setsearchroot end configuring Cartridgelocal cartridge require cartridge local ok err cartridge cfg roles cartridge roles vshard storage cartridge roles vshard router cartridge roles metrics lt lt lt Adding crud roles cartridge roles crud storage cartridge roles crud router lt lt lt Adding custom roles app roles storage app roles api cluster cookie myapp cluster cookie assert ok tostring err The final step is to describe the dependencies of the application in the myapp scm rockspec file package myapp version scm source url dev null Adding the dependenciesdependencies tarantool lua gt checks cartridge metrics crud build type none The application s code is ready to run but let s write some tests to make sure it works as expected Writing testsEvery application needs testing The usual luatest is sufficient for unit tests But to write an integration test you may want to use the cartridge test helpers module It is shipped with Cartridge and can be used to run a cluster of any structure for the tests local cartridge helpers require cartridge test helpers creating a test clusterlocal cluster cartridge helpers Cluster new server command init lua test application entrypoint datadir tmp directory for xlog snap and other files use vshard true enable cluster sharding list of replica sets replicasets alias api uuid cartridge helpers uuid a roles app roles custom list of roles assigned to the replicaset list of instances in the replicaset servers instance uuid cartridge helpers uuid a alias api Let s write an auxiliary module to use in the integration tests In this module a test cluster with two replica sets is created Each replica set contains one instance The auxiliary module code test helper lualocal fio require fio local t require luatest local cartridge helpers require cartridge test helpers local helper helper root fio dirname fio abspath package search init helper datadir fio pathjoin helper root tmp db test helper server command fio pathjoin helper root init lua helper cluster cartridge helpers Cluster new server command helper server command datadir helper datadir use vshard true replicasets alias api uuid cartridge helpers uuid a roles app roles api servers instance uuid cartridge helpers uuid a alias api alias storage uuid cartridge helpers uuid b roles app roles storage servers instance uuid cartridge helpers uuid b alias storage function helper truncate space on cluster cluster space name assert cluster nil for server in ipairs cluster servers do server net box eval local space name local space box space space name if space nil and not box cfg read only then space truncate end space name endendfunction helper stop cluster cluster assert cluster nil cluster stop fio rmtree cluster datadir endt before suite function fio rmtree helper datadir fio mktree helper datadir box cfg work dir helper datadir end return helperThe integration test code test integration api test lualocal t require luatest local g t group integration api local helper require test helper local cluster helper clusterg before all function g cluster helper cluster g cluster start endg after all function helper stop cluster g cluster endg before each function helper truncate space on cluster g cluster employee endg test get employee function local server cluster main server filling the storage with data via HTTP API local response server http request post employee json name John Doe department Delivery position Developer salary employee id john doe t assert equals response status response server http request post employee json name Jane Doe department Delivery position Developer salary employee id jane doe t assert equals response status Making a GET request and checking if the output data is correct response server http request get employees salary t assert equals response status t assert equals response json name Jane Doe department Delivery employee id jane doe position Developer salary end Running the tests If you had launched the application beforeStopping the application cartridge stopRemoving the directory containing the data rm rf tmp Building the application and setting the dependencies cartridge build deps shRunning the linter rocks bin luacheck Running the tests to record the coverage rocks bin luatest coverageGenerating the coverage reports and looking at the result rocks bin luacov grep A Summary tmp luacov report out Running locallyTo run applications locally you can use cartridge cli but the roles we have written should be added to replicasets yml router instances router roles failover coordinator app roles api all rw falses instances s master s replica roles app roles storage weight all rw false vshard group defaults instances s master s replica roles app roles storage weight all rw false vshard group defaultTo see the parameters of the configured instances take a look at the instances yml file Running the cluster locally cartridge buildcartridge start dcartridge replicasets setup bootstrap vshardNow we can enter WebUI to load the roles configuration and to configure the failover To configure a stateful failover do the following click the Failover button choose stateful specify the address and the password localhost passwdLet s see how it works Now the leader in the s replica set is s master Let s stop it cartridge stop s masterNow s replica becomes the leader Let s restore s master cartridge start d s masters master is up again but s replica is still the leader because of the stateful failover Let s load the configuration for the cartridge roles metrics role To do this switch to the Code tab and create the metrics yml file with the following contents export path metrics format prometheus path health format healthAfter we click the Apply button the metrics will become available at each node of the application at the localhost metrics endpoint The health check page at the localhost health address will also appear This completes the basic setup of a small application the cluster is ready to run and now we can write an application to communicate with the cluster using the HTTP API or via a connector We can also expand the functionality of the cluster ConclusionMany developers hate wasting time configuring a database We prefer simply writing code and leaving cluster management to a framework To solve this problem I use Cartridge a framework that manages a cluster containing several instances of a Tarantool database Now you know how to build a reliable cluster application based on Cartridge and Tarantool how to write the code for a small application to store information about employees how to add tests how to configure a cluster I hope my story was helpful and you will start using Cartridge to create applications I would be glad to hear feedback on whether you managed to write a Cartridge application quickly and easily as well as questions about its use What s next Check out the documentation on the official website Try Cartridge in the sandbox Ask your questions to the community in the Telegram chat 2022-02-14 13:02:44
Apple AppleInsider - Frontpage News Daily deals Feb 14: $175 AirPods Pro, $140 Ecovacs robot vacuum cleaner, more! https://appleinsider.com/articles/22/02/14/daily-deals-feb-14-175-airpods-pro-140-ecovacs-robot-vacuum-cleaner-more?utm_medium=rss Daily deals Feb AirPods Pro Ecovacs robot vacuum cleaner more Monday s best deals include discounts on AirPods and AirPods Pro off Minecraft for the Nintendo Switch and a inch smart TV for under Best Deals for February As we do every day we ve collected some of the best deals we could find on Apple products tech accessories and other items for the AppleInsider audience If an item is out of stock it may still be able to be ordered for delivery at a later date Read more 2022-02-14 13:14:18
Apple AppleInsider - Frontpage News How to use iCloud Keychain, Apple's built-in and free password manager https://appleinsider.com/articles/21/12/29/how-to-use-icloud-keychain-apples-built-in-and-free-password-manager?utm_medium=rss How to use iCloud Keychain Apple x s built in and free password managerYour iPhone iPad and Mac all have a free password manager made by Apple called iCloud Keychain Here s how to use it set up two factor authentication and never have to remember a password again How to use iCloud KeychainApple has stepped up its game in password management thanks to new features in iOS macOS Monterey and its other software releases Previously iCloud Keychain was a background password manager that popped up from time to time usually to the user s confusion to offer a strong password or autofill something Now it scans for password breaches warns of repeated passwords and offers two factor authentication FA keys in a dedicated Settings window Read more 2022-02-14 13:08:00
Apple AppleInsider - Frontpage News Apple threatens to pull out of Toronto shopping project https://appleinsider.com/articles/22/02/14/apple-threatens-to-pull-out-of-toronto-shopping-project?utm_medium=rss Apple threatens to pull out of Toronto shopping projectClaiming that missed deadlines mean it can cancel its contract Apple has reportedly told the developer of a Toronto mall and condo project that it may pull out of the deal The One under construction in Toronto Source Eduardo Lima The Globe and MailSince Mizrahi Developments has been constructing what it calls a condominium an storey skyscraper that includes significant shopping areas at the corner of Yonge and Bloor Then in Apple was revealed to be involved with plans for a square foot store in the complex Now however it has reportedly told the developer that it may pull out of the downtown building known as The One Read more 2022-02-14 13:57:18
海外TECH Engadget Samsung's cellular Galaxy Watch 4 models drop to new record-low prices https://www.engadget.com/samsungs-cellular-galaxy-watch-4-models-drop-to-new-record-low-prices-134741299.html?src=rss Samsung x s cellular Galaxy Watch models drop to new record low pricesWhether you pre ordered one of Samsung s new Galaxy smartphones or have another Android handset the company s Galaxy Watches are the wearables we d recommend pairing with it The Galaxy Watch came out last year and earned a score of from us and we consider it to be the best Wear OS smartwatch available right now You can pick one of the LTE models for less right now at Amazon as they are up to percent off The mm LTE Galaxy Watch is off and down to while the mm LTE version is also off and down to Buy Galaxy Watch LTE mm at Amazon Buy Galaxy Watch LTE mm at Amazon The Galaxy Watch was the first to run Wear OS with One UI which were the products of a closer collaboration between Google and Samsung Tizen lovers need not fear ーthe interface doesn t look too different from that on previous Samsung smartwatches Arguably the biggest perk of Wear OS is that the Galaxy Watch can download apps directly from the Play Store Samsung also added gesture controls to the Watch which let you do things like flick your wrist to answer or dismiss calls In addition to smart features like receiving smartphone alerts answering calls and messages and using apps on your wrist the Galaxy Watch has almost all of the fitness features most people will look for in a smartwatch This includes a built in heart rate monitor and GPS plus support for sleep tracking along with snore detection blood oxygen measurements and more It also has a new in biometric sensor that enables body mass scans using bioelectrical impedance analysis Samsung packed a lot of value into the Galaxy Watch and the LTE models on sale take it one step further by letting you take and make calls send texts and stream music without your phone present If you like the idea of leaving your phone at home and still having some access to your digital life an LTE smartwatch like this is a good option Follow EngadgetDeals on Twitter for the latest tech deals and buying advice 2022-02-14 13:47:41
海外TECH CodeProject Latest Articles Drawing Medical Waveforms using a Windows Mobile 5.0 Device https://www.codeproject.com/Tips/14327/Drawing-Medical-Waveforms-using-a-Windows-Mobile-D winmobile 2022-02-14 13:34:00
海外TECH CodeProject Latest Articles How to Access private S3 Objects with AWS Cognito https://www.codeproject.com/Articles/5324952/How-to-Access-private-S3-Objects-with-AWS-Cognito How to Access private S Objects with AWS CognitoTo provide a URL link to access objects in private S bucket through AWS Cognito User Pool using hosted UI Authorized API Gateway and Lambda in a Secure Way 2022-02-14 13:01:00
金融 RSS FILE - 日本証券業協会 J-IRISS https://www.jsda.or.jp/anshin/j-iriss/index.html iriss 2022-02-14 15:00:00
ニュース @日本経済新聞 電子版 【北京オリンピック】ジャンプ男子団体、日本は5位 (写真は左上から時計回りに佐藤幸椰、中村直幹、小林陵侑、小林潤志郎) #beijing2022 #北京2022 ▶競技結果・経過 https://t.co/zEVHzqsIkN https://t.co/VBO3Pdq7Wy https://twitter.com/nikkei/statuses/1493209500341391362 2022-02-14 13:04:22
海外ニュース Japan Times latest articles Putin signals talks with U.S. and NATO to continue amid crisis https://www.japantimes.co.jp/news/2022/02/14/world/politics-diplomacy-world/russia-putin-ukraine-talks/ Putin signals talks with U S and NATO to continue amid crisisThe comments were the clearest signs yet that Russia will continue diplomatic efforts to ease tensions and may even begin to de escalate in a crisis 2022-02-14 22:34:29
ニュース BBC News - Home Camilla tests positive for coronavirus https://www.bbc.co.uk/news/uk-60377261?at_medium=RSS&at_campaign=KARANGA covid 2022-02-14 13:29:45
ニュース BBC News - Home Sadiq Khan: Met Police Federation has 'no faith' in London mayor https://www.bbc.co.uk/news/uk-england-london-60375845?at_medium=RSS&at_campaign=KARANGA resignation 2022-02-14 13:50:34
ニュース BBC News - Home Ukraine: How prepared is Russia for attack? https://www.bbc.co.uk/news/world-europe-60158694?at_medium=RSS&at_campaign=KARANGA border 2022-02-14 13:08:05
ニュース BBC News - Home What are the travel rules for France, the US, and other popular destinations? https://www.bbc.co.uk/news/explainers-56997931?at_medium=RSS&at_campaign=KARANGA greece 2022-02-14 13:11:40
ニュース BBC News - Home Covid map: Coronavirus cases, deaths, vaccinations by country https://www.bbc.co.uk/news/world-51235105?at_medium=RSS&at_campaign=KARANGA countrykey 2022-02-14 13:32:06
北海道 北海道新聞 旭川市の60代女性 100万円詐欺被害 https://www.hokkaido-np.co.jp/article/645670/ 詐欺被害 2022-02-14 22:19:00
北海道 北海道新聞 林氏、ミャンマー情勢打開へ連携 カンボジア首相後継と会談 https://www.hokkaido-np.co.jp/article/645669/ 首相 2022-02-14 22:18:00
北海道 北海道新聞 A東京が横浜BC下す バスケBリーグ1部 https://www.hokkaido-np.co.jp/article/645668/ 男子 2022-02-14 22:18:00
北海道 北海道新聞 英皇太子夫人がコロナ感染 自主隔離、夫に続き https://www.hokkaido-np.co.jp/article/645667/ 隔離 2022-02-14 22:17:00
北海道 北海道新聞 中国の徐夢桃が金メダル フリースタイル女子・14日 https://www.hokkaido-np.co.jp/article/645666/ 金メダル 2022-02-14 22:14:00
北海道 北海道新聞 高病原性鳥インフル 道内で過去最多の12件に 欧州から渡り鳥で 全道養鶏場で緊急消毒へ https://www.hokkaido-np.co.jp/article/645664/ 過去最多 2022-02-14 22:07:00
北海道 北海道新聞 「男女倒れている」と通報、大阪 2人搬送、容体は不明 https://www.hokkaido-np.co.jp/article/645665/ 大阪府高槻市登美の里町 2022-02-14 22:08: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件)