投稿時間:2023-01-06 02:35:06 RSSフィード2023-01-06 02:00 分まとめ(41件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS AWS Big Data Blog Green Flag uses Amazon QuickSight to democratize data and enable self-serve insights to all employees https://aws.amazon.com/blogs/big-data/green-flag-uses-amazon-quicksight-to-democratize-data-and-enable-self-serve-insights-to-all-employees/ Green Flag uses Amazon QuickSight to democratize data and enable self serve insights to all employeesThis is a guest post by Jeremy Bristow Head of Product at Green Flag In the US there s a saying “Sooner or later you ll break down and call Triple A In the UK that same saying might be “Sooner or later you ll break down and call Green Flag Green Flag has been assisting stranded motorists … 2023-01-05 16:24:08
AWS AWS Big Data Blog Accelerate your data exploration and experimentation with the AWS Analytics Reference Architecture library https://aws.amazon.com/blogs/big-data/accelerate-your-data-exploration-and-experimentation-with-the-aws-analytics-reference-architecture-library/ Accelerate your data exploration and experimentation with the AWS Analytics Reference Architecture libraryOrganizations use their data to solve complex problems by starting small running iterative experiments and refining the solution Although the power of experiments can t be ignored organizations have to be cautious about the cost effectiveness of such experiments If time is spent creating the underlying infrastructure for enabling experiments it further adds to the cost Developers … 2023-01-05 16:20:24
AWS AWS - Webinar Channel Getting Started with Amazon Aurora & Amazon RDS Blue/Green Deployments https://www.youtube.com/watch?v=6DaMgyFHY3Y Getting Started with Amazon Aurora amp Amazon RDS Blue Green DeploymentsDatabase updates are now safer simpler and faster with Amazon RDS Blue Green Deployments Using Blue Green Deployments you can now make database updates such as major or minor version upgrades schema changes maintenance updates and more in Amazon Aurora MySQL Compatible Edition Amazon RDS for MySQL and Amazon RDS for MariaDB Blue Green Deployments has switchover guardrails that help you to switchover in as fast as a minute with zero data loss and no application changes In this session learn more about Blue Green Deployments and how you can use it to make updates 2023-01-05 16:27:37
python Pythonタグが付けられた新着投稿 - Qiita ABC259 D Dif:947 『AtCoder ABC251~275 ARC140~151 灰・茶・緑問題 超詳細解説』サンプル https://qiita.com/sano192/items/e39d3636c1ea5d62c1bb abcddif 2023-01-06 01:26:49
python Pythonタグが付けられた新着投稿 - Qiita ABC262 B Dif:220 『AtCoder ABC251~275 ARC140~151 灰・茶・緑問題 超詳細解説』サンプル https://qiita.com/sano192/items/8a9cc91d73a798de6a54 abcbdif 2023-01-06 01:21:20
python Pythonタグが付けられた新着投稿 - Qiita ABC256 C Dif:541 『AtCoder ABC251~275 ARC140~151 灰・茶・緑問題 超詳細解説』サンプル https://qiita.com/sano192/items/c52d24d0cdf3797a77d7 abccdif 2023-01-06 01:14:58
AWS AWSタグが付けられた新着投稿 - Qiita AWS My First Setup - 自分流初期設定の忘備録 https://qiita.com/Ryku/items/60faa934127489c55808 awsmyfirstsetup 2023-01-06 01:59:39
技術ブログ Developers.IO [レポート]エクサバイト規模のAWSストレージのイノベーション #STG221-L #reinvent https://dev.classmethod.jp/articles/reinvent2022-stg221-report/ stgla 2023-01-05 16:12:33
海外TECH Ars Technica Amazon expands layoffs from 10,000 to 18,000 jobs as stock price keeps falling https://arstechnica.com/?p=1907885 previous 2023-01-05 16:21:44
海外TECH Ars Technica Sony announces new controller aimed at gamers with disabilities https://arstechnica.com/?p=1907879 launch 2023-01-05 16:04:48
海外TECH MakeUseOf How VW’s EV-Maker Scout Motors Will Take on Rivian https://www.makeuseof.com/how-vws-ev-maker-scout-motors-will-take-on-rivian/ motors 2023-01-05 16:30:15
海外TECH MakeUseOf How and What the Tesla Autopilot Sees https://www.makeuseof.com/how-and-what-the-tesla-autopilot-sees/ autopilot 2023-01-05 16:16:15
海外TECH DEV Community REST API with ASP.NET and MySQL https://dev.to/esdanielgomez/rest-api-with-aspnet-and-mysql-5c6h REST API with ASP NET and MySQLIn this tutorial article we will learn how to build a web API from ASP NET to handle CRUD operations with a database in MySQL Source code ASP NET Web API Resources required To follow this article step by step or run the included demo it is necessary to have the following tools in operation MySQL NET SDK Visual Studio The web development workload and ASP NET for Visual Studio Process to follow In the tutorial we will have three important parts Review the database we are going to use Establish database access from ASP NET through the Entity Framework Set the handlers and their methods for the web service As a case study for this tutorial user data will be handled through CRUD Create Read Update and Delete operations The database for the application domain The database that we will use in this example is made up of a single table called User with the attributes Id FirstName LastName Username Password and EnrrollmentDate in MySQL The SQL statements for the creation of the User table is as follows 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 Very well with the database established we can already start with the implementation of our first project for the development of API Rest services Establish database access from ASP NET through Entity Framework ASP NET Web API project In Visual Studio the first thing we ll do is create a new project of type ASP NET Core Web API Then in the following steps we can specify the Framework With this project we ll create access to the database and implement a corresponding controller to work with that data and provide the web API Database access with Entity Framework To establish the entities through classes and the connection of the database we can use the Database First approach of the Entity Framework which allows us to scaffolding from the database to the project that is generate classes automatically according to the entities established in the database and the connection in the project For this purpose it s necessary to install three NuGet packages Microsoft EntityFrameworkCore DesignMicrosoft EntityFrameworkCore ToolsMySql EntityFrameworkCoreIn case you are working with SQL Server the NuGet package to install will be Microsoft EntityFrameworkCore SQLServer Note to find the admin center of nuGet packages we can go to the option menu gt project gt Manage NuGet packages With the installation of these NuGet packages we ll now open the package management console to write a command that will allow us to perform scaffolding from the database Command Scaffold DbContext server servername port portnumber user username password pass database databasename MySql EntityFrameworkCore OutputDir Entities fThe result is as follows Here the User class is defined as follows 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 And the DBContext which has the configuration with the database whose main method OnConfiguring will look something like this protected override void OnConfiguring DbContextOptionsBuilder optionsBuilder if optionsBuilder IsConfigured optionsBuilder UseMySQL server localhost port user root password database database Now it s not the most appropriate that the connection string to the database is specified in the OnConfiguring method For this within our project we can find the appsettings json file in which we can define this configuration AllowedHosts ConnectionStrings DefaultConnection server servername port portnumber user username password pass database databasename Then in the Program class we ll add as a service to the DBContext and then we must reference the DefaultConnection property specified in the appsettings json file builder Services AddEntityFrameworkMySQL AddDbContext lt DBContext gt options gt options UseMySQL builder Configuration GetConnectionString DefaultConnection In this case returning to the class of the DBContext we delete the connection string specified in the OnConfiguring method At the end we would have the empty method protected override void OnConfiguring DbContextOptionsBuilder optionsBuilder With these steps we have already ready the connection and the necessary configurations to work with the database in ASP NET with the help of Entity Framework Set the controllers and their methods for the web service In order to transport the data between the processes for the management of the database and the processes for working with web services it s advisable to establish DTO classes for each entity of the project in this case a DTO for the entity User To do this we ll create a new folder within the project called DTO and create a class called UserDTO whose attributes will be the same as the User class defined in the Entities section above 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 Controllers for the Web API Now what we ll do is add the controllers in this case the controller for the user which will allow to establish methods to perform CRUD operations on the tables of the database and expose them through the Web API On the Controllers folder we ll add a controller called 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 Now the goal is to perform CRUD operations In this sense we ll use methods to access the information Get to insert data Post to modify Put and to delete a record Delete The following is the final code for each of the methods A Get the list of all users 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 Obtain the data of a specific user according to their 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 Insert a new user 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 Update the data of a specific user 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 Delete a user based on their 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 With these methods and the steps followed up to this point the web service is ready to run Test the implemented web APITo test the implemented API we can use Swagger UI a visual tool that allows us to interact with the methods of our service and that in turn is already integrated into our ASP NET project For testing we need to build and run the application Next we can see the Swagger interface so that we can perform the corresponding tests according to the methods defined in our controller and in an interactive way As this is a RestFul service we may use any other program or application to consume these services For example here we can see a call to the GetUsers method from the Postman tool What next With this tutorial we have learned step by step how to implement HTTP services that handle user data from ASP NET and how to test with these functionalities The source code for this example can be viewed from the following repository on GitHub ASP NET Web API Thanks for reading I hope you liked the article If you have any questions or ideas in mind it ll be a pleasure to be able to communicate with you and together exchange knowledge with each other See you on Twitter esDanielGomez com Regards 2023-01-05 16:51:58
海外TECH DEV Community Zod Crash Course https://dev.to/arafat4693/zod-crash-course-geg Zod Crash Course Goals of ZodValidation library Schema first First class typescript support No need to write types twice Immutable Functional porgramming Super small library kb SetupCan be used with Node Deno Bun Any Browser etc npm i zodimport z from zod Must have strict true in tsconfig file Basic Usage creating a schemaconst User z object username z string extract the inferred typetype User z infer lt typeof User gt username string const user User username Arafat parsingmySchema parse user gt tuna mySchema parse gt throws ZodError safe parsing doesn t throw error if validation fails mySchema safeParse user gt success true data tuna mySchema safeParse gt success false error ZodError Basic Typesimport z from zod primitive valuesz string z number z bigint z boolean z date z symbol empty typesz undefined z null z void accepts undefined catch all types allows any valuez any z unknown never type allows no valuesz never ValidationsAll types in Zod have an optional options parameter you can pass as the last param which defines things like error messages Also many types has validations you can chain onto the end of the type like optionalz string optionalz number lt optional Makes field optionalnullable Makes field also able to be nullnullish Makes field able to be null or undefined Default ValuesCan take a value or function Only returns a default when input is undefined z string default Arafat z string default Math random Literalsconst one z literal one retrieve literal valueone value one Currently there is no support for Date literals in Zod Enums Zod Enumsconst FishEnum z enum Salmon Tuna Trout type FishEnum z infer lt typeof FishEnum gt Salmon Tuna Trout Doesn t work without as const since it has to be read onlyconst VALUES Salmon Tuna Trout as const const fishEnum z enum VALUES fishEnum enum Salmon gt autocompletes TS Enums Should you use Zod enums when possible enum Fruits Apple Banana const FruitEnum z nativeEnum Fruits Objectsz object all properties are required by defaultconst Dog z object name z string age z number extract the inferred type like thistype Dog z infer lt typeof Dog gt equivalent to type Dog name string age number shape key Gets schema of that keyDog shape name gt string schemaDog shape age gt number schema extend Add new fields to schemaconst DogWithBreed Dog extend breed z string merge Combine two object schemasconst BaseTeacher z object students z array z string const HasID z object id z string const Teacher BaseTeacher merge HasID type Teacher z infer lt typeof Teacher gt gt students string id string pick omit partial Same as TSconst Recipe z object id z string name z string ingredients z array z string To only keep certain keys use pickconst JustTheName Recipe pick name true type JustTheName z infer lt typeof JustTheName gt gt name string To remove certain keys use omitconst NoIDRecipe Recipe omit id true type NoIDRecipe z infer lt typeof NoIDRecipe gt gt name string ingredients string To make every key optional use partialconst partialRecipe Recipe partial id string undefined name string undefined ingredients string undefined deepPartial Same as partial but for nested objectsconst user z object username z string location z object latitude z number longitude z number strings z array z object value z string const deepPartialUser user deepPartial username string undefined location latitude number undefined longitude number undefined undefined strings value string passThrough Let through non defined fieldsconst person z object name z string person parse name bob dylan extraKey gt name bob dylan extraKey has been stripped Instead if you want to pass through unknown keys use passthrough person passthrough parse name bob dylan extraKey gt name bob dylan extraKey strict Fail for non defined fieldsconst person z object name z string strict person parse name bob dylan extraKey gt throws ZodError Arraysconst stringArray z array z string Array of strings element Get schema of array elementstringArray element gt string schema nonempty Ensure array has a valueconst nonEmptyStrings z string array nonempty the inferred type is now string string nonEmptyStrings parse throws Array cannot be empty nonEmptyStrings parse Ariana Grande passes min max length Gurantee certail sizez string array min must contain or more itemsz string array max must contain or fewer itemsz string array length must contain items exactly Advanced Types TupleFixed length array with specific values for each index in the arrayThink for example an array of coordinates z tuple z number z number z number optional rest Allow infinite number of additional elements of specific typeconst variadicTuple z tuple z string rest z number const result variadicTuple parse hello gt string number UnionCan be combined with things like arrays to make very powerful type checking let stringOrNumber z union z string z number same aslet stringOrNumber z string or z number stringOrNumber parse foo passesstringOrNumber parse passes Discriminated unionsUsed when one key is shared between many types Useful with things like statuses Helps Zod be more performant in its checks and provides better error messagesconst myUnion z discriminatedUnion status z object status z literal success data z string z object status z literal failed error z instanceof Error myUnion parse status success data yippie ki yay RecordsUseful when you don t know the exact keys and only care about the valuesz record z number Will gurantee that all the values are numbersz record z string z object name z string Validates the keys match the pattern and values match the pattern Good for things like stores maps and caches MapsUsually want to use this instead of key version of recordconst stringNumberMap z map z string z number type StringNumberMap z infer lt typeof stringNumberMap gt type StringNumberMap Map lt string number gt SetsWorks just like arrays Only unique values are accepted in a set const numberSet z set z number type NumberSet z infer lt typeof numberSet gt type NumberSet Set lt number gt PromisesDoes validation in two steps Ensures object is promiseHooks up then listener to the promise to validate return type const numberPromise z promise z number numberPromise parse tuna ZodError Non Promise type stringnumberPromise parse Promise resolve tuna gt Promise lt number gt const test async gt await numberPromise parse Promise resolve tuna ZodError Non number type string await numberPromise parse Promise resolve gt Advanced Validation refineconst email z string refine val gt val endsWith gmail com message Email must end with gmail com Also you can use the superRefine method to get low level on custom validation but most likely won t need it Handling ErrorsErrors are extremely detailed in Zod and not really human readable out of the box To get around this you can either have custorm error messages for all your validations or you can use a library like zod validation error which adds a simple fromZodError method to make error human readable import fromZodError from zod validation error console log fromZodError results error ConclusionThere are many more concepts of Zod and I can t explain all that stuff here However If you want to discover them head to Zod s official documentation They ve explained everything perfectly there So this was it guys I hope you guys will like this crash course I ve tried my best to pick all of the essential concepts of Zod and explain them If you have any doubts or questions then feel free to ask them in the comment section I will answer as soon as I see it See you all in my next article 2023-01-05 16:48:44
海外TECH DEV Community 6 React questions for technical interviews and their answers https://dev.to/jgamaraalv/6-react-questions-for-technical-interviews-and-their-answers-10p3 React questions for technical interviews and their answersThroughout my career as a developer I have been able to go through some selection processes with different difficulties and questions about certain subjects I decided to gather in this post the most common questions and their respective answers Not for them to be decorated but because I think they are extremely important to understand for anyone looking to evolve in their career as a React developer What is the difference between Component and PureComponent A component in React is a function or class that returns a React element which is a description of a user interface A pure component is a component that implements the shouldComponentUpdate lifecycle method in a way that prevents the component from re rendering if the component s props and state have not changed Here is an example of a simple component function HelloWorld props return lt div gt Hello props name lt div gt Here is an example of the same component implemented as a pure component class HelloWorld extends React PureComponent render return lt div gt Hello this props name lt div gt The main difference between a component and a pure component is that a pure component implements shouldComponentUpdate with a shallow prop and state comparison while a component does not This means that a pure component will not re render if its props and state have not changed while a component will always re render every time it is rendered Using a pure component can improve performance in cases where the component is rendered frequently and the component s props and state do not change often However if the component s props or state do change frequently using a pure component can prevent the component from updating when it should which can break the app Describe ways to pass information from a component to its parent There are several ways to pass information from a child component to its parent in React Callback functions You can pass a callback function as a prop to the child component The child component can then call the callback function when it needs to pass data back to the parent For example In the parent component function Parent const handleChildData data gt Do something with the data from the child component return lt Child onChildData handleChildData gt In the child component function Child props const handleClick gt const data some data props onChildData data return lt button onClick handleClick gt Click me lt button gt Context You can use the React context feature to pass data from a child component to a parent component The parent component creates a context object and the child component consumes it For example In the parent component const DataContext React createContext function Parent const data setData React useState null return lt DataContext Provider value data setData gt lt Child gt lt DataContext Provider gt In the child component function Child const data setData React useContext DataContext const handleClick gt setData some data return lt button onClick handleClick gt Click me lt button gt Ref We can pass a ref to the children component so we can acess the value with ref current in the parent component const inputReft useRef lt InputComponent ref inputRef gt Give ways to prevent components from re rendering There are several ways to prevent a component from re rendering in React React PureComponent As mentioned previously you can use React PureComponent instead of React Component when defining a component class React PureComponent implements the shouldComponentUpdate lifecycle method with a shallow prop and state comparison which means that the component will only re render if its props or state have changed If the props and state are the same according to the comparison the component will not re render class MyComponent extends React PureComponent render Render the component React memo You can use the React memo higher order component to wrap a function component and prevent it from re rendering if its props have not changed React memo performs a shallow comparison of the props to determine if the component should re render If the props are the same according to the comparison the component will not re render const MyComponent React memo function MyComponent props Render the component You can also provide a custom comparison function to React memo if you need to perform a more complex comparison of the props For example const areEqual prevProps nextProps gt Return true if the props are equal false otherwise const MyComponent React memo function MyComponent props Render the component areEqual How many arguments does setState take and why is it async The setState method in React takes up to two arguments The first argument is an updater function or an object representing the new state The second argument is an optional callback function that is called after the state has been updated Here is an example of using setState with an updater function this setState prevState gt return count prevState count Here is an example of using setState with an object representing the new state this setState count this state count setState is asynchronous because it may be batched together with other state updates which means that the state may not be updated immediately after calling setState This is done to improve performance by avoiding unnecessary re renders If you need to perform an action after the state has been updated you can pass a callback function as the second argument to setState The callback function will be called after the state has been updated and the component has re rendered this setState count this state count gt Do something after the state has been updated It is important to note that the state may be updated asynchronously so you should not rely on the state being immediately available after calling setState If you need to use the updated state in a subsequent update you should pass a function as the first argument to setState and use the current state as an argument to the function this setState prevState gt return count prevState count The state may not be immediately available so it is important to use the previous state as an argument to the updater functionthis setState prevState gt return count prevState count What is a fragment and why do we need it In React a fragment is a way to group a list of children without adding extra nodes to the DOM Fragments are useful when you want to return multiple elements from a component s render method but you don t want to wrap the elements in an extra DOM node Here is an example of using a fragment to group a list of elements render return lt gt lt p gt Item lt p gt lt p gt Item lt p gt lt p gt Item lt p gt lt gt This will render the same JSX as the following code render return lt React Fragment gt lt li gt Item lt li gt lt li gt Item lt li gt lt li gt Item lt li gt lt React Fragment gt Both of these examples will render a list with three items but the fragment allows you to group the elements without adding an extra node to the DOM This can be useful in cases where you want to return multiple elements from a component but you don t want to wrap the elements in an extra node In the past you could use a div element as a placeholder for a fragment but this is no longer recommended because it can lead to confusion and can cause problems with CSS It is now recommended to use fragments or a React Fragment element to group elements in a list List the steps needed to migrate a Class to Function Component To migrate a class component to a function component in React you can follow these steps Convert the class component to a function component To do this you will need to remove the class keyword and the extends clause and add the function keyword You should also remove the render method and move the JSX code to the top level of the component function Before class MyComponent extends React Component render return lt div gt Hello world lt div gt After function MyComponent props return lt div gt Hello world lt div gt Convert any instance variables or methods to function component hooks If the class component uses any instance variables or methods you will need to convert them to function component hooks This includes variables like this state and this props as well as methods like this setState Before class MyComponent extends React Component state count handleClick gt this setState count this state count render return lt div gt lt button onClick this handleClick gt Click me lt button gt lt p gt this state count lt p gt lt div gt After function MyComponent const count setCount React useState const handleClick gt setCount count return lt div gt lt button onClick handleClick gt Click me lt button gt lt p gt count lt p gt lt div gt Remove the constructor method If the class component has a constructor method you can remove it since function components do not have a constructor method Before class MyComponent extends React Component constructor props super props Initialize state and bind methods Other methods and render function After function MyComponent props Initialize state using hooks and define methods as functions Render function Convert any static methods or properties to regular functions or variables If the class component has any static methods or properties you will need to convert them to regular functions or variables Before class MyComponent extends React Component static propTypes name PropTypes string isRequired static defaultProps name world Other methods and render function After MyComponent propTypes name PropTypes string isRequired MyComponent defaultProps name world function MyComponent props Render function After following these steps your class component should be fully converted to a function component Extra a Javascript question What s the difference in handling exceptions in promises callbacks and async await In JavaScript there are three main ways to handle exceptions using try catch with synchronous code using a callback function and using async await Here is a brief overview of the differences between these three approaches try catch try catch is used to handle exceptions in synchronous code When an exception is thrown in the try block the code execution is immediately halted and the catch block is executed try Code that may throw an exception catch error Handle the exception Callbacks Callbacks are used to handle asynchronous exceptions When an asynchronous function returns a result or an error it calls a callback function with the result or the error as an argument The callback function can then handle the result or the error as needed asyncFunction function error result if error Handle the error else Use the result async await async await is a more recent approach to handling asynchronous exceptions async functions allow you to use the await keyword to pause the execution of the function until a promise is resolved If the promise is rejected an exception is thrown which can be handled using a try catch block async function example try const result await asyncFunction Use the result catch error Handle the error In general try catch is used to handle exceptions in synchronous code while call 2023-01-05 16:21:21
海外TECH DEV Community Learn CSS: Create the Google Logo https://dev.to/ratracegrad/learn-css-create-the-google-logo-3b73 Learn CSS Create the Google LogoOne of the best ways to learn CSS is by creating something useful while you learn I will show you how to use the following CSS items by creating the Google logo position relative and absolutepseudo classes before and afterpositioning an element that is absolutetransform translateYcreate triangle What we will be creatingWe will create the Google logo in pure CSS It will look like this Create our starter filesLet s start by creating two files called index html and style css In your index html file add the following starter code lt DOCTYPE html gt lt html lang en gt lt head gt lt meta charset UTF gt lt meta http equiv X UA Compatible content IE edge gt lt meta name viewport content width device width initial scale gt lt title gt Google Logo lt title gt lt link rel stylesheet href style css gt lt head gt lt body gt lt body gt lt html gt In the style css file add the following starter code body padding margin height vh display flex justify content center align items center background color azure Dissecting the Google LogoThe Google logo is a multi colored letter G If we look at it closely it is basically a multi colored circle with part of it removed and replaced with a line Knowing that then we will use that in creating the Google logo Add the following line inside the body tag of your index html file lt div class google logo gt lt div gt Creating our multi colored circleThe first step in creating the Google logo is to create a multi colored logo This first step is to create a circle with a different color for each corner For this demo I am going to set the circle to have a height and width of px Add the following code to your style css file google logo position relative width px height px padding border top px solid ea border right px solid f border bottom px solid a border left px solid fbbc border radius background color azure This is what our logo looks like now Position absolute and relativeThe position CSS property sets how an element is positioned in a document The top right bottom and left properties determine the final location of positioned elements If you define an element to have position of absolute the element is removed from the normal document flow and no space is created for the element in the page layout It is positioned relative to its closest positioned ancestor We defined the google logo to have a position of relative The next step in the logo is to create the line part of the letter G This element will have a position of absolute pseudo class beforeWe need to create the line part of the G letter We will use the pseudo class before to draw this line We will define the line to have a position of absolute Then we will define its position by using the top and right properties We set the top to be That makes the top of the line to be at of the circle This puts the line below the center This is not what we want To move it to be in the center we will use a CSS trick using the transform property Add the following code to your style css file google logo before content z index position absolute top right px transform translateY width px height px background color f This is what our logo looks like now Creating a triangleThe last step of our logo is to create a triangle above the line This triangle will be transparent which will hide part of our original multi colored circle Here is what we want to accomplish We will use the pseudo class after to draw the triangle To make the triangle hide part of the circle we will give it the same background color as our body which is azure In a previous article about creating the YouTube logo I showed how to create a triangle in CSS We will be doing exactly the same here Add the following code to your style css file google logo before content z index position absolute top right px transform translateY width px height px background color f Final LogoIf you view your index html file in a browser you should see the completed Google Logo Let s ConnectThanks for reading my article today You can get the source code here If you like my content please consider buying me a coffee 2023-01-05 16:08:34
海外TECH DEV Community My GitHub Contribution History (2014-2023) https://dev.to/this-is-learning/my-github-contribution-history-2014-2023-1ebh My GitHub Contribution History Green squares on GitHub aren t just a mere activity indicator Move a step back and look at the bigger picture they tell a story your story This post will be slightly different from the usual as it s not technical but rather more personal I saw on Twitter that everyone was sharing their GitHub contribution chart on one image with a simple tool probably because it was shared by the official GitHub account and retweeted by Kent C Dodds Funnily enough this tool isn t new but it s been there since and you can find it at So why not I decided to give it a try and I generated my contribution chart from when I created my GitHub account to today Even if I don t have a long and intense career yet I immediately realized that those green squares how they re grouped and positioned meant a lot to me They were depicting my career so far in an image I took some time to look at the picture and a lot of great memories came to my mind so I decided to switch on my webcam and record my thoughts I hope somehow in an inspiring way In the above image I can see some milestones such as My time at the universityThe game development experienceQuitting my job to find the amazing company I work for todayThe accepted Pull Requests on vscode and many more If you re curious the outcome is as uploaded on my YouTube channel where I usually talk about Open Source so here s the video Let me also invite you to try out the tool and take a moment to look at your own chart I m sure it will tell a lot about you so many great memories lie among those green squares Feel free to write in a comment what a particular square or cluster means to you Thanks for reading this article I hope you found it interesting I recently launched my Discord server to talk about Open Source and Web Development feel free to join Do you like my content You might consider subscribing to my YouTube channel You can find it here Feel free to follow me to get notified when new articles are out Leonardo MontiniFollow I talk about Open Source GitHub and Web Development I also run a YouTube channel called DevLeonardo see you there 2023-01-05 16:01:05
Apple AppleInsider - Frontpage News Victrola Stream Onyx plays vinyl through Sonos smart speakers https://appleinsider.com/articles/23/01/05/victrola-stream-onyx-plays-vinyl-through-sonos-smart-speakers?utm_medium=rss Victrola Stream Onyx plays vinyl through Sonos smart speakersAt the CES Victrola expanded its turntable catalog with the Stream Onyx able to pipe audio from records through Sonos speakers Victrola Stream OnyxA continuation from the existing Stream turntable lineup the second iteration Stream Onyx is an upgrade from the Victrola Stream Carbon in build materials Made from aluminum plastic and MDF the turntable has premium metal turntable components inside a low resonance plinth Read more 2023-01-05 17:00:09
Apple AppleInsider - Frontpage News New Twinkly Entertainment Hub will sync LED lights with videos https://appleinsider.com/articles/23/01/05/new-twinkly-entertainment-hub-will-sync-led-lights-with-videos?utm_medium=rss New Twinkly Entertainment Hub will sync LED lights with videosTwinkly s new Entertainment Hub will let entertainers gamers and others synchronize Twinkly lights with audio and video content The app will sync Twinkly s lights to on screen contentThe desktop app can provide an immersive experience to reflect on screen visuals alongside any form of audio into an LED light show As a result gamers streamers musicians and entertainers can benefit from the company s newest product Read more 2023-01-05 16:14:01
Apple AppleInsider - Frontpage News Weak November iPhone shipments not a big deal in the long run, says UBS https://appleinsider.com/articles/23/01/05/weak-november-iphone-shipments-not-a-big-deal-in-the-long-run-says-ubs?utm_medium=rss Weak November iPhone shipments not a big deal in the long run says UBSDespite a year over year iPhone shipment decline in November investment bank UBS is still bullish on Apple for the long term The iPhone Pro remains supply constrainedCovid lockdowns followed by subsequent protests and mass employee walkouts in a Zhengzhou iPhone plant has created an ongoing supply problem for Apple s iPhone lineup The iPhone Pro and iPhone Pro Max has been hit the hardest with weeks of shipment delays expected for current orders Read more 2023-01-05 16:08:40
Apple AppleInsider - Frontpage News IOGEAR announces new 4K multi-device keyboard & monitor switch https://appleinsider.com/articles/23/01/05/iogear-announces-new-4k-multi-device-keyboard-monitor-switch?utm_medium=rss IOGEAR announces new K multi device keyboard amp monitor switchAnother product that IOGEAR announced at CES is a new keyboard printer and mouse switch that suppors multiple displays and is designed for professional applications New KVMP from IOGEARMost multi monitor KVMs only provide a desktop extension from a single computer but IOGEAR s KVMP can offer extension and matrix modes to increase productivity While its extension model still expands the desktop to two screens the matrix mode allows people to see the contents from different sources on each screen Read more 2023-01-05 16:01:22
Apple AppleInsider - Frontpage News IOGEAR announces new USB-C docks to connect multiple external displays https://appleinsider.com/articles/23/01/05/iogear-announces-new-usb-c-docks-to-connect-multiple-external-displays?utm_medium=rss IOGEAR announces new USB C docks to connect multiple external displaysIOGEAR has announced several USB C docking stations at CES to help people connect accessories and monitors to their computers New docks from IOGEAR at CES The company announced a Dock Pro Universal Dual View Docking station the Dock Pro Duo USB C Docking Station and a Dock Pro USB K Triple View Each one offers unique ways to connect peripherals to computers Read more 2023-01-05 16:00:58
海外TECH Engadget Lenovo YogaBook 9i hands-on: A huge leap for dual-screen laptops https://www.engadget.com/lenovo-yoga-book-9-i-hands-on-ces-2023-a-huge-leap-for-dual-screen-laptops-160045296.html?src=rss Lenovo YogaBook i hands on A huge leap for dual screen laptopsWe ve seen a handful of companies attempt to make dual screen laptops a thing from Dell s Concept Duet back in to more recent systems like ASUS line of ZenBook Duo notebooks But with the YogaBook i at CES Lenovo is pushing the idea of a true two screen laptop further than ever before From the outside the YogaBook i doesn t look much different from a typical laptop But when you open it up you re greeted by two inch K OLED displays that dominates the inside of the device That means unlike ASUS rivals there s no room for a physical keyboard at least not on the body of the device However to support all sorts of setups and use cases Lenovo also provides a range of bundled accessories including a folding kickstand a detachable Bluetooth keyboard and a stylus And it s this combination of peripherals that really elevates the YogaBook i into something more than a simple clamshell When propped up on the kickstand you can position the laptop s displays in either side by side or stacked orientations which provides tons of vertical screen real estate or more traditional dual displays depending on your needs Then all you have to do is slap the BT keyboard down on a table and suddenly you have a device that s more like a portable all in one desktop Lenovo also has some software tricks to get the most out of the various display modes For example when the YogaBook i s screens are stacked on top of each you can tap five fingers against the screen to span a single window across both displays in what the company calls waterfall mode Alternatively when you want to move windows from one screen to another you can simply flick your finger to send an app up or down And similar to what we ve seen on the ThinkPad X Fold Lenovo has a variety of grid options so you can launch into dual triple or quadruple app layouts to maximize your multitasking Sam Rutherford EngadgetIn addition to standard handwriting and stylus support you can use the YogaBook s stylus to capture screenshots and then press a button to automatically embed it in a new OneNote file This makes the process of recording minutes or saving ideas from brainstorming sessions during meetings super simple And of course when space is a concern you can always use the YogaBook i in clamshell mode either by using an on screen virtual keyboard or simply dropping the BT keyboard on top of the lower display I also really appreciate some of the small add ons Lenovo included to support various typing layouts By pushing the keyboard back towards the screen both the physical or virtual keyboard via an eight finger swiping motion you can activate a virtual touchpad albeit a somewhat small one Or if you have an external mouse connected you can pull the keyboard forward to reveal a row of widgets for stuff like weather news and more Sam Rutherford EngadgetAs for specs the YogaBook i is well equipped with th gen Intel Core i CPUs up to GB of DDR RAM GB of storage and three USB C ports with Thunderbolt And despite being a relatively sleek system that measures just inches thick Lenovo managed to cram a large Whr battery inside That s important because those dual OLED displays are pretty power hungry with the company claiming the laptop will last around seven hours in dual screen mode or closer to hours when only using a single display Sam Rutherford EngadgetThat said I do have a few concerns First some of the gesture controls and stylus input weren t particularly responsive The YogaBook even blue screened a couple of times over the course of about an hour while I tested it But that s sort of to be expected when demoing pre production devices The bigger issue for me is that while I m optimistic about the future of dual screen laptops typing on a touchscreen is still a challenge I found that when I was in a groove I could type nearly as fast as I can on a traditional physical keyboard The problem is that when your fingers drift and they will typos start piling up in bunches and there s no good way of finding the home row again That means you often have to look down to check the position of your hands which is annoying for touch typists Sam Rutherford EngadgetFinally while I love that Lenovo puts the YogaBook s kickstand BT keyboard and stylus in the box for free I really think the kickstand should be built in to the device itself like it is on convertibles like a Surface Pro That s because even though the kickstand turns into a folding cover of sorts it feels like you spend a bit too much time keeping track of everything and practicing origami when moving between modes But in many respects this is what you get when a company explores an untested design And even with these concerns I m still incredibly excited to try out a final retail version of the YogaBook i when it comes out sometime in April for around 2023-01-05 16:00:45
海外TECH Engadget Lenovo's Smart Paper tablet is a $400 answer to the Kindle Scribe https://www.engadget.com/lenovo-smart-paper-e-ink-notepad-voice-notes-160035558.html?src=rss Lenovo x s Smart Paper tablet is a answer to the Kindle ScribeAlongside its regular slate of laptops and other gear Lenovo has announced an E Ink notepad at CES Smart Paper is a inch display with an anti glare screen The company says it s a lightweight device with GB of storage enough for pages of doodles and scrawls Smart Paper comes with a battery less stylus that can be stored in the case The Smart Paper Pen is designed to minimize lag with latency as low as milliseconds There are nine different pen settings such as pencil ballpoint and marker more than pressure sensitivity levels and tilt detection Smart Paper has dozens of notepad templates as well including a blank slate lined paper and music manuscript LenovoThere s the option to record voice notes thanks to the dual microphones Handily you can take notes while recording a meeting or lecture They ll be synced so you can select some text and hear that portion of the recording Don t worry too much about losing a note Smart Paper can convert your handwriting into text and you can use keyword searches to find what you re looking for You can delete and reorganize notes and place them into folders You ll be able to access millions of ebooks and search saved books and articles that are on your Smart Paper If you leave the notepad at home you ll still be able to access all your stuff thanks to the Smart Paper mobile and Windows PC app which supports cloud sync The app can translate text and audio recordings onto other languages as well Smart Paper seems like Lenovo s answer to Amazon s Kindle Scribe which debuted last year How they compare against each other in practice remains to be seen but at Smart Paper will be more expensive It should ship later this year Lenovo 2023-01-05 16:00:35
海外TECH Engadget Lenovo turns to 'AI' to optimize its 2023 gaming laptops https://www.engadget.com/lenovo-gaming-laptops-ces-2023-ai-chip-160033869.html?src=rss Lenovo turns to x AI x to optimize its gaming laptopsLenovo believes artificial intelligence will help differentiate its gaming laptops Four new models at CES include the Lenovo LA AI chip which the company says can dynamically adjust frame rates increase the maximum heat threshold and boost overall performance Additionally it s launching new gaming desktops across different price points The LA AI chip is in the new Legion Pro i and i the “i suffix denotes Intel variants gaming laptops Lenovo s AI Engine software uses the chip to deploy a “machine learning algorithm to tune system performance optimally The company says FPS monitoring higher thermal design power TDP and other tweaks boost performance and efficiency over previous generations Although until we get some hands on time it s unclear how big of a significant difference that will make The Intel powered Legion Pro i is the highest end model starting at Its AMD equivalent the Legion Pro won t be available in North America The maxed out versions of the i run on the latest th Gen Intel Core processors with NVIDIA s GeForce RTX Next Gen series Laptop GPUs The notebook has a inch QHD x display with a Hz refresh rate NVIDIA versions use Lenovo s ColdFront thermal management system including an extra wide vapor chamber covering the processor and graphics card Lower tier models use a dedicated CPU vapor chamber with hybrid heat piping instead Lenovo says the more advanced cooling system leads to zero throttling while totaling W of thermal design power Additionally a tricked out version uses a Whr battery the largest allowed on flights that also supports quick charging LenovoThe Legion Pro and i are slightly cheaper starting at for the AMD version with a Risen Series CPU and for Intel th gen Intel Core Lenovo pitches this tier as equally suitable for gaming or work and the machines include the new AI chip and ColdFront system The Pro series also maxes out with the latest NVIDIA laptop cards for graphics and its display is a inch WQXGA panel with up to a Hz refresh rate Lenovo also updated its gaming desktops The Legion Tower i is the highest end model starting at The PC uses th gen Intel processors NVIDIA graphics and up to GB of Mhz DDR RAM in the top shelf versions The company offers plenty of cooling options for the premium machine including a bigger VRM heatsink up to six ARGB fans and a liquid cooling system adding up to a W TDP The Tower i comes in configurations of up to TB storage three TB SSDs and W PSU Meanwhile the Tower i and Tower are the company s less expensive desktop machines The “i variant runs th gen Intel Core chips and next gen NVIDIA graphics while the standard Pro sticks with an AMD Risen series processor and either NVIDIA or Radeon RX graphics Both machines ship with up to GB Mhz DDR RAM and up to two TB SSDs Lenovo s new gaming hardware is scheduled to ship around springtime The Legion Pro i laptop kicks things off in March with the Pro i laptops and Tower i and i desktops following in April Finally the Tower desktop will launch slightly later in May 2023-01-05 16:00:33
海外科学 NYT > Science How a Nuclear Dump in Taiwan Created a Generation of Activists https://www.nytimes.com/2023/01/05/world/asia/lanyu-taiwan-nuclear-waste.html How a Nuclear Dump in Taiwan Created a Generation of ActivistsFor members of a Taiwanese tribe a waste site on their island serves as a painful reminder of the government s broken promises and a symbol of their long struggle for greater autonomy 2023-01-05 16:43:47
海外科学 NYT > Science CVS and Walgreens Plan to Offer Abortion Pills Where Abortion Is Legal https://www.nytimes.com/2023/01/05/health/abortion-pills-cvs-walgreens.html CVS and Walgreens Plan to Offer Abortion Pills Where Abortion Is LegalThe two chains said they would begin the certification process under a new F D A regulation that will allow retail pharmacies to dispense the prescription pills for the first time 2023-01-05 16:44:49
金融 RSS FILE - 日本証券業協会 第12回日本証券サミット(ニューヨーク) https://www.jsda.or.jp/about/international/20230104161801.html 証券 2023-01-05 16:30:00
ニュース BBC News - Home Employers could sue unions under planned anti-strike laws https://www.bbc.co.uk/news/uk-politics-64173772?at_medium=RSS&at_campaign=KARANGA minimum 2023-01-05 16:31:59
ニュース BBC News - Home Ukraine war: Putin orders 36-hour ceasefire over Orthodox Christmas https://www.bbc.co.uk/news/world-64178912?at_medium=RSS&at_campaign=KARANGA ukraine 2023-01-05 16:50:14
ニュース BBC News - Home Who is striking? How Friday 6 January's walkouts will affect you https://www.bbc.co.uk/news/business-64174086?at_medium=RSS&at_campaign=KARANGA conway 2023-01-05 16:30:50
ニュース BBC News - Home Six women arrested after boy, one, dies at Dudley nursery https://www.bbc.co.uk/news/uk-england-birmingham-64178388?at_medium=RSS&at_campaign=KARANGA manslaughter 2023-01-05 16:38:16
ニュース BBC News - Home Carole Packman murder: Russell Causley to be released from prison https://www.bbc.co.uk/news/uk-england-dorset-64179428?at_medium=RSS&at_campaign=KARANGA carole 2023-01-05 16:53:27
ニュース BBC News - Home Evacuations ordered in California as massive storm slams into coast https://www.bbc.co.uk/news/world-us-canada-64169954?at_medium=RSS&at_campaign=KARANGA outages 2023-01-05 16:47:17
ニュース BBC News - Home Strike rules: What are they and who is allowed to strike? https://www.bbc.co.uk/news/business-61950028?at_medium=RSS&at_campaign=KARANGA member 2023-01-05 16:46:02
ニュース BBC News - Home England midfielder Nobbs joins Villa from Arsenal https://www.bbc.co.uk/sport/football/64172965?at_medium=RSS&at_campaign=KARANGA aston 2023-01-05 16:48:47
北海道 北海道新聞 ロ大統領36時間停戦命じる 6日からの正教クリスマス https://www.hokkaido-np.co.jp/article/784000/ 正教 2023-01-06 01:38:07
北海道 北海道新聞 ササラ電車の絵本人気 札幌のイラストレーター、色鉛筆で柔らか描写 https://www.hokkaido-np.co.jp/article/783961/ 路面電車 2023-01-06 01:26:02
北海道 北海道新聞 極寒に街ゆがむ 十勝管内で蜃気楼 https://www.hokkaido-np.co.jp/article/783981/ 冷え込み 2023-01-06 01:24:14
Azure Azure の更新情報 General Availability: Azure Sphere support for European Data Boundary https://azure.microsoft.com/ja-jp/updates/general-availability-azure-sphere-support-for-european-data-boundary/ processing 2023-01-05 17:00:05
GCP Cloud Blog Best Kept Security Secrets: How VPC Service Controls can help build defense in depth https://cloud.google.com/blog/products/identity-security/vpc-service-controls-add-a-robust-security-layer/ Best Kept Security Secrets How VPC Service Controls can help build defense in depthWhile cloud security skeptics might believe that data in the cloud is just one access configuration mistake away from a breach the reality is that a well designed set of defense in depth controls can help minimize the risk of configuration mistakes and other security issues Our Virtual Private Cloud VPC Service Controls can play a vital role in creating an additional layer of security while also making it easier to manage your data in a way that most cloud services can t do today Organizations across industries and business models use cloud services for activities such as processing their data performing analytics and deploying systems VPC Service Controls can empower an organization when deciding how users and data can cross the perimeter of the supported cloud services if at all While VPC Service Controls are designed to help stop attackers they can also enable contextual trusted data sharing similar to how Zero Trust allows contextual access aside block StructValue u title u Hear monthly from our Cloud CISO in your inbox u body lt wagtail wagtailcore rich text RichText object at xeab gt u btn text u Subscribe today u href u utm medium blog amp utm campaign FY Cloud CISO Perspectives newsletter blog embed CTA amp utm content amp utm term u image None What are VPC Service ControlsVPC Service Controls help administrators define a security perimeter around Google managed services which can control communication to and between those services The Service Controls isolate your Google Cloud resources from unauthorized networks including the internet For example this can help you keep a clear separation between services that are allowed to run in production and services that are not VPC Service Controls can help you prevent mistakes that lead to costly data breaches because they control access to your data at a granular level They add context aware access controls on these services and can help you achieve your organization s Zero Trust access goals Example of the fine grained policies based on access context that can be implemented with VPC Service Controls Like wearing two layers of clothing made from different fabrics to protect you from winter weather VPC Service Controls may appear similar to Identity and Access Management IAM but they come from a different approach to implementing security IAM enables granular identity based access control VPC Service Controls create a security perimeter that protects your cloud resources and sets up private connectivity to Google Cloud s APIs and services While it s recommended to use both VPC Service Controls have an added bonus They can support blocking data theft during a breach  The additional layer of security that VPC Service Controls offer customers is challenging to achieve with on premise systems or even with other cloud providers You can think of it as an firewall for APIs that also adds a logical security control around three paths that data can take  From the public internet to your resourcesInside your VPC and the cloud service perimeterFor service to service communication for example denying access to someone who wants to load data to BigQuery or exfiltrate data from a BigQuery instance How VPC Service Controls can help stop attackersVPC Service Controls are used to enforce a security perimeter They can help isolate resources of multi tenant Google Cloud services which can help reduce the risk of data exfiltration or a data breach For example a bank that migrated financial data processing to Google Cloud can use VPC Service Controls to isolate their processing pipeline from public access or any unauthorized access by defining a trusted service perimeter How VPC Service Controls can enable trusted sharingVPC Service Controls are used to securely share data across service perimeters with full control over what resource can connect to other resources or outside the perimeter This can help mitigate data exfiltration risks stemming from stolen identities IAM policy misconfigurations some insider threats and compromised virtual machines Returning to our bank example that same bank using VPC Service Controls may securely share or access data across Service Perimeters and Organizations They may allow access to specific partners and for specific operations Example of allowing an authorized device plus authorized access How VPC Service Controls support Zero Trust accessVPC Service Controls deliver Zero Trust access to multi tenant Google Cloud services Clients can restrict access to authorized IPs client context user identity and device parameters while connecting to multi tenant services from the internet and other services A bank can use moving its services to the public cloud as an opportunity to abandon outdated access management approaches and adopt Zero Trust access VPC Service Controls let them create granular access control policies in Access Context Manager based on attributes such as user location and IP address For example it would allow an analyst to only access Big Query from a corporate device on the corporate network during business hours  These policies can help ensure the appropriate security controls are in place when granting access to cloud resources from the Internet  Next steps with VPCCheck out these pages to learn more about VPC Service Controls for your sensitive cloud deployments especially for regulated workloads This blog is the third in our Best Kept Security Secrets series which includes how to tap into the power of Organization Policy Service and how Cloud EKM can help resolve the cloud trust paradox Related ArticleBest kept security secrets How Cloud EKM can help resolve the cloud trust paradoxThe evolution of cloud computing has led organizations to want even more control over their data and more transparency from their cloud s Read Article 2023-01-05 17:00: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件)