Category Archives: General

General Postings not related to Web Development

Custom sorting order in LINQ (ORDER BY WEIGHTING)

I have developed a C# LINQ extension method to allow very flexible ordering by assigning weightings to the sort keys of the elements to be ordered. I was inspired by the functionality offered by SQL Server’s ORDER BY CASE WHEN: The extension method I have created lets you pass a lambda function which allows the [...]

Posted in General | Tagged , | 6 Comments

String.Capitalize in C# (PHP’s ucwords in C#)

I have been playing around with C# recently and found the need for functionality similar to that provided by PHP’s ucwords() function. I dont think this exists in C# as standard so here is a simple extension method to achieve ucwords in C# using a little bit of LINQ (the extremely useful Aggregate extension method) [...]

Posted in General | Tagged , , , , , | 4 Comments

Cloning Zend_Config without side-effects

Cloning in PHP5 PHP5 with its much improved object-oriented style passes objects by reference by default. To create a copy of an object, a new construct ‘clone’ is introduced. Cloning an object in PHP5 creates a shallow copy – any properties that are references to other variables, will remain references. Additionally, PHP5 brings the __clone() [...]

Posted in General | 2 Comments

Zend Certified Engineer!

I finally got round to booking the Zend PHP 5 Exam and successfully passed earlier this week!

Posted in General | Tagged , , | 4 Comments

Nofollow on WordPress Comments Still?

I have only just noticed that comments on this WordPress blog have rel=”nofollow” set as default. I believe that if someone is willing to contribute to a blog by commenting then the least they deserve is an inlink to their site. A quick search shows that this is the default for all WordPress installations. The [...]

Posted in General | Tagged | 1 Comment

Setup Subversion and Trac on CentOS 5

Recently I set up a virtual server to use as a development machine. It runs on CentOS 5 and hosts several Subversion repositories with associated Trac projects. There are many guides and plenty of help on the net to help you setup such a system. However, when I tried to do it I came across [...]

Also posted in Guides | Tagged , , , , , | 64 Comments

Zend Framework 1.0.3 Released

Zend Framework (ZF) 1.0.3 has been released. This is the third maintenance release since the launch of Zend Framework 1.0 at the beginning of July 2007, which goes to show how quickly the ZF community is growing. Zend Framework is quickly becoming the most popular PHP5 framework, mostly due to the fact that it does not tie [...]

Posted in General | Tagged , , | 2 Comments