Categories

Tags


Lazy Object

I was inspired by the well known Lazy List implementation and decided to create a Lazy Object generic type.  There may be better ways to do this, but I thought that a Lazy Object would be a good way to handle the Many To One situations, just as the Lazy List handles the One To Many situations.  With out further ado, here is my Lazy Object code:

public class Lazy<T>
{
    private IQueryable<T> query;

    public Lazy(IQueryable<T> query)
    {
        this.query = query;
    }

    public T Get()
    {
        return query.SingleOrDefault();
    }
}

kick it on DotNetKicks.com

February 26, 2009 16:03 by jpsanders
E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Thumbnail Generation Extension

I created a small BlogEngine.NET extension that allows you to generate a thumbnail image on the fly and display the generated image within the post.  The extension also links the thumbnail image to the full sized image so that a user can go directly to the full size image if they wish. Example:

[IMG FILE=Images/walking_small.jpg SIZE=200]

Syntax: "[IMG FILE=Images/walking_small.jpg SIZE=200]"

Download Extension: ImgThumbGen.cs (6.01 kb)

kick it on DotNetKicks.com

March 14, 2008 16:40 by jpsanders
E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

F# 99 Problems

Two brothers are taking on the 99 Problems Site using Microsoft's F# Language, http://www.frickinsweet.com/99problems/.  Not only do they have a great title "I've Got 99 Problems... but a glitch ain't one", but so far it seems they are taking time to explain their solutions to the problems and ask the general public to contribute to the creation of truly elegant solutions. I'm going to make it a point to check this site often to see how they are progressing, perhaps I'll even try to solve some the the 99 problems myself (it's never bad to learn a new language, particularly one that is so different from my standard OO languages).

March 10, 2008 20:26 by jpsanders
E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

BlogEngine.Net

I've been toying with the idea of creating a blog for quite some time and finally decided to take the plunge in 2008.  I had been looking for blogging platform that I could deploy on my host (www.godaddy.com) and that was written in a .NET language (preferably C#).  When I stumbled upon BlogEngine.NET (http://www.dotnetblogengine.net/) I knew it would fit the bill.  It was designed with extensibility as a goal, and out of the gate seemed to be quite hackable.  So far BlogEngine.NET has been a snap to install and configure.  I've been able to tweak the themes and have so far been able to make small code adjustments to the theme master pages.  I am going to explore the creation of some small extensions that will help add some additional functionally to BlogEngine.NET that I believe my wife will be able to take advantage of on her instance of BlogEngine.NET.

March 5, 2008 20:55 by jpsanders
E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed