投稿時間:2022-12-05 04:28:04 RSSフィード2022-12-05 04:00 分まとめ(31件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita discord pyでbotのコマンドをadd_command()で登録する https://qiita.com/halglobe0108/items/3e1fd4f01a6390b746a8 addcommand 2022-12-05 03:53:31
python Pythonタグが付けられた新着投稿 - Qiita Python の __name__ == '__main__' とは何か知りたい https://qiita.com/taro-hida/items/c8ca8ba1912243a68369 namexmainx 2022-12-05 03:14:35
js JavaScriptタグが付けられた新着投稿 - Qiita viewportタグがChromeデスクトップ版では効かない挙動を追ってみた https://qiita.com/karintou8710/items/55d4f7ec4f101cba7a05 chrome 2022-12-05 03:34:29
AWS AWSタグが付けられた新着投稿 - Qiita AWS Protonで使い捨てのブランチプレビュー環境を実現する https://qiita.com/goosys/items/e2c739f06c85b75fc476 awsproton 2022-12-05 03:40:40
Azure Azureタグが付けられた新着投稿 - Qiita Web Apps for containerでNode-RED環境を構築する https://qiita.com/yossihard/items/23b03908a246003d0ddd azureadventcalendar 2022-12-05 03:33:50
Ruby Railsタグが付けられた新着投稿 - Qiita AWS Protonで使い捨てのブランチプレビュー環境を実現する https://qiita.com/goosys/items/e2c739f06c85b75fc476 awsproton 2022-12-05 03:40:40
海外TECH MakeUseOf How to Claim Your Google Stadia Refund https://www.makeuseof.com/how-to-claim-google-stadia-refund/ clear 2022-12-04 18:05:34
海外TECH DEV Community Crud Dynamodb usando funciones lambdas y apigateway https://dev.to/kcatucuamba/crud-dynamodb-usando-funciones-lambdas-y-apigateway-49m1 Crud Dynamodb usando funciones lambdas y apigatewayAmazon Web ServicesLa plataforma en la nube Amazon Web Services AWS ofrece multiples servicios integrales para que los desarrolladores de software puedan implementar sus soluciones de manera rápida y relativamente fácil Hoy en día es indispensable crear servicios web para entregar y capturar información para que las aplicaciones puedan conectarse entre ellas los servicios rest son de los más usados actualmente Ejercicio prácticoPara este ejemplo se crea una api rest que realice operaciones CRUD Crear Leer Actualizar y Eliminar de productos dentro de una base de datos NoSQL proporcionada por AWS se implementa funciones lambdas para realizar el código y el servicio de Apigateway para consumir desde un cliente Requisitos previos Cuenta activa de AWSTener configurada las credenciales AWS AWS CLI y SAM CLI en el ordenador Conocimientos esenciales de serverless Conocimientos esenciales de Cloudformation Tener instalado nodejs para este ejercicio se usa v Tecnologías a usar en AWSAWS CLI y SAM CLICloudformationLambdas Nodejs DynamodbApigatewayA continuación se detalla brevemente y se pone en contexto de las herramientas de AWS a usar ServerlessServerless quiere decir sin servidor permite al desarrollador crear y ejecutar aplicaciones con raṕidez y menor costo no se preocupa por gestionar infraestructura de servidores donde se aloja el código simplemente se enfoca en codear Puedes revisar más del tema en este artículo ServerlessAWS CLI y SAM CLIAWS CLI es una herramienta de línea de comandos de AWS se usa para administrar sus servicios en AWS Se debe configurar las credenciales con aws configure ver el siguiente enlace AWS CLISAMSignifica modelo de aplicación sin sevidor de AWS es un framework que se utiliza para crear apliaciones sin servidor en AWS También tiene una interfaz de línea de comandos para poder desplegar servicios revisar el siguiente link para su instalación dependiendo del sistema operativo SAM CLICloudformationAWS CloudFormation es un servicio que ofrece a desarrolladores una manera sencilla de crear una colección de recursos de AWS y organizarlos como si fuese archivos de código LambdasAWS Lambda permite correr código sin administrar servidores el desarrollador solo escribe trozos de código funciones y se las sube a este servicios se puede usar con varios lenguajes entre ellos python javascript y java Para más información revisar AWS LambdaDynamodbEs un servicio de base de datos NoSQL de AWS permite almacenar datos en documentos y valores clave Api GatewayAmazon Api Gateway es un servicio de AWS para administrar y proteger servicios de API REST HTTP y WebSockets Permite conectarse a otros servicios y consumirlas mediante una url Para más información revisar el siguiente enlace AWS Api GatewayInfraestructura a crearSe indica un pequeño diagrama de como va funcionar la aplicación CRUD a crear Inicio de proyectoDentro de un directorio en la consola colocar el comando sam init y completar las instrucciones de la siguiente manera Se debe generar un proyecto en la siguiente estructura Esta estructura solo nos sirve como ejemplo de partida para un mejor control del proyecto se configura de la siguiente manera quitar la carpeta de tests y el archivo principal app ts la carpeta hello world se cambia por app Instalar dependenciasDentro de la carpeta app en donde se encuentra el package json ejecutar lo siguiente npm installnpm install aws sdknpm install short uuidDynamoDB servicios y modeloEn las siguientes carpteas crear los siguientes archivos DynamoClient tsNos genera una instancia cliente para poder realizar operaciones en una tabla de Dynamo import DynamoDB from aws sdk clients dynamodb export const dynamoClient new DynamoDB DocumentClient Product tsEs un molde de los campos que va a contener el producto export interface Product id string name string price number description string ProductService tsEs una clase que nos va permitir realizar la lógica de cada una de las funciones que estamos usando en este caso operaciones CRUD import dynamoClient from dynamodb DynamoClient import Product from models Product import generate from short uuid export class ProductService static async getProducts Promise lt Product gt try const tableName process env TABLE NAME const response await dynamoClient scan TableName tableName promise return response Items as Product catch error throw new Error Error getting products error static async getProductById id string Promise lt Product gt try const tableName process env TABLE NAME const response await dynamoClient get TableName tableName Key id promise return response Item as Product catch error throw new Error Error getting product by id error static async createProduct product Product Promise lt Product gt try const tableName process env TABLE NAME product id generate await dynamoClient put TableName tableName Item product promise return product catch error throw new Error Error creating product error static async updateProductById product Product Promise lt Product gt try const tableName process env TABLE NAME await dynamoClient update TableName tableName Key id product id UpdateExpression set name name price price description description ExpressionAttributeNames name name price price description description ExpressionAttributeValues name product name price product price description product description promise return product catch error throw new Error Error updating product error static async deleteProductById id string Promise lt void gt try const tableName process env TABLE NAME await dynamoClient delete TableName tableName Key id promise catch error throw new Error Error deleting product error FuncionesDentro de la carpeta funciones se crea un archivo por cada función En las funciones solo hace falta llamar al servicio creado anteriormente y retornar datos create tsimport APIGatewayProxyEvent APIGatewayProxyResult from aws lambda import ProductService from services ProductService import Product from models Product Function to create a new product param event returns export const handler async event APIGatewayProxyEvent Promise lt APIGatewayProxyResult gt gt const newProduct Product JSON parse event body as string const product await ProductService createProduct newProduct return statusCode body JSON stringify item product deleteById tsimport ProductService from services ProductService import APIGatewayProxyEvent APIGatewayProxyResult from aws lambda Function to delete a product by id param event returns export const handler async event APIGatewayProxyEvent Promise lt APIGatewayProxyResult gt gt const id event pathParameters id if id return statusCode body JSON stringify message id is required await ProductService deleteProductById id return statusCode body Product deleted getAll tsimport ProductService from services ProductService import APIGatewayProxyEvent APIGatewayProxyResult from aws lambda Function to get all products param event returns export const handler async event APIGatewayProxyEvent Promise lt APIGatewayProxyResult gt gt const products await ProductService getProducts return statusCode body JSON stringify items products getById tsimport ProductService from services ProductService import APIGatewayProxyEvent APIGatewayProxyResult from aws lambda param event Function to get product by id returns export const handler async event APIGatewayProxyEvent Promise lt APIGatewayProxyResult gt gt const id event pathParameters id if id return statusCode body JSON stringify message id is required const product await ProductService getProductById id return statusCode body JSON stringify item product updateById tsimport APIGatewayProxyEvent APIGatewayProxyResult from aws lambda import ProductService from services ProductService import Product from models Product Function to update a product by id param event returns export const handler async event APIGatewayProxyEvent Promise lt APIGatewayProxyResult gt gt const updatedProduct Product JSON parse event body as string const product await ProductService updateProductById updatedProduct return statusCode body JSON stringify item product Template yamlEn este archivo se configura toda la infraestructura que se va a desplegar en AWS lambdas apigateway roles tablas etc La configuración es cloudformation con características avanzadas proporcionadas por SAM para desplegar aplicaciones serverless Se configura las propiedades de algunos recursos de manera global para evitar repetir cosas En los recursos para cada una de las funciones debe quedar de la siguiente manera La parte de Policies es muy importante se le da permisos a la función lambda para ejecutar operaciones en la tabla de dynamo que estamos creando A continuación se muestra el template completo AWSTemplateFormatVersion Transform AWS Serverless Description gt crud products serverless Sample SAM Template for crud products serverless More info about Globals Globals Function CodeUri app Timeout Tracing Active Runtime nodejs x Architectures x Environment Variables TABLE NAME Ref ProductTable Api TracingEnabled TrueResources CreateProductFunction Type AWS Serverless Function Properties Handler src functions create handler Events CreateProduct Type Api Properties Path products Method post Policies DynamoDBCrudPolicy TableName Ref ProductTable Metadata BuildMethod esbuild BuildProperties Minify true Target es EntryPoints src functions create ts UpdateProductFunction Type AWS Serverless Function Properties Handler src functions updateById handler Events CreateProduct Type Api Properties Path products Method put Policies DynamoDBCrudPolicy TableName Ref ProductTable Metadata BuildMethod esbuild BuildProperties Minify true Target es EntryPoints src functions updateById ts DeleteByIdProductFunction Type AWS Serverless Function Properties Handler src functions deleteById handler Events CreateProduct Type Api Properties Path products id Method delete Policies DynamoDBCrudPolicy TableName Ref ProductTable Metadata BuildMethod esbuild BuildProperties Minify true Target es EntryPoints src functions deleteById ts GetAllProductsFunction Type AWS Serverless Function Properties Handler src functions getAll handler Events CreateProduct Type Api Properties Path products Method get Policies DynamoDBCrudPolicy TableName Ref ProductTable Metadata BuildMethod esbuild BuildProperties Minify true Target es EntryPoints src functions getAll ts GetProductByIdFunction Type AWS Serverless Function Properties Handler src functions getById handler Events CreateProduct Type Api Properties Path products id Method get Policies DynamoDBCrudPolicy TableName Ref ProductTable Metadata BuildMethod esbuild BuildProperties Minify true Target es EntryPoints src functions getById ts ProductTable Type AWS DynamoDB Table Properties TableName Sub AWS StackName products AttributeDefinitions AttributeName id AttributeType S KeySchema AttributeName id KeyType HASH BillingMode PAY PER REQUESTDespliegueEso sería todo en cuanto a las plantillas y el código para realizar operaciones CRUD Dentro de la carpeta donde esta la plantilla template yaml ejecutar sam buildSeguidamente ejecutarsam deploy guidedA continuación realiza algunas preguntas se recomienda configurar de la siguiente manera Luego confirmar el despliegue y esperar Es probable que en windows la consola se queda congelada revisar en la consola aws directamente Se revisa en la consola de cloudformation de AWS Los recursos han sido creados En el recurso de apigateway se puede ver la implementación para poder consumirlas Probando apisConsultando productos se creo uno previamente Se crea un productoProducto por ID DespedidaEso sería todo puedes ir probando todas las demas funciones de esta manera es sencillo desplegar apis con AWS Si alguna duda no dudes en comentarlo Referencias text AWS CloudFormation es un servicio de forma ordenada y predecible 2022-12-04 18:55:51
海外TECH DEV Community Progress on contribution https://dev.to/mnosov622/progress-on-contribution-21po Progress on contributionHi Progress on logoThis week I ve made some progress regarding the tasks that I ve been assigned to First of all I created a logo for the new project it looks like that I created it with the help of Adobe photoshop Here I needed to come up with the main colors for the logo I went for blue color which is usually represents calmness and trust Psychology of colorsChoosing the right color and learning how to combine it correctly with another is a hurdle that many designers struggle with especially when starting out Why is that so As every color has a meaning Colors help us to feel our emotions they enable us to make quick associations they dictate our reaction to things Knowing how this works is apowerful tool to have in your toolkit when taking on the world of branding and design My favourite quote about colors Colors are power and designers are the artists that blend them to perfection They create a story without words and build a connection in one glance Waiting for approvalAfter creating a logo I m waiting for approval from project maintainers Once they approve I will go and create different sizes of the logo Improving UIFor another project I have been enhancing the UI and made minor accessibility modifications Remove useless actionFor the following project if user wants to create a post but he is not logged in he will see an alert saying You need to log in to create a post I think this is not necessary as most of the applications just redirect you to log in page without alert Though UX could be improved by saying you need to log in first in the sign in form Improve UI with CSSAlso I have improved the UI by including CSS animations hover effects and overall content readability For example Putting sign in form in the center is a great approach I think There are so many things that could be improved on the website in terms of design I would work on it next week Have a wonderful and productive week 2022-12-04 18:42:14
海外TECH DEV Community Important Git Commands which every developer needs in his day to day life https://dev.to/imshivanshpatel/important-git-commands-which-every-developer-needs-in-his-day-to-day-life-2ba5 Important Git Commands which every developer needs in his day to day life stashThe git stash command is a utility that allows a developer to temporarily save modified files However it is a utility that should only be used occasionally because it only involves local repository history Code stored in a local stash is not visible to other developers nor is it replicated to other git repositories like GitHub or GitLab when a push occurs git stash pushCreates a new stash and rolls back the state of all modified files 2022-12-04 18:40:28
海外TECH DEV Community Connect Server Using Terminal & SSH https://dev.to/akilesh/types-of-ways-to-connect-using-ssh-3j43 Connect Server Using Terminal amp SSHUsing terminal we are going to establish a remote connection to a Remote Server like Droplet EC or any cloud vm If you are using Linux or Mac you are good to go but in windows you should download git bash Now to generate your SSH key type his commends in your terminal It s better to generate SSH keys inside ssh folderssh keygen Now name your key you can name your key what ever suits for you Don t need any passphraseWe have generated two files public key amp private keypublic key Used by the Serverprivate key Used by the Client Open the public key filescat ur key name pubWe need to provide our public key to the remote server by opening it in terminal and copy the phrase To establish connection between client with serverssh i droplet ssh key root Abbreviation ssh i keyfile target machineusername hostWhat s the meaning of i in ssh By providing the private keyfile and our server username and ip address we are opening a connection between client and serverIf you see the above message we have successfully connected our client with the server BonusYou can check your system specification with this commendsfree hdf hlscpuTo terminate the session enter exit in terminal 2022-12-04 18:30:00
Apple AppleInsider - Frontpage News Amazon's $199 AirPods Pro 2 deal returns, AirPods Max drop to $439 https://appleinsider.com/articles/22/12/04/amazons-199-airpods-pro-2-deal-returns-airpods-max-drop-to-439?utm_medium=rss Amazon x s AirPods Pro deal returns AirPods Max drop to Amazon s AirPods deals deliver the best prices this weekend with AirPods Pro back on sale for and AirPods Max getting a new discount Apple AirPods are discounted at Amazon Black Friday pricing has returned on Apple AirPods Pro with the release back on sale for This matches the cheapest price we ve seen at Amazon and it falls within of the record low price we ve seen at any reseller Read more 2022-12-04 18:14:16
海外TECH Engadget Elon Musk says Apple has ‘fully resumed’ advertising on Twitter https://www.engadget.com/elon-musk-says-apple-has-fully-resumed-advertising-on-twitter-182040425.html?src=rss Elon Musk says Apple has fully resumed advertising on TwitterAccording to Elon Musk Apple has “fully resumed advertising on Twitter The billionaire made the comment during a Twitter Spaces conversation he broadcast from his private plane on Saturday evening On November th Musk claimed Apple had “mostly stopped advertising on Twitter and threatened to remove the platform s iOS client from the App Store “Do they hate free speech Musk asked his followers and went on to play up the censorship angle The New York Times reports Apple temporarily stopped advertising on Twitter following the Club Q shooting in Colorado Springs on November th The outlet notes brands tend to their dial back their Twitter ads following shootings and disasters primarily because they don t want to see their products next to tweets about human tragedy Amazon is also planning to resume advertising on Twitter at about m a year pending some security tweaks to the company s ads platform per a source familiar with the situation ーZoëSchiffer ZoeSchiffer December Two days after blasting Apple Musk said he had met with Tim Cook “We resolved the misunderstanding about Twitter potentially being removed from the App Store he posted “Tim was clear that Apple never considered doing so On Saturday Musk added Apple was the largest advertiser on Twitter That same day he thanked advertisers “for returning to Twitter Separately Platformer s ZoëSchiffer reported on Saturday that Amazon also had plans to start advertising on Twitter again The retail giant has reportedly committed to spending approximately million per year “pending some security tweaks to the company s ads platform News of Apple and Amazon returning to Twitter comes amid ongoing reports that the company s advertising revenue has dropped significantly since Musk s takeover in late October During the first week of the World Cup in Qatar the company only made about percent of the ad revenue it expected to during that period according to The Times In recent weeks the company has repeatedly cut its internal revenue projections for the final three months of the year Initially Twitter reportedly expected to earn about billion in Q but has since cut that number to billion Musk previously told employees the company was in dire financial straits and warned bankruptcy was “not out of the question 2022-12-04 18:20:40
海外TECH CodeProject Latest Articles Embedding Native (Windows and Linux) Views/Controls/Applications into Avalonia Applications in Easy Samples https://www.codeproject.com/Articles/5348155/Embedding-Native-Windows-and-Linux-Views-Controls Embedding Native Windows and Linux Views Controls Applications into Avalonia Applications in Easy SamplesThis article describes embedding native Windows and Linux control into an Avalonia application 2022-12-04 18:39:00
海外科学 NYT > Science Photos: Mauna Loa’s Eruption Offers Rare Glimpse Into the Earth https://www.nytimes.com/2022/12/03/science/mauna-loa-volcano-eruption-hawaii.html Photos Mauna Loa s Eruption Offers Rare Glimpse Into the EarthThe world s largest active volcano erupted for the first time in years raising excitement among scientists who are eager to unlock its many mysteries 2022-12-04 18:13:48
ニュース @日本経済新聞 電子版 ウクライナ東部で攻防激化 大統領「苦しい状況」 https://t.co/RaLVMiUmp6 https://twitter.com/nikkei/statuses/1599475794203770880 攻防激化 2022-12-04 18:48:40
ニュース @日本経済新聞 電子版 イケア、自宅外受け取り拠点3倍 提携先の倉庫活用 https://t.co/OtUsj9KL7b https://twitter.com/nikkei/statuses/1599470786749681664 受け取り 2022-12-04 18:28:46
ニュース @日本経済新聞 電子版 年金運用、企業にも責任 「脱金融機関任せ」23年法改正へ https://t.co/jU0GV0cysS https://twitter.com/nikkei/statuses/1599466491900231681 金融機関 2022-12-04 18:11:42
ニュース BBC News - Home Train strikes: Firms make first offer in bid to stop Christmas strikes https://www.bbc.co.uk/news/business-63853669?at_medium=RSS&at_campaign=KARANGA christmas 2022-12-04 18:55:30
ニュース BBC News - Home Ukraine war: Two generations share bed after Russian strikes https://www.bbc.co.uk/news/world-europe-63850875?at_medium=RSS&at_campaign=KARANGA russian 2022-12-04 18:29:11
ニュース BBC News - Home EU must act over distortions from US climate plan - von der Leyen https://www.bbc.co.uk/news/world-europe-63852394?at_medium=RSS&at_campaign=KARANGA legislation 2022-12-04 18:10:57
ビジネス ダイヤモンド・オンライン - 新着記事 「空気を読みすぎてしまう人」が自分の意見を伝える方法 - 99%はバイアス https://diamond.jp/articles/-/313725 自分 2022-12-05 03:50:00
ビジネス ダイヤモンド・オンライン - 新着記事 国内外で協調できなかった日本の為替介入、有効になる条件の精査を - 数字は語る https://diamond.jp/articles/-/313900 円安進行 2022-12-05 03:40:00
ビジネス ダイヤモンド・オンライン - 新着記事 MS&AD「2025年度までに6300人削減」は序の口?独自試算で判明した厳しい現実 - ダイヤモンド保険ラボ https://diamond.jp/articles/-/313893 msampad 2022-12-05 03:35:00
ビジネス ダイヤモンド・オンライン - 新着記事 中国、新型コロナ感染急増に備える機会逃す - WSJ PickUp https://diamond.jp/articles/-/313898 wsjpickup 2022-12-05 03:30:00
ビジネス ダイヤモンド・オンライン - 新着記事 【社説】米軍に信頼を失いつつある米国民 - WSJ PickUp https://diamond.jp/articles/-/313897 wsjpickup 2022-12-05 03:25:00
ビジネス ダイヤモンド・オンライン - 新着記事 【企業別年収マップで見る】誰が日本人の賃金アップを邪魔しているのか? - 「いい会社」はどこにある? https://diamond.jp/articles/-/313583 【企業別年収マップで見る】誰が日本人の賃金アップを邪魔しているのか「いい会社」はどこにある「いい会社」はどこにあるのかーもちろん「万人にとっていい会社」など存在しない。 2022-12-05 03:20:00
ビジネス ダイヤモンド・オンライン - 新着記事 【10倍株連発】 株式資産2億5000万円超の現役サラリーマン投資家が見逃さない“2つのポイント” - サラリーマン投資家が10倍株で2.5億円 https://diamond.jp/articles/-/313500 【倍株連発】株式資産億万円超の現役サラリーマン投資家が見逃さない“つのポイントサラリーマン投資家が倍株で億円株式投資で資産億万円を築いている現役サラリーマン投資家の愛鷹氏。 2022-12-05 03:15:00
ビジネス ダイヤモンド・オンライン - 新着記事 センスの悪い人が買う「ダウンジャケット」はこれだ!【書籍オンライン編集部セレクション】 - 服が、めんどい 「いい服」「ダメな服」を1秒で決める https://diamond.jp/articles/-/313373 センスの悪い人が買う「ダウンジャケット」はこれだ【書籍オンライン編集部セレクション】服が、めんどい「いい服」「ダメな服」を秒で決める服について考えるのは、めんどくさい。 2022-12-05 03:10:00
ビジネス ダイヤモンド・オンライン - 新着記事 【NG】いつも期限に遅れる人が絶対やってはいけない3つのこと - 時間最短化、成果最大化の法則 https://diamond.jp/articles/-/313118 2022-12-05 03:05:00
IT IT号外 コロナウイルス感染症に最も効果的で有効な薬が、東北大大学院の研究チームより発表される!葛根湯と養命酒の効能、関係とは!? https://figreen.org/it/%e3%82%b3%e3%83%ad%e3%83%8a%e3%82%a6%e3%82%a4%e3%83%ab%e3%82%b9%e6%84%9f%e6%9f%93%e7%97%87%e3%81%ab%e6%9c%80%e3%82%82%e5%8a%b9%e6%9e%9c%e7%9a%84%e3%81%a7%e6%9c%89%e5%8a%b9%e3%81%aa%e8%96%ac%e3%81%8c/ コロナウイルス感染症に最も効果的で有効な薬が、東北大大学院の研究チームより発表される葛根湯と養命酒の効能、関係とは東北大大学院の研究チームが、コロナウイルスに効く薬が漢方薬の「葛根湯」であることを突き止めました。 2022-12-04 18:29:12

コメント

このブログの人気の投稿

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