IT |
気になる、記になる… |
Amazon、Kindleストアで講談社のタイトルの複数セールを開催中 − 「講談社文庫の大ヒット映像化作品フェア」など |
https://taisy0.com/2022/10/17/163704.html
|
amazon |
2022-10-17 08:35:08 |
IT |
InfoQ |
DataDog Publishes AWS Security Report |
https://www.infoq.com/news/2022/10/datadog-aws-security/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global
|
DataDog Publishes AWS Security ReportataDog has published their State of AWS Security report an overview of practices based on data analysis from over organizations The report compares intersection and divergence between actual usage against industry best practices and the cause of breaches data leaks By Erik Costlow |
2022-10-17 08:09:00 |
ROBOT |
ロボスタ |
京セラ、映像がホログラムのように空中に浮かび上がる「高精細空中ディスプレイ」を初披露、テーブル型の画面も!コンテンツが指の動きに反応するデモ公開 |
https://robotstart.info/2022/10/17/ceatec-kyosera-displqy.html
|
京セラ、映像がホログラムのように空中に浮かび上がる「高精細空中ディスプレイ」を初披露、テーブル型の画面もコンテンツが指の動きに反応するデモ公開シェアツイートはてブ「CEATEC」において、京セラは映像が空中に浮かび上がる「高精細空中ディスプレイ」を初披露した。 |
2022-10-17 08:25:32 |
ROBOT |
ロボスタ |
琴葉 茜・葵、結月ゆかりが法人利用可能に!キャラクターボイスを活用した新サービス『A.I.VOICE Biz』スタート |
https://robotstart.info/2022/10/17/aivoice-chara-voice.html
|
|
2022-10-17 08:20:24 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] 学生作のプログラムがUNOで対戦 NTT東日本がプログラミングコンテスト開催 |
https://www.itmedia.co.jp/news/articles/2210/17/news149.html
|
algori |
2022-10-17 17:50:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] 全国のタナカヒロカズさん集え 「田中宏和の会」広告が話題 |
https://www.itmedia.co.jp/business/articles/2210/17/news150.html
|
itmedia |
2022-10-17 17:48:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] 「利用者がいたずらで140度に設定」──滋賀県の老舗銭湯、“サウナテロ”の被害に 店側は激怒「悪質な営業妨害」 |
https://www.itmedia.co.jp/business/articles/2210/17/news135.html
|
ITmediaビジネスオンライン「利用者がいたずらで度に設定」ー滋賀県の老舗銭湯、“サウナテロの被害に店側は激怒「悪質な営業妨害」滋賀県の老舗銭湯が「お客さまがサウナ室の温度セットを勝手に触り、男女とも℃以上にするという前代未聞のいたずらをされた」と投稿し、注目を集めている。 |
2022-10-17 17:30:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] 高級寝台列車「ななつ星in九州」 宿泊者のルームウェアを新たに発表 |
https://www.itmedia.co.jp/business/articles/2210/17/news126.html
|
itmedia |
2022-10-17 17:30:00 |
TECH |
Techable(テッカブル) |
人材発掘における課題点 |
https://techable.jp/archives/186096
|
長期 |
2022-10-17 08:00:39 |
IT |
情報システムリーダーのためのIT情報専門サイト IT Leaders |
日立ソリューションズ・クリエイト、「仮想オフィスサービス」でリアルオフィスの座席予約が可能に | IT Leaders |
https://it.impress.co.jp/articles/-/23913
|
日立ソリューションズ・クリエイト、「仮想オフィスサービス」でリアルオフィスの座席予約が可能にITLeaders日立ソリューションズ・クリエイトは年月日、「仮想オフィスサービス」を強化し、現実のオフィスに出社する際の座席予約機能と座席位置確認機能を追加すると発表した。 |
2022-10-17 17:37:00 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
PyCon JP 2022 day1 Keynote |
https://qiita.com/matsumura-yzrh/items/ea3cee83236634a0fbb1
|
pyconjpdaykeynotepyconjp |
2022-10-17 17:46:38 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
【StableDiffusion】よわよわMacBookでもAIに絵を描かせたい! |
https://qiita.com/KeiFunahashi/items/86b7e8337e80dfed5167
|
dream |
2022-10-17 17:03:04 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
AWS CDK(JavaScript) + AWS Lambda(C#) をやる(AWS Lambda Function URLsで) |
https://qiita.com/Dameppoi/items/9d80854979c034b85cc3
|
netsdkgt |
2022-10-17 17:39:20 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
【うわっ...私の表情、硬すぎ...?】face-api.jsで顔検出して感情と年齢を判定する |
https://qiita.com/ymmt1089/items/4e35a7ba62d38c568cb6
|
faceapijs |
2022-10-17 17:05:44 |
Linux |
Ubuntuタグが付けられた新着投稿 - Qiita |
Windows+VirtualBox+Ubuntuの設定メモ(VirtualBox 6.1.38) |
https://qiita.com/pez/items/a3ef1855f7e1e0ed3dfd
|
pcpanasonicletsnote |
2022-10-17 18:00:00 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
AWS ソリューションアーキテクト アソシエイト SAA-C02 合格体験記 |
https://qiita.com/kotori118/items/3236b567bc971347f90a
|
間際 |
2022-10-17 17:38:08 |
Azure |
Azureタグが付けられた新着投稿 - Qiita |
Azure VM 仮想マシン 自動シャットダウンを構成する |
https://qiita.com/OrionLute/items/1771f91ea5ac8c802ad9
|
自動シャ |
2022-10-17 17:29:10 |
海外TECH |
DEV Community |
Handle quick phone authentication in Next.js using Appwrite and Twilio |
https://dev.to/hackmamba/handle-quick-phone-authentication-in-nextjs-using-appwrite-and-twilio-569i
|
Handle quick phone authentication in Next js using Appwrite and TwilioPhone authentication has provided a more accessible and secure way to validate users identities during onboarding or security sensitive operations It involves sending a user an SMS with a secret key that a system can use to validate their identity In this post we will learn how to authenticate a user with their phone number by leveraging Appwrite s phone authentication APIs and Twilio PrerequisitesTo fully grasp the concepts presented in this tutorial the following requirements apply Basic understanding of JavaScript and React Docker installation An Appwrite version instance check out this article on how to set up an instance locally Appwrite also supports one click install on DigitalOcean or Gitpod A Twilio account sign up for a trial account is completely free Getting startedWe need to create a Next js starter project by navigating to the desired directory and running the command below in our terminal npx create next app twilio auth amp amp cd twilio authThe command creates a Next js project called twilio auth and navigates into the project directory Installing dependenciesInstalling TailwindCSSTailwindCSS is a utility first CSS framework packed with classes to help us style our web pages To use it in our application run the command below in our terminal npm install D tailwindcss postcss autoprefixernpx tailwindcss init pThe command installs TailwindCSS and its dependencies and generates tailwind config js and postcss config js files Next we need to update tailwind config js file with the snippet below module exports content pages js ts jsx tsx components js ts jsx tsx theme extend plugins Finally we need to add TailwindCSS directives to our application The directives give our application access to TailwindCSS utility classes To do this navigate to the styles folder and update the globals css files in it with the snippet below tailwind base tailwind components tailwind utilities Installing AppwriteAppwrite is a development platform that provides a powerful API and management console for building backend servers for web and mobile applications To install it run the command below npm i appwrite Set up Twilio as SMS providerTo enable phone verification with Appwrite we need to sign into our Twilio Console and create a virtual phone number to send SMS messages Click on the Get a Twilio phone number button Twilio will generate a phone number for sending SMS messages an account SID and an Auth Token We need to keep these parameters handy as we need them to configure and enable phone authentication on Appwrite Add a verified phone numberSince we are using Twilio s free trial we need to verify the numbers we intend to send SMS to To do this click on the verified phone numbers link and click on Add a new Caller ID button Input the country code phone number and verify accordingly Enable geographical permissionTo avoid fraud abuse and high costs for voice or messaging usage Twilio implements a geo permissions mechanism for enabling and disabling countries that can receive voice calls and SMS messages from a Twilio account To enable SMS for our verified numbers we need to search for SMS Geographic Permissions in the search bar click on the SMS Geographic Permissions result and then check the country where the verified phone number operates Configure AppwriteTo get started we need to start up the Appwrite instance on our machine and then follow the steps that follow Enabling Twilio support in AppwriteTo enable Twilio support with Appwrite we need to update Appwrite s environment variables with our Twilio credentials To do this first we need to navigate to the directory created when we installed Appwrite and edit the env file as shown below remaining env variable goes here APP PHONE PROVIDER phone lt Account SID gt lt Auth Token gt twilio APP PHONE FROM lt TWILIO GENERATED PHONE NUMBER gt Sample of a properly filled variables is shown below APP PHONE PROVIDER phone ACfbccf fcaacbcceabb twilio APP PHONE FROM As mentioned earlier we can get the required credentials from Twilio console Secondly we need to sync the changes we made on the env file with our Appwrite server To do this we must run the command below inside the appwrite directory docker compose up d force recreateLastly we need to confirm that the service handling messaging on Appwrite is up and running We can verify or start this by expanding the Appwrite project on Docker Desktop Creating a new Appwrite projectTo create a new project we need to navigate to the specified hostname and port http localhost Next we need to log in to our account or create an account if we don t have one On the console click on the Create Project button input twilio auth as the name and click Create The project dashboard will appear on the console Next click on the settings tab and copy the Project ID and API Endpoint Create phone authentication in Next jsTo get started we ll navigate to our project root directory and create a helper folder here create an utils js file and add the snippet below import Client Account from appwrite create clientconst client new Client client setEndpoint http localhost v setProject PROJECT ID GOES HERE create accountconst account new Account client authenticate user with phone numberexport const phoneAuth phone number gt return account createPhoneSession unique phone number validate phone sessionexport const validateSMS userID secret gt return account updatePhoneSession userID secret The snippet above does the following Imports the required dependency Uses the Client and Account class to set up an Appwrite instance by specifying the endpoint and corresponding project ID Creates a phoneAuth and validateSMS function that uses the createPhoneSession and updatePhoneSession methods to create a user and validate the user using the code sent via SMS respectively PS The unique string passed to the createPhoneSession method tells Appwrite to auto generate a unique ID when creating a user Finally we need to update the index js file inside the pages folder as shown below import Head from next head import useState from react import phoneAuth validateSMS from helper utils import styles from styles Home module css export default function Home const value setValue useState phone otp const user setUser useState null const isPhoneVerify setIsPhoneVerify useState false const handleChange e gt setValue value e target name e target value const handleSubmit e gt e preventDefault phoneAuth value phone then res gt setUser res userId setIsPhoneVerify true catch e gt alert Error getting phone session e const handleValidatePhone e gt e preventDefault validateSMS user value otp then res gt alert User successfully verified using for user with ID res userId country Code res countryCode and expires on res expire catch e gt alert Error validating session e return lt div className styles container gt lt Head gt lt title gt Appwrite Twilio Auth lt title gt lt meta name description content Generated by appwrite twilio aauth gt lt link rel icon href favicon ico gt lt Head gt lt main className flex justify center items center h screen gt lt div className rounded xl w p shadow xl gt lt h className text xl font bold mb text indigo text center gt Appwrite Twilio Auth lt h gt isPhoneVerify Verify OTP using phone session lt form onSubmit handleValidatePhone gt lt fieldset className mb gt lt label className text sm block mb gt OTP lt label gt lt input className h border w full rounded border gray required type number name otp onChange handleChange gt lt fieldset gt lt button className bg indigo w full h rounded font semibold text white hover bg indigo gt Validate OTP lt button gt lt form gt Get Phone Session Form lt form onSubmit handleSubmit gt lt fieldset className mb gt lt label className text sm block mb gt Phone Number lt label gt lt input className h border w full rounded border gray required type tel name phone onChange handleChange gt lt fieldset gt lt button className bg indigo w full h rounded font semibold text white hover bg indigo gt Submit lt button gt lt form gt lt div gt lt main gt lt div gt The snippet above does the following Imports the required dependenciesLines Create state properties to manage application stateLines Create an handleChange function to control inputsLines Create an handleSubmit function that uses the phoneAuth function to create a userLine Create an handleValidatePhone function that uses the validateSMS function to verify the created user using the secret key sent via SMSModify the UI to display the forms conditionallyWith that done we can start a development server using the command below npm run devWe can validate the created user on Appwrite and also view Message Logs on Twilio ConclusionThis post discussed how to handle phone number authentication in Next js using Appwrite and Twilio With Appwrite developers don t have to reinvent the wheel when building authentication into their applications They can save application development time by leveraging intuitive authentication APIs provided by Appwrite These resources might also be helpful Set up Appwrite instance locallyAppwrite official documentationTwilio Geo Permissions |
2022-10-17 08:49:53 |
海外TECH |
DEV Community |
Restful API with Golang practical approach |
https://dev.to/firdavs_kasymov/restful-api-with-golang-practical-approach-420a
|
Restful API with Golang practical approachIn this tutorial we would be creating a Restful API with a practical approach of clean architecture and native Golang without any frameworks There are lots of tutorials out there for Restful API but the issue they are facing is they don t have a clear structure and use various frameworks Those tutorials depend on the existence of some frameworks of Golang With every external framework being used in the project it comes with great responsibility I don t have anything against these frameworks but rather I prefer to minimize the use of external frameworks and stick with standard packages of Golang When a beginner starts learning Golang most of them jump straight away to the famous external frameworks such as Gin Beego Fiber and many more Frameworks are good to implement something fast but the main issue is here that beginners are using frameworks without understanding the native approach that Golang provides out of the box This approach leads to the developer being dependent on the specific framework If you are sticking with frameworks what would you do if these frameworks are being deprecated have bugs or are not being supported anymore All of these frameworks use the native Golang codes behind them with an extra layer which makes them frameworks So my two cents here is to try to learn standard Golang packages this way you will not get lost in the world of frameworks as Golang provides most of the required things out of the box The initial requirement before we start our tutorial is to make sure that you have the following installed setup on your computer Golang IDE of your choice VSCode or GoLand JetBrains Postgresql Insomnia Golang Migrate For the purpose of this tutorial we will not be using Docker as explaining Docker and it is function is out of the context of this tutorial Initial setupCreate your folder and initialize the app mkdir rest apicd rest apigit initGolang has a package manager which is handled by go mod file To generate this file you must run the following command go mod init Name Of Remote Repository The convention to create a go mod is to use the name of the remote repository of your app in my case it will be go mod init github com fir rest api It is important to name it as a repository name because that is how Go manages dependencies when you execute the following command go get PackageName First we need to create a project structure before starting the actual implementation of Restful API I have already written a full blog regarding structuring a Golang application you can read it in full by clicking here So in this project we would be following the same structure as it is explained in the previous blog ArchitectureThe architecture of our program will be looking like the following diagram As is clear from the diagram we have isolation between Repository Model Service and Delivery layers This approach has been taken by the rules of the clean architecture of Uncle Bob more info at With this pattern we can have a clean and easy to follow logic independent of any layer so your business rules simply don t know anything at all about the outside world The below flow explains how the layers access each other Delivery REST gRPC gt Business Service gt Repository gt Model As you can see that we are not exposing the repository directly to the Delivery layer instead only our business service has access to it And once we have received an API call we just expose the business service to the delivery layer which I think is quite logical to do and easier to follow Creating Restful endpointsFor the purpose of this tutorial we will be creating a simple REST API for the TO DO list application which has a business logic of Creating Reading Updating and Deleting the todo item known as CRUD We will be using some essential libraries to make the REST API so please execute the following commands go get github com gorilla muxgo get github com sirupsen logrusgo get github com jmoiron sqlxgo get github com lib pqgo get github com asaskevich govalidatorgo get github com joho godotenvgo get github com kelseyhightower envconfigBriefly we will be explaining what each library does mux Package gorilla mux implements a request router and dispatcher for matching incoming requests to their respective handler Read in full from here logrus Logrus is a structured logger for Go golang completely API compatible with the standard library logger sqlx sqlx is a library which provides a set of extensions on go s standard database sql library pq A pure Go postgres driver for Go s database sql package govalidator A package of validators and sanitisers for strings structs and collections godotenv A library for loading env config filesenvconfig Library for managing configuration data from environment variables ConfigIn this project we are going to use dependencies such as Postgres as Postgres requires the client connection to provide credentials to be able to connect to the database So we have decided to create env file in the root of project with the credentials for the database we are going to use DATABASE HOST localhostDATABASE PORT DATABASE USER postgresDATABASE PASSWORD passwordDATABASE NAME restSERVER PORT The above credentials for Database might be different in your local computer so make sure to adjust it accordingly Create a file in directory configs config go with the content package configsimport github com joho godotenv github com kelseyhightower envconfig type Config struct Database Database ServerPort int envconfig SERVER PORT default type Database struct Host string envconfig DATABASE HOST required true Port int envconfig DATABASE PORT required true User string envconfig DATABASE USER required true Password string envconfig DATABASE PASSWORD required true Name string envconfig DATABASE NAME required true func NewParsedConfig Config error godotenv Load env cnf Config err envconfig Process amp cnf return cnf err This code will be responsible for parsing env files content to the struct Config Helper packagesIn this section we would be creating a helper package which can be used within our project or can be imported to external projects Package dbThis package will have methods linked to the Database such as connecting to the database and error handling Create a folder in pkg db which will include the files of db package Create the following associated files pkg db db gopackage dbimport fmt github com jmoiron sqlx github com lib pq type ConfingDB struct Host string Port int User string Password string Name string func Connect cnf ConfingDB sqlx DB error dsn fmt Sprintf host s port d user s password s dbname s sslmode disable cnf Host cnf Port cnf User cnf Password cnf Name db err sqlx Connect postgres dsn return db err And the following file for error handlingpkg db error gopackage dbimport database sql errors fmt func HandleError err error error if errors Is err sql ErrNoRows return ErrObjectNotFound return err ErrObjectNotFound is used to indicate that selecting an individual object yielded no result Declared as type not value for consistency reasons type ErrObjectNotFound struct func ErrObjectNotFound Error string return object not found func ErrObjectNotFound Unwrap error return fmt Errorf object not found Database migrationIf you have followed the initial setup you should have already golang migrate installed locally So we use migration files all together to keep the track of database scheme changes For the purpose of this tutorial we must create a table named todo for our database so for that we would be using golang migrate tool First create a folder migrations in the root directory Next execute the following command from the root working directory of the projectmigrate create ext sql dir migrations seq create todo tableThe command will automatically create two files inside migrations folder So we have now two files migrations create todo table up sqlWe need to put all the changes which we would like to do in a database on this file such as the creation of a new table or any changes related to the database Please put the following content into this file CREATE TABLE todo id SERIAL name TEXT NOT NULL description TEXT NOT NULL status SMALLINT NOT NULL created on TIMESTAMP WITHOUT TIME ZONE NOT NULL updated on TIMESTAMP WITHOUT TIME ZONE deleted on TIMESTAMP WITHOUT TIME ZONE PRIMARY KEY id When using Migrate CLI we need to pass to database URL Let s export it to a variable for convenience export POSTGRESQL URL postgres postgres password localhost rest sslmode disable Then run migration files by executing the command migrate database POSTGRESQL URL path migrations up create todo table down sqlIn case of if you would like to roll back migrations we will use down sql files so in this tutorial rollback of migration would be to delete a created table So please put the following content into this file DROP TABLE IF EXISTS todo To rollback the previously executed migration run the following command migrate database POSTGRESQL URL path migrations down Creating LayersModelWe would be creating a separate folder for the model layer in the directory internal todo model model go inside the file please have the following content package modelimport time type Status intconst StatusPending Status iota StatusInProgress StatusDone func s Status IsValid bool switch s case StatusPending return true case StatusInProgress return true case StatusDone return true return false type ToDo struct ID int db id Name string db name Description string db description Status Status db status CreatedOn time Time db created on UpdatedOn time Time db updated on DeletedOn time Time db deleted on We would be using model purely to interact with the Database to get the object from it and parse it to our model RepositoryLet s create our repository which will be responsible for handling all the database interactions for the ToDo model Create a separate directory for the repository internal todo repositoryand have file repository go within package repositoryimport context fmt github com fir rest api internal todo model github com fir rest api pkg db github com jmoiron sqlx type Repository struct Db sqlx DB func NewRepository db sqlx DB Repository return Repository Db db func r Repository Find ctx context Context id int model ToDo error entity model ToDo query fmt Sprintf SELECT FROM todo WHERE id AND deleted on IS NULL err r Db GetContext ctx amp entity query id return entity db HandleError err func r Repository Create ctx context Context entity model ToDo error query INSERT INTO todo name description status created on updated on VALUES name description status created on updated on RETURNING id rows err r Db NamedQueryContext ctx query entity if err nil return db HandleError err for rows Next err rows StructScan entity if err nil return db HandleError err return db HandleError err func r Repository Update ctx context Context entity model ToDo error query UPDATE todo SET name name description description status status created on created on updated on updated on deleted on deleted on WHERE id id err r Db NamedExecContext ctx query entity return db HandleError err func r Repository FindAll ctx context Context model ToDo error var entities model ToDo query fmt Sprintf SELECT FROM todo WHERE deleted on IS NULL err r Db SelectContext ctx amp entities query return entities db HandleError err The repository layer has only one purpose it will make a SQL query to the Database So in this case it provides the base CRUD operations for the ToDo model Create a separate directory for the service layer so you can write the business logic here so we would be creating a directory internal todo service and the files internal todo service service go and internal todo service get go within it Please have the following content on the file internal todo service service go ServiceWe would be implementing the business logic for the CRUD operations Please create the following folder in directory internal todo service and all the following files within the created directoryinternal todo service service gopackage serviceimport github com fir rest api internal todo repository type Service struct repo repository Repository func NewService r repository Repository Service return Service repo r It returns an instance of service and this instance would be having all methods of our business logic So in this tutorial the Delivery Layer can only call the Service layer to get access to the business logic CreateThe business logic will validate the parameters of the function and save the ToDo in the database internal todo service create gopackage serviceimport context github com asaskevich govalidator github com fir rest api internal todo model github com fir rest api pkg erru time type CreateParams struct Name string valid required Description string valid required Status model Status valid required func s Service Create ctx context Context params CreateParams int error if err govalidator ValidateStruct params err nil return erru ErrArgument Wrapped err tx err s repo Db BeginTxx ctx nil if err nil return err Defer a rollback in case anything fails defer tx Rollback entity model ToDo Name params Name Description params Description Status params Status CreatedOn time Now UTC err s repo Create ctx amp entity if err nil return err err tx Commit return entity ID err It returns an instance of service and this instance would be having all methods of our business logic Please note that here we have a separate type CreateParams for taking arguments to function rather than using model go Because we would like to have clear isolation between each layer so this way we would not clutter the tags of types and mandatory arguments to the function If we have used type ToDo from model go as an argument to the function type ToDo struct ID int db id Name string db name Description string db description Status Status db status CreatedOn time Time db created on UpdatedOn time Time db updated on DeletedOn time Time db deleted on Which fields from ToDo model would be mandatory for the business logic As it is clear that it will mess up our architecture if we use the model go types as arguments to the business layer That is one of the reasons why I like to isolate the layers so we have a clear understanding of mandatory fields for the functions GetThe business logic here is quite straightforward we will have a function which will take id as a mandatory parameter then we would be looking up the database internal todo service get gopackage serviceimport context errors github com fir rest api internal todo model github com fir rest api pkg db github com fir rest api pkg erru func s Service Get ctx context Context id int model ToDo error todo err s repo Find ctx id switch case err nil case errors As err amp db ErrObjectNotFound return model ToDo erru ErrArgument errors New todo object not found default return model ToDo err return todo nil UpdateThe business logic here is that we will be taking id as a mandatory field so we can look up the ToDo entity from the Database then update the fields name description status optionally if it is provided internal todo service update gopackage serviceimport context errors github com asaskevich govalidator github com fir rest api internal todo model github com fir rest api pkg erru type UpdateParams struct ID int valid required Name string Description string Status model Status func s Service Update ctx context Context params UpdateParams error if err govalidator ValidateStruct params err nil return erru ErrArgument Wrapped err find todo object todo err s Get ctx params ID if err nil return err if params Name nil todo Name params Name if params Description nil todo Description params Description if params Status nil if params Status IsValid return erru ErrArgument Wrapped errors New given status not valid todo Status params Status tx err s repo Db BeginTxx ctx nil if err nil return err Defer a rollback in case anything fails defer tx Rollback err s repo Update ctx todo if err nil return err err tx Commit return err DeleteHere we would be finding the ToDo entity from the database if it is found then we soft deleted it by putting the current time for the field DeletedOn I choose to soft delete the records compared to hard delete from the database table because this way we would be having records which we can use for various purposes such as auditing and etc internal todo service delete gopackage serviceimport context time func s Service Delete ctx context Context id int error todo err s Get ctx id if err nil return err tx err s repo Db BeginTxx ctx nil if err nil return err Defer a rollback in case anything fails defer tx Rollback now time Now UTC todo DeletedOn amp now err s repo Update ctx todo if err nil return err err tx Commit return err DeliveryHere we would be finding the ToDo entity from the database if it is found then we soft deleted it by putting the current time for the field DeletedOn I choose to soft delete the records compared to hard delete from the database table because this way we would be having records which we can use for various purposes such as auditing and etc In this section we would be implementing the delivery layer with the Restful server So please create a folder in the directory http rest As we have described CRUD so for each functionality of CRUD we would be having a separate handler which will receive external API calls and then each handler will call it is relevant business service We would be creating a separate handler and explaining the logic Initiate handler serviceFirst we must initiate a handler service so please create a file in http rest handlers handler go and put the following content package handlersimport toDoRepo github com fir rest api internal todo repository toDoService github com fir rest api internal todo service github com gorilla mux github com jmoiron sqlx github com sirupsen logrus type service struct logger logrus Logger router mux Router toDoService toDoService Service func newHandler lg logrus Logger db sqlx DB service return service logger lg toDoService toDoService NewService toDoRepo NewRepository db The handler service will take business service as a dependency argument in our case the dependency is toDoService which is our internal business service layer HelpersThere is common logic which is being used by every handler so I have decided to put that logic in a separate helper function so we can reuse it rather than duplicate it Create a file in http rest handlers helper go and put the following content package handlersimport bytes encoding json errors github com fir rest api pkg erru io net http Don t have to repeat yourself every time you respond to user instead you can use some helper functions func s service respond w http ResponseWriter data interface status int var respData interface switch v data type case nil case erru ErrArgument status http StatusBadRequest respData ErrorResponse ErrorMessage v Unwrap Error case error if http StatusText status status http StatusInternalServerError else respData ErrorResponse ErrorMessage v Error default respData data w WriteHeader status w Header Set Content Type application json if data nil err json NewEncoder w Encode respData if err nil http Error w Could not encode in json http StatusBadRequest return it does not read to the memory instead it will read it to the given v interface func s service decode r http Request v interface error return json NewDecoder r Body Decode v it reads to the memory func s service readRequestBody r http Request byte error Read the content var bodyBytes byte var err error if r Body nil bodyBytes err io ReadAll r Body if err nil err errors New could not read request body return nil err return bodyBytes nil will place the body bytes back to the request body which could be read in subsequent calls on Handlers for example you have more than middleware and each of them need to read the body If the first middleware read the body the second one won t be able to read it unless you put the request body back func s service restoreRequestBody r http Request bodyBytes byte Restore the io ReadCloser to its original state r Body io NopCloser bytes NewBuffer bodyBytes CreateWe will be creating handlers and the practical approach would be to have a struct for the request response within the relevant handler this way we have clear isolation between the data which is being required from the API call and the data which is being inserted into the business layer rather than using model everywhere within our application Some of you might not agree with me but I prefer clean code over a complicated one The main important thing for developers is to write the code clean so the fellow developers can understand easily http rest handlers create gopackage handlersimport github com fir rest api internal todo model toDoService github com fir rest api internal todo service net http func s service Create http HandlerFunc type request struct Name string json name Description string json description Status model Status json status type response struct ID int json id return func w http ResponseWriter r http Request req request Try to decode the request body into the struct If there is an error respond to the client with the error message and a status code err s decode r amp req if err nil s respond w err return id err s toDoService Create r Context toDoService CreateParams Name req Name Description req Description Status req Status if err nil s respond w err return s respond w response ID id http StatusOK As you can see the job of our handler is to receive an API call and then call the relevant business service layer to handle the rest of the logic s toDoService Create this is our business service layer It is a clean approach as our handler knows only about the business service layer and the handler does not know anything about the underlying logic of the business This approach is practical because imagine if you would like to expose your API with gRPC protocol with the current approach we just add an additional delivery layer in the directory http grpc then call our business service layer without the need to write any business logic GetPlease create a file in http rest handlers get go and have the following content package handlersimport errors github com fir rest api internal todo model github com fir rest api pkg erru github com gorilla mux net http strconv time func s service Get http HandlerFunc type response struct ID int json id Name string json name Description string json description Status model Status json status CreatedOn time Time json created on UpdatedOn time Time json updated on omitempty return func w http ResponseWriter r http Request vars mux Vars r id err strconv Atoi vars id if err nil s respond w erru ErrArgument Wrapped errors New valid id must provide in path return getResponse err s toDoService Get r Context id if err nil s respond w err return s respond w response ID getResponse ID Name getResponse Name Description getResponse Description Status getResponse Status CreatedOn getResponse CreatedOn UpdatedOn getResponse UpdatedOn http StatusOK UpdatePlease create a file in http rest handlers update go and have the following content package handlersimport errors github com fir rest api internal todo model toDoService github com fir rest api internal todo service github com fir rest api pkg erru github com gorilla mux net http strconv func s service Update http HandlerFunc type request struct Name string json name Description string json description Status model Status json status type response struct ID int json id return func w http ResponseWriter r http Request vars mux Vars r id err strconv Atoi vars id if err nil s respond w erru ErrArgument Wrapped errors New valid id must provide in path return req request Try to decode the request body into the struct If there is an error respond to the client with the error message and a status code err s decode r amp req if err nil s respond w err return err s toDoService Update r Context toDoService UpdateParams ID id Name req Name Description req Description Status req Status if err nil s respond w err return s respond w response ID id http StatusOK DeletePlease create a file in http rest handlers delete go and have the following content package handlersimport github com gorilla mux net http strconv func s service Delete http HandlerFunc return func w http ResponseWriter r http Request vars mux Vars r id err strconv Atoi vars id if err nil s respond w err return err s toDoService Delete r Context id if err nil s respond w err return s respond w nil http StatusOK MiddlewareAs you might have noticed by this time that one of the most important parts of every application is being able to log request and response to API calls Disclaimer when you log requests and responses you must be careful not to log sensitive information such as credentials usernames passwords and any other data which violates privacy Please create a file in http rest middleware logger go and put the following content inside it package handlersimport fmt net http time responseWriter is a minimal wrapper for http ResponseWriter that allows the written HTTP status code to be captured for logging This type will implement http ResponseWriter type responseWriter struct http ResponseWriter status int body byte wroteHeader bool wroteBody bool func wrapResponseWriter w http ResponseWriter responseWriter return amp responseWriter ResponseWriter w func rw responseWriter Status int return rw status func rw responseWriter WriteHeader code int if rw wroteBody return rw status code rw ResponseWriter WriteHeader code rw wroteHeader true func rw responseWriter Write body byte int error if rw wroteBody return nil i err rw ResponseWriter Write body if err nil return err rw body body return i err func rw responseWriter Body byte return rw body middlewarMiddlewareLoggereLogger logs the incoming HTTP request and response Enable it only for debug purpose disable it on production func s service MiddlewareLogger func http Handler http Handler return func next http Handler http Handler fn func w http ResponseWriter r http Request if r URL Path healthz Call the next handler don t log if it is internal request from health check of Kubernetes next ServeHTTP w r return defer func if err recover err nil w WriteHeader http StatusInternalServerError requestBody err s readRequestBody r if err nil s respond w err return s restoreRequestBody r requestBody logMessage fmt Sprintf path s method s requestBody v r URL EscapedPath r Method string requestBody start time Now wrapped wrapResponseWriter w next ServeHTTP wrapped r logMessage fmt Sprintf s responseStatus d responseBody s logMessage wrapped Status string wrapped Body s logger Infof s duration v logMessage time Since start return http HandlerFunc fn Register HandlersAs of now we have all the handlers with the relevant handlers but we need to register those handlers to the router with the customized Path We would be creating a file in http rest handlers routes go and have the following content package handlersimport github com gorilla mux github com jmoiron sqlx github com sirupsen logrus net http func Register r mux Router lg logrus Logger db sqlx DB handler newHandler lg db adding logger middleware r Use handler MiddlewareLogger r HandleFunc healthz handler Health r HandleFunc todo handler Create Methods http MethodPost r HandleFunc todo id handler Get Methods http MethodGet r HandleFunc todo id handler Update Methods http MethodPut r HandleFunc todo id handler Delete Methods http MethodDelete Creating ServerIn this stage we need to create an instance of an actual server which can receive API calls and handle those calls Please create a file in http rest logger go and have the following content inside it package restimport github com sirupsen logrus os func NewLogger logrus Logger log logrus New log SetOutput os Stdout log SetLevel logrus InfoLevel log SetFormatter amp logrus TextFormatter ForceColors true TimestampFormat FullTimestamp true return log Create a file in http rest server go and have the following content inside it package restimport context fmt github com fir rest api configs github com fir rest api http rest handlers github com fir rest api pkg db github com gorilla mux github com rs cors github com sirupsen logrus net http os os signal sync syscall type Server struct logger logrus Logger router mux Router config configs Config func NewServer Server error cnf err configs NewParsedConfig if err nil return nil err database err db Connect db ConfingDB Host cnf Database Host Port cnf Database Port User cnf Database User Password cnf Database Password Name cnf Database Name if err nil return nil err log NewLogger router mux NewRouter handlers Register router log database s Server logger log config cnf router router return amp s nil func s Server Run ctx context Context error server http Server Addr fmt Sprintf d s config ServerPort Handler cors Default Handler s router stopServer make chan os Signal signal Notify stopServer syscall SIGINT syscall SIGTERM defer signal Stop stopServer channel to listen for errors coming from the listener serverErrors make chan error var wg sync WaitGroup wg Add go func wg sync WaitGroup defer wg Done s logger Printf REST API listening on port d s config ServerPort serverErrors lt server ListenAndServe amp wg blocking run and waiting for shutdown select case err lt serverErrors return fmt Errorf error starting REST API server w err case lt stopServer s logger Warn server received STOP signal asking listener to shutdown err server Shutdown ctx if err nil return fmt Errorf graceful shutdown did not complete w err wg Wait s logger Info server was shut down gracefully return nil func s Server ServeHTTP w http ResponseWriter r http Request s router ServeHTTP w r Run ServerAt this point now we can run a Restful server and test all our integrations Please create a file in cmd app main go and have the following content inside it package mainimport context github com fir rest api http rest log func main if err run context Background err nil log Fatalf v err func run ctx context Context error server err rest NewServer if err nil return err err server Run ctx return err Our main package has a few lines of code which is an entry point to our application I think the main package should be clean and must be used to start servers without any extra logic TestsIn this section we are going to test our API server manually by making a Restful API call with the help of the Insomnia Tool Make sure that you are in the root directory and run the following command from the terminal go run cmd app goCreateMake an API call to thePOST localhost todoRequest Body name Tutorial Restful pending description Still we are testing Restful api so not finished status GetMake an API call to theGET localhost todo id of todo might be different in your case UpdateMake an API call to thePUT localhost todo id of todo might be different in your case Request Body name Tutorial Restful finished description Restful api testing finished status Get Updated ToDoMake an API call to theGET localhost todo id of todo might be different in your case From the above screenshot it is clear that the entity ToDo was updated DeleteMake an API call to theDELETE localhost todo id of todo might be different in your case The entity was deleted so when we do GET request we will be getting an error as the object does not exist anymore EnhancementsYou can even enhance this project by adding more functionalities such as Add todo list endpoint that will return all existing ToDo s entity Extra functionalities such as filtering the ToDo by status and keywords Add authenticationOnce you have done these enhancements you can create a PR towards my repository github com fir rest api The endHopefully this tutorial was useful and I would be more than happy to receive questions or suggestions about it The source code for this tutorial can be found hereThat s it for this blog Please feel free to comment with your views on this blog Thanks for your time reading this blog and hope it was useful Happy learning and sharing |
2022-10-17 08:42:07 |
海外TECH |
DEV Community |
Get Started with Amazon Elastic Container Service with Fargate |
https://dev.to/makendrang/getting-started-with-amazon-elastic-container-service-with-fargate-32ko
|
Get Started with Amazon Elastic Container Service with Fargate Introduction What is Docker Image SourceDocker is a tool that makes it easy to build deploy and run applications using containers Containers allow developers to package and deploy applications as a single package along with all necessary components such as libraries and other dependencies This ensures that the program will run on any other Linux machine regardless of your custom settings on the machine which may be different from the machine you use to write and test the code What is Amazon ECS Amazon ECS manages containers and allows developers to run applications in the cloud without configuring the environment to run their code It allows developers with AWS accounts to deploy and manage scalable applications running on groups of servers called clusters through application program interface calls and task definitions Amazon ECS makes it easy for developers to use Docker containers for a variety of tasks These range from hosting simple websites to running complex distributed microservices that require thousands of containers Running Amazon ECS with FargateYou can run services or tasks on AWS Fargate to deploy containers on serverless infrastructure managed by Amazon ECS Let s launch Amazon ECS on AWS Fargate using the Fargate launch type for our task In regions where Amazon ECS supports AWS Fargate the Amazon ECS First Startup wizard guides you through the Amazon ECS launch process using the Fargate launch type The wizard creates a cluster and gives you the option to run a sample web application Kindly watch the below video on how to create a task definition a service and a cluster using Fargate ConclusionYou have successfully created a task definition a service and a cluster using Fargate Gratitude for perusing my article till the end I hope you realized something unique today If you enjoyed this article then please share it with your buddies and if you have suggestions or thoughts to share with me then please write in the comment box Follow me and share your thoughts GitHubLinkedInTwitterThe above blog is submitted under Devtron Hacktoberfest conducted by Devtron Check out their Github repo and give it a star ️if you like it Follow Devtron on LinkedIn Twitter |
2022-10-17 08:03:16 |
海外TECH |
Engadget |
Mercedes-Benz' EQE SUV is its first crossover to get the AMG treatment |
https://www.engadget.com/mercedes-benz-eqe-suv-amg-083443358.html?src=rss
|
Mercedes Benz x EQE SUV is its first crossover to get the AMG treatmentAs part of its ambitious electric vehicle plans Mercedes has taken the wraps off its latest model the EQE SUV ーalong with a bonus high performance AMG version Highlights of the new models include slippery aerodynamics a large kWh battery and very quick MPH times on the AMG model Mercedes calls the EQE SUV a quot multipurpose variant of the EQE executive sedan quot that launched recently As such it looks very much like an SUV version of the EQE though it s actually inches shorter than the sedan Size wise it s somewhere between the EQ B and EQS SUVs nbsp Mercedes BenzIt s one of the more aerodynamic SUVs out there with a very slippery coefficient of drag ーeven with the running boards Along with the large kWh battery that helps contribute to an expected miles of WLTP range likely less on the EPA scale Mercedes didn t detail power or performance on the regular EQE model but instead talks about battery efficiency thermal cooling energy recovery noise and vibration comfort and more in its extremely detailed press release nbsp The interior has a mix of natural and synthetic materials like NeoTex and leather Front and center is a curved Hyperscreen that features three separate displays for the infotainment system vehicle controls and more The automaker said it has now integrated more streaming services Spotify Amazon Music and Apple Music into the MBUX infotainment system There s also a front passenger display that s designed to allow the front passenger to watch TV without distracting the driver nbsp Mercedes BenzThe AMG version is Mercedes first performance SUV and takes everything on the regular EQE to The front and rear motors put out HP or up to from a boost function with the optional AMG Dynamic Plus package The Race Start feature lets you put full power to the wheels complete with sound emitted inside and outside the vehicle getting from MPH in seconds Other performance features on the AMG include an AMG adapted air suspension lowered ride height settings for Sport and Sport modes an active anti roll bar carbon ceramic front brakes and rear axle steering as standard nbsp Mercedes BenzSome exterior touches include digital headlights that project the Mercedes and AMG logos when the vehicle is shut off large and inch wheels and an AMG logo on the hood in place of the usual Mercedes one Inside lucky buyers can choose from four interior options with leather seating as standard The Hyperscreen also gets custom AMG graphics including a performance readout in the center display More details for the EQE like powertrain options will be announced closer to launch Mercedes Benz didn t detail pricing or availability but did say that the standard version of the EQE SUV will start production in December at its US facility in Alabama Unlike the EQS SUV that starts at the EQE SUV may have a shot at getting under the threshold to quality for a federal tax credit nbsp |
2022-10-17 08:34:43 |
医療系 |
医療介護 CBnews |
能力高い介護福祉士の給与アップ提案-社保審・部会の委員、人材確保で |
https://www.cbnews.jp/news/entry/20221017173537
|
介護保険 |
2022-10-17 17:45:00 |
医療系 |
医療介護 CBnews |
医療保護入院、一定期間ごとに要件確認-障害者総合支援法改正案、訪問支援事業創設も |
https://www.cbnews.jp/news/entry/20221017171436
|
一定期間 |
2022-10-17 17:20:00 |
金融 |
RSS FILE - 日本証券業協会 |
外国株式信用取引の取扱状況 |
https://www.jsda.or.jp/shiryoshitsu/toukei/foreign-shinyo/index.html
|
信用取引 |
2022-10-17 10:00:00 |
金融 |
RSS FILE - 日本証券業協会 |
個人情報の苦情処理に関する実績報告 |
https://www.jsda.or.jp/shiryoshitsu/toukei/kojn_kujyou.html
|
個人情報 |
2022-10-17 09:00:00 |
ニュース |
@日本経済新聞 電子版 |
中国、7~9月GDP公表延期 習氏3期目控え「忖度」か
https://t.co/FZ3d3Y1NbQ |
https://twitter.com/nikkei/statuses/1581932208373501952
|
控え |
2022-10-17 08:56:44 |
ニュース |
@日本経済新聞 電子版 |
[FT]クレディ・スイス、国内事業の一部売却を検討
https://t.co/by3p49DIYV |
https://twitter.com/nikkei/statuses/1581920384873816064
|
国内事業 |
2022-10-17 08:09:45 |
海外ニュース |
Japan Times latest articles |
Xi looks to harness Chinese ‘fighting spirit’ to take on U.S. |
https://www.japantimes.co.jp/news/2022/10/17/asia-pacific/politics-diplomacy-asia-pacific/defiant-xi-china-congress/
|
Xi looks to harness Chinese fighting spirit to take on U S Leader Xi Jinping used a highly anticipated speech at a twice a decade Communist Party congress to deliver a clear message to those who want to thwart |
2022-10-17 17:15:37 |
海外ニュース |
Japan Times latest articles |
The high stakes of climate-risk accounting |
https://www.japantimes.co.jp/opinion/2022/10/17/commentary/world-commentary/climate-change-investing/
|
environment |
2022-10-17 17:00:48 |
ニュース |
BBC News - Home |
Pressure mounts on Liz Truss ahead of Jeremy Hunt statement |
https://www.bbc.co.uk/news/uk-politics-63282694?at_medium=RSS&at_campaign=KARANGA
|
government |
2022-10-17 08:17:03 |
ニュース |
BBC News - Home |
Dartford closure: Just Stop Oil protesters climb up QE2 Bridge |
https://www.bbc.co.uk/news/uk-england-essex-63281841?at_medium=RSS&at_campaign=KARANGA
|
bridgethere |
2022-10-17 08:44:54 |
ニュース |
BBC News - Home |
Booker Prize 2022: Queen Consort to award prestigious prize |
https://www.bbc.co.uk/news/entertainment-arts-63283020?at_medium=RSS&at_campaign=KARANGA
|
garner |
2022-10-17 08:15:43 |
ニュース |
BBC News - Home |
Pound rises and borrowing costs fall as chancellor moves to calm markets |
https://www.bbc.co.uk/news/business-63278821?at_medium=RSS&at_campaign=KARANGA
|
measures |
2022-10-17 08:49:10 |
ニュース |
BBC News - Home |
T20 World Cup: Scotland shock West Indies in Group B |
https://www.bbc.co.uk/sport/cricket/63281343?at_medium=RSS&at_campaign=KARANGA
|
indies |
2022-10-17 08:53:13 |
ニュース |
BBC News - Home |
T20 World Cup: Scotland shock West Indies in Hobart |
https://www.bbc.co.uk/sport/av/cricket/63283946?at_medium=RSS&at_campaign=KARANGA
|
indies |
2022-10-17 08:33:58 |
GCP |
Google Cloud Platform Japan 公式ブログ |
PromQL の追加によりオープンソースの支持を高める Cloud Monitoring |
https://cloud.google.com/blog/ja/products/devops-sre/cloud-monitoring-ui-now-features-promql-querying/
|
本日は、MetricsExplorerやダッシュボードビルダーをはじめとする、CloudMonitoringのユーザーインターフェース全体でPromQLを使用できるようになったことをお知らせいたします。 |
2022-10-17 09:50:00 |
GCP |
Google Cloud Platform Japan 公式ブログ |
BigQuery SQL で Google Earth Engine の衛星画像を解析 |
https://cloud.google.com/blog/ja/products/data-analytics/analyzing-satellite-images-in-google-earth-engine-with-bigquery-sql/
|
たとえば、この投稿では、GEEカタログ内のLandsat衛星画像から気温と植生のデータを取得するCloudFunctionsの関数を作成するのですが、それらすべてをBigQueryのSQLから行っていきます。 |
2022-10-17 09:40:00 |
GCP |
Google Cloud Platform Japan 公式ブログ |
BigQuery Export ユーザーの Log Analytics への移行 |
https://cloud.google.com/blog/ja/products/data-analytics/moving-to-log-analytics-for-bigquery-export-users/
|
BigQueryへのログシンクLogAnalytics運用上のオーバーヘッドログシンクつまたは複数とBigQueryデータセットを追加で作成、管理し、ログエントリのコピーをエクスポートGoogleが管理するリンクされたBigQueryデータセットをGoogleCloudコンソールからワンクリックでセットアップ費用BigQueryでデータが複製されるため、ストレージと取り込みで重の費用を支払う必要があるBigQueryのストレージと取り込みの費用は、CloudLoggingの取り込み費用に含まれるLogAnalyticsからのクエリは無料枠ストレージテーブル作成時にログタイプごとにスキーマを定義ログ形式を変更すると、スキーマの不一致によりエラーが発生する可能性がある単一の統合型スキーマログ形式を変更しても、スキーマの不一致によるエラーは発生しない分析BigQueryからSQLでログのクエリを実行LogAnalyticsページで、またはBigQueryページからSQLでログのクエリを実行ネイティブJSONデータ型を使用して簡単にJSONフィールドに対するクエリを実行可能事前構築済みの検索インデックスを使用することで検索を高速化セキュリティログバケットへのアクセスを管理BigQueryデータセットへのアクセス権を管理し、ログのセキュリティと整合性を確保ログバケットへのアクセスを管理リンクされたBigQueryデータセットへの読み取り専用アクセス権のみを管理LogAnalyticsと従来のBigQueryへのログシンクとの比較シンプルなテーブル構成データに関する最も重要な変更点は、LogAnalyticsでアップグレードされたログバケット内のすべてのログを、GoogleCloudのすべてのログタイプまたはログ形式をサポートする包括的なスキーマ次のセクションで詳述を使用して、単一のログビューAllLogsで利用できることです。 |
2022-10-17 09:30:00 |
GCP |
Google Cloud Platform Japan 公式ブログ |
Vertex AI Model Registry でモデルの本番環境への移行を合理化する |
https://cloud.google.com/blog/ja/products/ai-machine-learning/vertex-ai-model-registry/
|
図VertexAIModelRegistryモデル評価ビュー簡素化されたモデルの検証でモデルのリリースを改善する MLOps環境では、適切なモデルのバージョンをダウンストリームシステム全体で一貫して使用するために、自動化が重要です。 |
2022-10-17 09:20:00 |
GCP |
Google Cloud Platform Japan 公式ブログ |
BigQuery に課金データをエクスポートして分析する |
https://cloud.google.com/blog/ja/topics/developers-practitioners/exporting-and-analyzing-billing-data-using-bigquery/
|
このデータにBigQueryを使用する理由は何ですか課金データのエクスポートではすべて、大量のデータが生成されます。 |
2022-10-17 09:10:00 |
北海道 |
北海道新聞 |
ミルクボーイが一日署長、大阪 「それ特殊詐欺やないかい!」 |
https://www.hokkaido-np.co.jp/article/746514/
|
一日署長 |
2022-10-17 17:29:00 |
北海道 |
北海道新聞 |
BTSのジンさん兵役へ 12月入隊期限、事務所発表 |
https://www.hokkaido-np.co.jp/article/746513/
|
所属事務所 |
2022-10-17 17:27:00 |
北海道 |
北海道新聞 |
性被害の元自衛官「私の区切り」 4人から謝罪、「強く生きたい」 |
https://www.hokkaido-np.co.jp/article/746512/
|
元自衛官 |
2022-10-17 17:27:00 |
北海道 |
北海道新聞 |
航空2社、4回目職場接種を開始 水際対策緩和で対策強化 |
https://www.hokkaido-np.co.jp/article/746511/
|
日本航空 |
2022-10-17 17:20:00 |
北海道 |
北海道新聞 |
3年ぶり当別スウェーデンマラソン 田園風景眺め1312人快走 |
https://www.hokkaido-np.co.jp/article/746226/
|
石狩管内 |
2022-10-17 17:20:07 |
北海道 |
北海道新聞 |
立憲・野田氏「かませ犬のよう」 追悼演説に胸中複雑 |
https://www.hokkaido-np.co.jp/article/746508/
|
追悼演説 |
2022-10-17 17:15:00 |
北海道 |
北海道新聞 |
ロシア軍元大佐に懸賞金 マレーシア機撃墜で起訴 |
https://www.hokkaido-np.co.jp/article/746503/
|
起訴 |
2022-10-17 17:06:00 |
北海道 |
北海道新聞 |
1管本部、新たに人のあごとみられる骨発見 知床の観光船事故 |
https://www.hokkaido-np.co.jp/article/746507/
|
知床半島 |
2022-10-17 17:01:48 |
ビジネス |
東洋経済オンライン |
中国「国慶節」大型連休の旅行客が激減した事情 新型コロナの流行が全国170都市以上に拡散 | 「財新」中国Biz&Tech | 東洋経済オンライン |
https://toyokeizai.net/articles/-/625570?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
建国記念日 |
2022-10-17 18:00:00 |
ニュース |
Newsweek |
人類が天体の動きを意図的に変えた史上初の成果 探査機を衝突 |
https://www.newsweekjapan.jp/stories/world/2022/10/post-99876.php
|
イタリア宇宙機関の小型探査機が搭載、分離し、衝突を撮影「DART」にはイタリア宇宙機関ASIの小型探査機「LICIACube」が搭載され、ディモルフォスとの衝突の数日前に「DART」から分離して、衝突の様子やディモルフォスからの噴出物を撮影していた。 |
2022-10-17 17:25:15 |
IT |
週刊アスキー |
DMM GAMES、パッケージゲーム「D.C.5 ~ダ・カーポ5~」公式サイトにてサンプルCGや紹介マンガなどの情報を更新! ポストカード無料配布キャンペーンも開催決定! |
https://weekly.ascii.jp/elem/000/004/109/4109182/
|
開催決定 |
2022-10-17 17:40:00 |
GCP |
Cloud Blog JA |
PromQL の追加によりオープンソースの支持を高める Cloud Monitoring |
https://cloud.google.com/blog/ja/products/devops-sre/cloud-monitoring-ui-now-features-promql-querying/
|
本日は、MetricsExplorerやダッシュボードビルダーをはじめとする、CloudMonitoringのユーザーインターフェース全体でPromQLを使用できるようになったことをお知らせいたします。 |
2022-10-17 09:50:00 |
GCP |
Cloud Blog JA |
BigQuery SQL で Google Earth Engine の衛星画像を解析 |
https://cloud.google.com/blog/ja/products/data-analytics/analyzing-satellite-images-in-google-earth-engine-with-bigquery-sql/
|
たとえば、この投稿では、GEEカタログ内のLandsat衛星画像から気温と植生のデータを取得するCloudFunctionsの関数を作成するのですが、それらすべてをBigQueryのSQLから行っていきます。 |
2022-10-17 09:40:00 |
GCP |
Cloud Blog JA |
BigQuery Export ユーザーの Log Analytics への移行 |
https://cloud.google.com/blog/ja/products/data-analytics/moving-to-log-analytics-for-bigquery-export-users/
|
BigQueryへのログシンクLogAnalytics運用上のオーバーヘッドログシンクつまたは複数とBigQueryデータセットを追加で作成、管理し、ログエントリのコピーをエクスポートGoogleが管理するリンクされたBigQueryデータセットをGoogleCloudコンソールからワンクリックでセットアップ費用BigQueryでデータが複製されるため、ストレージと取り込みで重の費用を支払う必要があるBigQueryのストレージと取り込みの費用は、CloudLoggingの取り込み費用に含まれるLogAnalyticsからのクエリは無料枠ストレージテーブル作成時にログタイプごとにスキーマを定義ログ形式を変更すると、スキーマの不一致によりエラーが発生する可能性がある単一の統合型スキーマログ形式を変更しても、スキーマの不一致によるエラーは発生しない分析BigQueryからSQLでログのクエリを実行LogAnalyticsページで、またはBigQueryページからSQLでログのクエリを実行ネイティブJSONデータ型を使用して簡単にJSONフィールドに対するクエリを実行可能事前構築済みの検索インデックスを使用することで検索を高速化セキュリティログバケットへのアクセスを管理BigQueryデータセットへのアクセス権を管理し、ログのセキュリティと整合性を確保ログバケットへのアクセスを管理リンクされたBigQueryデータセットへの読み取り専用アクセス権のみを管理LogAnalyticsと従来のBigQueryへのログシンクとの比較シンプルなテーブル構成データに関する最も重要な変更点は、LogAnalyticsでアップグレードされたログバケット内のすべてのログを、GoogleCloudのすべてのログタイプまたはログ形式をサポートする包括的なスキーマ次のセクションで詳述を使用して、単一のログビューAllLogsで利用できることです。 |
2022-10-17 09:30:00 |
GCP |
Cloud Blog JA |
Vertex AI Model Registry でモデルの本番環境への移行を合理化する |
https://cloud.google.com/blog/ja/products/ai-machine-learning/vertex-ai-model-registry/
|
図VertexAIModelRegistryモデル評価ビュー簡素化されたモデルの検証でモデルのリリースを改善する MLOps環境では、適切なモデルのバージョンをダウンストリームシステム全体で一貫して使用するために、自動化が重要です。 |
2022-10-17 09:20:00 |
GCP |
Cloud Blog JA |
BigQuery に課金データをエクスポートして分析する |
https://cloud.google.com/blog/ja/topics/developers-practitioners/exporting-and-analyzing-billing-data-using-bigquery/
|
このデータにBigQueryを使用する理由は何ですか課金データのエクスポートではすべて、大量のデータが生成されます。 |
2022-10-17 09:10:00 |
コメント
コメントを投稿