How to Create a Diff of Two Images

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

Global Population Density

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

How to Open an App from Anywhere on Mac Command Line

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

The Distribution of Surnames

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

Customizing HTML Form Validation

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

The Global Contrail Map

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

5 Web Design Trends for 2023 That You Should Pay Attention To (Sponsored)

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

Forever Chemicals in Freshwater Fish

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
1 47 48 49 50 51 190