Search   Feed   Browse   Add
Feed items 1 - 5 of 5 for May 2008

Omer van Kloeten's .NET Zen

Programming is life, the rest is mere details

LINQ Performance Pitfall - Deferred Execution - May 27, 2008

When using LINQ, queries may bloat up to dozens of lines. My personal style is to take these queries and break them apart to smaller units of logic. To each unit of logic, I append a call to ToArray. yosit asked me why I did it and I answered I was avoiding a possible pitfall. Here's what I meant. Take the following code for instance: static void Main(string args) int arr = 1, 2, 3, 4, 5, 6, 7, 8, 9 ; var filter = from n in arr where VeryLongOperation(n) .
http://weblogs.asp.net/okloeten/archive/2008/05/27/6225197.aspx

SQL Server 2005 Analysis Services's ADOMD.NET Connection Pooling, or Lack Thereof - May 27, 2008

First of all, if you've come here looking for how to activate connection pooling when using SSAS 2005 via ADOMD.NET, you're in for a little surprise - there is none by design. Loading a new connection can take up a long time, since with every new session to the database, all of the metadata and security context has to get loaded too. I've decided to perform some mental gymnastics and try and implement a simple connection pooling mechanism. Here is the (very) basic version of the mechanism,...
http://weblogs.asp.net/okloeten/archive/2008/05/27/6224080.aspx

Residue - May 23, 2008

This is a short, off-topic rant. Please bare with me. In an effort to spark some life into my home laptop (which is about four years old and fighting like a champ), I've gone through the list of services running on my machine to try and stop those that are non-essential to me.To my surprise, I found XobniService.exe on the list of running processes. Since I had previously uninstalled Xobni and hadn't restarted since, I thought a restart would clear it up. It didn't.To me, that seemed odd: I...
http://weblogs.asp.net/okloeten/archive/2008/05/23/6214706.aspx

Extension Methods Roundup: IndicesWhere, TakeEvery, Distinct - May 18, 2008

As I do from time to time, here is a batch of three Extension Methods I've written recently: IndicesWhere <summary> Gets the indices where the predicate is true. <summary> public static IEnumerable<int> IndicesWhere<T>(this IEnumerable<T> enumeration, Func<T, bool> predicate) Check to see that enumeration is not null if (enumeration == null) throw new ArgumentNullException("enumeration"); Check to see that predicate is...
http://weblogs.asp.net/okloeten/archive/2008/05/18/6200566.aspx

A Limitation of Lambda Expressions and Overloaded Extension Methods - May 7, 2008

Tamir hates lambdas. He was having a problem with one of his lambda expressions and twittered about it. Around that time I opened my twitter account (yes, Yosi finally convinced me) and offered my help. He wanted to have a single extension method that could iterate over a collection and either change or keep the values it got. Kind of like this:items.ForEach(item => item.SubItems.ForEach(subItem => subItem = newValue)); Where ForEach was defined as:static void ForEach<T>(this...
http://weblogs.asp.net/okloeten/archive/2008/05/07/6165335.aspx
Available Archives
- April (6 items)
- May (5 items)
- June (4 items)
Sponsored Links
© 2008 FeedCapsule.com  |  Contact