Using Generative AI to Detect Cat Breeds

Let’s be honest, what other use is there for generative AI than working with cats? If you read my previous post on Google’s Gemini AI launch, you may have seen my test prompts asking it to identify the kind of cat shown in a picture. I decided to turn this into a proper web application as a real example of the API in action. Here’s what I came up with. The Front End # For the front end, I decided to make use of a native web platform feature to access the user’s camera via a simple HTML form field. By using capture="camera" on an input tag, you directly get access to the device camera. There are more advanced ways of doing this, but for quick and simple, it works... more →
Posted in: JavaScript

Coins Hoards from the Roman Empire

Ancient Rome had significant trade links with India, particularly during the Roman Empire under the rule of Augustus and onwards. The Silk Road and Indian Ocean trade routes facilitated the exchange of goods to Rome from India, including textiles, spices, gems, and other luxury items. You can find evidence of this trade between the Roman Empire and India on this interactive map of Maps Mania… more →
Posted in: Interactive Maps

AutoGrow Textareas with CSS

As the demands of the web change and developers experiment with different user experiences, the need for more native language improvements expands. Our presentation layer, CSS, has done incredibly well in improving capabilities, even if sometimes too slow. The need for native support for automatically expanding textarea elements has been long known…and it’s finally here! To allow textarea elements to grow vertically and horizontally, add the field-sizing property with a value of content: textarea { field-sizing: content; // default is `fixed` } The default value for field-sizing is fixed, signaling current behavior. The new behavior, content, will expand as much as possible.... more →
Posted in: JavaScript

How Well Do You Know New York’s Subway?

Following the huge success of his London Tube Memory Game Benjamin Tran Dinh released a New York subway version of the game, called the New York City Subway Memory Game.Benjamin’s game requires you to name all 472 New York City subway stations. The game is therefore more of a marathon than a sprint and I suspect will take you at least a few hours to complete. If you don’t have that much time to Maps Mania… more →
Posted in: Interactive Maps

An Image Dialog Web Component

A lot of the talk (well, on Mastodon at least) lately concerning web components has been on "HTML Web Components". The idea is that web components can progressively enhance "regular" HTML in the DOM instead of completely blowing it away with the Shadow DOM. (You can find a deeper discussion of this in Jim Nielsen’s blog post.) This is something that’s been on my mind for a while now as well and I’ve kept my eyes open for opportunities to build web components that enhance, not replace, content. With that in mind, I built a really simple component that does something fun. We’ve all seen sites that use JavaScript to provide a thumbnail and detail view... more →
Posted in: JavaScript

Google Gemini and AI Studio Launch

While it feels like just yesterday I first blogged about Google’s PaLM APIs and MakerSuite, it was actually over two months ago, and of course, GenAI offerings are iterating and improving at lightning speed. In the past week, Google has announced Gemini, their new generative AI model. Naturally, I was curious about the API aspect of this and took a quick look. MakerSuite rebranded as AI Studio # First off, the web UI (which I reviewed back in my first post) has been renamed to the generic and boring, but probably more enterprise and appropriate, AI Studio. Along with that, when creating new prompts, it will default to use Gemini models. (You can still select PaLM if you want.) Another change…... more →
Posted in: JavaScript

Racial Profiling in Redlining Maps

The University of Richmond has released a large update to its amazing Mapping Inequality project. This update includes introductions to the redlining maps produced for around 80 cities, written by scholars and historians and the addition of around 100 new cities to the project.Under President Franklin D. Roosevelt’s New Deal black homeowners were discriminated against by redlining maps. These Maps Mania… more →
Posted in: Interactive Maps

Discover Your Neighborhood Tree Score

The Woodland Trust has released a new interactive map which reveals the amount of tree canopy cover available in thousands of UK neighborhoods. Using the map you can discover the ‘tree equity score’ of Lower Layer Super Output Area (LSOA) in England, Scotland, Wales and Northern Ireland. If you click on your neighborhood on the Tree Equity Score UK map you can discover its ‘tree equity score’, Maps Mania… more →
Posted in: Interactive Maps
1 28 29 30 31 32 189