How to Create a Diff of Two Images / / No Comments When I was a child, I loved looking for Waldo in the “Where’s Waldo?” book series. These days I’m a sucker for TMZ’s “What’s the Big Frigin Difference” images, where TMZ slightly changes an image and you have to spot the differences between the two. That got me to thinking — how easily could I automate diff’ing two images? This StackOverflow post was gold. To create a diff of two similar images, we’ll use ImageMagick’s convert command line utility with a large host of configurations: convert '(' image1.png -flatten -grayscale Rec709Luminance ')' '(' image2.png -flatten -grayscale Rec709Luminance ')' ... more → Posted in: JavaScript Tagged with: create, Diff, images
Global Population Density / / No Comments Top Row: Paris, Barcelona, New York, Bottom Row: London, San Francisco, Los AngelesUS cities tend to have lower population densities than cities in most other countries in the world. The maps above show the populations living within a 5km radius of the centers of a number of major cities. As you can see San Francisco and Los Angeles have significantly lower population densities than Paris and Maps Mania… more → Posted in: Interactive Maps Tagged with: Density, global, Population
How to Open an App from Anywhere on Mac Command Line / / No Comments Many engineers like myself live in the command line, and perform actions from command line that most others would click an icon for. I’ve always found opening apps from command line on Macs painful. You need to references the Applications directory, add .app to the name, etc. I just want to open apps by name. To open an app from any directory by its simple name, you can use the -a argument to open: open -a Cyberduck # Works regardless of case as well open -a CyBeRdUcK I love -a for a command like open. Being able to open any app by name is exactly what I want! The post How to Open an App from Anywhere on Mac Command Line appeared first on David Walsh Blog. David Walsh Blog… more → Posted in: JavaScript Tagged with: Anywhere, Command, from, line, open
The Distribution of Surnames / / No Comments The superbly named Namensverbreitungskarte is an interactive map which can show the distribution of surnames in Germany. Enter a family name into the map and you can see where people with that name lived in 1996 and in 1890. The distribution is based on German casualty lists of the 1st World War and the German phone directory from 1996.One neat feature of Namensverbreitngskarte is that you can Maps Mania… more → Posted in: Interactive Maps Tagged with: Distribution, Surnames
Customizing HTML Form Validation / / No Comments Form validation has always been my least favorite part of web development. You need to duplicate validation on both client and server sides, handle loads of events, and worry about form element styling. To aid form validation, the HTML spec added some new form attributes like required and pattern to act as very basic validation. Did you know, however, that you can control native form validation using JavaScript? validity Each form element (input, for example) provides a validity property which represents a ValidityState. ValidityState looks something like this: // input.validity { badInput: false, customError: true, patternMismatch: false, rangeOverflow: false, rangeUnderflow: false,... more → Posted in: JavaScript Tagged with: Customizing, form, HTML, Validation
The Global Contrail Map / / No Comments Global air travel is a significant contributor to climate change. A recent study revealed that aircraft contrails contribute over half of the sector’s global warming impact. The study shows how contrails (the icy clouds that form in the wake of aircraft) effectively trap heat in the atmosphere, heat which would otherwise be released into space.The Contrail Climate Initiative’s Contrail Map Maps Mania… more → Posted in: Interactive Maps Tagged with: Contrail, global
5 Web Design Trends for 2023 That You Should Pay Attention To (Sponsored) / / No Comments The start of a new year is usually a time when we start looking for ways to make something a little better. That something could be our life, work, or what we produce. Web designers, for example, might look for ways to make their designs more interesting or effective. In this post we will focus on 5 web design trends that are designed to help users get the most from the websites they visit and we will use 10 pre-built websites from BeTheme to demonstrate how best to implement those trends . BeTheme is one of the world’s most popular and highly-rated WordPress Themes with 268,000+ sales and a 4.83/5 star-rating. 5 new web design trends for 2023 To improve anything, you have to know what it does... more → Posted in: JavaScript Tagged with: 2023, Attention, design, should, Sponsored, Trends
Forever Chemicals in Freshwater Fish / / No Comments A new study by the Environmental Working Group (EWG) has found harmful levels of PFAS in freshwater fish throughout the United States. The study measured the harmful levels of ‘forever chemicals’ in freshwater fish collected across the United States. PFAS are known as ‘forever chemicals’ because they never break down in the environment. They have entered freshwater bodies across the United Maps Mania… more → Posted in: Interactive Maps Tagged with: Chemicals, Fish, Forever, Freshwater