Month: December 2008

Repeatable random numbers in JavaScript

Repeatable random numbers in JavaScript

Ever since programming BASIC on the Spectrum I’d wondered why it was possible to seed a “random” number generator. But then I found I wanted to do something that would produce repeatable results, but look like a random sequence. Strangely, although JavaScript alongs you to specify a seed for Math.random() the numbers that follow aren’t …

+ Read More

Firing JavaScript functions after a .Net AJAX request

Firing JavaScript functions after a .Net AJAX request

I wanted to have a function called after data was returned to the page from a .Net AJAX call. (The idea was to fade out when you pressed “submit” and then redraw when data came back.) It turns out there are handy handlers already there to, erm, handle this: Sys.WebForms.PageRequestManager.getInstance() .add_beginRequest(StartRequestHandler); Sys.WebForms.PageRequestManager.getInstance() .add_endRequest(EndRequestHandler); Those little …

+ Read More

Near Athens – the island of Aegina

Near Athens – the island of Aegina

Whether the island is actually spelt Aegina or not I couldn’t tell – it was spelt differently on every timetable and in every guidebook. But if fits for me. We started off at Piraeus, the port that’s virtually a suburb of Athens now, and went to “Gate 8” as directed and bought a ticket. We …

+ Read More

Athens – some modern stuff

Athens – some modern stuff

Athens has a strange history of very ancient architecture, a bit of development with the Romans, and then not much for a very long period of time. Most of the city looks very 20th century, and not particularly well done at that. However there are a few large modern buildings. Unfortunately, somehow they don’t seem …

+ Read More

Athens – various old stuff

Athens – various old stuff

Athens is full of old stuff. You can’t help seeing it everywhere, and they can’t help but finding it every time they want to build something. As a result, there are quite a few museums of old stuff, or places to wander around ruins. In fact, I’m sure you could just start building a museum …

+ Read More