Jump to Navigation

The Code

Nifty Glass

Nifty Glass

I had decided to create the "glass" effect popularised by OSX and Vista and while following various guides and creating some graphics in the GNU Image Manipulation Package I spotted a pattern and decided to come up with a way to create the now popular glass effect in CSS, without using any graphics at all.

Using the gradient fill in GIMP and applying those colours to the CSS used to create the Nifty Corners effect, I managed to create some pure CSS Glass buttons. Hopefully I can explain how I did this below and show you how you can create the same effect for your own projects.

Code URI Component

Java Duke

JavaScript has a handy function built in called encodeURIComponent, and the corresponding function decodeURIComponent.

These functions allow you effectively strip out parts of a string that could cause problems when sent in a URI, in a get request for example.

I also recently found it handy for encoding strings for sending to and from a JSP server over AJAX, the trouble came up when I realised that there is no built in equivalent functions server side. A quick search of the net revealed a few solutions, but none that actually worked, not in Java, or PHP, or anything else that I could have adapted. A bit surprised by this lack of a solution to a common problem, I investigated what these functions do.

AJAX Library

AJAX

Like everyone else, when I started dabbling in AJAX code I found myself repeatedly creating the same code to do the same things. There was always code to make sure I could create the XMLHttpRequest if it was there, or the Microsoft equivalent for the awkward browser. There was always event code to process, sometimes repeatedly, the response codes until I got a 4. There was usually code to present some visual indication to the user that there was a call in progress.

Now, like other programmers, if I find myself doing the same thing over and over again, it's time to write a library.

So, here is is. The Dark Snow AJAX library.

A JavaScript Framework

Scaffold

When I decided to learn JavaScript I found, quite quickly, that while it is a powerful language, which came as a surprise since I always thought of it as a simple automation lauguage for browsers, there are numerous holes.

These holes were filled by numerous framework libraries for doing all sorts of things. Be it filling in some small missing functions like addAfter to compliment addBefore, or extra trim functions for strings as you would find in PHP, there were, and still are, numerous choices.

Views from the Chavannes

Chavannes

These are numerous views I found published from the top of the Chavannes chair lift in Les Gets, France, where I did a season in the winter of 2007 - 2008.

The majority of these images are not published anywhere else, it seems they set up a large number of views, mainly from the same panning camera, but only use the best ones. A simple script here loops over the numbered views and pulls them all in.

Be warned though, these are the full sized images, scaled for this summary page, so it might take a while to load in.

Loads of Smilies

Loads of Smilies

A lot of smilies that I've gathered over the years of running my forum.

Lots of Little Flags

Little Flags

A lot of world flags, for use on websites for internationisation purposes, or, as I've used them, to put a nationality next to a user.

A clean version of this file, with all the images, can be found at http://www.darksnow.net/downloads/images/flags/.

Canvas Big Ben

Big Ben

My latest exploration of the canvas tag was a sort of extension of the canvas clocks I already made but the scope was far greater.

Canvas Clocks

Canvas Clock

Following on from my initial work with the canvas tag to create the canvas site logo generator, I worked on the dynamic aspects of the canvas tag, to prove to myself it could be used to create the sort of animations Flash and Silverlight are designed for.

This example is obviously relatively trivial but does go to show what can be achieved.

Canvas Logo Generator

DarkSnow Logo

A while ago I discovered the canvas tag and thought I would have a play around with it. This page is the first result of that exploration and has been used to quickly create bitmaps of the site logo.

The canvas tag, and libraries built on it, could become a real contender on the web. The ability to script and dynamically manipulate resolution independent vector graphics on a web page makes this potentially a viable alternative to Flash, even if the tools are not yet there.

But, as usual, certain popular browser have done their own thing and don't support it. Maybe some day, when this is more widely supported, we'll see it everywhere as a light weight replacement to anything requiring a browser plugin.