Model Binder

When working with a multi-tier application I often find myself converting from one of the tiers object models to my own similar (but often different) model.  I often write code that would set one by one each property from a web tier object to my object.  In order to make this easier I wrote this…

0

Updated JQuery ResizeComplete method

I made 2 slight changes and I think it works pretty well now.  I now detect if the browser is Firefox and use the regular resize event since its resize behaves like a resizeComplete.  I also modified the timeout a bit since I think 100 ms might be too small. Here is the updated version:…

1

Rough draft of a new JQuery method

I have run into issues recently with the browsers’ implementation of the resize event on the window.  Opera, Safari, IE and Firefox all have different behaviors when this event is fired.  Firefox only fires it when you release the mouse. IE fires this event many many times while resizing.   Safari will fire continusouly while dragging…

1

Parameterized State Transformer Monad in F#?

I have have been playing around with F# and I decided to create a state monad.  This worked out really well since I was able to leverage the F# computation expressions.  I then decided to try to extend this and make it more general by creating a parameterized state transformer monad.  This is a state…

2

What annoys me when writing generic functions in Visual Studio…

When writing a generic function I start from left to right (the same way I write most things except when I took Yiddish in college).  For example, Lets say I am writing a simple generic method which return the first element of a generic list. I want the signature of this method to be: private…

6

SQL CE 3.5 with LINQ to SQL Revisited

A few days ago I made a post about using SQL CE 3.5 with LINQ to SQL.   I described a way to use connection pooling with SQL CE. A gracious blog reader (Mike Brown)  pointed out a way I could make my solution much simpler by using the [ThreadStatic] attribute.  I never heard of this…

5

The Snippet Designer is Released!!!!

Some History The Snippet Designer was started as an intern project of mine during the Summer of 2006.  The idea was to make snippet files (which were introduced to Visual Studio in 2005) a first class entity.  Following this idea I created a Visual Studio plug-in which included an editor for snippet files and a…

4

SQL CE 3.5 with LINQ to SQL

Using LINQ to SQL with SQL CE 3.5 can be a bit of a challenge.  First off, the LINQ to SQL Visual Studio designer doesn’t support SQL CE so you need to run sqlmetal from the command line to create the object model (or write it by hand).  Once you get past this point then…

2

CollectionView.DeferRefresh() : My new best friend

Well, maybe not best friend but its a nice function.  When working with bound collections in WPF you often end up dealing with a CollectionView.  This is the MSDN documentation description of a CollectionView : You can think of a collection view as a layer on top of a binding source collection that allows you…

2

I started playing with F#…

I decided to do some Project Euler problems using F#.  So here is my first one, Problem # 31.  Nothing in this solution really shows off anything special about F# but you have to start somewhere 😉   1: #light 2:  3: let rec combos amt (denoms:int list) = 4: if amt = 0 then…

0