Blog Home  Home RSS 2.0 Atom 1.0 CDF  
Hairy Spider Blog - Friday, February 17, 2006
A web of intrigue
 
 Friday, February 17, 2006
2/17/2006 12:32:45 PM (GMT Standard Time, UTC+00:00)  #      Misc  | 
 Thursday, February 16, 2006
Recently a few of the items in my start menu have stopped working. Everytime I try to open the Run box I get a error message saying that windows cannot create a shortcut. I can get around this by doing Windows-Key + R. Help and support has the same error.

However, if I leave it too long, the whole of the start menu stops working then it's time to kill the explorer process and reload it. I tried rolling back to a previous state, and this seemed to have fixed it for a while. But it has started happening again.

I've read somewhere that regsrvr shell32.dll will work, but I've tried it with no success.

I haven't found any fix to this issue, and neither does anyone else. I'm investigating but we'll have to see if I'm going to have to rebuild my OS. If I do - I'll be really annoyed.

2/16/2006 9:16:12 PM (GMT Standard Time, UTC+00:00)  #      Misc  | 
 Wednesday, February 15, 2006
2/15/2006 3:46:26 PM (GMT Standard Time, UTC+00:00)  #      gmail | google  | 
 Tuesday, February 07, 2006
I think that Google have found a USP for their messenger application: you can archive your "chats" online.

It seems to have been the case with a lot of google products lately big promise, small delivery. Certainly Google Talk has suffered from few features which should be standard. Now it seems that there is a reason to use it, and that is that every chat you have using Google Talk can be archived in your gmail account and presumable included in any searches. This is a big leap forward, it's been ages since there has been any visible movement for Google Talk. I wonder how long it will be before those wacky Google developers allow you to send emoticons, or possibly in google speak "Gemicons."

I'd be interested to see what the online version is like. This is a departure from the usual, no big 2 year beta, now it's just a big announcement of a beta at some point. Maybe after the video and analytic debarcles, Google are being a little less risky. I hope not.





2/7/2006 10:36:52 AM (GMT Standard Time, UTC+00:00)  #      gmail | google  | 
 Friday, February 03, 2006
Well I've been sat at home for too long now. I'm finding that you can't hold a conversation with a blank wall. So I've decided to make more of an effort to get myself back in some form of gainful employment.

So if you have a proposition to make please get in touch, my details are scattered across this site, you could even drop me a comment. I can send through a CV at a moments notice.


2/3/2006 3:45:32 PM (GMT Standard Time, UTC+00:00)  #       | 
 Thursday, February 02, 2006

Since I installed .Net version 2 I haven't been able to create any new version 1 websites in visual studio 2003. Any .net pages are 404'd and debugging has also broken. Old sites still works.

I found a way to work around this. To get a site working you need to create a new virtual directory, then copy the code over and change the relative settings in the csproj and webinfo files.

I believe that it's got something to do with the way that the virtual directories are being created by Visual Studio. Looking at the information in the IIS Metabase yeilds the following differences between a working application and a broken one:

Key nameworkingfailing
KeyType IIsWebVirtualDir IIsWebDirectory
Win23Error 0 !Missing!
Path !path to site! !Missing!
DirBrowseFlags 1073741886 !Missing!
AccessFlags 513 !Missing!
ScriptMaps !Missing! .htw,C:\WINNT\System32\webhits.dll,3,GET,HEAD,POST

There are also differences in the keys on the bin folder:

Key nameworkingfailing
KeyType !Missing! IIsWebDirectory

Updating the broken setting to those of the fixed settings seems to resolve the situation. If I were so inclined - I'd knock out a script. As it is, I'm tired after writing that dictionary definition thing.

2/2/2006 12:32:36 PM (GMT Standard Time, UTC+00:00)  #      .net | c-sharp  | 

I've just been reading a book with words like solipsism. What the hell does that mean?

Obviously I had to pick up the dictionary and scan through until I found what the word meant. However, I didn't - I admit it: I'm too lazy to do that so I still don't know what solipsism means. It sounds great, but to me, totally meaningless. The reason why I didn't do it was because there were too many steps involved: Put the book down, Find the dictionary, pick it up, find the right page, read the description, put the dictionary back, pick up the book, find the page, re-read the sentence.

Argh! It's a nightmare. I was then thinking how much easier it would be reading books on the web, it's simple to look up definitions. Then I realised it was just as hard. Wouldn't it be nice to have an easy way to lookup a definition, what I'd like to do is to highlight a word, and press a key.

Well now I can do this. Try it out on this page, highlight a word and press the d key. There is a problem with Mozilla browsers, as I can't find any way to position to the dictionary definition by the selected text. In IE there isn't a problem.

In theory this could be incorporated on any web page just by including this script containing all the code

I would need to change the paths so that they reference this site, but that could be done.

The definitions come from www.dict.org and the code to get it from there can be viewed in the javascript files.

Here's a section of random text for you to play with:

I never spend much time in school but I taught ladies plenty. It's true I hire my body out for pay, hey hey. I've gotten burned over Cheryl Tiegs, blown up for Raquel Welch. But when I end up in the hay it's only hay, hey hey. I might jump an open drawbridge, or Tarzan from a vine. 'Cause I'm the unknown stuntman that makes Eastwood look so fine.

One for all and all for one, Muskehounds are always ready. One for all and all for one, helping everybody. One for all and all for one, it's a pretty story. Sharing everything with fun, that's the way to be. One for all and all for one, Muskehounds are always ready. One for all and all for one, helping everybody. One for all and all for one, can sound pretty corny. If you've got a problem chum, think how it could be.

Top Cat! The most effectual Top Cat! Who's intellectual close friends get to call him T.C., providing it's with dignity. Top Cat! The indisputable leader of the gang. He's the boss, he's a pip, he's the championship. He's the most tip top, Top Cat.

80 days around the world, we'll find a pot of gold just sitting where the rainbow's ending. Time - we'll fight against the time, and we'll fly on the white wings of the wind. 80 days around the world, no we won't say a word before the ship is really back. Round, round, all around the world. Round, all around the world. Round, all around the world. Round, all around the world.

Hong Kong Phooey, number one super guy. Hong Kong Phooey, quicker than the human eye. He's got style, a groovy style, and a car that just won't stop. When the going gets tough, he's really rough, with a Hong Kong Phooey chop (Hi-Ya!). Hong Kong Phooey, number one super guy. Hong Kong Phooey, quicker than the human eye. Hong Kong Phooey, he's fan-riffic!

Text supplied by www.malevole.com
2/2/2006 11:55:48 AM (GMT Standard Time, UTC+00:00)  #      DictionaryDefinitions | Javascript  | 
 Wednesday, January 25, 2006
Last night I was restless, I had one of the nights where ideas pop into my head.

Anyway I was thinking what was happening on the other side of the world right now. Well then I wondered what was actually on the other side of the world. So then I thought how do I define that. Well, as far as I'm concerned there are three extra locations that could be described as the other side of the world:

The exact opposite this would be reached by digging a whole through the centre of the earth, and where you break the surface is the other side of the world. Aswell as this there are also the mirror locations as reflected by the equator and the imaginary meridian 180° away.

So I wrote this Gmap implementation to see what's opposite any location on the globe. As it is given that the world is pretty much covered by water there's very little to see.

1/25/2006 11:02:55 AM (GMT Standard Time, UTC+00:00)  #      gmap  | 
So how the hell do you convert from one coordinate system to another. Well the proper way would be to study and learn all about 3D trig.

The easy way is to read this paper: National GPS Network information: Annexe C. Converting between grid Eastings and Northings and ellipsoidal latitude and longitude

I've done this and it made my eyes bleed. I've taken the information in it and produced the following C# code:

using System;


namespace tt
{
/// /// /// public class LatLonConversions
{
const double a = 6377563.396;
const double b = 6356256.91;
const double e2 = (a -b)/a;
const double n0 = -100000;
const double e0 = 400000;
const double f0 = 0.999601272;
const double phi0 = 0.855211333;
const double lambda0 = -0.034906585;
const double n = (a-b)/(a+b);


private LatLonConversions()
{ }

public static LatLon ConvertOSToLatLon(double E, double N)
{
double phi = 0;
phi = (N-n0)/(a*f0) + phi0;
double M = b * f0 * ( (1 + n + 5/4*n*n + 5/4*n*n*n)*(phi - phi0) - (3*n + 3*n*n + 21/8*n*n*n) * Math.Sin(phi-phi0) * Math.Cos(phi+phi0) +
(15/8*n*n + 15/8*n*n*n) * Math.Sin(2*(phi-phi0))*Math.Cos(2*(phi+phi0))-35/24*n*n*n*Math.Sin(3*(phi-phi0))*Math.Cos(3*(phi+phi0)));

while (N-n0-M>=0.01)
{
phi = (N-n0-M)/(a*f0)+phi;
M = b * f0 * ( (1 + n + 5/4*n*n + 5/4*n*n*n)*(phi - phi0) - (3*n + 3*n*n + 21/8*n*n*n) * Math.Sin(phi-phi0) * Math.Cos(phi+phi0) +
(15/8*n*n + 15/8*n*n*n) * Math.Sin(2*(phi-phi0))*Math.Cos(2*(phi+phi0))-35/24*n*n*n*Math.Sin(3*(phi-phi0))*Math.Cos(3*(phi+phi0)));
}

double v = a*f0*Math.Pow(1-e2*Math.Sin(phi)*Math.Sin(phi),-0.5);

double p = a*f0*Math.Pow(1-e2*Math.Sin(phi)*Math.Sin(phi),-1.5)*(1-e2);
double n2 = v/p-1;

double vii = Math.Tan(phi)/(2*p*v);
double viii = Math.Tan(phi)/(24*p*v*v*v)*(5+3*Math.Tan(phi)*Math.Tan(phi) + n2 - 9*Math.Tan(phi)*Math.Tan(phi)*n2);
double ix = Math.Tan(phi)/(720*p*Math.Pow(v, 5)) * (61 + 90 * Math.Tan(phi) * Math.Tan(phi) + 45 * Math.Pow(Math.Tan(phi), 4));
double x = (1/Math.Cos(phi))/v;
double xi = (1/Math.Cos(phi))/(6*Math.Pow(v, 3)) * (v/p + 2*Math.Pow(Math.Tan(phi), 2));
double xii = (1/Math.Cos(phi))/(120*Math.Pow(v, 5)) * (5 + 28*Math.Pow(Math.Tan(phi), 2) +24*Math.Pow(Math.Tan(phi), 4));
double xiia = (1/Math.Cos(phi))/(5040*Math.Pow(v, 7)) * (61 + 662*Math.Pow(Math.Tan(phi), 2) +1320*Math.Pow(Math.Tan(phi), 4)+ 720*Math.Pow(Math.Tan(phi), 6));

double e = (E-e0);
double lon = (phi - vii * e*e + viii*e*e*e*e-ix*e*e*e*e*e*e ) * 180 / Math.PI;
double lat = (lambda0 + x*e - xi*e*e*e + xii*e*e*e*e*e - xiia*e*e*e*e*e*e*e) *180 / Math.PI;



return new LatLon(lon, lat);
}
}

public class LatLon
{
public double Latitude;
public double Longitude;


public LatLon()
{
Latitude =0;
Longitude =0;
}

public LatLon(double lat, double lon)
{
Latitude =lat;
Longitude =lon;
}

}

}

You can test an implementation of this code using my OS2LatLong webservice.
1/25/2006 10:54:01 AM (GMT Standard Time, UTC+00:00)  #      .net | c-sharp | gmap  | 
 Friday, December 30, 2005
I wanted to have some fun with the Google Maps API I had a feed of data so I thought that I'd use the feed which comes with a little bit of information tagged to a postcode and use that power the google map.

Here's the link to view some posh vehicles on a gmap of the uk

I had some real fun converting the UK style OS map references to lat and long. Which I'll cover in the next post.

12/30/2005 12:19:22 PM (GMT Standard Time, UTC+00:00)  #      .net | gmap | google  | 
Copyright © 2008 Rhys Jeremiah. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: