投稿時間:2023-04-16 18:10:45 RSSフィード2023-04-16 18:00 分まとめ(13件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita カーネル法を使った強化学習のアルゴリズムの数値実験による検証(2) https://qiita.com/asagao_iXaga3/items/c68a1a4b878ad0831424 confide 2023-04-16 17:22:30
python Pythonタグが付けられた新着投稿 - Qiita 超初心者向け Pythonコードの書き方 パイソンの基礎を学ぶ 4 https://qiita.com/natsuki_natsuki/items/2b96085ec9af4c22babf 設計図 2023-04-16 17:20:27
js JavaScriptタグが付けられた新着投稿 - Qiita AWS SDK for JavaScript v3 - クレデンシャル取得 https://qiita.com/takmot/items/5f94d9fbe782560a1e26 awsconfig 2023-04-16 17:03:28
AWS AWSタグが付けられた新着投稿 - Qiita AWSで開発環境構築 #1(踏み台サーバーを作成) https://qiita.com/kanerin1004/items/1b0749163036558af78f 開発 2023-04-16 17:45:24
AWS AWSタグが付けられた新着投稿 - Qiita AWS SDK for JavaScript v3 - クレデンシャル取得 https://qiita.com/takmot/items/5f94d9fbe782560a1e26 awsconfig 2023-04-16 17:03:28
海外TECH DEV Community Simplify your EKS Cluster Observability with Prometheus & Grafana https://dev.to/aws-builders/simplify-your-eks-cluster-observability-with-prometheus-grafana-353i Simplify your EKS Cluster Observability with Prometheus amp GrafanaGood day fellow Bloggers Its been a while since I posted a blog I have been settling down in my new role and studying for a beast of an exam coming up Without further delay Kuberenetes Observability Made Easy I would encourage everyone get used of the CloudFormation YAML Manifest construction whilst we are seeing more vendor agnostic IaC platforms such as Terraform it definitley helped me prepare for my AWS DevOps Professional Exam coming up so I would encourage you to make sure you sharpen up your skillsets wherever you can I have the link to the AWS CloudFormation Documentation so familiarize yourself with the whitepapers and dive right in The below context will give you an example of my custom YAML CloudFormation Stackset Once compiled you can use API Calls with the AWS CLI installed either to your WSL Windows Sub System for Linux or PowerShell Terminals The CloudFormation stacks simply build and can be destroyed and re constructed in minutes So utilizing the above toolsets I created a EKS Cluster and added a second stack with references to my existing stack Once deployed you can then add further toolsets such as the Prometheus stack set using the Helm Community Install and your almost at the end of your race I will recommend installing Kubernetes Lens as its much easier to install and manage your Ks cluster then directly managing it via CLI However I am a CLI Jockey and still prefer the terminal Ensure that within your settings you configure your Kube Config context destination so that lens can get straight to work as per the below Finally once the prometheus and helm stack completes the install you will be ready to start monitoring logs alerting amp Graphs Dashboards using both Prometheus and Grafana For more tutorials feel free to visit Or Connect with me on LinkedIn via Have a great week ahead RegardsDevonPatrickAWS Community Builder amp Cisco Champion 2023-04-16 08:15:00
海外TECH DEV Community C# (C Sharp) CRUD Rest API using .NET 7, ASP.NET, Entity Framework, Postgres, Docker and Docker Compose https://dev.to/francescoxx/c-c-sharp-crud-rest-api-using-net-7-aspnet-entity-framework-postgres-docker-and-docker-compose-493a C C Sharp CRUD Rest API using NET ASP NET Entity Framework Postgres Docker and Docker ComposeLet s create a CRUD Rest API in C or C sharp using NET ASP NET Framework for building web apps Entity Framework ORM Postgres Database Docker Containerization Docker Compose To run the database and the application Video version All the code is available in the GitHub repository link in the video description IntroHere is a schema of the architecture of the application we are going to create We will create endpoints for basic CRUD operations CreateRead allRead oneUpdateDeleteHere are the steps we are going through Define the requirementsCreate a new C project Install the dependenciesConfigure the database connectionCreate the logic for the CRUD operationsUpdate the project Dockerfiledocker compose ymlRun the Postgres database and the applicationUpdate the database schemaTest the applicationWe will go with a step by step guide so you can follow along Requirements NET installed and runningdotnet CLI Optional C Extension Pack for VS Code Create a new C projectThere are many ways to create a new C project but I will use the dotnet CLIOpen a terminal and run the following command dotnet new webapi n csharp crud apiNow step into the directory cd csharp crud api Install the dependenciesWe will use the following dependencies Entity FrameworkNpgsql Postgres driver To install them be sure to be in the csharp crud api directory and run the following commands dotnet add package Microsoft EntityFrameworkCore Designdotnet add package Npgsql EntityFrameworkCore PostgreSQL Test the base applicationBefore we proceed let s see if the project is configured correctly Open the folder in VS Code or your favorite IDE code You should see the following structure Now run the following command to start the application dotnet run urls http localhost You should see the following output To test the application open a browser and go to the following URL http localhost weatherforecastYou should see the following output Now it s time to start coding the application Code the applicationThere are three steps to code the application Configure the database connectionCreate the logic for the CRUD operationsUpdate the Program cs file ️Configure the database connectionopen the appsettings json file and add the following lines ConnectionStrings DefaultConnection Host db Port Database postgres Username postgres Password postgres Your appsettings json file should look like this Logging LogLevel Default Information Microsoft AspNetCore Warning AllowedHosts ConnectionStrings DefaultConnection Host db Port Database postgres Username postgres Password postgres ️Create the logic for the CRUD operationsCreate a new folder called Models and a new file called User cs inside it Populate User cs with the following code using System ComponentModel DataAnnotations Schema namespace Models Table users public class User Column id public int Id get set Column name public string Name get set Column email public string Email get set Now create a new folder called Data and a new file called UserContext cs inside it Populate the UserContext cs file with the following code using Models using Microsoft EntityFrameworkCore namespace Data public class UserContext DbContext public UserContext DbContextOptions lt UserContext gt options base options public DbSet lt User gt Users get set Now create a new folder called Controllers and a new file called UsersController cs inside it Populate the UserscController cs file with the following code using Data using Models using Microsoft AspNetCore Mvc using Microsoft EntityFrameworkCore namespace csharp crud api Controllers ApiController Route api controller public class UsersController ControllerBase private readonly UserContext context public UsersController UserContext context context context GET api users HttpGet public async Task lt ActionResult lt IEnumerable lt User gt gt gt GetUsers return await context Users ToListAsync GET api users HttpGet id public async Task lt ActionResult lt User gt gt GetUser int id var user await context Users FindAsync id if user null return NotFound return user POST api users HttpPost public async Task lt ActionResult lt User gt gt PostUser User user context Users Add user await context SaveChangesAsync return CreatedAtAction nameof GetUser new id user Id user PUT api users HttpPut id public async Task lt IActionResult gt PutUser int id User user if id user Id return BadRequest context Entry user State EntityState Modified try await context SaveChangesAsync catch DbUpdateConcurrencyException if UserExists id return NotFound else throw return NoContent DELETE api users HttpDelete id public async Task lt IActionResult gt DeleteUser int id var user await context Users FindAsync id if user null return NotFound context Users Remove user await context SaveChangesAsync return NoContent private bool UserExists int id return context Users Any e gt e Id id dummy method to test the connection HttpGet hello public string Test return Hello World ️Update the Program cs fileWe are almost done now we just need to update the Program cs file add these imports at the top of the file using Data using Microsoft EntityFrameworkCore And these lines lines above the var app builder Build line Added configuration for PostgreSQLvar configuration builder Configuration builder Services AddDbContext lt UserContext gt options gt options UseNpgsql configuration GetConnectionString DefaultConnection Or you can replace the whole Program cs file with the following code using Data using Microsoft EntityFrameworkCore var builder WebApplication CreateBuilder args Add services to the container builder Services AddControllers Learn more about configuring Swagger OpenAPI at builder Services AddEndpointsApiExplorer builder Services AddSwaggerGen Added configuration for PostgreSQLvar configuration builder Configuration builder Services AddDbContext lt UserContext gt options gt options UseNpgsql configuration GetConnectionString DefaultConnection var app builder Build Configure the HTTP request pipeline if app Environment IsDevelopment app UseSwagger app UseSwaggerUI app UseHttpsRedirection app UseAuthorization app MapControllers app Run We are done with the application logic now it s time to Dockerize it Dockerize the applicationWe will Dockerize the application in creating and populating two files Dockerfiledocker compose yml Dockerfile At the root of the project create a new file called Dockerfile and populate it with the following code dockerfileFROM mcr microsoft com dotnet sdk AS buildWORKDIR appCOPY csproj RUN dotnet restoreCOPY RUN dotnet publish c Release o outFROM mcr microsoft com dotnet aspnet AS runtimeWORKDIR appCOPY from build app out ENTRYPOINT dotnet csharp crud api dll Explanation docker compose ymlAt the root of the project create a new file called docker compose yml and populate it with the following code yamlversion services csharp app container name csharp app build context dockerfile Dockerfile ports depends on db environment ConnectionStrings DefaultConnection Host db Database postgres Username postgres Password postgres db container name db image postgres environment POSTGRES USER postgres POSTGRES PASSWORD postgres POSTGRES DB postgres ports volumes pgdata var lib postgresql datavolumes pgdata Explanation We are done Now we can run the Postgres and the app containers ‍ ️Run the applicationWe will run the containers services defined in the docker compose yml file Run the Postgres container docker compose up d db Create the table in the databaseWe can create the table in different ways but let me show you how you can do it directly from the app container First be sure that the Postgres container is running Open a different terminal and run the following command bashdocker exec it db psql U postgres And we are inside of the Postgres Container now We can create the table with the following command sqlCREATE TABLE Users Id SERIAL PRIMARY KEY Name VARCHAR NOT NULL Email VARCHAR NOT NULL ️Build and run the app containerBuild the Docker image bashdocker compose build Run the app container bashdocker compose up csharp app Test the applicationLet s test the application with PostmanNow we can test the project We will use Postman but you can use any other tool Create a userTo create a new user make a POST request to localhost api users The body of the request should be like that json name aaa email aaa mail The output should be something like that Let s create two more users make a POST request to localhost api users json name bbb email bbb mail json name ccc email ccc mail Get all usersTo get all users make a GET request to localhost api users The output should be something like that Get a userTo get a user make a GET request to localhost api users id For example GET request to localhost api users The output should be something like that Update a userTo update a user make a PUT request to localhost api users id For example PUT request to localhost api users The body of the request should be like that json name Francesco email francesco mail The output should be something like that Delete a userTo delete a user make a DELETE request to localhost api users id For example DELETE request to localhost api users On Postman you should see something like that Final testAs a final test we can check the database using TablePlus ConclusionWe made it we built a CRUD Rest API project in C or C sharp using NET ASP NET Framework for building web apps Entity Framework ORM Postgres Database Docker Containerization Docker Compose To run the database and the application Video version All the code is available in the GitHub repository link in the video description That s all If you have any question drop a comment below Francesco 2023-04-16 08:06:08
海外TECH DEV Community Top FREE HTML Resources https://dev.to/sanket00900/top-free-html-resources-30fo Top FREE HTML ResourcesIf you want to become a full stack web developer then your first step should be learning HTML and if you go on the internet and search for resources of HTML you will be lost in the ocean of resources So in this particular blog I will be sharing some top resources from where you can learn HTML for free and move ahead with your journey of becoming a full stack web developer Before going to resources let s understand what is HTML HTML is the hypertext markup language that decides how your web page will look like HTML defines the structure of the web page and it is used for creating different web pages HTML particularly discusses the structure of any web page next up let s talk about some important Concepts that you should be focusing on while learning HTML starting with theDifferent types of semantic tags So on any web page there are different types of tags so you should be aware of different semantic tags which define the structure of a web page HTML forms On the webpage there is one important part of taking input from the user and working accordingly so you should be aware of HTML forms HTML tables you should be aware of HTML tables so that you can create different tables of different sizes HTML media In HTML media you should be aware of three tags which are image video and audio tags So up until this point in time we have talked about what is HTML and what are the different important topics that you should be focusing on while learning HTML Let s talk about the resources So in this particular blog I will be sharing two types of resources The first one is documentation Documentation will help you to learn any technology as well as it will serve you as a reference if you need help in the future The next type of resource is video tutorials Starting with the resourceswschools MDN Docs html com Tutorial by freecodecamp Crash course by traverse media Crash course by Programming with Mosh Tutorial by CodeWithHarryResources Link Notion Page ‍You can watch this particular video from my channel for a better understanding Video LinkGet in Touch with me Follow sanket for more 2023-04-16 08:02:23
海外ニュース Japan Times latest articles Kishida incident shows protecting VIPs from lone wolves remains a tall order https://www.japantimes.co.jp/news/2023/04/16/national/kishida-bomb-security-concerns/ Kishida incident shows protecting VIPs from lone wolves remains a tall orderCampaigning often sees politicians looking to shake hands and deliver speeches in front of sometimes large audiences in settings without security checkpoints 2023-04-16 17:26:46
海外ニュース Japan Times latest articles Five bodies from missing SDF chopper found off Okinawa https://www.japantimes.co.jp/news/2023/04/16/national/okinawa-helicopter-bodies-found/ divers 2023-04-16 17:11:48
海外ニュース Japan Times latest articles Reinvigorated Yusei Kikuchi fans nine in Blue Jays’ win over Rays https://www.japantimes.co.jp/sports/2023/04/16/baseball/mlb/kikuchi-jays-rays-win/ Reinvigorated Yusei Kikuchi fans nine in Blue Jays win over RaysMaking his first home start of at a sold out Rogers Centre the resurgent left hander stayed on the attack against a formidable Tampa Bay lineup 2023-04-16 17:10:33
ニュース BBC News - Home Chelsea: How Emma Hayes balances two international keepers - with a third on the way https://www.bbc.co.uk/sport/football/65262362?at_medium=RSS&at_campaign=KARANGA Chelsea How Emma Hayes balances two international keepers with a third on the wayGermany s Ann Katrin Berger and Sweden s Zecira Musovic have shared the Chelsea goalkeeper shirt this season so who will start their FA Cup semi final 2023-04-16 08:00:43
ニュース BBC News - Home Anna Patten: Defender eyes FA Cup glory with Aston Villa https://www.bbc.co.uk/sport/football/65274826?at_medium=RSS&at_campaign=KARANGA Anna Patten Defender eyes FA Cup glory with Aston VillaAnna Patten has tasted success in the FA Youth Cup but now craves glory in the senior competition as Aston Villa look to upset the odds against Chelsea and reach the final 2023-04-16 08:01:02

コメント

このブログの人気の投稿

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