投稿時間:2022-04-27 02:34:17 RSSフィード2022-04-27 02:00 分まとめ(40件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… ビックカメラ、Amazonデバイスを最大60%オフで販売するセールを開催中 https://taisy0.com/2022/04/27/156268.html amazon 2022-04-26 16:30:01
AWS AWS Big Data Blog Build a modern data architecture and data mesh pattern at scale using AWS Lake Formation tag-based access control https://aws.amazon.com/blogs/big-data/build-a-modern-data-architecture-and-data-mesh-pattern-at-scale-using-aws-lake-formation-tag-based-access-control/ Build a modern data architecture and data mesh pattern at scale using AWS Lake Formation tag based access controlCustomers are exploring building a data mesh on their AWS platform using AWS Lake Formation and sharing their data lakes across the organization A data mesh architecture empowers business units organized into domains to have high ownership and autonomy for the technologies they use while providing technology that enforces data security policies both within and … 2022-04-26 16:07:40
AWS AWS Machine Learning Blog Create random and stratified samples of data with Amazon SageMaker Data Wrangler https://aws.amazon.com/blogs/machine-learning/create-random-and-stratified-samples-of-data-with-amazon-sagemaker-data-wrangler/ Create random and stratified samples of data with Amazon SageMaker Data WranglerIn this post we walk you through two sampling techniques in Amazon SageMaker Data Wrangler so you can quickly create processing workflows for your data We cover both random sampling and stratified sampling techniques to help you sample your data based on your specific requirements Data Wrangler reduces the time it takes to aggregate and … 2022-04-26 16:02:16
AWS AWS Security Blog Extend your pre-commit hooks with AWS CloudFormation Guard https://aws.amazon.com/blogs/security/extend-your-pre-commit-hooks-with-aws-cloudformation-guard/ Extend your pre commit hooks with AWS CloudFormation GuardGit hooks are scripts that extend Git functionality when certain events and actions occur during code development Developer teams often use Git hooks to perform quality checks before they commit their code changes For example see the blog post Use Git pre commit hooks to avoid AWS CloudFormation errors for a description of how the AWS … 2022-04-26 16:36:24
AWS AWS TechShift Part 4: Automation and Scaling a Software Application on AWS https://www.youtube.com/watch?v=YXXOyA8yGA0 TechShift Part Automation and Scaling a Software Application on AWSIntroducing TechShift the AWS series dedicated to software businesses who looking to acceleerate the transofrmation of their solutions to Cloud and SaaS Register for a TechShift Event Subscribe More AWS videos More AWS events videos ABOUT AWSAmazon Web Services AWS is the world s most comprehensive and broadly adopted cloud platform offering over fully featured services from data centers globally Millions of customers ーincluding the fastest growing startups largest enterprises and leading government agencies ーare using AWS to lower costs become more agile and innovate faster SAAS Cloud SoftwareBusiness SoftwareVendor BusinessTransofrmation AWS AmazonWebServices CloudComputing 2022-04-26 16:41:02
AWS AWS TechShift Part 5: Summary on Application Migration and Modernization https://www.youtube.com/watch?v=m6rzlY7NVv4 TechShift Part Summary on Application Migration and ModernizationIntroducing TechShift the AWS series dedicated to software businesses who looking to acceleerate the transofrmation of their solutions to Cloud and SaaS Register for a TechShift Event Subscribe More AWS videos More AWS events videos ABOUT AWSAmazon Web Services AWS is the world s most comprehensive and broadly adopted cloud platform offering over fully featured services from data centers globally Millions of customers ーincluding the fastest growing startups largest enterprises and leading government agencies ーare using AWS to lower costs become more agile and innovate faster SAAS Cloud SoftwareBusiness SoftwareVendor BusinessTransofrmation AWS AmazonWebServices CloudComputing 2022-04-26 16:40:54
AWS AWS Security Blog Extend your pre-commit hooks with AWS CloudFormation Guard https://aws.amazon.com/blogs/security/extend-your-pre-commit-hooks-with-aws-cloudformation-guard/ Extend your pre commit hooks with AWS CloudFormation GuardGit hooks are scripts that extend Git functionality when certain events and actions occur during code development Developer teams often use Git hooks to perform quality checks before they commit their code changes For example see the blog post Use Git pre commit hooks to avoid AWS CloudFormation errors for a description of how the AWS … 2022-04-26 16:36:24
AWS lambdaタグが付けられた新着投稿 - Qiita GuardDutyの脅威検出結果をSlack/Teamsに通知する https://qiita.com/TomoyukiSugiyama/items/ab7998c0d4ad1fa29028 guardduty 2022-04-27 01:22:00
python Pythonタグが付けられた新着投稿 - Qiita [Python] list, tuple, dict, bitへのアクセス速度比較 https://qiita.com/KYUPHD/items/e9232713e4470d7a11a6 listtupledictbit 2022-04-27 01:18:19
js JavaScriptタグが付けられた新着投稿 - Qiita Azure Functions で 認証ユーザー情報にアクセスする https://qiita.com/georgeOsdDev@github/items/f62367cdd7dc1a95352a differentlangua 2022-04-27 01:07:52
AWS AWSタグが付けられた新着投稿 - Qiita GuardDutyの脅威検出結果をSlack/Teamsに通知する https://qiita.com/TomoyukiSugiyama/items/ab7998c0d4ad1fa29028 guardduty 2022-04-27 01:22:00
golang Goタグが付けられた新着投稿 - Qiita GuardDutyの脅威検出結果をSlack/Teamsに通知する https://qiita.com/TomoyukiSugiyama/items/ab7998c0d4ad1fa29028 guardduty 2022-04-27 01:22:00
Azure Azureタグが付けられた新着投稿 - Qiita Azure Functions で 認証ユーザー情報にアクセスする https://qiita.com/georgeOsdDev@github/items/f62367cdd7dc1a95352a differentlangua 2022-04-27 01:07:52
海外TECH Ars Technica Opinion: Here’s a simple way Elon Musk could make Twitter better https://arstechnica.com/?p=1850470 twitter 2022-04-26 16:05:59
海外TECH MakeUseOf How to Move Columns in Excel (4 Ways) https://www.makeuseof.com/how-to-move-columns-in-excel/ simple 2022-04-26 16:45:14
海外TECH MakeUseOf Protect Your Privacy With These 5 Opera Add-Ons https://www.makeuseof.com/protect-privacy-opera-add-ons/ browser 2022-04-26 16:30:13
海外TECH MakeUseOf How to Fix YouTube Audio Stuttering in Chrome on Windows https://www.makeuseof.com/windows-chrome-youtube-audio-stutter-fix/ How to Fix YouTube Audio Stuttering in Chrome on WindowsNothing ruins a good video like unstable stuttering audio If you encounter this issue on YouTube while using Chrome on Windows here are the fixes 2022-04-26 16:15:13
海外TECH DEV Community Day-74 Training At Ryaz https://dev.to/mahin651/day-74-training-at-ryaz-2430 Day Training At RyazDate Day TusdayToday I started at about am as I was in progress to complete the java script course so today I started with the left over task firstly I started with flat and flat map The flatMap method returns a new array formed by applying a given callback function to each element of the array and then flattening the result by one level It is identical to a map followed by a flat of depth but slightly more efficient than calling those two methods separately the flat method creates a new array with the elements of the subarrays concatenated into it The map method creates a new array whose elements are the results of a mapping function after this I started with sorting arrays it basically have sort function and it have fowling functionalites The sort sorts the elements of an array The sort overwrites the original array The sort sorts the elements as strings in alphabetical and ascending order then I started with some more ways of compleating the arrays and after completing it I started with twelfth module as it included with converting and checking numbers in this I basically learnt that we can convert one type to another and we can check the type as of boolean types it returns as true and false so this way my day ended up and I got to learn many new things 2022-04-26 16:44:37
海外TECH DEV Community Intro ao GitHub Actions: Mostrando artigos no seu READ.me https://dev.to/github/intro-ao-github-actions-mostrando-artigos-no-seu-readme-5f4a Intro ao GitHub Actions Mostrando artigos no seu READ meApesar da Github ser mais conhecida como uma plataforma de open source e armazanamento de código ela oferece uma variedade de ferramentas interessantes como o Co pilot que apresentei no meu último artigo Hoje vou apresentar para vocês o GitHub Actions uma ferramenta de CI CD continuous integration continuous delivery que te permite automatizar seu workflow ou fluxo de trabalho em português CI CD práticas combinadas de integração contínua e entrega contínuaWorkflow Ou fluxo de trabalho éa seqüência de passos necessários para se automatizar processos de negócio de acordo com um conjunto de regras Pra que serve GittHub Actions permite que vocêautomatize seus fluxos de trabalho em cada etapa do processo de desenvolvimento desde a integração atéa distribuição e a implantação Isso te permiti reduzir efetivamente o tempo gasto entre a ideia inicial e a aplicação dessa ideia O que são as Actions As actions ou ações do GitHub Actions são scripts empacotados para automatizar tarefas em um fluxo de trabalho na GitHub O GitHub Actions pode ser configurado para disparar fluxos de trabalho complexos com base nas suas necessidades Assim vocêobtem um fluxo de trabalho automatizado confiável e sustentável que resulta na diminuição significativa do tempo de desenvolvimento Criando seu primeiro Fluxo de trabalhoComo estamos falando sobre Github no Dev to o exemplo que vou mostrar para vocês permite que vocêexiba no seu READ me do Github os últimos artigos que vocêpostou no Dev to Dentro do seu READ me adicione o código abaixo e salve Blog posts lt BLOG POST LIST START gt lt BLOG POST LIST END gt P S eu usei o título Blog posts mas vocêpode usar o que quiser depois do nessa primeira linha Agora nesse repositório crie uma pasta com o nome github e dentro dela uma outra pasta chamada workflows aqui éaonde vocêvai colocar suas actions Vamos criar nossa action que vai atualizar nossa READ me com os ultimos artigos do nosso dev to nesse exemplo eu chamei o meu arquivo de blog post workflow mas vocêpode dar o nome que quiser As actions são arquivos yml então não esqueça de colocar o yml após o nome quando for criar esse arquivo Agora vamos escrever nossa Action colando o seguinte código no arquivoblog post workflow yml código inspirado nesse repo name Latest blog post workflow nome de sua escolhaon schedule Roda fluxo de trabalho automaticamente cron Roda a cada uma hora workflow dispatch Roda fluxo de trabalho manualmente pelo Github Actions jobs update readme with blog name Update this repo s README with latest blog posts runs on ubuntu latest steps name Checkout uses actions checkout v name Pull in dev to posts uses gautamkrishnar blog post workflow master with feed list Troque pachicodes pelo seu usuário A anatomia de uma ActionNo exemplo acima temos name O nome da sua action a sua escolhaon o código dentro do on vai ditar quando essa action serárodada nesse caso usamos schedule para que ela rode automaticamente em um certo horário Jáo cron diz que nossa action rodaráa cada hora completa jobs Os “trabalhos que essa action vai rodar Aqui temos o name explicando o que a action faz runs on para definir aonde vai rodar Por último ainda dentro de jobs temos os steps que são os passos que essa action vai seguir com o nome do step e o uses Nesse exemplo primeiro estamos fazendo um Checkout e depois pegando os artigos do Dev to Vocêpode aprender em mais detalhes aqui na documentação oficial estáem português Como essa Action roda a cada hora vocêprovavelmente não vai ver o resultado imetiatamente mas assim que rodar vocêteráuma lista como essa ConclusãoO Github Actions éuma ferramenta super útil de automatização que vocêe seu time podem usar para uma variedade de fluxos de trabalhos Criar release de versão rodar testes fazer deploy instalar dependencias atualizar seu perfil no GitHub e muito mais Se vocêjáusa Github Actions comenta aqui e me fala quais os usos principais que vocêe ou seu time tem para essa ferramenta E se vocêainda não segue a página oficial da GitHub Brasil no twitter segue lá D 2022-04-26 16:37:56
海外TECH DEV Community How to create an auth login system with axios interceptors (TypeScript) https://dev.to/vikirobles/how-to-create-an-auth-login-system-with-axios-interceptors-typescript-2k11 How to create an auth login system with axios interceptors TypeScript Hi guys In this article I am sharing a small process of an auth system using axios interceptors The concept below is that when you submit your email or password you want to check if that user exists on the server and if the user is authenticated then the user would be able to navigate to other pages More information about interceptors you can check here You could simply do a post request inside your SignIn component however if one day lets say axios doesn t exist anymore and you want to be able to change what you used in just one place but not the logic behind it then interceptors is the way to go Also this is a concept recently came across called MVP minimum viable product LINK still trying to get my head around it but is good to know By the way the article is giving you an idea how that works of course you would need to add your own bits and pieces api etc So let s take a step back What I am sharing below is Setup the connection with a server Create a service layer Set up with a serverCreate your client which is the connection with your API Below the REACT APP API URL could be your own API saved on your env file or env localinterface ConfigType ApiUrl string const config ConfigType ApiUrl process env REACT APP API URL export default configimport axios from axios import config from config import setupInterceptorsTo from http client interceptor const instance axios create baseURL config ApiUrl headers Content type application json export default setupInterceptorsTo instance Create the service layerBelow we have the interceptors which will handle our error messages because there is always different type of errors import AxiosError AxiosInstance AxiosRequestConfig from axios import toast from react toastify import isObject isEmpty from lodash const API DEFAULT MESSAGE REQUEST The request is invalid function handleError serverError any if isObject serverError Object entries serverError forEach value gt const errorMessage isEmpty value API DEFAULT MESSAGE REQUEST value toast error errorMessage const onRequest config AxiosRequestConfig AxiosRequestConfig gt return config const onResponseError error AxiosError Promise lt AxiosError gt gt handleError error response data return Promise reject error export default function setupInterceptorsTo axiosInstance AxiosInstance AxiosInstance axiosInstance interceptors request use onRequest undefined axiosInstance interceptors response use undefined onResponseError return axiosInstance Here is where we actually send a request to the server in this case a post request import BehaviorSubject from rxjs import isNull from lodash import httpClient from shared http client interface LoginRequestModel email string password string const currentUserSubject isNull localStorage getItem current user new BehaviorSubject null new BehaviorSubject JSON parse localStorage getItem current user export const currentUserValue currentUserSubject valueexport async function login requestData LoginRequestModel Promise lt string gt const response await httpClient post auth login requestData const access token accesstoken response data return accesstoken Finally you can call your login function on your SignIn component and the only thing you need to do is to use it in an async way where await login data Thats the only input it gets since above you have the schema for this function and it does all the work for us isolated 2022-04-26 16:37:29
海外TECH DEV Community Configurando JWT en Django Rest Framework https://dev.to/nahuelsegovia/configurando-jwt-en-django-rest-framework-3nna Configurando JWT en Django Rest FrameworkLo primero que tenemos que hacer es instalar simplejwt pip install djangorestframework simplejwten este caso yo lo tengo configurado junto a mi archivo requirements txt Django django cors headersdjango getenvdjangorestframework psycopg binarydjangorestframework simplejwtUna vez instalada la dependencia vamos a nuestro proyecto y en urls py agregamos las siguientes rutas path api token TokenObtainPairView as view name token obtain pair path api token refresh TokenRefreshView as view name token refresh En settings py en las configuraciones de REST FRAMEWORK definimos la autenticación que vamos a usar por defecto con el framework REST FRAMEWORK DEFAULT AUTHENTICATION CLASSES rest framework simplejwt authentication JWTAuthentication DEFAULT PERMISSIONS CLASSES rest framework permissions IsAuthenticated Sin olvidarnos que en INSTALLED APPS tenemos que indicar que vamos a usar rest framework INSTALLED APPS django contrib admin django contrib auth django contrib contenttypes django contrib sessions django contrib messages django contrib staticfiles rest framework Una vez hecho esto en nuestras views podemos pedir que para que alguien haga una petición hacia nuestro endpoint como mínimo tiene que estar autenticado y el método de autenticación que configuramos es el de JWT from django http import JsonResponsefrom rest framework import permissions statusfrom rest framework decorators import api view permission classes api view POST permission classes permissions IsAuthenticated def create post request return JsonResponse msg todo funcionando Probando la configuración Sin autenticación Autenticándonos para obtener el tokenUtilizando el token para hacer peticiones 2022-04-26 16:32:55
海外TECH DEV Community PMT(Periodic Payment For A Loan) https://dev.to/designegycreatives/pmtperiodic-payment-for-a-loan-19oa PMT Periodic Payment For A Loan What is PMT FUNCTION The PMT Function is categorized under financial EXCEL FUNCTIONS The function helps calculate the total payment Principal and Interest required to settle a loan or an investment with a fixed interest rate over a specific time period Formula PMT rate nper pv fv type The PMT FUNCTION uses the following arguments Rate required argument The interest rate of the loanNper required argument The total number of payments for the loan takenPv required argument The present value or total amount that a series of future payments is worth now it is also called Principal Fv optional argument The FV or a cash balance we want to attain after the last payment is made if FV is omitted it is assumed to be that is the future value of the loan is TYPE optional argument The security s price it is the type of day count basis to use The possible values of basis are BasisDay count basis or omittedUS NASD Actual actualActual Actual European How to use the PMT Function in ExcelExample Let s assume that we need to invest in such a manner that after two years we ll receive The rate of interest is per year and the payment will be made at the start of each month the details are The above function returns PMT as It is the monthly cash outflow required to realize in two years Things to remember about the PMT Function NUM error Occurs when The given rate value is less than or equal to The given nper value is equal to VALUE error Occurs when any of the arguments provided are non numeric When calculating monthly or quarterly payments we need to convert annual interest rates or the number of periods to months or quarters If we wish to find out the total amount that was paid for the duration of the loan we need to multiply the PMT as calculated by nper 2022-04-26 16:16:14
海外TECH DEV Community O que é gRPC - Como usar os Protocol Buffers | Parte 2 https://dev.to/expertostech/o-que-e-grpc-como-usar-os-protocol-buffers-parte-2-mk3 O que égRPC Como usar os Protocol Buffers Parte Autor Rodrigo G TavaresVeja a Parte O que égRPC Seus componentes RPC e HTTPProtocol Buffers ou para os íntimos Protobuf éuma linguagem neutra criada para permitir a integração entre linguagens de programação também usado como IDL pelo sistema gRPC Veremos nesse artigo o que são os Protocol Buffers como eles funcionam e como eles se integram com o sistema gRPC IntroduçãoQuando falamos de integração entre linguagens estamos trazendo o conceito de interoperabilidade ou seja a capacidade das aplicações e sistemas se comunicarem de maneira simples e fácil e éexatamente esse o papel dos Protocol Buffers O que são os Protocol BuffersBasicamente são uma linguagem neutra e de plataforma neutra usada para definição de tipos de dados e funções muito parecido com o formato JSON porém menor e mais rápido Como vimos no artigo anterior ele éusado como IDL linguagem para definição de interfaces no sistema gRPC Por que eu preciso de uma linguagem neutra Uma linguagem neutra éuma linguagem simples usada pra fazer a definição das interfaces e tipos usado nas integrações A partir dessa interface cada linguagem que queira fazer uma integração deve interpretar o código escrito na IDL gerando funções e tipos nos padrões da sua linguagem Essas interfaces geradas são chamadas de stubs e são usadas tanto pelo provedor de serviços quanto pelo consumidor O lado provedor usaráas interfaces para efetivamente implementar as regras daquele serviço enquanto o consumidor como o próprio nome diz vai usá las pra consumir ou seja acessar os serviços E éexatamente esse o papel dos protocol buffers Estrutura dos Protocol BuffersPrecisamos de atenção nos padrões e convenções de formatação do arquivo proto Mas por que isso éimportante Usar o formato correto faz com que o processo de geração dos stubs siga as convenções de cada linguagens de destino Em resumo seguindo o padrão dos protocol buffers farácom que o código gerado também esteja no padrão da linguagem ConfiguraçõesAo criar o arquivo proto buffer por convenção o nome do arquivo deve ser todo minúsculo com a extensão proto Exemplo pessoa protopessoafisica protopessoajuridica proto SintaxeUma vez criado o arquivo devemos atribuir a versão da sintaxe que pode ser proto ou proto syntax proto Desse ponto em diante focaremos na versão de sintaxe proto que éa mais recente para mais detalhes da versão proto háum link para a documentação nas referências do artigo PacoteAgora precisamos definir o pacote essa éuma instrução opcional usada pra compor o nome da mensagem essa configuração deixa o nome único e evitando conflitos com outros tipos de nome semelhante ou seja podemos ter tipos de nomes iguais desde de que estejam em pacotes diferentes package expertostech A instrução package em Java go e csharp éusada pra compor o código gerado no caso do csharp o valor éatribuído ao namespace jáno Go e no Java éatribuído em uma propriedade de mesmo nome ImportaçãoDepois temos a área de importação onde vocêpode fazer referência pra outros tipos como éo caso da definição de data hora que precisa ser importado Vocêtambém pode importar seus próprios tipos aqui import google protobuf timestamp proto Opções adicionaisVamos agora para as configurações específicas para cada linguagem Para o Java as configurações são java multiple files se verdadeiro indica que as classes serão geradas em arquivos separados java outer classname o nome da classe de geração option java multiple files true option java outer classname PessoaProtos Se vocêquiser organizar seus arquivos proto em pacotes ou namespace diferentes das suas classes vocêpode usar as seguintes configurações java package para o Java go package para o Go csharp namespace para o C Essas três configurações sobrescrevem o valor do pacote package nproto alterando os valores para geração das classes option java package expertostech tutorial grpc option go package expertostech tutorial grpc option csharp namespace ExpertosTech Tutorial Grpc Definição de tiposUma curiosidade éque os tipos nos proto buffers são chamados de “mensagem justamente por que esses tipos declarados são usados como mensagem de envio e recebimento nas suas integrações entre sistemas MensagemIniciamos a declaração cada tipo com a palavra chave “message seguido do nome no padrão CamelCase message Pessoa Éimportante saber que podemos declarar várias mensagens em um arquivo proto message Pessoa message Usuario AtributosAgora vamos declarar os atributos da mensagem Cada atributo começa com o tipo seguido do nome e ao fim um código de identificação único message Pessoa string documento pessoal Esse código deve ser único na mensagem e não no arquivo proto isso quer dizer que vocêpode ter vários identificadores de atributo com o número por exemplo desde que eles estejam em mensagens diferentes message Pessoa string documento pessoal message Usuario string login Essa identificação deve ser feita a partir do número e pode chegar até ou Tenho minhas dúvidas se vocêvai precisar chegar tão longe mas éimportante dizer que os números entre à são reservados para a identificação dos atributos do framework isso quer dizer que se vocêusá los a geração dos stubs apresentaráerro Nos atributos usamos como convenção de nome letras minúsculas separando cada palavra com um underscore message Pessoa string documento pessoal string nome Tipos de dadosNa tabela abaixo podemos ver os principais tipos para declaração de atributos e quais são os seus correspondentes nas principais linguagens Caso queira ver a lista completa háum link para a documentação nas referências do artigo proto TypeC TypeJava Kotlin TypeC TypeGo TypestringstringStringstringstringintintintintintfloatfloatfloatfloatfloatdoubledoubledoubledoublefloatboolboolbooleanboolboolAlém dos tipos de dados da linguagem vocêtambém pode usar como tipos nos seus atributos suas próprias mensagens ou seja vocêpode por exemplo criar uma mensagem Cidade e usá la como referência dentro da mensagem Endereco message Endereco string logradouro string numero string bairro Cidade cidade message Cidade string nome int ddd Éimportante ressaltar que no caso do tipo utilizado estar em outro arquivo proto énecessário importá lo na seção import como pode ser visto no exemplo abaixo import endereco proto message Pessoa string documento pessoal string nome Endereco endereco Listas de valoresUm recurso muito utilizado nas integrações são as listas e temos dois tipos de listas nos protocol buffers Listas simplesPara declarar uma lista usamos a palavra chave repeated seguida pelo tipo do campo e o nome da lista Por convenção uma vez que as listas listas possuem diversos itens elas são sempre nomeadas no plural message Pessoa repeated Endereco enderecos Listas chave e valorOutra lista que temos disponível éa de chave e valor chamada de map nesse tipo de lista podemos definir um tipo de dado para chave e outro tipo de dado para valor lembrando que tanto na chave quanto no valor podemos usar tanto os tipos da linguagem quanto nossos próprios tipos message Pessoa map lt string google protobuf Timestamp gt atualizacoes EnumeraçõesFechando os principais tipos da linguagem também temos um conjunto de valores fixos chamados de enum Os enums têm a estrutura semelhante a de uma mensagem porém ao invés de atributos háuma lista fixa de valores Pra declarar uma enumeração usamos a palavra chave enum seguida do nome no padrão CamelCase Para a lista de valores usamos as letras todas maiúsculas separando as palavras por um underscore Os itens do enum também precisam ser numerados sóque diferente dos atributos da mensagem a lista de valores do enum deve iniciar no número zero enum TipoPessoa NAO DEFINIDA FISICA JURIDICA ServiçosFechamos a definição dos tipos agora precisamos definir as nossas funções Isso émuito simples usamos a palavra chave service seguida do nome do serviço no padrão CamelCase service PessoaServico Para declararmos uma função dentro do seu serviço iniciamos com a palavra chave rpc seguida pelo o nome da funcionalidade no padrão CamelCase o parâmetro de entrada entre parênteses seguido da palavra chave returns com a mensagem de retorno da função também entre parênteses service PessoaServico rpc PessoaPorDocumento Pessoa returns Pessoa Podemos declarar várias funções dentro de um mesmo serviço e obrigatoriamente todas elas precisam de uma mensagem como parâmetro de entrada e uma outra como parâmetro de saída não podemos ter funções sem entrada ou saída e os parâmetros devem obrigatoriamente ser mensagens e não tipos simples service PessoaServico rpc PessoaPorDocumento Pessoa returns Pessoa rpc PessoaPorNome Pessoa returns Pessoa Vejamos abaixo o código completo dos protocol buffers usados atéaqui como exemplos Arquivo endereco protosyntax proto package expertostech option java multiple files true option java outer classname EnderecoProtos option java package expertostech tutorial grpc option go package expertostech tutorial grpc option csharp namespace ExpertosTech Tutorial Grpc message Endereco string logradouro string numero string bairro Cidade cidade message Cidade string nome int ddd Arquivo pessoa protosyntax proto package expertostech import google protobuf timestamp proto import endereco proto option java multiple files true option java outer classname PessoaProtos option java package expertostech tutorial grpc option go package expertostech tutorial grpc option csharp namespace ExpertosTech Tutorial Grpc service PessoaServico rpc PessoaPorDocumento Pessoa returns Pessoa rpc PessoaPorNome Pessoa returns Pessoa message Pessoa string documento pessoal string nome repeated Endereco enderecos map lt string google protobuf Timestamp gt atualizacoes TipoPessoa tipo pessoa enum TipoPessoa NAO DEFINIDA FISICA JURIDICA message Usuario string login string senha Gerando os stubs com JavaPara testar a geração veja o projeto completo no github github expertos tech protocol bufferVeja abaixo a estrutura do projeto e arquivo pom xml lt xml version encoding UTF gt lt project xmlns xmlns xsi xsi schemaLocation gt lt modelVersion gt lt modelVersion gt lt groupId gt expertostech lt groupId gt lt artifactId gt stub gen lt artifactId gt lt version gt SNAPSHOT lt version gt lt properties gt lt maven compiler source gt lt maven compiler source gt lt maven compiler target gt lt maven compiler target gt lt properties gt lt dependencies gt lt dependency gt lt groupId gt io grpc lt groupId gt lt artifactId gt grpc stub lt artifactId gt lt version gt lt version gt lt dependency gt lt dependency gt lt groupId gt io grpc lt groupId gt lt artifactId gt grpc protobuf lt artifactId gt lt version gt lt version gt lt dependency gt lt dependency gt lt groupId gt jakarta annotation lt groupId gt lt artifactId gt jakarta annotation api lt artifactId gt lt version gt lt version gt lt optional gt true lt optional gt lt dependency gt lt dependencies gt lt build gt lt extensions gt lt extension gt lt groupId gt kr motd maven lt groupId gt lt artifactId gt os maven plugin lt artifactId gt lt version gt Final lt version gt lt extension gt lt extensions gt lt plugins gt lt plugin gt lt groupId gt org xolstice maven plugins lt groupId gt lt artifactId gt protobuf maven plugin lt artifactId gt lt version gt lt version gt lt configuration gt lt protocArtifact gt com google protobuf protoc exe os detected classifier lt protocArtifact gt lt pluginId gt grpc java lt pluginId gt lt pluginArtifact gt io grpc protoc gen grpc java exe os detected classifier lt pluginArtifact gt lt configuration gt lt executions gt lt execution gt lt goals gt lt goal gt compile lt goal gt lt goal gt compile custom lt goal gt lt goals gt lt execution gt lt executions gt lt plugin gt lt plugins gt lt build gt lt project gt O que vem a seguir Fechamos a definição dos protocol buffers que éa parte central do sistema gRPC No próximo artigo última parte dessa série entraremos na parte prática de tudo que vimos atéaqui a implementação passo a passo de um serviço gRPC com Java usando os protocol buffers E se vocêchegou atéaqui deixe o seu gostei no artigo e jáaproveita pra seguir o canal ExpertosTech em todas redes sociais Referencias Documentação Prtocol Buffers 2022-04-26 16:01:08
Apple AppleInsider - Frontpage News Apple counters claims that privacy features were meant to boost its ad business https://appleinsider.com/articles/22/04/26/apple-counters-claims-that-privacy-features-were-meant-to-boost-its-ad-business?utm_medium=rss Apple counters claims that privacy features were meant to boost its ad businessApple has released a new report that analyzes the impact of App Tracking Transparency on the mobile advertising industry ーand defend against accusations that it boosts its own ad business Apple App Tracking TransparencyThe report titled Mobile Advertising and the Impact of Apple s App Tracking Transparency Policy was penned by Columbia Business School professor Kinshuk Jerath It primarily counters accusations that Apple implemented App Tracking Transparency to bolster its own advertising business while snarling competitors Read more 2022-04-26 17:00:02
海外TECH Engadget Sony is reportedly telling developers to create time-limited demos for their games https://www.engadget.com/sony-ps-plus-premium-timed-trial-developers-164841025.html?src=rss Sony is reportedly telling developers to create time limited demos for their gamesSony is gearing up to roll out the revamped PlayStation Plus in the coming weeks Ahead of the new tiers being introduced the company is reportedly placing more demands on certain developers According to Game Developer it s asking studios working on games with a price point of at least to create timed trials that last at least two hours The report suggests that Sony informed studios of the directive through its developer portal and without advance warning They can reportedly release their timed trial which will need to be available for at least a year up to three months after their game hits the PlayStation Store The policy is said not to apply to previously released games titles that will be sold for less than or PlayStation VR games The highest tier of the overhauled subscription service PS Plus Premium will include access to time limited game trials Sony started testing such trials on PS in October It granted players access to Death Stranding Directors Cut for six hours and Sackboy A Big Adventure for five hours at no extra cost While many folks appreciate game demos and being able to try out a title before paying for it this move will require studios to dedicated precious time and resources to create the timed trials That ll surely put more strain on smaller developers nbsp It s not clear why Sony decided on a threshold for this policy but there s a case to be made that developers selling games at a higher price point are more likely to be larger studios with more resources Engadget has contacted Sony Interactive Entertainment for comment Sony will be aware it has to make sure PS Plus Premium delivers good value to users That tier will cost per month per quarter or per year the lowest tier is the same as the current version of PS Plus and won t have a price increase The new PS Plus service is different from Xbox Game Pass in that none of the tiers will offer first party games on their release day Offering trials of many new and recent games on top of a library of several hundred games from every generation of PlayStation may make up for that at least to some extent 2022-04-26 16:48:41
海外TECH Engadget Historic UK Proms music festival to include its first video game concert https://www.engadget.com/uk-proms-video-game-music-concert-163236278.html?src=rss Historic UK Proms music festival to include its first video game concertFor the first time the UK s annual Proms classical music festival will feature a concert dedicated to video game compositions On August st the Royal Philharmonic Orchestra led by conductor Robert Ames will perform a selection of music from Battlefield Dear Esther Kingdom Hearts Shadow of the Colossus nbsp and other influential titles “Fantastic worlds epic adventures complex characters and huge moral choices the universe of computer gaming is a natural match for orchestral music and in the st century games have created a huge and passionate global audience for some of the most vivid ambitious and inventive music currently being written for symphony orchestra the BBC writes of the upcoming concert “From Bit to Infinity will take place at the historic Royal Albert Hall If you imagine you ll find yourself in London this summer tickets start at £ And if not the BBC plans to broadcast the concert on August th The full program will be announced at a later date nbsp 2022-04-26 16:32:36
海外TECH Engadget YouTube's Super Thanks tipping is now available to partners worldwide https://www.engadget.com/youtube-super-thanks-tipping-160053572.html?src=rss YouTube x s Super Thanks tipping is now available to partners worldwideYou no longer have to hold back if you ve wanted to tip YouTube creators with a Super Thanks YouTube has made the tipping feature available to all eligible creators in the countries where the service s Partner Program exists As a viewer you now have the option to customize the comment that appears when you tip whether you re watching on desktop or mobile Super Thanks is the latest form of YouTube s long running efforts to get fans directly supporting video producers You can spend between to to show your appreciation and get a specially colored comment to highlight your contribution YouTube takes a percent cut but this is theoretically easier for creators than linking a separate crowdfunding service such as Patreon and hoping viewers contribute The feature joins the livestream oriented Super Chat While it s still soon to say if the expanded Super Thanks will see much uptake it could give some creatives a stronger incentive to post videos on YouTube instead of limiting themselves to TikTok Twitch and other platforms where some form of tipping is already widely available 2022-04-26 16:00:53
Cisco Cisco Blog Letter from Oslo: The NDC Security 2022 Conference https://blogs.cisco.com/developer/oslondcsecurity2022conference01 Letter from Oslo The NDC Security ConferenceWhen you find yourself on a business trip and forget the code to your corporate AmEx you know you haven t been on the road for a while NDC Security was a great way to get myself back into the conference configuration I learned a lot at this show and had a great time giving two talks 2022-04-26 16:08:31
金融 金融庁ホームページ 「新型コロナウイルス感染症関連情報」特設ページを更新しました。 https://www.fsa.go.jp/ordinary/coronavirus202001/press.html 新型コロナウイルス 2022-04-26 17:00:00
ニュース ジェトロ ビジネスニュース(通商弘報) 米イリノイ州知事が2023年度予算に署名、インフレ対応に選挙対策との批判も https://www.jetro.go.jp/biznews/2022/04/1f242356728674ab.html 選挙対策 2022-04-26 16:40:00
ニュース ジェトロ ビジネスニュース(通商弘報) 第1四半期の乗用車生産台数は前年同期比18.9%減、ウクライナ情勢が影響 https://www.jetro.go.jp/biznews/2022/04/a839e2520581443d.html 前年同期 2022-04-26 16:30:00
ニュース ジェトロ ビジネスニュース(通商弘報) 海南省から広東省に初めて電力を輸送、電力の相互融通を強化 https://www.jetro.go.jp/biznews/2022/04/1584ad6a953e59ac.html 電力 2022-04-26 16:20:00
ニュース ジェトロ ビジネスニュース(通商弘報) 米ウィスコンシン州、新たなクリーンエネルギー計画を発表 https://www.jetro.go.jp/biznews/2022/04/a2996c6ee239693a.html 計画 2022-04-26 16:10:00
ニュース BBC News - Home P&O ferry European Causeway docks after losing power in Irish Sea https://www.bbc.co.uk/news/uk-northern-ireland-61229753?at_medium=RSS&at_campaign=KARANGA larne 2022-04-26 16:47:39
ニュース BBC News - Home Katie Kenyon: Missing woman search becomes murder inquiry https://www.bbc.co.uk/news/uk-england-lancashire-61237156?at_medium=RSS&at_campaign=KARANGA katie 2022-04-26 16:51:34
ニュース BBC News - Home Elon Musk warned he must protect Twitter users https://www.bbc.co.uk/news/business-61225355?at_medium=RSS&at_campaign=KARANGA agrees 2022-04-26 16:28:50
ニュース BBC News - Home Paul Arthurs: Oasis guitarist diagnosed with tonsil cancer https://www.bbc.co.uk/news/entertainment-arts-61236635?at_medium=RSS&at_campaign=KARANGA arthurs 2022-04-26 16:51:55
ニュース BBC News - Home David Oluwale: Blue bridge plaque theft treated as hate crime https://www.bbc.co.uk/news/uk-england-leeds-61227944?at_medium=RSS&at_campaign=KARANGA david 2022-04-26 16:42:37
北海道 北海道新聞 NY株、一時500ドル超安 世界景気の減速懸念 https://www.hokkaido-np.co.jp/article/674549/ 減速 2022-04-27 01:09:00
北海道 北海道新聞 IAEA「放射線レベルは正常」 チェルノブイリ原発を訪問 https://www.hokkaido-np.co.jp/article/674548/ 事務局長 2022-04-27 01:09: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件)