Blog Home  Home RSS 2.0 Atom 1.0 CDF  
Hairy Spider Blog - Friday, February 24, 2006
A web of intrigue
 
 Friday, February 24, 2006
Well I've finally got round to producing the inline CSS editor that I wanted to do in the first place. The first stab, was in C++ and although it worked, it was a complete nightmare. It didn't allow you to alter CSS files that were loaded as "@import". This new version does, it parses the CSS and adds each individual rule back to the style sheet. Simply replacing the CSSText caused a memory corruption error in MSHTML.

It's been re-written it in C# using Pavel Zolnikov's BandObjects. I've also added a few extras such as a DOM Explorer and the ability to add plugins to the band object.

While it's been writting in C# 2.0 there's not much use of the new version 2 features. Mind I was most satisfied with my first foray into using generics. I didn't think that there'd be much use for them but I did find a use, albeit slightly contrived.

So you want to see the screen shot?



OK, so now you like the look of it, you want to know how to get it and play with it?

I really wanted to deploy this as with the proper installer however, C# Express doesn't include that so you going to have to install the file manually:

First of all download DOM Helper.

Extract the files in that archive to a location on your harddrive that you can remember (e.g. c:\DOMHelper\).

Next you'll need to regasm the assembly open a cmd shell ( Start -> Run -> cmd) and type:

"%windir%/Microsoft.Net/Framework/v2.0.50727/regasm" /codebase c:\DOMHelper\DOMHelper.dll

This should have registered the assembly, and the next time you open Internet Explorer you will be able to view DOM Helper by choosing it from View -> Explorer Bars -> DOM Helper.

If for any reason you don't like it to uninstall run the following command

"%windir%/Microsoft.Net/Framework/v2.0.50727/regasm" /u c:\DOMHelper\DOMHelper.dll


Thanks to www.famfamfam.com/lab/icons/silk/ for the icons

If you want to know more, then please let me know.

2/24/2006 2:32:05 PM (GMT Standard Time, UTC+00:00)  #      c-sharp | DOM Helper | Downloads | Inline CSS Editor  | 
 Tuesday, February 21, 2006
Following on from a previous entry on powerpoint presentations: http://www.hairy-spider.com/2004/10/29/ExtractingAFlashFileFromAPowerpointPresentation.aspx

I've compiled the source included in that entry and uploaded it to the website for general consumption. I've done nothing to the code other than compile it.

When you download the file, you must extract the file somewhere on your machine. Please put it in a memorable and easy location, e.g. c:\

Then you need to open a command window ( start -> run... -> cmd) then you need to type something like:

c:\extractaflash.exe path_to_my_scrap_file.scrap c:\outfile.swf

This will then create a new file in the c:\ location called outfile.swf which will be the shockwave flash object.

I would work on a gui application but I don't have any sample scrap files to hand. So you'll have to make do with this.

You can now download the extractaflash executable.

As a side note, it's amazing how something you do can end up all over the shop in all sorts of code that you as the original writer of the code have no knowledge about. I don't really mind people using my code but a little bit of appreciation would be nice. I know that licenses are supposed to stop this sort of thing, but it's just a rude not even including a reference to the originator of the code.

2/21/2006 1:29:18 PM (GMT Standard Time, UTC+00:00)  #      c-sharp  | 
 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  | 
Copyright © 2008 Rhys Jeremiah. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: