Category Archives: Technical

SimpleLookups 1.2 Released

Today, I released SimpleLookups v1.2. This version includes the following changes:

New Features:
– Get a list of lookup values based on a code or a list of codes.
– Remove a list of lookup values based on a code or a list of codes.

Changed Features:
– The methods “GetActive” and “GetAll” are deprecated and are replaced by a single method called “Get”. An activeOnly flag is passed in to the method.

The next release will be v1.5, and it will contain code structure changes and some other changes, namely the ability to configure SimpleLookups through app.config/web.config files.

As typical, a few links for the lazy:
Getting Started with SimpleLookups

Download SimpleLookups 1.2
View Source Code (BitBucket)
View Complete SimpleLookups v1.2 API Documentation

SimpleLookups 1.1 Released

Today, I released SimpleLookups v1.1, which is a small change to the library that is taking the world by storm. (Disclaimer: May not be as popular as advertised.)

This version includes a couple of small API changes, as well as a couple new methods.

New Features:
– Get a list of lookup values based on a list of ids.
– Remove a list of lookup values based on a list of ids.

Changed Features:
– The method “GetById” is now called “Get”.
– The API will now return IList instead of List.

A few links for the lazy:
Getting Started with SimpleLookups

Download SimpleLookups 1.1
View Source Code (BitBucket)
View Complete SimpleLookups v1.1 API Documentation

SimpleLookups 1.0 Released

Today, I released SimpleLookups v1.0, which is a project that I’ve been wanting to release for a long time. This is a small .NET 2.0+ library that is designed to make “lookup” values easy to retrieve from a SQL Server database.

Edit: The tutorial is now here: Tutorial

Download SimpleLookups 1.0
View Source Code (BitBucket)
View Complete SimpleLookups v1.0 API Documentation

SQL Server: Divide Date Range into Months

I wrote a script the other day that is utterly useless to me, but it might be helpful for someone else, so I thought I’d write a quick post about it.

Suppose you have some date range, let’s say “1/20/2013 – 4/29/2014”. Now, suppose you want this range to be broken up into one month sections, with a start and end date for each month. Suppose, for some reason, you want to use a recursive common table expression (CTE). You can just do this:

This would produce the following results:

months-cte-results

I think that this is actually pretty cool, but I can’t really come up with a reason to use something like this, outside of maybe a financial application. Anyway, I hope someone gets some use out of it.

Team Foundation Service: How do I delete a Team Project?

I came across this problem earlier today, and I realized that it isn’t clear how to delete a team project. It is, however, really easy.

All you have to do is open the “Developer Command Prompt for VS2012” (located in Start > All Programs > Microsoft Visual Studio 2012 > Visual Studio Tools) and type the following command (assuming you have the server mapped in Visual Studio).

TfsDeleteProject /force /collection:https://ID.visualstudio.com/DefaultCollection PROJECT

Replacing the word “ID” with whatever your TFS Online ID is, and “PROJECT” with the name of the team project that you wish to delete.

MP3 Decoder/Player

Today, I’m starting to look at the MP3 specification in order to write an unmanaged C++ library which will hopefully be able to read, decode, and play all MP3 files. This code will be integrated with my Alarm clock software eventually, but for now I just want to get it working. This will be my major project for the next few months which means that after the planned Alarm updates, I will not be touching it for a little while.

A few things I need to consider:
-Different versions of the MP3 standard.
-DIfferent versions of the ID3 tagging standard. (1.0, 1.1, 2.0, 2.2, 2.3, 2.4, etc)
-MP3’s encoded with WinAMP fail to pass the standard. iTunes might as well.
-Speed. I cant have a slow decoder. I need to use native code and use the most efficient data structures available.
-Do I want to make this open source?

I might try to find another open-source decoder and build off of it, but I’m not sure yet.