Matthew Quinn's Blog
07/27/2010
Shortcuts for initializing C# collections
When initializing a collection to a known set of values, C# provides a bit of syntactic sugar to cut down on your typing.
06/10/2010
Unique IDs for regular HTML elements in modules
The fastest way to get a handle on an object in the HTML DOM is by its ID.
06/08/2010
Iteration order of an object's properties in Javascript
In order to get the correct behaviour, you can create an array of the keys in traversal order, and iterate over that instead.
07/23/2009
Fix for Firebug issues in FireFox 3.5
After installing Firefox 3.5, I started having trouble with Firebug 1.4.
06/29/2009
Synchronizing jQuery Animations
On a current project I had to animate the "opening" of an absolute-positioned div (initially hidden) from the top-right to its full dimensions (917x228). That means animating the width (from 0px to 917px), the offset left (from its initial value to 917px less than that) and the height (from 0px to 228px).
11/14/2008
LINQ Outer Join
The LINQ outer join is kind of unintuitive, here’s the code in case you ever find yourself needing it:
11/11/2008
LINQ: Dynamically chaining "or" clauses with PredicateBuilder
Awesome find here. For the search functionality I'm working on, the user put in keywords and matches were returned if any of the keywords were matched – so “or” clauses were needed. Using standard LINQ stuff, this is really tough to do dynamically. For a while the only results I found required you to sacrifice LINQ’s compile-time type checking
10/31/2008
Nested lambda expressions for aggregate functions
Today I found another example of LINQ’s potential for tidy and efficient code. In my current project we needed to sort Story objects based on their user rating.