BlogEngine.NET Twitter Widget

by Donovan Olivier April 30, 2010 10:24PM

I have been using a modified version of the BlogEngine.NET Twitter widget that I got from Al Bsharah, but noticed that it doesn't correctly create the link for Twitter user names that contain an underscore.

An easy fix for this is to modify line 354 of his widget.ascx.cs file to include an underscore in the regular expression:

private static readonly Regex regex2 = new Regex("@[a-zA-Z0-9_]*", 
                                        RegexOptions.Compiled | RegexOptions.IgnoreCase);

UPDATE May 1, 2010: The original has now been updated.


Tags: ,

Blog

Unity 2.0

by Donovan Olivier April 21, 2010 6:07PM

So you've switched to Enterprise Library 5.0 and you're now finding compiler errors relating to generic implementations of .Resolve, .RegisterType, etc. in your UnityContainer? These are now extension methods, so just add the following to your class and your problem will be solved:

using Microsoft.Practices.Unity;

Tags: ,

Blog

Public Holidays

by Donovan Olivier April 9, 2010 11:29PM

I recently updated my component for calculating public holidays and have decided to share the C# source.  This is currently configured for South Africa, but can easily be updated to support any other country you choose (see the config file in the unit test project).

The standard holidays are stored in a custom configuration section as month and day, while easter is calculated for the specific year in question.  The provider determines if a public holiday falls on a Sunday and rolls it over to the Monday, as per South African standard (this behavior can be disabled in the configuration).

Enjoy. Any feedback would be appreciated.

Imaginary.Holidays.7z (12.70 kb)


Tags: , ,

Blog

The Perpetrator

perpetrator

Donovan Olivier

software developer, architect, husband, father, son, brother, uncle, nephew, sinistral, enquirer, skeptic, cynic, anarchist, contrarian, infidel, dissident, rebel, troublemaker, dissenter, renegade.

Noise

i know one shld look at beer studies undertaken by the institute of brewing & distillery with a critical eye, but... http://t.co/hOtxdgox
planetdonovan 4 hours ago

is there any way to ensure that the electronics you buy are manufactured by free range humans? http://t.co/smfg8lSg
planetdonovan 7 hours ago

@planetdonovan ha ha I thought the same when that guy hit him.
LBugnion 1 day ago

@jalpf @LBugnion it is hard, however, to see him getting beaten up... c'mon jack!
planetdonovan 1 day ago

#FF - @thisisinterval @greyholed @planetdonovan @Sonicsgate
adrianshannon 2 days ago

this is why most f1 cars are gonna look weird this year http://t.co/zoObHpUg
planetdonovan 3 days ago

new ferrari f2012 nose is freaky! http://t.co/kwBktVib
planetdonovan 3 days ago

random site of the day http://t.co/wZYZg0FI
planetdonovan 3 days ago

computing achievements http://t.co/JIsYZcjB (via @gizmodo)
planetdonovan 3 days ago

RT @LiveScience: Newfound Alien Planet is Best Candidate Yet to Support Life, Scientists Say http://t.co/BKx8ToBT
planetdonovan 3 days ago

well, this is bound to be controversial http://t.co/j724XCTP (via @carolynporco)
planetdonovan 3 days ago

opposing the death penalty seems to be the unpopular point of view in south africa.
planetdonovan 4 days ago

started my day with a colossal database screw up - things can only get better from here.
planetdonovan 5 days ago

conspiracy theory of the day http://t.co/qy14T7Xx (clues: "cancer industry", "medical mafia")
planetdonovan 6 days ago