. Topicala Page Index Token

A Journal about the experiences I have developing little applications in C#, Perl, Html and Javascript and talking about things new things that I use. Always Geeky; Always Nerdy; Always poor Grammer!

I am a Software Analyst Developer working in Southport, England but living in Liverpool. I develop mainly in C# and ASP.Net. I have been developing comercial software for several years now. I maintain this site (hosted at SwitchMedia UK) as a way of exploring new technologies (such as AJAX) and just generally talking about techie geek issues. This site is developed through a host of Perl scripts and a liberal use of Javascript. I enjoy experimenting with new technologies and anything that I make I host here.

Quick Search

Web www.kinlan.co.uk

Friday, February 24, 2006

C# CSS Classname Regex

As promised, although a little late I have updated the Regex to get CSS classnames via C#. The problem I had was that it would find file extensions in a url specified by the "url(xyz.png)" in an attribute.

I added a little negative look behind and now it seems to work prety well:

string css = @"
.someclass
{
background: white url(someimage.png) repeat-x top left;
}
.someclass2
{
background: white url ( someimage.png) repeat-x top left;
}
";
MatchCollection arr = Regex.Matches(css, @"(?<!url\s*\(.*)(\.[-]?[_a-zA-Z][_a-zA-Z0-9-]*|[^\0-\177]*\\[0-9a-f]{1,6}(\r\n[ \n\r\t\f])?|\\[^\n\r\f0-9a-f]*)");
string class1 = arr[0].Value;
string class2 = arr[1].Value;

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, , , , , , ,

My Related Documents
, ,

Related Amazon Books
Compressed Image File Formats: JPEG, PNG, GIF, XBM, BMP (ACM Press S.): / PNG: The Definitive Guide: / Web Designer's Guide to PNG, GIF, JPEG: / CSS Pocket Reference: / Professional CSS: Cascading Style Sheets for Web Design: / Regular Expression Pocket Reference: / Regular Expression Recipes: A Problem-Solution Approach: / Regular Expression Recipes for Windows Developers: a Problem-solution Approach: /

Related Images From Flickr

Wednesday, February 22, 2006

Not going to update the style of this site

I was thinking about it, like I said in my previous post, but I have still couldn't think of a design that I really really liked, something really simple but wouldn't make people go "ick".

Ah well, if I get time I will update the style :)

Technorati Tags
[feed], [feed], [feed], [feed]

Related Wikipedia Documents

My Related Documents
, ,

Related Amazon Books
Agile Web Development with Rails: / Head First HTML with CSS & XHTML: / Don't Make Me Think!: A Common Sense Approach to Web Usability: / Stylin' with CSS: A Designer's Guide: / The ZEN of CSS Design: Visual Enlightenment for the Web: /

Related Images From Flickr

Saturday, February 18, 2006

Coding Horror

Coding Horror [http://www.codinghorror.com/blog/] is a brilliant blog. It is the kind of blog that I like to read at the moment, it has some insighful entries and is just generally a good blog to read. I wish I could style myself around this Blog.

I might try the layout of that site in my own blog because it is very crisp and clean, my site is bloated, slow and ugly colours.

I am pretty sure people find my entries hard to read.

I know having a good looking blog doesn't make a good blog, but I think a blog that is easy to read and to follow is far better.

Anyway over the next week I will take a backup of this template and try a simpler much crisper layout.

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, , , ,

My Related Documents
, ,

Related Amazon Books
Effective STL: 50 Specific Ways to Improve the Use of the Standard Template Library (Professional Computing S.): / The STL Tutorial and Reference Guide: C++ Programming with the Standard Template Library (Professional Computing S.): / Generic Programming and the STL: Using and Extending the C++ Standard Template Library (Professional Computing S.): / Perl Template Toolkit: / MAC OS X Web Services: Using Applescript, Cocoa, Sherlock and the Webobjects Template: /

Related Images From Flickr

Thursday, February 16, 2006

Openseach and IE7 Beta 2 update

The Opensearch spec that I wrote the other day was a little inaccurate, thanks to Michael Fagan for the comment.

Nice. I look forward to the day when all blogs offer this.Btw, your
ShortName is much longer than 16 characters, the maximum, so you should be using
LongName instead.

See http://opensearch.a9.com/spec/1.1/description/#longname
. Also, while your OpenSearch Description file is correct, your display on the
blog post uses some lowercase characters when they should be in uppercase.
Somebody might get confused if they copy that and find out it doesn't
work.



I have ammended the XML so that it is more in line with the spec and includes along name. I have also added in a URL for RSS results based off Google's Blog search.

One thing it doesn't do is integrate into http://www.A9.com because the search engine is not on my domain. It is a pity really, but I can see why they do it. I could route all the search results through a proxy script but I think that would be even more unfair to Google.

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, , , , ,

My Related Documents
, , , , ,

Related Amazon Books
The Search: How Google and Its Rivals Rewrote the Rules of Business and Transformed Our Culture: / The Google Story: / Winning Results with Google Adwords: / Building Your Business with Google for Dummies: / Beginning RSS and Atom Programming: / RSS and Atom: Understanding and Implementing Content Feeds and Syndication: / Content Syndication with RSS: / RSS and Atom Hacks: /

Wednesday, February 15, 2006

New Site Partner

This site has a partner for the while. Check out Shopzilla UK at the top right of the page if you are interested in Laptops or Price Comparisons in the UK.

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, ,

My Related Documents
, ,

Related Amazon Books
Laptops for Dummies (For Dummies S.): / Upgrading and Repairing Laptops: / Upgrading and Fixing Laptops for Dummies (For Dummies S.): / Why We Buy: The Science of Shopping: / Constructing Usable Shopping Carts: Designing and Building Great E-Commerce Applications: /

Related Images From Flickr

Google Adsense for Search and IE7 Openseach Provider

I managed to speak to the Google Adsense for Search team about using my Google Adsene Account in the SiteSearch in IE7, suffice to say I was correct in my first guess: You are not allowed to use anything but their search boxes. I think this is a bit limiting, but the person I spoke to said they would pass it to their product team for consideration.

So in summary, using IE 7's open search provider with Adsense is a no no.

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, , , , ,

My Related Documents
, , , ,

Related Amazon Books
Make Easy Money with Google: Using the Adsense Advertising Program: / The Search: How Google and Its Rivals Rewrote the Rules of Business and Transformed Our Culture: / Winning Results with Google Adwords: / Google Pocket Guide: /

Related Images From Flickr

Google Search and IE 7 Search Provider

If you are using IE7 Beta 2 and you are looking this entry from my site you should notice that I have provided a customer search provider.

The search provider hooks up with Google search, so you can now search my site for specific text. I am not too sure if this breaks any T's & C's of Google but I will take it down if anyone complains.

This is just a showcase really to show you how easy it is to set up a custom site search provider in Internet Explorer 7 Beta 2.

There is an OpenSearch file at http://www.kinlan.co.uk/opensearch.xml which contains the following:

<opensearchdescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<shortname>Paul Kinlans Blog: Google Search</shortname>
<description>A Google Search from Paul Kinlans C#, .Net Framework</description>
<url template="http://www.google.com/custom?q={searchTerms} &domains=www.kinlan.co.uk& sitesearch=www.kinlan.co.uk&amp;forid=1&ie=ISO-8859-1&oe=ISO-8859-1&safe=active& cof=GALT:#008000;GL:1;DIV:#336699;VLC:663399; AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF; LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF; FORID:1;&hl=en" type="text/html">
</opensearchdescription>

And each page has the following <link> in the section.
<link title="C#, .Net Framework: Google Search" href="http://www.kinlan.co.uk/opensearch.xml" rel="search" type="application/opensearchdescription+xml" />

Hope this helps anyone who wants to set up search providers.

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, ,

My Related Documents
, , , ,

Related Amazon Books
The Search: How Google and Its Rivals Rewrote the Rules of Business and Transformed Our Culture: / Make Easy Money with Google: Using the Adsense Advertising Program: / Google Hacks: / Google Maps Hacks: / Windows Longhorn Developer Beta Preview: /

Related Images From Flickr

Tuesday, February 14, 2006

A Quick C# Question: Sealed classes

If you have a sealed class are all the methods inside the sealed class also typed as sealed.

I am asking this because I have some virtual functions inside an abstract class that I would like to seal, I don't want the class to be extended so sealing the class makes sense. Therefore if I just seal the class can all the methods be considered sealed by the JIT'er or do I have to seal the methods too.

Technorati Tags
[feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, , , , , , , ,

My Related Documents
,

Related Amazon Books
Professional ASP.NET 2.0: / Programming C#: / Pro C# 2005 & the .NET 2.0 Platform: / Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries: / Windows Forms Programming in C#: /

Related Images From Flickr

Monday, February 13, 2006

Rabbits

This is just a shout for one of my friends.

If you are into rabbits [i.e the animal] the check out http://nibblin.com, it is a forum for rabbit owners and enthusiasts. It has a nice comunity already.

Technorati Tags
[feed], [feed], [feed]

Related Wikipedia Documents
, , ,

My Related Documents

Related Amazon Books
Pippin and Peanut: The Adventure Begins: /

Related Images From Flickr

Internet Explorer Browser Objects in C#

Rich Crane reports that he has posted the Code to Internet Explorer Browser Modules along with some examples.

It looks like a pretty cool framework for getting .Net to interact with Internet explorer. I can't wait to have a play, and not have to worry about me handling all the COM interop etc [it is already done in this framework]. I did notice that the number of Browser Events that are available seems to be less than what IE exposes. Maybe I am wrong though.

Staying on the subject, Sky Software who produce EZShellExtensions.Net and the Shell MegaPack.Net have produced new versions of their software for developers. The EZShellExtensions.Net software allows you to create Internet Explorer toolbands and Internet Explorer vertical and horizontal bands and most things you would want to do via Shell Extensions in .Net. The ShellMega pack is a collection of their own Shell Extensions that they have created ready for you to use.

Both packages support VS.Net 2002 - 2005 so that means it supports the .Net framework v1.0 - v2.0, whilst Rich Cranes project only supports VS 2005 from what I can tell. The prices of the product is quite reasonable for the stuff you get.

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, ,

My Related Documents
, , ,

Related Amazon Books
Classic Shell Scripting: / Microsoft Content Management Server 2002: A Complete Guide: / Windows NT Shell Scripting: / Ajax in Action: / Essential COM: /

Related Images From Flickr

Google Search Query: internet explorer 7 favorites

A user visited my site with the Query "internet explorer 7 favorites". My original content for IE7 favorites was with Beta 1, so I thought that it was only fair that I provided an update not that Beta 2 is on the streets.

I had two major problems:
  1. The favorites menu when open would crash IE7 Beta 1
  2. The favorites menu when extremly large would file the screen and you couldn't see what was happening.

It seems that both of my issues have been fixed in Internet Explorer Beta 2, the menu now doesn't take the entire screen, it works a similar way to the IE 6 browser where it is one long scrollable menu. And also it doesn't crash anymore. :)



Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, ,

My Related Documents
, , ,

Related Amazon Books
Microsoft Internet Explorer 7: Introductory Concepts and Techniques: / Course Ilt Internet Explorer 7: / Internet Explorer 7: Basic: / Explorer's Guide to the Semantic Web: /

Related Images From Flickr

Friday, February 10, 2006

Microsoft Feed Manager Events Example

Thanks to Matt Dotson, who gave some code up on GotdotNet that shows how to get the GetWatcher in the Feed Management Api to work.

I had a problem the other day with it. I couldn't get the Watcher attached to the feed. It was a simple casting problem and my misunderstanding of Interop.

Here is my code

FeedsManagerClass fmc = new FeedsManagerClass();
IFeed f = (IFeed) fmc.GetFeed("Internet Explorer Team Blog");
IFeedEvents_Event ife = (IFeedEvents_Event) f.GetWatcher(FEEDS_EVENTS_SCOPE.FES_ALL, FEEDS_EVENTS_MASK.FEM_FEEDEVENTS );
ife.FeedItemCountChanged += new IFeedEvents_FeedItemCountChangedEventHandler(ife_FeedItemCountChanged);
ife.FeedDownloadCompleted += new IFeedEvents_FeedDownloadCompletedEventHandler(ife_FeedDownloadCompleted);
f.Download();

Now my code works. I was casting to an FeedsWatcherClass rather than the IFeedEvents_Event interface.

Silly me.

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, , , , , ,

My Related Documents
, , , , , ,

Related Amazon Books
User Interface Design for Programmers: / Designing the User Interface: / Essential COM: / Developing Feeds with RSS and Atom: / Syndicating Web Sites with RSS Feeds for Dummies (For Dummies S.): / Beginning RSS and Atom Programming: / Hacking RSS: / Filtering the Web to Feed Data Warehouses: /

Related Images From Flickr

Thursday, February 09, 2006

Microsoft Feed Management API c# problems

I am trying to use the Microsoft Feed Management API in IE7 Beta 2 and I am trying to hook up the a feed watcher event to see when the counts of items in a feed change.

However, I can't get past the following line:
FeedFolderWatcher fwc = new FeedFolderWatcherClass();

I get the exception:
Retrieving the COM class factory for component with CLSID {281001ED-7765-4CB0-84AF-E9B387AF01FF} failed due to the following error: 80040154

Which from what I can tell the CLSID is not installed on my system.

What can I do? Is this an install problem or a problem with the MFM API?
Does anybody have the full screen saver c# example so that I can see what is going on?

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, , , , ,

My Related Documents
, , , ,

Related Amazon Books
Programming C#: / Filtering the Web to Feed Data Warehouses: / Developing Feeds with RSS and Atom: / Beginning RSS and Atom Programming: / Hacking RSS: / RSS and Atom: Understanding and Implementing Content Feeds and Syndication: /

Related Images From Flickr

A Question about RSS Readers

Does anyone know of any RSS readers that can filter out languages?

That is I would like an RSS reader that will only display English RSS items [or any other language that I choose to filter by]

Currently I use SharpReader which implements IBlogExtension, but that is about it. It doesn't provide an API to filter individual posts.

Maybe the Microsoft Feed Management API can help me out?

Technorati Tags
[feed], [feed], [feed], [feed], [feed], [feed], [feed]

Related Wikipedia Documents
, , , , , , ,

My Related Documents
, , , , ,

Related Amazon Books
Syndicating Web Sites with RSS Feeds for Dummies (For Dummies S.): / Beginning RSS and Atom Programming: