The Riskiest Places to Live in America

Los Angeles County is a dangerous place to live. According to the National Risk Index the residents of Los Angeles County are more likely to suffer from a natural hazard than anywhere else in the United States. The residents of Los Angeles County are more likely to experience an earthquake than any other US location. They also have one of the highest chances of experiencing a landslide and Maps Mania… more →
Posted in: Interactive Maps

Working with Pasted Content in JavaScript

This began as me wanting to build an Alpine.js application that handled pasted input, but I realized before I looked into handling this with Alpine, it made sense to start with basic vanilla JavaScript at first. I’ve worked with the clipboard before, mainly storing information to it, but this was the first time I looked at handling input from the clipboard. The web platform handles it rather nicely, but as with most things, there are a few interesting things you need to be aware of. Here’s what I found. Listening To the Event # The first thing you need to do is actually listen to the event. While you probably listen on a part of a DOM, it made the most sense to me to listen at the... more →
Posted in: JavaScript

France Surrenders to Facism

The far-right National Rally has won 33% of the vote in the first round of France’s parliamentary elections. You can view the results in each constituency in Le Monde’s French elections: Map of the first round’s results.Le Monde’s map is a sea of brown, revealing that the National Rally has managed to become the most popular party in electoral districts across the whole country. There is a Maps Mania… more →
Posted in: Interactive Maps

1000+ Streets Called Washington

George Washington has more streets named after him in America than any other person in history. There are 1,399 streets named for the Founding Father in the United States, including George Washington Memorial Parkway in Washington DC and a number of Washington Streets in the state of Washington.At the other end of the scale Babe Ruth has only 3 U.S. streets named in his honor. There are 11 Maps Mania… more →
Posted in: Interactive Maps

Storing Recipes in IndexedDB

The last two sessions of my show, <Code><Br>, were taken up talking about one of my favorite web platform features, IndexedDB. This is a topic I’ve covered many years on the blog (I even wrote a book on it back in 2016) so I thought it would be a good topic for the show. (I will include links to those episodes at the end of this post.) In the first session, Sue, one of the folks watching the live stream, suggested I use recipes as an example of data to persist in the browser. I thought this was perfect as recipe data can get quite complex. You can see an example of that in the post I wrote earlier this month on scraping recipes. For the context of the live stream, I decided... more →
Posted in: JavaScript

Who is Your Closest Team?

If you have ever wondered which baseball team you should support then you need Maptitude’s Closest Major or Minor League Baseball Stadium by Drive Time map. The map shows you which affiliated major or minor baseball stadium you can drive to in the quickest time in the contiguous United States.The map is a sort of combination of a voronoi diagram and an isochrone map. However, Maps Mania… more →
Posted in: Interactive Maps

Creating a Content Assistant with Gemini and GenAI

One of the use cases for generative AI that I’ve discussed before is the idea of using the tool to aid in the writing process. I’m not talking about creating content so much as creating suggestions and providing feedback about the content you yourself have created. This past weekend I worked on a "general purpose" tool with this in mind and thought I’d share it to get your feedback. ("You" being the smart readers of this blog who keep me honest when I show something stupid. 😉 The Application # The application itself is rather straightforward. It asks two questions – first, what are you trying to accomplish with your writing and what are the desired... more →
Posted in: JavaScript

How to Set Date Time from Mac Command Line

Working on a web extension that ships to an app store and isn’t immediately modifiable, like a website, can be difficult. Since you cannot immediately deploy updates, you sometimes need to bake in hardcoded date-based logic. Testing future dates can be difficult if you don’t know how to quickly change the date on your local machine. To change the current date on your Mac, execute the following from command line: # Date Format: MMDDYYYY sudo date -I 06142024 This command does not modify time, only the current date. Using the same command to reset to current date is easy as well! The post How to Set Date Time from Mac Command Line appeared first on David Walsh Blog. David Walsh... more →
Posted in: JavaScript
1 12 13 14 15 16 190