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

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS AWS Partner Network (APN) Blog Drug Analyzer on AWS Provides Analytics That Inform Treatment Decisions and Support New Therapies https://aws.amazon.com/blogs/apn/drug-analyzer-on-aws-provides-analytics-that-inform-treatment-decisions-and-support-new-therapies/ Drug Analyzer on AWS Provides Analytics That Inform Treatment Decisions and Support New TherapiesChange Healthcare collaborated with the innovation teams at AWS to develop Drug Analyzer a commercial launch application powered by AWS The application is built on Change Healthcare s Data Science as a Service DSaaS platform a security enabled analytic cloud service that enables persistent compliance monitoring and highly customizable analytics capabilities Drug Analyzer provides life sciences organizations with data insights that inform treatment decisions and support the development of new therapies 2023-06-05 16:29:28
AWS AWS Media Blog Opportunity Analysis gives new insight into the quality of a shot https://aws.amazon.com/blogs/media/opportunity-analysis-gives-new-insight-into-the-quality-of-a-shot/ Opportunity Analysis gives new insight into the quality of a shotThis brand new analytic part of National Hockey League NHL EDGE IQ powered by Amazon Web Services AWS uses a novel machine learning ML model that analyzes millions of historical and real time data points to show fans how difficult a shot was at the moment of release calculated just seconds after the play nbsp Imagine you re … 2023-06-05 16:51:52
Ruby Rubyタグが付けられた新着投稿 - Qiita railsを使ってアプリを作る 編集 https://qiita.com/toma1monji/items/3ed1869c18463c9d063e postspostid 2023-06-06 01:43:47
Ruby Rubyタグが付けられた新着投稿 - Qiita プログラミング初心者が2ヶ月でRuby Silverに合格した話 https://qiita.com/kumaryoya/items/2de137a10afe6fd74e85 silver 2023-06-06 01:28:30
海外TECH Ars Technica New DirectX 12-to-Metal translation could bring a world of Windows games to macOS https://arstechnica.com/?p=1944395 announces 2023-06-05 16:19:43
海外TECH MakeUseOf How to Create a Shaky Camera Effect in Adobe Premiere Pro https://www.makeuseof.com/adobe-premiere-pro-shaky-camera-effect-how-to/ adobe 2023-06-05 16:45:17
海外TECH MakeUseOf How to View and Clear the Windows 10 Activity History https://www.makeuseof.com/tag/view-delete-windows-10-activity-history/ history 2023-06-05 16:15:17
海外TECH DEV Community Deploy an ERC-721 Contract on Linea using Infura and Truffle Introduction https://dev.to/mbogan/deploy-an-erc-721-contract-on-linea-using-infura-and-truffle-introduction-c0j Deploy an ERC Contract on Linea using Infura and Truffle IntroductionEthereum has a well known problem Transactions are slow expensive and don t scale well Ls layer twos are a new generation of blockchains built on top of Ethereum to solve this problem Among these new layer two solutions Linea a zero knowledge rollup or zk rollup is one of the most promising In this article we ll look at Linea and why it could be the future of Ls We ll walk through a tutorial that creates and deploys a smart contract to Linea And we ll do so by using all the industry standard tools you probably already know for building on the Ethereum network Infura MetaMask Solidity OpenZeppelin and Truffle Let s get started Linea A leading zkEVMzkEVMs are one the most talked about technologies in web They solve many of the most critical problems of public blockchains cost speed and scalability zkEVMs do so by using a clever piece of cryptography and scaling technology known as the ZK rollup ZK rollups use zero knowledge proofs to allow for higher throughput and lower costs by moving heavy computations off chain in a manner that is secure and easily verifiable What makes zkEVMs especially exciting is that they are EVM compatible by default This means you can use all the tools contracts and libraries created for Ethereum to work on zkEVMs as well with little to no modification These features of low cost high speeds and easy use make zkEVMs the web technology to master in Linea is a zkEVM that is developer first meaning it was built with native integrations to existing tools If you know the common Ethereum developer tools MetaMask Solidity Infura Truffle etc then you already know how to work with Linea Let s walk through how to create and deploy a smart contract on Linea Deploy a Contract on Linea Step Install a Wallet and acquire lineaETHIn order to deploy contracts to Linea we will need to sign off on transactions and pay for gas fees To do so we will require a crypto wallet that is capable of holding the gas currency MetaMask is the most popular self custodial wallet solution available in the market today It is free safe and easy to use You can download MetaMask as an extension for your browser If this is your first time using MetaMask it will prompt you through a series of steps to set up your wallet Toward the end MetaMask will give you the option to secure your wallet Make sure you do that and save your wallet s secret recovery phrase We will need this in a future step On the top right of your MetaMask window click on the Network dropdown and toggle Show Hide test networks Once you ve chosen to view test networks you should see Linea Goerli in the dropdown This is the test network for Linea we ll use the testnet instead of the mainnetーwhich isn t yet live as of the time of this articleーso that we don t have to spend real funds on our transaction fees As you may have already guessed MetaMask comes automatically configured with the Linea testnet We don t have to do any additional configuration If this is your first time using Linea you ll see a balance of lineaETH Let s change this by acquiring some free ETH from the Linea Faucet Once you have your lineaETH you should see a balance that looks something like this Step Acquire an Infura Linea RPC endpointIn order to deploy contracts to Linea we need an RPC endpoint Recently Infura added support for Linea so by creating a free account with Infura we ll automatically get access to Linea RPC endpoints After creating an Infura account create a new API key from the dashboard For network choose Web API You can name the project anything you like Once you ve created a key you will be navigated to the project s dashboard which contains a section named Endpoints Here you will find an RPC for Linea It will be of the form lt gt Keep this URL safe We ll need this in a future step Step Install NPM and NodeIn order to create a Truffle project we need NPM and Node on our local machine You can download both for free Once you ve done so check that they ve been properly configured by running the commands below If all goes well you should see a version number output for each command node v npm v Step Create a Truffle projectAfter installing NPM and Node we re ready to create a Truffle project and install all necessary packages and libraries We will run a series of commands on the Terminal that will do the following things in sequence Create an empty node repositoryInstall TruffleInitialize a bare bones Truffle projectInstall necessary packages such as dotenv openzeppelin and HD wallet provider mkdir linea nft amp amp cd linea nft npm init y npm install g truffle truffle init npm install openzeppelin contracts truffle hdwallet provider dotenvIn step we install OpenZeppelin to get access to base implementations of the ERC standard that powers non fungible tokens or NFTs Dotenv is a package that helps with secret management It will ensure that sensitive information such as our wallet s recovery phrase is not exposed publicly Finally HD wallet provider is a handy package that will allow us to integrate our MetaMask wallet into our Truffle project and pay for gas sign transactions seamlessly Step Configure the Truffle projectBefore we start writing our contract let s configure our project to make sure it can use the MetaMask wallet we set up in an earlier step and also make requests to the Linea testnet using the Infura RPC In the root folder of the project create a new file called env and add the following contents MNEMONIC lt YOUR METAMASK WALLET RECOVERY PHRASE gt INFURA RPC “ lt INFURA LINEA RPC URL gt This is information that we don t want to be exposed publicly The dotenv package will ensure this is the case with the aforementioned file Let s now import these values into truffle config js and configure it to work with Linea require dotenv config const HDWalletProvider require truffle hdwallet provider const MNEMONIC INFURA RPC process env module exports networks development host port network id linea provider gt new HDWalletProvider MNEMONIC INFURA RPC network id compilers solc version Step Create the contractWe re now in a great place to write our contract Our contract is extremely simple When deployed it mints a single NFT and assigns ownership to the wallet that deploys the contract Our NFT will require some metadata to be associated with it For the sake of this tutorial we ll use the following metadata that represents a cute panda ipfs QmUyZoKqbYknXGfDBRTYvMqPbBsjUiLEnyrZRHere s what you ll see when you view the NFT in a wallet or marketplace that supports Linea NFTs Feel free to replace this with NFT metadata of your choice If you re interested in understanding how to format NFT metadata check out the documentation In your project s contracts folder create a new Solidity file called LineaNft sol and add the following code SPDX License Identifier MITpragma solidity import openzeppelin contracts token ERC extensions ERCURIStorage sol import openzeppelin contracts utils Counters sol contract LineaNft is ERCURIStorage using Counters for Counters Counter Counters Counter private tokenIds string private metadataUrl constructor ERC Linea NFT LNFT Set metadata of the NFT metadataUrl ipfs QmUyZoKqbYknXGfDBRTYvMqPbBsjUiLEnyrZR Mint NFT mintNFT function mintNFT private tokenIds increment uint newItemId tokenIds current mint msg sender newItemId setTokenURI newItemId metadataUrl Let s make sure everything is working by compiling our contract truffle compile Step Deploy the Contract to Linea TestnetAfter compiling our contract and configuring our Truffle project we re ready to write a deployment script that launches our contract on the Linea testnet In the migrations folder of your project create a new file called deploy contract js and add the following code Get instance of the Linea NFT contractconst lineaNftContract artifacts require LineaNft module exports function deployer Deploy the contract to Linea deployer deploy lineaNftContract We re all set Deploy the contract to Linea and mint an NFT by running the following single command truffle migrate network lineaIf all goes well you should see an output that looks something like this Starting migrations gt Network name linea gt Network id gt Block gas limit xac deploy contract js Deploying LineaNft gt transaction hash xcbeeedfacebabcddfc gt Blocks Seconds gt contract address xDBAFfFcaaeEdECAA gt block number gt block timestamp gt account xcFcbFaccCdACEeE gt balance gt gas used xf gt gas price gwei gt value sent ETH gt total cost ETH gt Saving artifacts gt Total cost ETHSummary gt Total deployments gt Final cost ETH Step Check out contract on Linea Block ExplorerWe can check out our contract on the Linea Block Explorer All you have to do is search for your contract s address Once you ve done that you should be able to see details about your contract including NFT name symbol transaction data etc You can check out the contract I deployed when creating this project here ConclusionCongratulations You ve successfully deployed an ERC contract to Linea If you have experience building on the Ethereum blockchain and other EVM compatible blockchains you probably noticed that what we did in this tutorial was identical to what you would ve done in your normal workflow You can access Linea s speed low transaction costs and security with your current skill set If you can build on Ethereum you can build on Linea To learn more about Linea and start building dapps check out the documentation 2023-06-05 16:57:17
海外TECH DEV Community Interactive E-Com UI: Animated Free Shipping Bar https://dev.to/codesphere/interactive-e-com-ui-animated-free-shipping-bar-156o Interactive E Com UI Animated Free Shipping BarIn this article the first in our Interactive E commerce UI series we aim to create a small animated progress bar using Framer Motion This progress bar intended for use in the shopping cart summary will inform the user about how much more they need to spend to qualify for free shipping and will celebrate their achievement when they reach this goal by displaying a Lottie animation As an e commerce store owner implementing this the main aim for our free shipping bar is to increase the average order value AOV and encourage users to proceed to checkout Setting the sceneIn the past few years animations and microinteractions have grown increasingly popular in web applications This trend which initially emerged in native mobile apps is gradually finding its place in web applications designed for browser display Despite the rising use of microinteractions strategic implementation often falls short Developers often integrate these features for their aesthetic appeal failing to recognize their potential in guiding user attention and influencing user behavior For our animated free shipping bar cart we re capitalizing on two familiar behavioral patterns UnlockingIf there is a possibility to reach something previously inaccessible people try to gain access to it so that they can benefit from it This principle can be used to make something more attractive CheeringIt is motivating to receive positive feedback already during a task and to see that everything was done correctly These patterns form the basis of our design If we were to test this in a real world scenario we could use these patterns to formulate an informed hypothesis about whether the free shipping bar effectively boosts our AOV and reduces the bounce rate from the cart to checkout ImplementationTo implement this we ll be working with the standard Shopify Hydrogen Demo Store Hydrogen is Shopify s React based headless commerce stack which supports Framer Motion a React library for animation and motion In our case we first installed the Shopify Hydrogen Template by following the Documentation You can obviously skip this step if youre implementing the free shipping bar into your own store that might be running on a different platform Shopify Hydrogen comes with Framer Motion out of the box if you are implementing this in another system architecture that does not have this you should start with installing your dependancies first by running npm install framer motion lottie react Creating the Free Shipping Bar ComponentWith the dependencies installed let s create a new component for our free shipping bar In this component we ll use motion from Framer Motion to animate the width of the free shipping bar and AnimatePresence to manage the presence of the Lottie animation First import the necessary libraries and components We ll use motion and AnimatePresence from Framer Motion for the free shipping bar animation and the Lottie animation We also import the Lottie component from the lottie react package and a JSON file containing the confetti animation data import React from react import motion AnimatePresence from framer motion import Lottie from lottie react import ConfettiAnimation from public assets confetti cannons json Next define the ProgressBar component It receives a price prop which is used to calculate the progress of the bar and the message displayed above the bar The freeShippingThreshold is defined as This is the threshold that we want our price to reach Admittedly this is a very high threshold for free shipping Since we were using the standard Hydrogen setup which features a snowboard store with pretty high prices we adjusted it accordingly for this example Adjust this value as per your requirements The progress is calculated as a percentage of the price compared to the free shipping threshold If the progress exceeds we cap it at const ProgressBar React FC lt ProgressBarProps gt price gt Define the threshold for free shipping const freeShippingThreshold Calculate the progress as a percentage let progress price freeShippingThreshold Ensure the progress doesn t exceed if progress gt progress Next we calculate the remaining amount needed for free shipping and define the message that will be displayed above the free shipping bar Calculate the remaining amount for free shipping const remaining freeShippingThreshold price Determine the message to display above the free shipping bar const message progress Free shipping unlocked You re missing remaining toFixed for free shipping Finally we return the TSX for our component We use the motion div component to create an animated div that changes its width and background color based on the progress We also use AnimatePresence to conditionally render the Lottie animation when the progress reaches return lt div className overflow hidden bg transparent gt Display the progress bar lt div className overflow hidden h w full border border gray rounded md gt lt motion div className h full rounded md animate width progress Change the background colorcolor based on the progress backgroundColor progress lightblue lightgrey transition duration ease easeOut gt lt div gt Display the message lt p className mb text center text sm mt gt message lt p gt Display the Lottie animation when progress is lt AnimatePresence gt progress amp amp lt Lottie className absolute bottom left pointer events none animationData ConfettiAnimation loop false autoplay gt lt AnimatePresence gt lt div gt export default ProgressBar To sum up In the returned TSX we create a container div with a free shipping bar and a message The bar is a motion div whose width and background color are animated based on the progress value The message is a paragraph that displays the message variable we defined earlier We also use the AnimatePresence component to conditionally render a Lottie animation when the progress reaches This animation is an SVG animation that plays once and does not loop It is positioned at the bottom left of the screen and does not interfere with pointer events thanks to the pointer events none class This leaves us with this code for our Free Shipping Bar component import React from react import motion AnimatePresence from framer motion import Lottie from lottie react import ConfettiAnimation from public assets confetti cannons json interface ProgressBarProps price number const ProgressBar React FC lt ProgressBarProps gt price gt Define the threshold for free shipping const freeShippingThreshold Calculate the progress as a percentage let progress price freeShippingThreshold Ensure the progress doesn t exceed if progress gt progress Calculate the remaining amount for free shipping const remaining freeShippingThreshold price Determine the message to display above the progress bar const message progress Free shipping unlocked You re missing remaining toFixed for free shipping return lt div className overflow hidden bg transparent gt Display the message lt div className overflow hidden h w full border border gray rounded md gt lt motion div className h full rounded md animate width progress Change the background color based on the progress backgroundColor progress lightblue lightgrey transition duration ease easeOut gt lt div gt lt p className mb text center text sm mt gt message lt p gt Display the Lottie animation when progress is lt AnimatePresence gt progress amp amp lt Lottie className absolute bottom left pointer events none animationData ConfettiAnimation loop false autoplay gt lt AnimatePresence gt lt div gt export default ProgressBar The shipping bar component can now be used as a component simply by importing it into the desired file and placing it where you d like it to appear In our case it s in the CartSummary function of the Cart tsx file under the summary elements We then pass in the total amount currently in the cart to render the free shipping bar accordingly function CartSummary cost layout children null children React ReactNode cost CartCost layout Layouts const summary drawer grid gap p border t md px page sticky top nav grid gap p md px md translate y bg primary rounded w full Retrieve the totalAmount from the cost object convert it to a floating point number and assign it to totalAmount If cost totalAmount or amount is not defined default to const totalAmount parseFloat cost totalAmount amount return lt section aria labelledby summary heading overflow hidden className summary layout gt lt h id summary heading className sr only gt Order summary lt h gt lt dl className grid gt lt div className flex items center justify between font medium gt lt Text as dt gt Subtotal lt Text gt lt Text as dd data test subtotal gt cost subtotalAmount amount lt Money data cost subtotalAmount gt lt Text gt lt div gt lt dl gt children lt div gt lt ProgressBar price totalAmount gt Use the ProgressBar component here lt div gt lt section gt Wrapping UpIn conclusion an animated free shipping bar cart designed with principles of unlocking and cheering can greatly enhance user experience in e commerce stores Not only does it provide a visually engaging element it also subtly influences customer behavior guiding them towards actions beneficial to the store such as increasing average order value and decreasing bounce rates By utilizing technologies like Shopify s Hydrogen Framer Motion for animations and the lottie react package for celebratory effects we re able to create an attractive responsive and interactive UI that appeals to modern customers Remember while our example used a specific stack and setup these principles can be adapted to your unique e commerce platform Stay tuned for more articles in our Interactive E commerce UI series where we ll continue exploring exciting ways to enrich your digital storefront s user experience 2023-06-05 16:38:53
海外TECH DEV Community 100 DAYS- DAY 2 https://dev.to/pahujanayan/100-days-day-2-11g DAYS DAY Hello to anyone reading this I am still relatively new to coding and this platform as well so please feel free to drop any corrections advice for me I am trying to do the Day Challenge of consistent coding and this is Day The goal is simple I will solve one or more than one leetcode gfg problem a day and post what I learnt I am confident that this will help me improve my concepts and help me be more consistent in my practice Looking forward to a positive interaction with all of you DAY PROBLEM Given an m x n integer matrix matrix if an element is set its entire row and column to s You must do it in place Example Input matrix Output Intuition On the first look The question seems pretty straightforward For every in the original matrix at their place set their rows and columns to The brute force approach would be to make a copy of matrix Then traverse the original matrix and for every s index We change the rows and columns of the new matrix we made But that would take O m n space but the question and constraints demand us to solve the problem in less space than this So we are going to have to look at another approach An approach I thought initially is to make a vector of pair to store the indexes of s and then make changes in the original vector Let s understand by looking at the example We first using two for loops traverse the whole matrix We find a at so we store it in our vector Now that we have the indexes of all s in the original matrix we traverse the vector to set rows and columns Code class Solution public void setZeroes vector lt vector lt int gt gt amp matrix int rows matrix size int cols matrix size vector lt pair lt int int gt gt vec stores indexes of all s for int i i lt rows i for int j j lt cols j if matrix i j vec push back i j for int k k lt vec size k for int l l lt matrix size l matrix vec k first l for int l l lt matrix size l matrix l vec k second Time Complexity O m n Worst Case Space Complexity O n Although this approach is good We can give it a tweak to do it in place and yet not compromise any time complexity Optimal Solution For the optimal solution We are going to assume the top row and leftmost column as the dummy arrays for rows and columns index Just like we stored the index in the past we will just be changing the rows and cols index of the dummy array to Here is the optimized code class Solution public void setZeroes vector lt vector lt int gt gt amp matrix int colFlag int rows matrix size int cols matrix size for int i i lt rows i for int j j lt cols j if matrix i j matrix i if j matrix j else colFlag for int i i lt rows i for int j j lt cols j if matrix i matrix j matrix i j if matrix for int j j lt cols j matrix j if colFlag for int i i lt rows i matrix i I will be providing a detailed explanation of this soon 2023-06-05 16:26:51
海外TECH DEV Community Lookup disk properties on linux https://dev.to/yugabyte/lookup-disk-properties-on-linux-12p0 Lookup disk properties on linuxWhen using linux systems there sometimes is a need to understand the exact disk properties One reason is to be able to understand IO read and write size and how it affects latency Linux uses buffered IO by default That means that any read or write request will use the cache The cache in linux is completely automatic essentially consisting of non allocated memory However in most cases buffered IO will also require memory when there is memory shortage To understand which block device a filesystem is using use the lsblk command lsblkNAME MAJ MIN RM SIZE RO TYPE MOUNTPOINTsda G disk├ーsda G part boot└ーsda G part ├ーalmalinux root G lvm └ーalmalinux swap G lvm SWAP In this case the lsblk command tells me I got one disk sda with two partitions sda and sda The disk here therefore is sda The disk exposes a lot of its properties via sys block lt DISK gt queue such as The disk maximum IO size max hw sectors kb readonly The disk current maximum IO size max sectors kb read write The disk IO queue size nr requests read write The disk read ahead size read ahead kb read write The scheduler for the disk scheduler read write Is the disk set as considered to be on a rotating disk rotational readonly Is the disk set as considered to be on dax writeable persistent memory dax readonly 2023-06-05 16:21:51
海外TECH DEV Community Dicas para criar projetos front-end melhores e mais rápido - Parte 1 https://dev.to/marcelluscaio/dicas-para-criar-projetos-front-end-melhores-e-mais-rapido-parte-1-5213 Dicas para criar projetos front end melhores e mais rápido Parte Quando estamos aprendendo a programar a gente se acostuma a seguir tutoriais O instrutor faz a gente segue tin tin por tin tin a coisa quase sempre funciona o mundo élindo e os passarinhos cantam Aía gente vai fazer nosso primeiro projeto por conta própria ou segundo ou terceiro e bate aquela sensação E agora O que eu faço Por onde começo Eu passei por essa situação bem mais de três vezes cara leitora caro leitor Com o tempo fui reunindo alguns hábitos e práticas que me ajudam a ter maior controle e eficiência nos projetos em que trabalho Reuni neste artigo algumas dessas dicas conselhos que vão aumentar sua produtividade a qualidade do seu código além de te ajudar a ter mais segurança na hora de começar novos projetos Ébom logo tirar uma coisa do nosso caminho não existe maneira certa de fazer esse tipo de coisa apenas maneiras não erradas Essas práticas me ajudam e pode ser que algumas dessas coisas não funcionem para você Ficarei feliz em ler todos os feedbacks e experiências o campo de comentários estáaberto Educados comentam PlanejamentoA primeira coisa a se fazer para escrever um bom código é não abra o seu editor de código favorito agora Éisso mesmo que vocêleu Deixa para abrir o VS Code daqui a pouco A gente começa planejando E para isso vamos abrir o leiaute que vamos construir Com sorte vocêrecebeu um arquivo de referência criado por uma um designer Com mais sorte ainda a o designer teve tempo de ser meticulosa o e todos os elementos do leiaute seguem uma lógica os espaçamentos respiros tamanhos de fontes tudo tem alguma coerência interna Mas no mundo real estamos todos trabalhando com prazos apertados e algumas coisas podem passar batidas Énosso trabalho interpretar aquele arquivo entender qual era a intenção de quem criou perguntar quando houver dúvidas e sugerir alterações Com o leiaute aberto vocêvai prestar atenção nos seguintes pontos a Existe um guia de estilo Aqui éa hora de construir o nosso guia de estilos no CSS Vamos olhar para o leiaute e nos perguntar Quais são as cores utilizadas Quais são as fontes utilizadas família tamanho peso Eu costumo fazer isso criando propriedades personalizadas no CSS CSS Custom Properties que muitas vezes chamamos de variáveis CSS Nas Custom Properties eu defino todas as cores do projeto font family font weight e font size Assim alguns tipos de mudanças podem ser feitas no guia de estilo do projeto sem precisar acessar cada ocorrência daquela propriedade O resultado fica algo mais ou menos assim root color main FF color secondary FF ff arial Arial sans serif fw fw fs px fs px Não reparem na escolha de fontes e cores O que quero demonstrar aqui éque nosso guia de estilos vai estar definido nessas variáveis e pode ser acessado e modificado com facilidade pois a fonte daquela informação estáem apenas um lugar Um exemplo do que poderia acontecer digamos que a empresa foi comprada por outra que reformula a identidade visual mudando as cores da marca Em vez de correr atrás de todas as ocorrências de cores podemos apenas alterar no nosso guia de estilos root color main FFFF color secondary FFFF ff arial Arial sans serif fw fw fs px fs px Assim as mudanças serão replicadas onde quer que eu tenha colocado as Custom Properties color main e color secondary b Qual o alinhamento Existe uma linha de grade O alinhamento éum dos principais responsáveis por orientar a leitura do usuário Alinhamento éaquela linha invisível que passa pelas extremidades do conteúdo do site A ponta esquerda do conteúdo do seu header éuma das linhas de grade do seu site Um site com alinhamento coerente e intuitivo melhora muito a experiência do usuário Por isso éimportante que vocêtenha clareza no início do projeto quantas larguras diferentes de seção vai haver no site Aqui temos um exemplo de um site desalinhado Criei as bordas laterais para que a gente possa ver como não existe padrão nenhum no alinhamento Olha sócomo fica bem melhor com um alinhamento feito com mais cuidado Quando estamos começando fazemos o alinhamento caso a caso seção a seção O que acaba acontecendo seguimos critérios diferentes a cada vez que fazemos Uma hora definimos a width da seção com px depois com mais na frente fazemos usando padding Isso faz com que a gente não tenha clareza de qual éo tamanho que cada tipo de seção do site deve ter E se isso não estáclaro na sua cabeça enquanto vocêestáprogramando isso não vai estar claro no seu código nem vai estar claro na tela Para fazer esse trabalho a gente usa os containers A gente ouve essa palavra vêem códigos de cursos mas muitas vezes não paramos para pensar qual a finalidade desse tal de container O papel de um container é conter um determinado conteúdo Tá tá vou dar uma definição menos óbvia O container éresponsável por definir a largura máxima dos elementos que estão dentro dele Se temos dois conteúdos distintos com a mesma largura e alinhados ao centro podemos ter quase certeza que esses conteúdos estão alinhados Digo quase porque podemos quebrar esse alinhamento colocando padding no container por exemplo estragando o alinhamento que o container estava tentando criar Háduas técnicas para a criação de um container Uma usa width e a outra usa padding lateral Elas tem suas vantagens e desvantagens e vou explorar isso mais a fundo em um artigo em breve “Tá Caio mas e se eu tiver várias larguras diferentes Pode ser o caso de vocêconversar com o designer para entender melhor as linhas de grade do projeto Pode ser que determinada seção possa aumentar um pouco outra possa diminuir e vocês consigam uniformizar um pouco as linhas de grade Nos seus projetos pessoais comece usando um tamanho sóde container Depois aumente para dois Isso vai te dar uma clareza maior e treinar seu olhar para identificar conteúdos desalinhados Naquele exemplo do caio chella projeto criado durante o Challenge Front End da Alura que aconteceu em março de eu estruturei da seguinte maneira root container width container width var container width margin inline auto Dessa forma eu estabeleci uma mesma largura para todos os meus containers e na classe container eu aplico essa largura além de alinhar ao centro com a propriedade margin inline Se quiser conferir o projeto dáum pulo no meu github c Háelementos gráficos repetidos O cérebro humano evoluiu para reconhecer padrões E que sensação gostosa quando nós identificamos um Essa sensação boa que a familiaridade traz estáchumbada no nosso cérebro Isso se reflete no design de sites Seria muito estranho que um botão na primeira seção do site fosse retangular e azul e outro no final fosse redondo e rosa não é Por isso normalmente o design de um site costuma ter elementos semelhantes Esses elementos semelhantes terão a estilização semelhante no CSS Agora éa melhor hora para identificar esses elementos e criar componentes e classes utilitárias Para isso a gente vai criar classes no CSS que reúnem todas as características comuns daquele componente A distinção que faço aqui entre componentes e classes utilitárias émeramente teórica e tem a ver com o tipo de propriedade que as classes manipulam Se estálidando apenas com elementos da tipografia por exemplo entendo que estamos diante de uma classe utilitária como no exemplo de fontes que irei dar mais adiante Se estamos lidando com mais de uma característica do elemento entendo que estamos diante de um componente como no caso do container ali em cima e do botão que vou mostrar logo adiante Essa distinção émenos importante que a lógica por trás dela não se apegue muito a isso Digamos que vocêviu que os botões do seu site todos tem fundo vermelho e cor do texto verde O que vocêfaz Demite seu designer Brincadeira Ao percebermos esse padrão podemos criar uma classe que vai reunir essas características root color main ff color secondary ff button background color var color main color var color secondary Vocêpode observar ainda outras características em comum aos botões como padding border radius e text align por exemplo Outro elemento de um site que costuma ter um alto grau de padronização éa tipografia Vale a pena dedicar um tempo para anotar todos os tamanhos de fonte famílias peso e altura da linha para compreender o padrão do site Fazendo isso podemos chegar ao seguinte resultado root ff calistoga Calistoga cursive ff raleway Raleway sans serif fw fw fs px fs px fs px title font family var ff raleway font weight var fw font size var fs line height title small font size var fs text font family var ff calistoga font weight var fw font size var fs line height text bold font weight var fw E aíno seu HTML vocêpode fazer algo do tipo lt h class title gt Título lt h gt lt h class title title small gt Título menor lt h gt lt p class text gt Texto lt p gt lt p class text text bold gt Texto em negrito lt p gt d Qual foi a largura de tela utilizada no leiaute Muitas vezes nós olhamos o leiaute e tentamos replicar ele na nossa tela “O designer colocou px de padding lateral na página Vou colocar o mesmo aqui na minha página e vai ficar igualzinho Eis que vocêchega num ponto em que não consegue reproduzir fielmente o que vêno leiaute “Mas eu coloquei exatamente as mesmas medidas que estavam lá Viu Caio por isso que eu não gosto de front Eu entendo a sua revolta mas eu posso te ajudar a nunca mais ter esse problema A questão aqui ésimples o leiaute éapenas uma fotografia da nossa aplicação Essa foto écomo um mapa que vamos seguir e ali estão representados alguns momentos chave da nossa aplicação no geral a versão mobile e desktop se vocêtem mais do que isso vocêéprivilegiado SIM O desenvolvimento do site éum filme a junção de todas essas fotografias cenas Cada cena éuma largura de tela e devemos pensar como toda a movimentação dos atores nossos componentes elementos em tela estáacontecendo Algo pode sair muito bem na foto aos px mas quando chega aos px alguma coisa pode quebrar ficar fora de quadro Um grande salto na mentalidade de um bom desenvolvedor éparar de olhar a foto “funciona na minha tela e passar a se preocupar com o filme “Como seráque isso vai se comportar quando a tela for menor maior que a minha Qual éa experiência do usuário do produto que estou criando Então quando olhamos para o leiaute éessencial pensar qual momento do nosso site aquele leiaute estáretratando Se olharmos para um leiaute construído em px e começarmos a construir o nosso site na nossa tela de px vamos criar distorções involuntariamente Lembre se o dev tools éo seu melhor amigo e Mobile first ou Desktop first Outro ponto para considerar é qual paradigma adotar no projeto mobile first ou desktop first Caso vocênão saiba do que estou falando esses são dois paradigmas que definem como vamos começar o nosso projeto “mobile first celular primeiro desenvolve primeiro a versão mobile e “desktop first computador primeiro começa pela versão desktop Ébom vocêse acostumar com esses conceitos Mas afinal por onde começar pelo desenvolvimento para celulares ou para desktop Se alguma vozinha aídentro da sua cabeça jáestátipo a Hermione afoita para responder gritando “DEPENDE DEPENDE vocêestáno caminho para se tornar sênior pontos para a grifinória Na minha experiência começar pelo desenvolvimento para celulares facilita muito o trabalho mas não quero me aprofundar nesse tema aqui senão a gente se perde do assunto principal A escolha entre os dois paradigmas élivre mas deve ser consciente E ela éimportante porque isso vai afetar como vocêdeclara as suas media queries Se vocêcomeça desenvolvendo para uma tela de px por exemplo quando for adaptar para telas maiores digamos px vai usar min width px Se por outro lado começou desenvolvendo para px quando for fazer a versão tablet vai precisar declarar a media query com max width px por exemplo Manter suas media queries em ordem émuito importante para não surtar na hora de caçar bugs ConclusãoSeguindo todos esses passos do planejamento nossos projetos ficam muito melhor organizados e a gente passa a ter muito mais controle sobre o que estáacontecendo na tela Mas a gente mal começou a escrever código Semana que vem eu trago mais dicas para tornar o seu projeto ainda mais robusto Me conta aqui nos comentários qual dica vocêmais gostou e de qual sentiu falta 2023-06-05 16:17:28
海外TECH DEV Community This week focus: Documentation https://dev.to/lucianghinda/this-week-focus-documentation-3obn This week focus DocumentationWhenever you open a piece of code try to find a place where you can describe how that class or that feature can be used by fellow developers Focus on usage examples or use cases You can start small with a PR description Add some examples of usage in the PR description This will be an easy start without any pressure and it can be edited as required based on feedback from your colleagues Add examples using YARDAnother way is to use YARD structure to write before a class or method directly example How to make this use case work t t run email param test Try to write an example that when copied pasted to irb or rails console will work I like this because most IDEs know how to show YARD examples while writing the code and thus you will have examples of usage for your classes while typing Write documentation in markdown formatIf you don t like to write documentation inside your code files put your documentation outside your code files The easiest is to create a docs folder inside your project and write in a markdown file Both Github and Gitlab already know how to render markdown files thus you will have browsable and searchable documentation without any extra effort In case you want something more fancy mdBook looks very good for providing a way to display this documentation The best is to start anywhereThere are maybe other ways to write documentation Focus this week on this You will thank yourself in a couple of weeks if you will need to change the code you wrote today if you wrote documentation about it somewhere Enjoyed this article Join my Short Ruby News newsletter for weekly Ruby updates Also check out my co authored book LintingRuby for insights on automated code checks For more Ruby learning resources visit rubyandrails info 2023-06-05 16:13:03
Apple AppleInsider - Frontpage News iPads, Apple Watch & Macs are all on sale for up to $250 off this week on Amazon https://appleinsider.com/articles/23/06/05/ipads-apple-watch-macs-are-all-on-sale-for-up-to-250-off-this-week-on-amazon?utm_medium=rss iPads Apple Watch amp Macs are all on sale for up to off this week on AmazonAs Apple prepares for its WWDC rollout Amazon is busy slashing prices on the gear you love Shoppers can take home the Apple Watch Ultra at a nearly discount or save on an M MacBook Pro Excellent deals are available on AmazonAdditionally shoppers on the prowl for an iPad have several options to choose from with virtually every model sporting some discount of up to off retail price Don t forget to pair that new iPad Pro with a Magic Keyboard now off for the inch model in both colors Read more 2023-06-05 16:31:39
海外TECH Engadget Binance faces SEC charges for allegedly mishandling funds and dodging rules https://www.engadget.com/binance-faces-sec-charges-for-allegedly-mishandling-funds-and-dodging-rules-162321241.html?src=rss Binance faces SEC charges for allegedly mishandling funds and dodging rulesThe Securities and Exchange Commission SEC is acting on concerns crypto giant Binance may have broken the law with its US operations The regulator has filed charges against Binance and founder Changpeng Zhao accusing the two of violating securities laws Most notably officials claim Binance knowingly undermined its own international compliance controls to help US investors keep trading on Binance com when they were only supposed to rely on the separate Binance US system Zhao and his company also controlled Binance US behind the scenes the SEC alleges The Commission also maintains that Binance and Zhao mixed and diverted customers assets at will including with the Zhao owned Sigma Chain The company and its US affiliate are further accused of running unregistered exchanges broker dealers and clearing agencies with Zhao serving as the control They also allegedly sold unregistered crypto assets the SEC adds The SEC aims to not only force Binance to comply with the law but to bar Zhao from helming any domestic securities issuers It also wants the company to disgorge its financial gains from the alleged violations and to pay additional penalties Binance says it s disheartened by the charges and maintains that it has participated in good faith talks to reach a settlement Reuters investigators reported that Binance commingled million from a corporate account with million for a customer oriented example The company denied the allegation saying that the relevant accounts were only used to facilitate cryptocurrency purchases and that the funds were exclusively corporate The SEC allegations come a few months after the Commodity Futures Trading Commission CFTC filed its own charges against Binance and Zhao It too accused the crypto firm of skirting US regulations and offering unregistered crypto assets Unlike the SEC the CFTC charged former compliance officer Samuel Lim The action against Binance is the latest phase in a broader crackdown against the crypto industry FTX and former CEO Sam Bankman Fried are facing numerous charges over alleged fraud and bribery New York State has sued former Celsius chief Alex Mashinsky over purported fraud while the SEC has charged Terraform Labs with running a multi billion dollar fradulent operation Combine this with Congress efforts to shape crypto policy and there s intense pressure on crypto exchanges to alter their practices This article originally appeared on Engadget at 2023-06-05 16:23:21
Cisco Cisco Blog Cisco Black Belt Fire Jumper Training for Cisco Partners https://feedpress.me/link/23532/16162552/cisco-black-belt-fire-jumper-training-for-cisco-partners Cisco Black Belt Fire Jumper Training for Cisco PartnersBlack Belt Fire Jumper Training for Cisco Partners is the foundational Cisco security portfolio training program identical to the Fire Jumper Academy for Cisco Employees A Black Belt certification entails completing the latest edition consisting of three stages of trainings for your relevant role 2023-06-05 16:00:26
金融 金融庁ホームページ 「サステナブルファイナンス有識者会議」(第16回)議事次第について公表しました。 https://www.fsa.go.jp/singi/sustainable_finance/siryou/20230606.html 有識者会議 2023-06-05 17:30:00
金融 金融庁ホームページ 鈴木財務大臣兼内閣府特命担当大臣閣議後記者会見の概要(令和5年6月2日)を掲載しました。 https://www.fsa.go.jp/common/conference/minister/2023a/20230602-1.html 内閣府特命担当大臣 2023-06-05 17:30:00
金融 金融庁ホームページ NGFS(気候変動リスク等に係る金融当局ネットワーク)による「金融機関の移行計画とそのミクロ健全性当局との関連性に係るストックテイク」について掲載しました。 https://www.fsa.go.jp/inter/etc/20230605/20230605.html 気候変動 2023-06-05 17:00:00
金融 金融庁ホームページ 令和5年梅雨前線による大雨及び台風第2号による災害等に対する金融上の措置を要請しました。 https://www.fsa.go.jp/news/r4/ginkou/20230605.html 梅雨前線 2023-06-05 17:00:00
ニュース BBC News - Home Ukraine war: 'Offensive actions' under way in east, Kyiv says https://www.bbc.co.uk/news/world-europe-65813560?at_medium=RSS&at_campaign=KARANGA bakhmut 2023-06-05 16:16:35
ニュース BBC News - Home Prince Harry surrounded by 'web of unlawful activity', court hears https://www.bbc.co.uk/news/uk-65808672?at_medium=RSS&at_campaign=KARANGA group 2023-06-05 16:33:38
ニュース BBC News - Home Princess Eugenie gives birth to baby boy named Ernest George Ronnie https://www.bbc.co.uk/news/uk-65785911?at_medium=RSS&at_campaign=KARANGA ernest 2023-06-05 16:53:26
ニュース BBC News - Home Ex-Vice-President Mike Pence joins White House race https://www.bbc.co.uk/news/world-us-canada-65813361?at_medium=RSS&at_campaign=KARANGA donald 2023-06-05 16:50:22
ニュース BBC News - Home MOVEit hack: BBC, BA and Boots among cyber attack victims https://www.bbc.co.uk/news/technology-65814104?at_medium=RSS&at_campaign=KARANGA attack 2023-06-05 16:19:40
ニュース BBC News - Home Ange Postecoglou: Tottenham reach agreement with Celtic boss to become their new manager https://www.bbc.co.uk/sport/football/65813665?at_medium=RSS&at_campaign=KARANGA manager 2023-06-05 16:47:36
ニュース BBC News - Home Chris Mason: Sunak gives prominence to vast migration challenge https://www.bbc.co.uk/news/uk-politics-65814270?at_medium=RSS&at_campaign=KARANGA highlight 2023-06-05 16:32:20
ニュース BBC News - Home Rishi Sunak's claims on small boats fact checked https://www.bbc.co.uk/news/65811208?at_medium=RSS&at_campaign=KARANGA crossings 2023-06-05 16:17:10
ニュース BBC News - Home French Open 2023 results: Coco Gauff could face Iga Swiatek in quarter-finals, Ons Jabeur through https://www.bbc.co.uk/sport/tennis/65810014?at_medium=RSS&at_campaign=KARANGA French Open results Coco Gauff could face Iga Swiatek in quarter finals Ons Jabeur throughAmerican teenager Coco Gauff moves into the French Open quarter finals where she could meet Polish top seed Iga Swiatek 2023-06-05 16:08:36
ニュース BBC News - Home Andy Murray defeats Chung Hyeon in first round at Surbiton Trophy https://www.bbc.co.uk/sport/tennis/65812578?at_medium=RSS&at_campaign=KARANGA Andy Murray defeats Chung Hyeon in first round at Surbiton TrophyAndy Murray kicks off his Wimbledon preparations with a straight set victory over Chung Hyeon in the first round of the Surbiton Trophy 2023-06-05 16:06:10
ニュース BBC News - Home Fireworks thrown as Independiente Rivadavia beat rivals Deportivo Maipu in Argentina https://www.bbc.co.uk/sport/av/tennis/65813805?at_medium=RSS&at_campaign=KARANGA Fireworks thrown as Independiente Rivadavia beat rivals Deportivo Maipu in ArgentinaWatch the scenes as play continues despite fans throwing fireworks on the pitch as Independiente Rivadavia beat rivals Deportivo Maipu in Mendoza Argentina 2023-06-05 16:32:01
ニュース BBC News - Home Hines, first 100m sprinter to break 10 seconds, dies https://www.bbc.co.uk/news/world-us-canada-65692022?at_medium=RSS&at_campaign=KARANGA championships 2023-06-05 16:06:03
Azure Azure の更新情報 Generally available: Azure Data Explorer Kusto Emulator on Linux https://azure.microsoft.com/ja-jp/updates/kusto-emulator-linux/ container 2023-06-05 17:00:01
IT IT号外 Chromeブラウザ、Firefoxブラウザの文字のフォントをSafariと同じものにしたい。見やすい?見づらいフォントをMACやApple製品の様に綺麗にする方法 https://figreen.org/it/chrome%e3%83%96%e3%83%a9%e3%82%a6%e3%82%b6%e3%80%81firefox%e3%83%96%e3%83%a9%e3%82%a6%e3%82%b6%e3%81%ae%e6%96%87%e5%ad%97%e3%81%ae%e3%83%95%e3%82%a9%e3%83%b3%e3%83%88%e3%82%92safari%e3%81%a8%e5%90%8c/ Chromeブラウザ、Firefoxブラウザの文字のフォントをSafariと同じものにしたい。 2023-06-05 16:53:13

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)