投稿時間:2022-10-07 07:18:57 RSSフィード2022-10-07 07:00 分まとめ(23件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT InfoQ Presentation: GraphQL Caching on the Edge https://www.infoq.com/presentations/graphql-cache-edge/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global Presentation GraphQL Caching on the EdgeMax Stoiber discusses why and how to edge cache production GraphQL APIs at scale By Max Stoiber 2022-10-06 21:38:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 儲けを取るか、顧客を取るか 苦境続く新電力 石川電力の自己破産は氷山の一角? https://www.itmedia.co.jp/business/articles/2210/07/news063.html itmedia 2022-10-07 06:45:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] ポルシェの上場が“今さら”ではなくベストタイミングだったといえるシンプルな理由 https://www.itmedia.co.jp/business/articles/2210/07/news056.html itmedia 2022-10-07 06:30:00
IT ビジネス+IT 最新ニュース 史上初の減収…大ピンチ「メタ」が描く逆転戦略、カギは“対TikTok機能”と“AI活用” https://www.sbbit.jp/article/cont1/95853?ref=rss 史上初の減収…大ピンチ「メタ」が描く逆転戦略、カギは“対TikTok機能と“AI活用Facebookを運営する米メタ・プラットフォームズが、年の創業以来最大の危機に陥っている。 2022-10-07 06:10:00
AWS AWS The Internet of Things Blog Detect water leaks in near real time using AWS IoT https://aws.amazon.com/blogs/iot/detect-water-leaks-in-near-realtime-using-aws-iot/ Detect water leaks in near real time using AWS IoTIntroduction Water is one of the most precious resources needed for the sustenance of life However only of the global water supply is suitable for human consumption The United States Environmental Protection Association EPA estimates that trillion gallons roughly percent of all treated water is wasted every year in the United States … 2022-10-06 21:28:30
Azure Azureタグが付けられた新着投稿 - Qiita Azure の Windows 11 マルチセッション仮想マシンで FSLogix ユーザープロファイルを使う構成を Azure CLI で作ってみた https://qiita.com/mnrst/items/555ee4c684a83aa0a1af azure 2022-10-07 06:45:32
海外TECH Ars Technica Now you can order the Steam Deck (and its dock) without a reservation https://arstechnica.com/?p=1887855 docks 2022-10-06 21:42:15
海外TECH Ars Technica Boston Dynamics *really* does not want you to add weapons to its robots https://arstechnica.com/?p=1887736 available 2022-10-06 21:28:31
海外TECH Ars Technica Roblox sued for allegedly enabling young girl’s sexual, financial exploitation https://arstechnica.com/?p=1887790 discord 2022-10-06 21:20:39
海外TECH MakeUseOf How to Use Google Earth Web as a Presentation Tool https://www.makeuseof.com/use-google-earth-web-presentation-tool/ locations 2022-10-06 21:30:14
海外TECH MakeUseOf BlackByte Ransomware Abuses Legitimate Drivers to Disable Security Measures https://www.makeuseof.com/blackbyte-ransomware-abuses-servers-disables-security/ layers 2022-10-06 21:23:41
海外TECH DEV Community REST API con ASP.NET 6 y MySQL https://dev.to/esdanielgomez/rest-api-con-aspnet-6-y-mysql-21j0 REST API con ASP NET y MySQL¡Hola En este artículo tutorial aprenderemos a construir una web API desde ASP NET para manejar operaciones CRUD con una base de datos en MySQL Nota el código fuente empleado en este tutorial estádisponible en GitHub en el siguiente repositorio ASP NET Web API Recursos necesarios Para seguir paso a paso este articulo o ejecutar el demo incluido es necesario tener en funcionamiento las siguientes herramientas MySQL NET SDK Visual Studio La carga de trabajo desarrollo web y ASP NET para Visual Studio Proceso a seguir En el tutorial tendremos tres partes importantes Revisar la base de datos que vamos a utilizar Establecer el acceso a la base de datos desde ASP NET a través de Entity Framework Establecer los controladores y sus métodos para el servicio web Como caso de estudio para este tutorial se manejarán los datos de usuarios a través de operaciones CRUD Crear Leer Actualizar y Eliminar en registros La base de datos para el domino de la aplicación La base de datos que utilizaremos en este ejemplo estáconformada por una única tabla llamada User con los atributos Id FirstName LastName Username Password y EnrrollmentDate en MySQL La sentencia SQL para la creación de la tabla User es la siguiente CREATE TABLE user Id INT NOT NULL PRIMARY KEY FirstName VARCHAR NOT NULL LastName VARCHAR NOT NULL Username VARCHAR NOT NULL Password VARCHAR NOT NULL EnrollmentDate datetime NOT NULL Muy bien con la base de datos establecida ya podemos comenzar con la implementación de nuestro primer proyecto para el desarrollo de servicios API Rest Establecer el acceso a la base de datos desde ASP NET a través de Entity Framework Proyecto ASP NET del tipo Web API En Visual Studio lo primero que haremos es crear un nuevo proyecto de tipo ASP NET Core Web API Después en los siguientes pasos podremos especificar el Framework Con este proyecto crearemos el acceso a la base de datos e implementaremos un controlador correspondiente para trabajar con esos datos y proporcionar la web API Acceso a la base de datos con Entity Framework Para establecer las entidades a través de clases y la conexión de la base de datos se puede emplear el enfoque Database First de Entity Framework el cual permite hacer scaffolding desde la base de datos hacia el proyecto es decir generar clases automáticamente de acuerdo con las entidades establecidas en la base de datos y la conexión en el proyecto Para este propósito es necesario instalar tres paquetes NuGet Microsoft EntityFrameworkCore DesignMicrosoft EntityFrameworkCore ToolsMySql EntityFrameworkCoreEn caso de que se este trabajando con SQL Server el paquete NuGet a instalar será Microsoft EntityFrameworkCore SQLServer Nota para encontrar el centro de administración de los paquetes NuGet podemos dirigirnos al menúde opciones gt proyecto gt manejar paquetes NuGet Con la instalación de estos paquetes NuGet ahora abriremos la consola de administración de paquetes para introducir un comando que permitirárealizar scaffolding desde la base de datos Comando Scaffold DbContext server servername port portnumber user username password pass database databasename MySql EntityFrameworkCore OutputDir Entities fEl resultado es el siguiente Aquí la clase User estádefinida de la siguiente manera public partial class User public int Id get set public string FirstName get set public string LastName get set public string Username get set public string Password get set public DateTime EnrollmentDate get set Y el DBContext el cual tiene la configuración con la base de datos cuyo método principal OnConfiguring se veráalgo como esto protected override void OnConfiguring DbContextOptionsBuilder optionsBuilder if optionsBuilder IsConfigured optionsBuilder UseMySQL server localhost port user root password database database Ahora no es lo más adecuado que la cadena de conexión a la base de datos se encuentre especificada en este método OnConfiguring Para esto dentro de nuestro proyecto podemos encontrar el archivo appsettings json en el cual podremos definir esta configuración AllowedHosts ConnectionStrings DefaultConnection server servername port portnumber user username password pass database databasename Luego en la clase Program agregaremos como servicio al DBContext y luego debemos hacer referencia a la propiedad DefaultConnection especificada en el archivo appsettings json builder Services AddEntityFrameworkMySQL AddDbContext lt DBContext gt options gt options UseMySQL builder Configuration GetConnectionString DefaultConnection En este caso regresando a la clase del DBContext borramos la cadena de conexión especificada en el método OnConfiguring A la final tendríamos el método vacío protected override void OnConfiguring DbContextOptionsBuilder optionsBuilder Con estos pasos ya tenemos lista la conexión y las configuraciones necesarias para trabajar con la base de datos en ASP NET con la ayuda de Entity Framework Establecer los controladores y sus métodos para el servicio web Con el objetivo de transportar los datos entre los procesos para el manejo de la base de datos y los procesos para trabajar con los servicios web es recomendable establecer clases DTO por cada entidad del proyecto en este caso un DTO para la entidad User Para ello crearemos una nueva carpeta dentro del proyecto llamada DTO y crearemos una clase llamada UserDTO cuyos atributos serán los mismos que la clase User definida en la sección Entities anteriormente public class UserDTO public int Id get set public string FirstName get set public string LastName get set public string Username get set public string Password get set public DateTime EnrollmentDate get set Controladores para el Web API Ahora lo que haremos es agregar los controladores en este caso el controlador para el usuario el cual permitiráestablecer métodos para realizar operaciones CRUD sobre las tablas de la base de datos y exponerlos a través del Web API Sobre la carpeta Controllers agregaremos un controlador llamado UserController La definición de la clase y su constructor se veráasí ApiController Route api controller public class UserController ControllerBase private readonly DBContext DBContext public UserController DBContext DBContext this DBContext DBContext Ahora el objetivo es realizar las operaciones CRUD En este sentido utilizaremos métodos para acceder a la información Get para insertar datos Post para modificar Put y para eliminar un registro Delete A continuación se muestra el código final de cada uno de los métodos A Obtener el listado de todos los usuarios registrados HttpGet GetUsers public async Task lt ActionResult lt List lt UserDTO gt gt gt Get var List await DBContext User Select s gt new UserDTO Id s Id FirstName s FirstName LastName s LastName Username s Username Password s Password EnrollmentDate s EnrollmentDate ToListAsync if List Count lt return NotFound else return List B Obtener los datos de un usuario especifico según su Id HttpGet GetUserById public async Task lt ActionResult lt UserDTO gt gt GetUserById int Id UserDTO User await DBContext User Select s gt new UserDTO Id s Id FirstName s FirstName LastName s LastName Username s Username Password s Password EnrollmentDate s EnrollmentDate FirstOrDefaultAsync s gt s Id Id if User null return NotFound else return User C Insertar un nuevo usuario HttpPost InsertUser public async Task lt HttpStatusCode gt InsertUser UserDTO User var entity new User FirstName User FirstName LastName User LastName Username User Username Password User Password EnrollmentDate User EnrollmentDate DBContext User Add entity await DBContext SaveChangesAsync return HttpStatusCode Created D Actualizar los datos de un usuario especifico HttpPut UpdateUser public async Task lt HttpStatusCode gt UpdateUser UserDTO User var entity await DBContext User FirstOrDefaultAsync s gt s Id User Id entity FirstName User FirstName entity LastName User LastName entity Username User Username entity Password User Password entity EnrollmentDate User EnrollmentDate await DBContext SaveChangesAsync return HttpStatusCode OK E Eliminar a un usuario según su Id HttpDelete DeleteUser Id public async Task lt HttpStatusCode gt DeleteUser int Id var entity new User Id Id DBContext User Attach entity DBContext User Remove entity await DBContext SaveChangesAsync return HttpStatusCode OK Con estos métodos y con los pasos seguidos hasta este punto el servicio web estálisto para ponerse en ejecución Probar la web API implementadaPara probar la API implementada podemos utilizar Swagger UI una herramienta visual que nos permite interactuar con los métodos de nuestro servicio y que a su vez ya se encuentra integrada en nuestro proyecto de ASP NET Para las pruebas necesitamos compilar y ejecutar la aplicación A continuación podemos ver la interfaz de Swagger para que podamos realizar las pruebas correspondientes de acuerdo con los métodos definidos en nuestro controlador y de una manera interactiva Al ser este un servicio RestFul nosotros podemos utilizar cualquier otro programa o aplicación para consumir estos servicios Por ejemplo aquípodemos ver una llamada al método GetUsers desde la herramienta Postman What next Con este tutorial hemos aprendido paso a paso como implementar servicios HTTP que manejen datos de usuarios desde ASP NET y como realizar pruebas con estas funcionalidades El código fuente de este ejemplo puede visualizarse desde el siguiente repositorio en GitHub ASP NET Web API Gracias por leer Espero que te haya gustado el artículo Si tienes alguna pregunta o alguna idea en mente seráun gusto poder estar en comunicación contigo y juntos intercambiar conocimientos entre sí Nos vemos en Twitter esDanielGomez com ¡Saludos 2022-10-06 21:17:12
海外TECH Engadget Researchers discover star being consumed by its smaller, deader neighbor https://www.engadget.com/researchers-discover-a-dead-star-thats-eating-away-at-a-much-larger-one-211503225.html?src=rss Researchers discover star being consumed by its smaller deader neighborThe Sun might be a solitary star in our solar system but around half of all other stars in the Milky Way are part of binary systems in which two orbit each other These can have incredibly fast orbital periods ーscientists have found two white dwarfs that take just minutes and seconds to orbit each other Another binary system is notable for a different reason one star is feasting on the other Around light years away there s a binary system that belongs to a class called quot cataclysmic variables quot That s an incredible term I m going to use after my next failed cooking experiment by the way In space terms when a star similar to our sun tightly orbits a white dwarf that s a cataclysmic variable As Reuters nbsp notes quot variable quot relates to the combined brightness of the two stars changing over time at least in terms of how we view the system from terra firma These luminosity levels can change significantly which is where the quot cataclysmic quot part comes into play The two stars in the billion year old system in question orbit each other every minutes That s the shortest known orbital period for a cataclysmic variable system The distance between the stars has narrowed over millions of years and they re now closer to each other than we are to the Moon researchers at Massachusetts Institute of Technology and elsewhere have determined In a paper published in Nature this week the researchers stated that the white dwarf is drawing material away from the Sun like partner quot It s an old pair of stars where one of the two moved on ーwhen stars die of old age they become white dwarfs ーbut then this remnant began to eat its companion quot MIT astrophysicist and the paper s lead author Kevin Burdge told Reuters quot Right before the second one could end its stellar life cycle and become a white dwarf in the way that stars normally do ーby evolving into a type of star called a red giant ーthe leftover white dwarf remnant of the first star interrupted the end of the companion s lifecycle and started slowly consuming it quot The researchers found that the larger star has a similar temperature to the Sun but has been reduced to around percent of our celestial neighbor s diameter It s now about the size of Jupiter The white dwarf is far smaller as it has a diameter around times the size of Earth s However it has a dense core with a mass of around percent that of our Sun s The white dwarf has been munching away on hydrogen from the larger star s outer layers leaving the latter unusually rich in helium The larger star is also morphing into a teardrop shape due to the gravitational pull of the white dwarf That s one reason for the changes in the binary system s levels of brightness MIT notes that the system can emit quot enormous variable flashes of light quot as a result of the hydrogen sapping process It added that long ago astronomers believed these flashes to be the consequence of an unknown cataclysm While we have a clearer understanding of the situation these days this is more evidence as if it were needed that space is cool and terrifying in equal measure 2022-10-06 21:15:03
ニュース BBC News - Home Thailand nursery attack: Witnesses describe shocking attack https://www.bbc.co.uk/news/world-asia-63158837?at_medium=RSS&at_campaign=KARANGA officer 2022-10-06 21:23:07
ニュース BBC News - Home Elton John and Prince Harry sue Daily Mail publisher over 'privacy breach' https://www.bbc.co.uk/news/uk-63164654?at_medium=RSS&at_campaign=KARANGA newspapers 2022-10-06 21:49:39
ニュース BBC News - Home Elon Musk: Twitter won't 'take yes for an answer' https://www.bbc.co.uk/news/business-63166568?at_medium=RSS&at_campaign=KARANGA takeover 2022-10-06 21:08:28
ニュース BBC News - Home Scotland 1-0 Austria AET: Harrison winner sets up play-off final with Republic of Ireland https://www.bbc.co.uk/sport/football/63111956?at_medium=RSS&at_campaign=KARANGA Scotland Austria AET Harrison winner sets up play off final with Republic of IrelandScotland are potentially minutes away from the Women s World Cup after a gruelling extra time play off victory over Austria 2022-10-06 21:26:26
ニュース BBC News - Home Arsenal 3-0 Bodo/Glimt: Arsenal ease to victory over Bodo/Glimt https://www.bbc.co.uk/sport/football/63151667?at_medium=RSS&at_campaign=KARANGA europa 2022-10-06 21:40:11
北海道 北海道新聞 NY株続落、3万ドル割れ 346ドル安、金利上昇嫌気 https://www.hokkaido-np.co.jp/article/741993/ 金利上昇 2022-10-07 06:23:06
北海道 北海道新聞 北極海氷、10番目の小ささ 晩夏に減少激しく https://www.hokkaido-np.co.jp/article/741996/ 人工衛星 2022-10-07 06:23:05
北海道 北海道新聞 「山上殺しに行く」と電話 拘置所業務妨害疑い男逮捕 https://www.hokkaido-np.co.jp/article/741997/ 安倍晋三 2022-10-07 06:12:00
北海道 北海道新聞 ノーベル平和賞、人権分野が有力 ノルウェー国営放送 https://www.hokkaido-np.co.jp/article/741990/ 国営放送 2022-10-07 06:12:53
海外TECH reddit さむい https://www.reddit.com/r/lowlevelaware/comments/xxhb9g/さむい/ wlevelawarelinkcomments 2022-10-06 21:47: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件)