Japan, Tokyo and *me* on StreetView…

2008-08-05 (Tue)

As you may know, Google Streetview went live today in selected Japanese cities.

To celebrate this I bring you the “Random drives in Tokyo StreetView” page. (Intended as another page for WebSaver).

On your drives, if you get to Tsunashima, you may see this odd looking person:

Gavin in Streetview

Further back story on this page.


JavaScript Sudoku Solver

2008-04-23 (Wed)

Solving Sudoku with software has been rather fashionable at the office this week. So here is page that does it in JavaScript entirely on the client:

Gavin’s JavaScript Sudoku Solver

As could be expected, this is not the fastest solver in the world, but it will get there using brute force. You have an option to watch the internal decision tree or not.

Gavin's Sudoku Solver screen shot

Inspiration for the code comes from a beautiful perl three line sudoku solver by Eccles & Toad. The extremely hard test case from the list of incredibly hard puzzles strings at Sudoku Players’ Forums on sudoku.com.


More on Ordnance Survey Tile Usage

2008-04-12 (Sat)

Here’s a summary of the usage yesterday: (Interesting to note that the counter resets at 23:00 GMT)

Ordnance Survey Usage for 2008/04/11

Read the rest of this entry »


Ordnance Survey Tile Count Exceeded

2008-04-10 (Thu)

Oh-oh!

Ordnace Survey Sorry Message

Tiles Used: 34642 of 30000

I guess my OS Overlay is getting more well known! This is the first time I have run out of my allocated tiles.

I’m going to monitor this for a while to see how chronic the issue is, and if necessary, ration tiles by source IP address, or even beg the OS for a bigger quota!


CSS/JavaScript Animated Odometer

2008-04-07 (Mon)

As part of the Street View saver page, I thought it would be fun to see how far you have “driven“. So I set about finding an odometer. This proved harder than I expected since most of what was out there were static, image based web-counters.

So I set about some CSS hacking and came up with this:
Odometer screen shot

This is entirely CSS and Javascipt based and fairly browser neutral (only fairly common one missing is IE 6 – bleagh).

Full details, including API, here.

Zip download here.

Update: 2009/04/07

Two odometers should work too:

<script src=”odometer.js” type=”text/javascript”></script>
<script type=”text/javascript”>
//<![CDATA[
var n = 9999999998;
var m = 10;
var myOdometer1, myOdometer2;
function run () {
var div1 = document.getElementById("odometerDiv1");
var div2 = document.getElementById("odometerDiv2");
myOdometer1 = new Odometer(div1, {value: n, digits: 10, tenths: true});
myOdometer2 = new Odometer(div1, {value: m, digits: 10, tenths: true});
update1();
update2();
}

function update1 () {
n=n+0.0025
myOdometer1.set(n);
setTimeout("update1()", 50);
}
function update2 () {
m=m-0.001
myOdometer2.set(m);
setTimeout("update2()", 100);
}
//]]>
</script>

<body onload=”run()” >
<div id=”odometerDiv1″ style=”width:100%;”></div>
<hr>
<div id=”odometerDiv2″ style=”width:100%;”></div>


Google Street View Screen Saver

2008-04-02 (Wed)

Another Google Maps API based screen saver for WebSaver. Based on the recently released Street View API, this walks around a few US cities (NY, LA, SF and Boston to be exact). The movement is random, but a history is kept to avoid too much repeating.

View it at: http://brock-family.org/streetview.html

Google Street View Screen Saver

The Street View API is still pretty new, and it does seem to leak memory (under Safari 3), so this may slow down your system.

Now, this will be more fun when they get some cities I  know on it.


Daily Tile Usage Count for Ordance Survey GE Overlay

2008-03-29 (Sat)

One problem with the Ordnance Survey’s OpenSpace API is the relatively low number of map “tiles” that you can use (currently 30000 per site per day). However they now have an API call to let you see your current tile usage.

I have added a little embedded widget to my Google Earth page so that you can check if the count has been exceeded, and if that might be the cause of problems when using the overlay.

If you are interested the tiny piece of code is:

<body>
<div id="tilecount" style="position: absolute; left:0px; top:0px; width: 100%; height: 100%; text-align: center;">Checking tile count...</div>
<script type="text/javascript">
	var supportService = new OpenSpace.SupportService();
	supportService.getTileCount( function (tilesUsed, maxTiles) {
  		var s = "Tiles Used: " + tilesUsed + " of " + maxTiles;
		var div = document.getElementById("tilecount");
		div.innerHTML=s;
	});
</script>
</body>

YouTube Screen Saver

2008-03-29 (Sat)

YouTube Screen Saver SampleI have uploaded a YouTube page for WebSaver.

The base URL is, http://brock-family.org/youtube.html however you can control it by passing arguments at the end of the url:

mute=1 – Turns off the sound (usually a good idea)

rows=n – Sets the number of rows of videos to view. n can be any number that your system can handle

cols=n – Sets the number of columns of video. Again – limit is up to your system

For example – my favourite is 3×2 videos with mute:

http://brock-family.org/youtube?mute=1&rows=2&cols=3

One other feature – if you only have 1 video (rows=cols=1) then the page will use a cookie to remember your last position in the last video.


WebSaver 2.1

2008-03-24 (Mon)

Websaver 2.1 is now available. Full details here.

Main addition is SMS support. If you have a laptop with the Sudden Motion Sensor, the screen saver can now send these events to the web-page as cursor input.

This is primarily for the google-maps saver page: http://brock-family.org/map.html


Is thing turned on?

2008-03-24 (Mon)

Ok, my Jaiku page is not working out. It’s great for a feed about what I’m doing, feeling and thinking, but the wrong place for descriptions of code I have released, or updated – or the odd piece of tech news that I have found important.

My aim is to provide a low bandwidth feed about things I have written, improved so you can subsribe to the RSS and forget about it.