Generating and Using Base 64 Images with JIMP

One of the JIMP library's many features is the ability to create a Base 64 string from an image. This has various uses (some nefarious...) but in this post I will demonstrate embedding a Base 64 encoded graphic as an image source in an HTML document. This is useful for small images such as logos or button graphics, and while I am using HTML the Base 64 string can also be used in CSS.

Continue reading

The JavaScript Date Type

Dates and times are less than straightforward to deal with, partly because of the varying sizes of the units which don't often fit neatly into the larger units, and partly because of the almost infinite number of ways they can be expressed in natural language.

Programming languages usually provide robust ways of handling dates and in this article I will put together a solution providing a reference to JavaScript's core date handling functionality.

Continue reading

Interactive Periodic Table in JavaScript version 1.0

The periodic table is a chart found pinned to the wall of every school chemistry lab showing various pieces of information on each element, or type of atom. The information is tightly packed and often difficult to read and understand so I decided to develop an interactive web-based version in JavaScript which is easier to use and comprehend than a static paper version.

My original intention was to simply produce a filterable version of the table, and in this post I have done just that. However, while researching the topic I found that it was far more complex than I originally realised and that there is huge scope for expanding the topic to show more infomation and also to show the existing information in different formats. This is therefore an ongoing project which I will enhance in the future. Watch this space...

Continue reading