投稿時間:2023-01-19 01:33:46 RSSフィード2023-01-19 01:00 分まとめ(38件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… 米Microsoft、1万人の人員削減を発表 https://taisy0.com/2023/01/19/167251.html microsoft 2023-01-18 15:52:06
IT 気になる、記になる… 「HomePod mini」、内部に隠されていた温度・湿度センサーが利用可能に − 今春にはサウンド認識にも対応 https://taisy0.com/2023/01/19/167247.html homep 2023-01-18 15:40:39
IT 気になる、記になる… Apple、Apple Watch用バンド「Black Unityスポーツループ」を発売 https://taisy0.com/2023/01/19/167242.html apple 2023-01-18 15:27:14
IT 気になる、記になる… Apple、「iOS 16.3」を来週に正式リリースへ https://taisy0.com/2023/01/19/167239.html apple 2023-01-18 15:20:13
IT 気になる、記になる… Apple、「HomePod (第2世代)」を発表 − 温度・湿度センサーを新たに搭載 https://taisy0.com/2023/01/19/167235.html apple 2023-01-18 15:11:38
AWS AWS Government, Education, and Nonprofits Blog 34 new or updated datasets on the Registry of Open Data: New data for land use, Alzheimer’s Disease, and more https://aws.amazon.com/blogs/publicsector/34-new-updated-datasets-registry-open-data-new-data-land-use-alzheimers-disease-more/ new or updated datasets on the Registry of Open Data New data for land use Alzheimer s Disease and moreThe AWS Open Data Sponsorship Program makes high value cloud optimized datasets publicly available on AWS This quarter AWS released new or updated datasets from Impact Observatory The Allen Institute for Brain Science Common Screens and others which are available now on the Registry of Open Data in the following categories 2023-01-18 15:39:41
js JavaScriptタグが付けられた新着投稿 - Qiita UnhandledRejectionエラーを握りつぶす https://qiita.com/YoshitakeHiroki/items/33d9c120cfb55af5bfdb omiserejectioncapturedwi 2023-01-19 00:41:19
Linux Ubuntuタグが付けられた新着投稿 - Qiita NuxtJSをUbuntu/PM2/Nginxでデプロイしよう https://qiita.com/asameshiCode/items/50e8e0dcca0c3f67e218 nginx 2023-01-19 00:46:12
AWS AWSタグが付けられた新着投稿 - Qiita AWS Athena 公式ページ https://qiita.com/yamato999/items/a365f6a1e61c585178d3 awsathena 2023-01-19 00:13:13
海外TECH Ars Technica How flood forecasts in real time with block-by-block data could save lives https://arstechnica.com/?p=1910775 learning 2023-01-18 15:44:26
海外TECH Ars Technica It looks like NASA will finally have an astronaut live in space for a full year https://arstechnica.com/?p=1910697 missions 2023-01-18 15:39:56
海外TECH MakeUseOf 3 Top Redis Clients for Go Developers https://www.makeuseof.com/go-redis-clients/ popular 2023-01-18 15:30:16
海外TECH MakeUseOf Matter Is Embraced at CES 2023: What This Means for Your Smart Home https://www.makeuseof.com/matter-at-ces-2023/ embraced 2023-01-18 15:26:40
海外TECH MakeUseOf 8 Lesser-Known, Low-Competition Freelancing Websites https://www.makeuseof.com/lesser-known-freelancing-websites/ competition 2023-01-18 15:15:15
海外TECH DEV Community Share your Jupyter Notebooks like a pro https://dev.to/derlin/share-your-jupyter-notebooks-like-a-pro-264f Share your Jupyter Notebooks like a proAre you doing data analysis with Jupyter Notebook Here is how to create beautiful notebooks with interactive plots and host them as HTML on GitHub Pages I recently published an in depth analysis of the top tags on dev to dev to is for webdevs and beginners I have data to prove it An in depth data analysis of the trending articles and tags count reactions comments on dev to blog derlin ch To back it up I published the full analysis notebooks on GitHub Pages ⮕ analysis html is the main notebook If you visit the link above you should see that The notebooks are available as responsive mobile friendly HTML pagesAll the graphs are interactive you can zoom and pan view details on hover export as a PNG etc Some plots from the main notebook analysis html are also available as standalone pages for example plot articles htmlThe root of the website contains an index of all the available files hidden but trust me The website is updated automatically on every push to the repository s main branch Let s see how you can do the same Table of ContentsPreface about Jupyter NotebookInteractive plots matplotlib →plotlyWhat is PlotlySetting up PlotlyPlotting with PlotlyOther tips to make your notebook shineDisplay Pandas DataFrame with styleUse alternate visualizations and rich contentExporting notebooks to HTMLUsing nbconvertAdding custom stylesExporting specific plots to standalone HTML pagesFree and automated hosting on GitHub Pages with GitHub ActionsPrerequisitesRepository structureThe manual processThe workflowWhat about the directory listing The final workflowGoing furtherDashMercuryTable of Contents generated with bitdowntoc Read more in this article Finally a clean and easy way to add Table of Contents to dev to articles Preface about Jupyter NotebookJupyter Notebook is a powerful tool for interactively developing and presenting data science projects In short a notebook is a single document where you can have code interspersed with their output and also other media such as rich text HTML images math equations etc If this doesn t ring a bell have a look at There are lots of ways to install Jupyter Notebook for example using JupyterLab or voila I personally prefer the standalone more lightweight version pip install notebookjupyter notebook Serving notebooks from local directory Jupyter Notebook is running at http localhost token This command starts a local web server where you can work on your notebooks Interactive plots matplotlib →plotlyThere are many plotting libraries for Python the most well known being matplotlib and its pyplot submodule If you have followed a data sciences tutorial chances are you have heard of it Matplotlib however generates plots as static images and to be honest I find the default styles quite unappealing This is why a switched to plotly years ago What is PlotlyAvailable in multiple languages JavaScript R F Julia and more Plotly s graphing library makes fully interactive publication quality graphs It comes with support for line plots scatter plots area charts bar charts error bars box plots histograms heatmaps subplots multiple axes polar charts bubble charts and more Cherries on the cake it is free and open source Plotly comes with a plotly express submodule usually imported as px that you can use to generate plots from arrays or pandas DataFrame Serie objects in a single command If you need more control over the plot you can switch to the plotly graph objects submodule which is more low level and thus more powerful I personally use both depending on my needs It can be installed easily using pip pip install plotly Setting up PlotlyLet s first import some Plotly submodules The easiest way to make Plotly plots import plotly express as px Lower level interface if you want to test it import plotly graph objects as go For configuration keep reading import plotly io as pioThe default template aka style is quite good already but I personally prefer the white theme see templates To make it the default pio templates default plotly white Plotly supports displaying figures in a variety of contexts To do so it uses something called the renderers framework By default Plotly attempts to autodetect an appropriate renderer at startup but I had some surprises especially during export This is why I always explicitly set the default renderer Let plotly know it runs inside a Jupyter Notebookpio renderers default notebook If you edit your notebooks using other means feel free to choose another renderer At the time of writing here are the available options print pio renderers Renderers configuration Default renderer notebook Available renderers plotly mimetype jupyterlab nteract vscode notebook notebook connected kaggle azure colab cocalc databricks json png jpeg jpg svg pdf browser firefox chrome chromium iframe iframe connected sphinx gallery sphinx gallery png We are all set So let s create plots Plotting with Plotly I assume you are familiar with pandas and numpy If this is not the case check out Pandas getting started and numpy learn First we need some random data import pandas as pdimport numpy as nps pd Series np random randn s head dtype floatLet s plot this meaningful Series using plotly express px line s This is a screenshot but you can see the zoom pan drag etc options on the top right and the hover tooltip on a datapoint For a real interactive plot see plot articles html This looks good already but there is always room for improvement Let s customize a bit this plot fig px line s fig update traces dict Add the markers dots mode lines markers Customize the hover box Use to get the data value supports formatting The empty lt extra gt lt extra gt tag removes the part of the hover displaying the trace name variable above hovertemplate x → y f lt br gt Nice hu lt extra gt lt extra gt fig update layout title Sample data showlegend False yaxis dict title None xaxis dict title None tickmode linear dtick margin dict l b This gives us And this is only the tip of the iceberg You can spend hours just playing with all the options Other tips to make your notebook shine Display Pandas DataFrame with styleDid you know that pandas provides methods to format and style a DataFrame This is awesome when you want to make a table more appealing or highlight certain parts to convey information quickly Styling is controlled via the style attribute Here is a simple example df style hide index do not show the index highlight max axis highlight the max value on each lineTo learn more and play with styles have a look at Essential Techniques to Style Pandas DataFrames on Kaggle Use alternate visualizations and rich contentDo not hesitate to fall back to other types of representations to spice up your notebooks for example show a WordCloud I used it for the cover image of my article on dev to tags You can also embed rich content audio video iframes SVG etc thanks to the IPython display module Exporting notebooks to HTMLNow that we have a nice notebook with interactive plots how do we export it to HTML and keep the interactive parts Using nbconvertWe can use nbconvert to export to HTML jupyter nbconvert ipynb to htmlAs long as the proper renderer is set pio renderers default notebook this results in a very decent interactive webpage On mobile however the responsiveness is a bit broken due to the cell numbering Fortunately Jupyter allows for custom styles so we can fix it with a tiny bit of CSS Adding custom stylesTo fix the responsiveness issue on mobile create a jupyter folder with the following structure jupyter├ーcustom│└ーcustom cssIn the custom css stylesheet add For this file to be processed by jupyter ensure you export JUPYTER CONFIG DIR for example JUPYTER CONFIG DIR jupyter jupyter nbconvert to html Make jupyter HTML export more responsive media max width px jp InputPrompt jp InputArea prompt jp OutputPrompt jp OutputArea prompt display none important Finally ask Jupyter to add this custom stylesheet to all the HTML notebooks it converts by setting the JUPYTER CONFIG DIR before running nbconvert JUPYTER CONFIG DIR jupyter jupyter nbconvert ipynb to htmlThe HTML page is now decent on mobile too Exporting specific plots to standalone HTML pagesI talked about notebooks but what about specific plots Once we have a plotly Figure exporting it to HTML is as easy as calling fig px line or fig go Figure fig write html my plot html The my plot html file will contain all the necessary js css to make it interactive and responsive Nothing more to do Free and automated hosting on GitHub Pages with GitHub ActionsSince notebooks are rendered as static HTML files the easiest way to host them is using GitHub Pages We could easily create a branch manually generate and push the HTML files and ask GitHub to serve the branch on Pages But this would be such menial work Instead let s use GitHub Actions to automate the whole process PrerequisitesFor this to work we need to enable GitHub Pages in the repository on GitHub We will use a brand new way of publishing to GitHub Pages using a custom GitHub Actions workflow This is still in beta but it works well and will likely pass to stable soon For more info see the official documentation Go to Settings gt Pages and under Source select GitHub Actions Repository structureThe next sections assume The notebooks are in one folder called dataviz There is a requirements txt at the root listing all the dependencies notebook pandas etc If you do not have this structure you may need to change parts of the workflow It shouldn t be difficult let me know in the comments if you need some help The manual processWithout GitHub Actions here is how the manual process would look like setup python environment clone the repo execute and convert notebooksexport JUPYTER CONFIG DIR jupyterjupyter nbconvert dataviz ipynb execute to html copy all the HTML files into a new empty foldermkdir publiccp dataviz html public create an index html with a directory listingtree H L noreport charset utf o index html run a static server serving publicpython m http server directory public The workflowFirst we need to declare a workflow that is triggered on every push to main name Publish Notebooks to Github Pageson push branches mainSIDE NOTE If like me your repository contains more than notebook s data you can avoid re publishing when nothing changed on the notebook s by adding an on push paths filter When using the push and pull request events you can configure a workflow to run based on what file paths are changed If at least one path matches a pattern in the paths filter the workflow runs This is the filter I use in my repo name Publish Notebooks to Github Pageson push branches main paths run only when the notebooks changed dataviz ipynb the data used in the notebooks changed json I modified something in the workflow github Next we need a job that exports the notebooks to HTML Since we are using jupyter commands we need to setup python and install the dependencies using pip We then run the nbconvert command and gather all the HTML outputs into a folder called public in the workflow to follow best practices but the name doesn t really matter The final steps are to call actions configure pages and actions upload pages artifact which are brand new official actions to publish to GitHub Pages documentation jobs build runs on ubuntu latest steps uses actions checkout v uses actions setup python v with python version cache pip will run faster with a cache name Install requirements run pip install r requirements txt name Export notebooks run export JUPYTER CONFIG DIR jupyter jupyter nbconvert dataviz ipynb execute to html name Prepare public folder id folder ←to reference the output of this step later run mkdir public cp dataviz html public echo name public gt gt GITHUB OUTPUT name Setup Pages id pages ←used in the deploy job keep reading uses actions configure pages v name Upload artifact uses actions upload pages artifact v with path steps folder outputs name Note that if we have used fig write html in our notebooks the standalone plots will also be published Why Thanks to the execute argument passed to nbconvert This asks Jupyter to run the notebook before the conversion which has some nice side effects it ensures the code cell numberings will always be consistent andit makes the job fail if you committed a faulty notebook Once the artifact with all the HTML files is uploaded the only missing piece is to publish it to GitHub Pages using the actions deploy pages This is done in another job which depends on the build job Note that it won t run if the build job fails jobs build see above deploy permissions pages write id token write environment name github pages url steps deployment outputs page url runs on ubuntu latest needs build steps name Deploy to GitHub Pages uses actions deploy pages vThat s it We now have a fully automated process for publishing our notebooks on the web What about the directory listing The only problem with the workflow above is that unless you have a notebook called index html hitting https lt username gt github io lt repo gt yields a Not Found Hugh To avoid this let s serve a listing of all the HTML files available using the community action jayanta github pages directory listing Simply add the following between the prepare public folder and setup pages actions name Prepare public folder ↓↓add this name Generate Directory Listings uses jayanta github pages directory listing v with FOLDER steps folder outputs name name Setup Pages This action lists all the files inside FOLDER and generates a static index html file allowing navigation The result can be seen at The final workflowThe full workflow is available at Use this link to see the version at the time of writing You may have to adapt it a bit to fit your needs but I hope it provides a strong base to build from Going furtherThis article shows a way to share a notebook in a static form If you want to go further and make the notebook s truly interactive here are some links to check out Remember however that they all require a Python server running no easy free hosting DashThrough a couple of simple patterns Dash abstracts away all of the technologies and protocols that are required to build a full stack web app with interactive data visualization Have a look at their gallery I used it a while back and enjoyed the experience MercuryMercury is a perfect tool to convert Python notebook into a web app and share with non programmers You define interactive widgets for your notebook with the YAML header Your users can change the values of the widgets execute the notebook and save the result as HTML file You can hide your code to not scare your non coding collaborators Easily deploy to any server Never tried it but seems interesting Let me know 2023-01-18 15:27:15
海外TECH DEV Community 8 Sites to Learn Java Programming for FREE in 2023 https://dev.to/javinpaul/8-sites-to-learn-java-programming-for-free-in-2023-4ddf Sites to Learn Java Programming for FREE in Disclosure This post includes affiliate links I may receive compensation if you purchase products or services from the different links provided in this article Hello friends if you want to learn Java Programming and looking for the best websites to learn Java coding for free then you have come to the right place In the past I have shared the Complete Java Developer RoadMap as well as best Java courses and books today I am going to share free sites to learn Java Programming for free in Being the author of a Java blog  and programmer I often receive questions like how to improve my coding skills  or how do I learn to code in Java or I am having difficulty solving programming problems please help etc This is mostly from programmers who have just started programming or computer science graduates with a programming degree or even some programmers with a year or two in Job If you don t know I have doing Java programming since last years and blogging my experience since last years in my blog Javarevisited SavingsFunda and Java and love to help people learning to code particularly Java programming language These are also the best online platforms where you can learn Java by yourself I mean if you want to become a self taught Java developer They are completely online and give you options for both video based learning and interactive learning You can watch lectures and follow along or you can read the theory and then do the practice problems to learn Java online Like many other things in the life if you want to improve your coding you need to code code and code and to develop programming skill you need to write a program and that s where many of these programmers fail In of cases they simply don t write enough programs to develop programming logic and code sense And without too much experience at data structures and algorithms if they attempt problems given on sites like LeetCode HackerEarth TopCoder or Project Euler they fail miserably To be frank it s not easy to solve coding problems from those sites until you have really done programming for a year or two or even more and one of the best way to improve your coding skill is to solve basic data structures algorithms developing classic games like Tic Tac Toe Tetris or Moon Lander and solving object oriented design problems by yourself By the way If you are absolutely new in the programming world then investing some money in buying a book or joining a course on data structure and algorithms like Data Structures and Algorithms Deep Dive Using Java on Udemy is a Good Idea   It may not teach you coding but it will give you knowledge of data structure and algorithms which is very important for any programmer Best Platforms to Learn Java Coding Online for FREE In this article I am going to share with you a couple of websites and coding platforms that will help you to learn coding and programming and that too for FREE The list not only includes websites where you can join free Java courses but also places where you can practice Java online for example CodeAbbey and CodingBat which are great places to learn Java by solving small Java programming exercises A few sites are mostly for Java programmers but the problem set can be solved in any language while the other site is language independent because it doesn t ask you to code online instead it only check your answers with random input data  UdemyThis is another popular website to learn Java and coding online Similar to Pluralsight it also provides both free and paid courses but the good part is that you have a lot of choices available and it s relatively cheaper than Pluralsight It also contains a lot of free courses in both Java and programming like Java Tutorial for Complete Beginners a whopping students are enrolled for this course and it s one of the best free Java courses available online And if you can spend a few bucks like then you can also find a lot of courses to learn Java from scratch like The Complete Java Masterclass is one of the best courses for programmers getting started with Java This course is updated to cover both Java and Java two of the LTS Java releases If you like to learn from video courses then Udemy is the best website to learn Java online You have a lot of options as there are multiple Java courses with different instructors and you can choose where you connect with the instructor  PluralsightThere are a lot of useful courses on Pluralsight to learn Java and coding online You can choose the classes you like to learn at your own pace The site also provides a day free trial which is more than enough to get a start with both Java and Coding if you are totally focused I recommend Java Fundamentals The Java Language to start learning the basics of Java programming language Author Jim Wilson has done a great job in explaining the syntax and features of Java in this power packed course Apart from that Pluralsight also has courses to teach programming for example you can check out Learning To Program Part Getting Started By Scott Allen  if you absolutely don t have any idea about programming CodegymIf you like to learn Java by building games and doing interactive programming exercises then you will love Codegym I recently found this website when one of my reader pointed it and I was amazed with the learning material The best thing about CodeGym is that they give you a lot of practice and they also follow rule where you will be reading or learning of your time and of time practicing what you learned This method works because in real life you will be using top of your skill of time this true with Java as well while Java API is very vast with hundreds of classes and third party libraries you will be using only of Java most of the time like core Java Collections and Multithreading In other words CodeGym is like an online course but with tasks and many games which clearly makes it as one of the best places to learn Java coding You can learn more about it here CodegymThey have both free and paid options while their free option is good enough to learn Java online if you can afford you should definitely try Codegym premium their paid version they are also offering discount now And if you want to learn more about it you can also see my review of CodeGym platform for learning Java  CodeAbbeyThe first site which  I am going to share with you guys was CodeAbbey when I came across CodeAbbey I really like their question set because it was perfectly designed for beginners It s neither easy nor trivial and provides some decent practice to the first timer Here is the kind of question you can expect from this site Maximum of array    Vowel Count   The weighted sum of digits Body Mass Index Sum of digits Median of Three Neumann s Random Generator   Array Checksum Modulo and time difference   Average of an array Array Counters Binary Search Dice RollingOnce you start solving these programs your programming logic will improve and you will learn how to apply the knowledge of operators data structure and algorithms to solve a problem Slowly you will learn how to approach any problem Once you solve the beginner s problem you can start with intermediate and some difficult ones to test your knowledge and gain some confidence Remember it s the problem solving skill that makes you a good programmer not just knowing all the syntax of any programming language like C or C Once you learn how to code or how to program you can solve the same problem in any programming language If you like books you can also purchase a book to learn how to program like Head First Programming which teaches you how to code and write a program using Python language  CodecademyThe popular website which I come to know while learning JavaScript now also has a free course to teach Java It s one of the best interactive sites to learn Java It provides an online IDE or Java Editor where you can not only code but also check your program by running and debugging it The course is not exhaustive as those available on Pluralsight and Udemy but given it s free it a still one of the better resources to learn Java Join  people who have already taken this course  CodingBatThe other site I am going to share with you guys is CodingBat This site is also an excellent resource to practice and learn to code for Java and Python programmer You can solve problems in either Java or Python Just like CodeAbbey you need to register but that s good because you can track your progress It also contains beginner level programming problems from useful topics like String Array Logic and Recursion I really like their questions from recursion as it s one of the confusing concepts to master They also have problems at different difficulty levels Once you log in you can select any question and you will be asked to write code for that method in Java or python Every program has a precise specification often you need to implement a particular method Once you were done you can run your program and test with different inputs including boundary conditions which are designed by CodingBat itself Their input set is perfect and you will learn quickly by following why your program doesn t run on a particular input Here are some of the questions you can expect at CodingBat monkeyTrouble You have two monkeys a and b and the parameters aSmile and bSmile indicate if each is smiling We are in trouble if they are both smiling or if neither of them is smiling Return true if we are in trouble monkeyTrouble true true true monkeyTrouble false false true monkeyTrouble true false falsebunnyEars We have many bunnies and each bunny has two big floppy ears We want to compute the total number of ears across all the bunnies recursively without loops or multiplication bunnyEars bunnyEars bunnyEars CodingBat also contains help and videos on both Java and Python lessons I am sure once you start solving programming problems on these two sites you will learn coding faster If you already know how to code then these will simply improve your thinking and programming skills The great thing about these two sites is that their problems are not very difficult which is one reason I am recommending these to beginners and intermediate Java programmers Sometimes a site with difficult programming problems discourages a young programmer Once you start solving easy questions your confidence will grow up and you gradually advance towards more challenging topics and questions  Test Automation UThis is another great place to learn Java online for FREE As the name suggests this website is for automation testers but it also has a useful track to learn Java which is not only engaging but also rewarding I come across this site on Twitter because I follow Angie Jones creator of this website and the first and probably the youngest woman to become a Java champion recently If you are learning Java for test automation or not this website will surely help you to get up to speed with Java If you find the Java Programming track advance then you can first start with an online course like The Complete Java Masterclass or take the learn Java track on CodeCademy to build the basic concepts  JetBrains AcademyThis is another great place to learn Java for FREE I recently found this site on Facebook and fell in love with it immediately The name of JetBrains is one of the most popular and trustworthy names in the Java world as they are the one who creates IntelliJIDEA and Android Studio JetBrains Academy in partnership with Hyperskill offers interactive project based learning combined with powerful development tools like IntelliJIDEA This means you can execute code not just in the browser but also in your IDE which is the tool you will use in most of your career for real world Java development Their Java developer track is massive and has projects covering topics and over hours of content You build Java projects like Coffee Machine Tic Tac Toe SimpleChattBot and much more They are not completely free but you can still learn a lot of things using their trial Btw JetBrains Academy also has a Python track that you can use if you want to learn Python online It has more than hours of content and a couple of projects which can you build along to learn Python better By the way these sites are not for experienced programmers as you can quickly solve all those questions but if you like to do a quick recap and practice then you will find them interesting as well If you are looking to buy a book to learn to code then I suggest you take a look at Head First Java rd Edition the new edition is now updated to cover Java SE to Java SE which makes it one of the best books to learn Java in depth Other Programming Articles and Tutorials you may like The Complete Java Developer RoadMap Things Java Programmer Should Learn Websites to learn Python Coding for FREE Programming languages You can Learn Tools Every Java Developer Should Know Websites to learn Git and Github for FREE Websites to learn Data Structure and Algorithms for FREE Reasons to Learn Python Programming Reasons to Learn Java Programming languages Frameworks Java and Web Developer should learn Websites to learn SQL for FREE Tips to become a better Java Developer Top Java Frameworks You Can Learn for Server Side Development Websites to Learn Coding for FREE The Complete DevOps Engineer RoadMap Data Structure Interview Questions for ProgrammersThanks for reading this article so far If you know any other excellent online resources like any websites or programming platforms to learn Java Coding for FREE especially for beginners which you think complements these two websites then feel free to share Everybody loves free resources and happy learning programming P S If you don t mind spending a few bucks for learning a valuable and in demand skill like Java then I highly recommend you to check out The Complete Java Masterclass course by Tim Buchalaka and his team on Udemy It s one of the most comprehensive and up to date courses to learn Java online 2023-01-18 15:24:48
海外TECH DEV Community CSS Tip: Style your Radio Buttons and Checkboxes for Printing https://dev.to/alvaromontoro/css-tip-style-your-radio-buttons-and-checkboxes-for-printing-3366 CSS Tip Style your Radio Buttons and Checkboxes for PrintingWe are discussing web design and development and I am talking about printing What is this the th century Who prints a website nowadays Who even owns a printer The answer to many of those questions may surprise you According to Deloitte of American households have a printer based on a Consumer Technology Association report from And the British marketing agency Varn ran some original research and found that around of their clients printed websites But let s put printers aside Long gone are the days in which people printed map directions or recipes Now printing doesn t necessarily imply paper Many people save websites as PDFs for their records e g of form answers or receipts They may never print those PDFs into paper but the styles applied to the documents are the website s printing styles What does this have to do with design and web development again Often developers share their customized versions of native components and design systems and we can find many issues when printing them especially with elements like radio buttons or checkboxes I m going to focus on those components A common way to create custom radios and checkboxes is by using backgrounds They are easy to implement they look good and they are supported everywhere…or almost But there s a problem browsers do not print backgrounds by default You could add media print to specify printer specific styles and that will work for many things but it can get messy or not make sense fast input type checkbox appearance none border px solid border radius rem box shadow inset rem fff display inline block height rem width rem vertical align bottom input type checkbox checked background blue media print input type checkbox checked text align center input type checkbox checked before content x This method will work and will be supported by all browsers modern and old looking at Internet Explorer which we shouldn t care about much anymore but you never know But there is a better way and it s simpler too Something that will make it nicer and more custom…because it will respect your styles both on the screen and on paper or PDF It is print color adjust The print color adjust property provides a hint to the user agent about how it should treat color and style choices that might be expensive or generally unwise on a printer or similar device such as using light text on a dark background With this property we can specify if we want the printer to include background colors and all the styles so that elements look the same on paper as they look on the screen Or let the browser make a choice for us which will lead to differences in color and format print color adjust has two key values economy the browser will make the adjustments that are considered necessary to save resources For example removing the backgrounds to avoid unnecessary ink usage This is the default value exact this tells the browser that the backgrounds and colors in the design are essential and must be printed without change users will still have some input in the printing form though In the example of the radio buttons and checkboxes it is essential to have the backgrounds to indicate whether they are selected No need for messy media print or hacky solutions One CSS property and we are good to go input type checkbox appearance none border px solid border radius rem box shadow inset rem fff display inline block height rem width rem vertical align bottom webkit print color adjust exact print color adjust exact input type checkbox checked background blue One small catch of this solution is that not all browsers support the property name print color adjust One good thing using the webkit prefix will cover all desktop browsers not so good on mobile though The recommendation is to use the property sparingly and only where needed Otherwise we may end up with some angry users customers But in the case of the checkboxes and radio buttons it is necessary and a tool that will simplify our code To provide a complete experience we must design and develop for that whole experience And that includes printing Components not only need to look good on the screen but they must also be usable and accessible both on the screen and in print 2023-01-18 15:19:21
海外TECH DEV Community Deep Cloning Objects in JavaScript, the Modern Way https://dev.to/builderio/deep-cloning-objects-in-javascript-the-modern-way-17kf Deep Cloning Objects in JavaScript the Modern WayDid you know there s now a native way in JavaScript to do deep copies of objects That s right this structuredClone function is built into the JavaScript runtime const calendarEvent title Builder io Conf date new Date attendees Steve const copied structuredClone calendarEvent Did you notice in the example above we not only copied the object but also the nested array and even the Date object And all works precisely as expected copied attendees Steve copied date Date Wed Dec cocalendarEvent attendees copied attendees falseThat s right structuredClone can not only do the above but additionally Clone infinitely nested objects and arraysClone circular referencesClone any transferrable objects such as Date Set Map Error RegExp ArrayBuffer Blob File ImageData and several moreSo for example this madness would even work as expected const kitchenSink set new Set map new Map regex foo deep array new File someBlobData file txt error new Error Hello kitchenSink circular kitchenSink All good fully and deeply copied const clonedSink structuredClone kitchenSink Why not just object spread It is important to note we are talking about a deep copy If you just need to do a shallow copy aka a copy that does not copy nested objects or arrays then we can just do an object spread const simpleEvent title Builder io Conf no problem there are no nested objects or arraysconst shallowCopy calendarEvent Or even one of these if you preferconst shallowCopy Object assign simpleEvent const shallowCopy Object create simpleEvent But as soon as we have nested items we run into trouble const calendarEvent title Builder io Conf date new Date attendees Steve const shallowCopy calendarEvent oops we just added Bob to both the copy and the original eventshallowCopy attendees push Bob oops we just updated the date for the copy and original eventshallowCopy date setTime As you can see we did not make a full copy of this object The nested date and array are still a shared reference between both which can cause us major issues if we want to edit those thinking we are only updating the copied calendar event object Why not JSON parse JSON stringify x Ah yes this trick It is actually a great one and is surprisingly performant but has some shortcomings that structuredClone addresses Take this as an example const calendarEvent title Builder io Conf date new Date attendees Steve JSON stringify converted the date to a stringconst problematicCopy JSON parse JSON stringify calendarEvent If we log problematicCopy we would get title Builder io Conf date T Z attendees Steve That s not what we wanted date is supposed to be a Date object not a string This happened because JSON stringify can only handle basic objects arrays and primitives Any other type can be handled in hard to predict ways For instance Dates are converted to a string But a Set is simply converted to JSON stringify even completely ignores certain things like undefined or functions For instance if we copied our kitchenSink example with this method const kitchenSink set new Set map new Map regex foo deep array new File someBlobData file txt error new Error Hello const veryProblematicCopy JSON parse JSON stringify kitchenSink We would get set map regex deep array error Ew Oh yeah and we had to remove the circular reference we originally had for this as JSON stringify simply throws errors if it encounters one of those So while this method can be great if our requirements fit what it can do there is a lot that we can do with structuredClone aka everything above that we failed to do here that this method cannot Why not cloneDeep To date Lodash s cloneDeep function has been a very common solution to this problem And this does in fact work as expected import cloneDeep from lodash cloneDeep const calendarEvent title Builder io Conf date new Date attendees Steve All good const clonedSink structuredClone kitchenSink But there is just one caveat here According to the Import Cost extension in my IDE that prints the kb cost of anything I import this one function comes in at a whole kb minified kb gzipped And that assumes you import just that function If you instead import the more common way not realizing that tree shaking doesn t always work the way you hoped you could accidentally import up to kb just for this one function While that will not be the end of the world to anyone it s simply not necessary in our case not when browsers already have structuredClone built in Browser and runtime supportAnd here is the best part cloneDeep is supported in all major browsers and even Node js and Deno Source MDN ConclusionIt s been a long time coming but we finally now have structuredClone to make deep cloning objects in JavaScript a breeze Thank you Surma About meHi I m Steve CEO of Builder io We make a way to drag drop with your components to create pages and other CMS content on your site or app visually You can read more about how this can improve your workflow here You may find it interesting or useful 2023-01-18 15:03:53
Apple AppleInsider - Frontpage News 2023 16-inch MacBook Pro vs 2021 MacBook Pro - compared https://appleinsider.com/inside/16-inch-macbook-pro/vs/2023-16-inch-macbook-pro-vs-2021-macbook-pro---compared?utm_medium=rss inch MacBook Pro vs MacBook Pro comparedApple has added powerful new M Pro and M Max chips to the inch and inch MacBook Pro Here s how they stack up versus the M Max and M Pro models inch MacBook ProAnnounced on January and available on January the new inch MacBook Pro and inch MacBook Pro models feature many of the same specifications with a few notable upgrades chiefly the new chips and an advanced HDMI port The new models can also eke out an extra hour of battery life Read more 2023-01-18 16:00:15
Apple AppleInsider - Frontpage News Deals: pick up Apple's Mac Studio with 32GB RAM for $1,845, plus $30 off AppleCare https://appleinsider.com/articles/23/01/18/deals-pick-up-apples-mac-studio-with-32gb-ram-for-1845-plus-30-off-applecare?utm_medium=rss Deals pick up Apple x s Mac Studio with GB RAM for plus off AppleCareThere s a lot to love about Apple s Mac Studio including this exclusive promo code discount bringing the standard model with GB RAM to plus off AppleCare Apple s Mac Studio is on sale Apple s powerful yet compact desktop is eligible for an exclusive discount at Apple Authorized Reseller Adorama this week where the standard configuration is on sale for with promo code APINSIDER Read more 2023-01-18 15:18:45
Apple AppleInsider - Frontpage News New HomePod & existing HomePod mini have temperature sensors https://appleinsider.com/articles/23/01/18/both-the-new-homepod-and-existing-homepod-mini-have-temperature-sensors?utm_medium=rss New HomePod amp existing HomePod mini have temperature sensorsIt s not just the new HomePod that has a temperature and humidity sensor Apple s HomePod mini has always had one but it just hasn t been activated yet Sensor for temperature and humidity in the HomePod miniWhile the initial HomePod mini teardowns missed the sensor a later one much after the HomePod mini s release spotted it A report from revealed that Apple held internal discussions about using the sensor to determine a room s temperature and relay that information to other smart home devices Read more 2023-01-18 15:16:35
Apple AppleInsider - Frontpage News Apple resurrects full-size HomePod with updated acoustics https://appleinsider.com/articles/23/01/18/apple-resurrects-full-size-homepod-with-updated-acoustics?utm_medium=rss Apple resurrects full size HomePod with updated acousticsAlmost two years after it discontinued its original HomePod Apple has launched a new version in the same size with the same form factor but improved audio and better Siri integration Apple dropped the original HomePod in March saying that it intended to focus on the then new HomePod mini instead Now the new HomePod will be available in stores and online from February Leveraging our audio expertise and innovations the new HomePod delivers rich deep bass natural mid range and clear detailed highs Greg Joswiak Apple s senior vice president of Worldwide Marketing said in a statement With the popularity of HomePod mini we ve seen growing interest in even more powerful acoustics achievable in a larger HomePod Read more 2023-01-18 15:56:22
海外TECH Engadget Shell is buying EV charging company Volta for $169 million https://www.engadget.com/shell-ev-charging-volta-acquisition-154259157.html?src=rss Shell is buying EV charging company Volta for millionOil and gas company Shell is buying electric vehicle charging operator Volta for million through a subsidiary The deal which the companies expect to close in the first half of this year amounts to cents per share around percent more than Volta s closing price on Tuesday Volta s board of directors approved the deal unanimously though it still requires the green light from shareholders It s subject to regulatory approval and other closing conditions too Shell will provide loans to Volta to give it a hand through the closing of the transaction On September th Volta had million in cash and cash equivalents compared with million at the end of quot While the EV infrastructure market opportunity is potentially enormous Volta s ability to capture it independently in challenging market conditions and with ongoing capital constraints was limited quot Volta interim CEO Vince Cubbage said in a statement quot Both Volta and Shell have a demonstrated ability to meet the changing needs of customers and this acquisition will bring that experience together to provide the options that are needed as more drivers choose electric quot The company has more than charging stations across the US and a handful in Europe typically at grocery stores and malls For a few years its DC fast charging stations were free to use for up to minutes with advertising and sponsorships helping to cover the costs However it shifted its DC fast chargers to a paid model last year Volta s more than L chargers are still free to use After the deal closes quot there will be no immediate change in driver experience quot the companies said Odd as it may seem that an oil company is buying an EV charging network it isn t the first time Shell has done so It snapped up UK network Ubitricity in for an undisclosed sum Last year Hertz and BP announced plans to set up a charging network in the US 2023-01-18 15:42:59
海外TECH Engadget Microsoft will lay off 10,000 employees as it cuts costs https://www.engadget.com/microsoft-confirms-layoffs-151816595.html?src=rss Microsoft will lay off employees as it cuts costsThe rumors of massive layoffs at Microsoft were true In a publicly posted memo from CEO Satya Nadella the company says it plans to cut jobs through its third fiscal quarter which ends in March The move is meant to quot align Microsoft s cost structure quot with demand and revenue according to Nadella ーthat is to slash expenses as sales shrink Customers boosted their digital spending during the height of the pandemic Nadella says but they re now scaling back Numerous countries are either in the midst of recessions or expecting them the executive adds Microsoft will continue to hire in quot key strategic areas quot Nadella says The company is taking on a billion restructuring charge for the severance costs consolidating building leases and unspecified changes to its hardware lineup Nadella notes that US staff will get quot above market quot severance pay as well as six months of continued healthcare coverage and stock awards As GeekWireexplains this is the second largest round of layoffs in Microsoft s history The company cut jobs in as a newly promoted Nadella scaled back Nokia s hardware business Microsoft hired aggressively during the pandemic recruiting workers in fiscal Some of those came through buyouts such as speech tech heavyweight Nuance employees and AT amp T s former ad tech wing Xandr people Microsoft s headcount is still larger than it was before the pandemic began but this is still a sharp direction change The company isn t alone in shedding jobs Meta laid off more than employees last fall as a bet on continued pandemic era growth didn t pay off Amazon meanwhile expects to drop over jobs located primarily in its retail and recruiting divisions Salesforce recently axed percent of employees The tech industry is grappling with a tougher economic reality and Microsoft isn t immune to those problems 2023-01-18 15:18:16
Cisco Cisco Blog YELLOW Evening the Odds in Education with Cisco https://blogs.cisco.com/education/yellow-evening-the-odds-in-education-with-cisco YELLOW Evening the Odds in Education with CiscoOne of the best ways Cisco can impact students globally is by partnering with innovative and prominent education institutions around the world Learn how YELLOW and CIsco s partnership is evening the odds in education 2023-01-18 15:12:58
海外科学 NYT > Science Can We Talk About How We Talk About the Weather? https://www.nytimes.com/2023/01/18/science/weather-forecasts-language.html meteorologists 2023-01-18 15:49:29
金融 RSS FILE - 日本証券業協会 株主コミュニティの統計情報・取扱状況 https://www.jsda.or.jp/shiryoshitsu/toukei/kabucommunity/index.html 株主コミュニティ 2023-01-18 15:30:00
金融 金融庁ホームページ 農林中央金庫及び商工組合中央金庫に関する「自己資本比率規制(第1の柱・第3の柱)に関する告示の一部改正(案)」等に対するパブリック・コメントの結果等の公表について公表しました。 https://www.fsa.go.jp/news/r4/ginkou/20230118.html 商工組合中央金庫 2023-01-18 17:00:00
金融 金融庁ホームページ 金融審議会「事業性に着目した融資実務を支える制度のあり方等に関するワーキング・グループ」(第6回)を開催します。 https://www.fsa.go.jp/news/r4/singi/20230118.html 金融審議会 2023-01-18 17:00:00
金融 金融庁ホームページ 「脱炭素等に向けた金融機関等の取組みに関する検討会」(第3回)議事次第について公表しました。 https://www.fsa.go.jp/singi/decarbonization/siryou/20230119.html 金融機関 2023-01-18 17:00:00
海外ニュース Japan Times latest articles Ukraine interior minister and children among dead in helicopter crash https://www.japantimes.co.jp/news/2023/01/19/world/ukraine-interior-minister-helicopter-crash/ heavy 2023-01-19 00:07:33
ニュース BBC News - Home UK inflation drops but food keeps inflation high https://www.bbc.co.uk/news/business-64311461?at_medium=RSS&at_campaign=KARANGA costs 2023-01-18 15:54:21
ニュース BBC News - Home Ian Kirwan: Boy guilty of Redditch Asda stabbing murder https://www.bbc.co.uk/news/uk-england-hereford-worcester-64235272?at_medium=RSS&at_campaign=KARANGA supermarket 2023-01-18 15:45:31
ニュース BBC News - Home Australian Open 2023 results: Emma Raducanu loses to Coco Gauff, Cameron Norrie wins https://www.bbc.co.uk/sport/tennis/64316023?at_medium=RSS&at_campaign=KARANGA Australian Open results Emma Raducanu loses to Coco Gauff Cameron Norrie winsBritish number one Emma Raducanu is out of the Australian Open after losing in straight sets to Coco Gauff but Cameron Norrie is through 2023-01-18 15:04:00
ニュース BBC News - Home Snooker match-fixing investigation - 10 Chinese players charged by WPBSA https://www.bbc.co.uk/sport/snooker/64297128?at_medium=RSS&at_campaign=KARANGA corruption 2023-01-18 15:55:01
ニュース BBC News - Home Michael Appleton: Blackpool sack head coach after seven months in charge https://www.bbc.co.uk/sport/football/64317051?at_medium=RSS&at_campaign=KARANGA appleton 2023-01-18 15:45:40
サブカルネタ ラーブロ トリポタラーメン SUNDAY@大門(浜松町) http://ra-blog.net/modules/rssc/single_feed.php?fid=206952 sunday 2023-01-18 15:00:40
仮想通貨 BITPRESS(ビットプレス) [NHK] コインベース 米暗号資産交換業大手 日本での取り引き停止へ https://bitpress.jp/count2/3_11_13529 取り引き 2023-01-19 00:37:59

コメント

このブログの人気の投稿

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