The site is the homepage of Duncan McDougall, a Glasgow based web developer, who works mainly with ASP.Net developing high performance websites.

This website is a place for me to experiment with Umbraco and website performance. i also blog personal web snippets and project experiences.

Always Up-to-date Copyright in Umbraco

Drop this bit of XSLT into your master page template

<umbraco:Item field="pageName" runat="server" xslt="Exslt.ExsltDatesAndTimes:year()" />

Via Percipient Studios

DeveloperDeveloperDeveloper Scotland - 8th May 2010

The agenda is now up and registration is now open for DDD Scotland 2010. The conference takes place on Saturday 8th May at Glasgow Caledonian University. I'm looking forward to Ian Cooper's Real World MVC Architectures and  Phil Winstanley's Exception Driven Development.

Capitalize First Letter In Each Word in C#

The C# way to capitalize each letter in a sentence. Here's how I did it. Remeber to toLower() if you maybe passing in a string entirely in uppercase.


CultureInfo.CurrentCulture.TextInfo.ToTitleCase(someSentence);

A Problem with Google Maps

Go to Google Maps UK. Now search for Blackburn. You get back the result you'd expect yes? Google kindly sends you to the middle of Blackburn, Lancashire. Where in the sidebar does it link you to Blackburn, Aberdeenshire? Nowheres!

Embedding Fonts using @font-face

A nice little bit I CSS3 I've use on my homepage to allow me to use fonts not necessarily on the visitor's computer is @font-face. Font types TrueType (.ttf) and OpenType (.otf) are supported in Opera 10+, Chrome 4.0, Safari 3.1+ and Firefox 3.5+.

Here's an example. First declare the font

@font-face {
font-family:'ExampleFont';
src: url('ExampleFontFileName.otf') format('opentype');
}

If you have different font files for font varients e.g. bold, italic, then these need to be set up seperately.

@font-face {
font-family:'ExampleFont';
font-weight: bold;
src: url('ExampleFontFileName-Bold.otf') format('opentype');
}
@font-face {
font-family:'ExampleFont';
font-style: italic;
src: url('ExampleFontFileName-Italic.otf') format('opentype');
}

Last but not least use this font like any other.

body{
font-family:'ExampleFont', Arial, sans-serif;
}