Warhammer 40K Tyranids

Comments

I painted these 8 horma-terma-whatever-gaunts in Hive Fleet Leviathan paint scheme more than a year ago. They came out fairly well, but it took about twelve hours to do. Upon completion I determined I shall not have a Tyranid force painted in Leviathan color scheme. Instead I'm going to do something that involves an airbrush and wood stain.

Tyranids Wide

Tyranids Pair


Trying out SyntaxHighligher and PreCode

Comments

Just making sure this is correct.  By this I mean PreCode (requires Windows Live Writer 2009) with SyntaxHighligher setup.  PreCode is also a stand alone program.

 

public bool Validate(IValidationDictionary modelState, string prefix)
{
    // xVal example code
    var dataAnnotationErrors = from prop in TypeDescriptor.GetProperties(_entity).Cast<PropertyDescriptor>()
           from attribute in prop.Attributes.OfType<ValidationAttribute>()
           where !attribute.IsValid(prop.GetValue(_entity))
           select new ErrorInfo(prop.Name, attribute.FormatErrorMessage(string.Empty), _entity);

    var brokenRules = GetBrokenRules();

    if (!String.IsNullOrEmpty(prefix))
        prefix += ".";

    if (dataAnnotationErrors.Any())
        dataAnnotationErrors.ForEach(ei => modelState.AddError(prefix + ei.PropertyName, ei.ErrorMessage));
    if (brokenRules.Any())
        brokenRules.ForEach(rule => modelState.AddError(prefix + rule.Property, rule.Message));

    return modelState.IsValid;
}

 

There is a “Fix Indentation” button in PreCode.  I am in love.

Now just to setup the clipboard SWF thing.

I should seriously consider a theme with a wider content area.


Automatic Windows Update Fail and Fix for WHS (Server 2003)

Comments

So I went to stream a movie (DVD) off my Windows Home Server (Windows Server 2003 based) to my Windows Media Center 2005 (XP 32-bit) and encountered CONSTANT stuttering.  The night before I had watched a movie with no problems.  I spent about 5 hours trying to figure out what had happened - both machines had a "Your computer was recently updated!" message from automatic updates.  I knew I was in serious trouble.

I spent a long time trying to troubleshoot codecs (both audio and video) and going through all manner of issues.  I mucked around with the registry on both machines as I narrowed down the problem to horrible, horrible gigabit network performance.  I watched the networking performance through Task Manager on the server and saw my network usage NEVER go above 1%.

Then finally I came across the hotfix from Microsoft to unfuck the hotfix automatic updates kindly installed for me:

http://support.microsoft.com/kb/948496/

Now network utilization hangs out at 25% while copying a 7 GB file across my gigabit network.

And I've learned the lesson I seem to learn every 6 months or so - pretty much every time a new install of Windows or a new PC comes online in my house - disable Automatic Update.  If you don't - you will regret it.

Update: I also had to install a hotfix rollup for Windows Media Center 2005 available from Windows Update and reboot the machine to put my network bandwidth consumption at something over 0.5% which is apparently what I need to play DVDs without stutters... though /sigh there is *still* some stuttering but not nearly as bad as before.

Update[2]: FINALLY.  I ran across this:

http://www.winaims.com/network_patch.html

So on my Windows Media Center machine I fired up regedit again and did:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanworkstation\parameters
Key: ReadAheadGranularity
Type: DWORD
Value: 0

rebooted, and now network utilization seems to stay at a constant 20% when copying a 6 GB file over my network.

Finally I can sleep with a minor feeling of accomplishment.


Eight Cores!

Comments

I've had this machine, dubbed "The BEAST" to the outside world (aka my friends) since last August with literally nothing to do.  Its a monster, eight cores, HyperV with several VMs running, 8 GBs of RAM and Server 2008 64-bit.  I just wish I had some useful task to put it towards!

Look ma, eight cores!


Web Application csproj => Mvc csproj

Comments

Since you can run classic web forms along side MVC its useful to know how to update your *.csproj project file so Visual Studio shows you the MVC items you can add to your project when you add a new item.  To do this, after installing MVC (and .NET 3.5 SP1 if you haven't yet):

  1. Unload your project through Solution Explorer (right-click, unload)
  2. Edit your *.csproj (yes you can do this in Visual Studio, right click the unloaded project node in Solution Explorer, Edit *.proj)
  3. In the <ProjectTypeGuids /> node add the GUID {603c0e0b-db56-11dc-be95-000d561079b0}; (the semi-colon is important if you prepend it to the exiting list, which is what I did)
  4. Add <MvcBuildViews>false</MvcBuildViews> as a sibling of the <ProjectTypeGuids /> node
  5. Reload the project