mha.dk

Random thoughts of wisdom - the personal blog of Michael Holm Andersen

Creating GUIDs in C#

While creating GUIDs today, I discovered that there is a few overloads to choose from in order to format the GUID:

System.Guid.NewGuid().ToString() = 93262f39-1842-4ec1-ad62-6cf115838450
System.Guid.NewGuid().ToString("N") = 7498c82cbb3c4c9dbdfef3cd2cc4bf9f
System.Guid.NewGuid().ToString("D") = 600d242a-2d7d-4957-a0a3-540e43b3cea8
System.Guid.NewGuid().ToString("B") = {521b19e3-f948-403f-8287-e71312bdacde}
System.Guid.NewGuid().ToString("P") = (310e1808-ed8d-4a09-add7-c214b4c530b6)

Got my FR60 today!

 

Got my cool Garmin Forerunner 60 today.

I bought it at pulsure.dk which sold it at a fair price of 899,- DKK

The cool thing about this watch is that a wireless heartbeat monitor is included along with the awesome Garmin Connect software (you can choose between the online and the desktop version).

Anyways.. I’m planning to use the watch together with my new Wii board and my “personal” (game) trainer and during swimming - wish me luck :-)

FR60

C64 Music Library

If you’re – like me – is a huge fan of old C64 (SID) music, then direct your browser over to the Stone Oakvalley's Authentic SID Collection (SOASC=) and browse / download just about any tune ever released for the C64 in MP3 format:

http://fonix.dyndns.org:40000/soasc/

..and ohh – I you’re into Amiga music – check out this link:

http://www.paula8364.com/

TortoiseSVN (x64) not showing icon overlays

After upgrading to version “TortoiseSVN-1.6.5” (x64) all my icons was gone!! I surfed the net for answers and found out that a lot of people are experiencing this issue.

Luckily I found an older install (TortoiseSVN-1.6.0.15855-x64-svn-1.6.0) in my download folder. This is what I did to make it work again:

  1. Uninstalled my current version (1.6.5)
  2. Reboot
  3. Installed TortoiseSVN-1.6.0.15855-x64-svn-1.6.0
  4. Reboot


And now all my icon overlays are working again. I was unable to find the old x64 version of TortoiseSVN on the main website – so I’ve included the download in this post. You can download it right here:

http://stuff.mha.dk/TortoiseSVN-1.6.0.15855-x64-svn-1.6.0.msi

1 week to TRSAC

Yeay, just one week to TRSAC – looking forward to geekin’ with the dudes from LiteWerx, meeting all the other sceners and taking a trip down memory lane back to the (good old) Amiga and Commodore 64 days when I did all my “demos” coding as part of DGS (more info: here and here) :-)

Don’t know what TRSAC is all about – check it out: http://trsac.dk/about.html

MS SQL Server 2008 Express (x64) memory leak?

I’ve been using MS SQL Server 2008 Express edition (x64) on Vista Ultimate SP2 quite a lot the last month and was running out of memory almost every day (the SQL Engine using +1GB of Memory!!)

Today I updated my SQL Instance to SQL Server 2008 Service Pack 1 and now it only uses between 100-150MB of memory .. So it seems that there might be a memory leak in the “prior SP1 version”

Download SQL Server 2008 Service Pack 1

CultureInfo – National Language Support (NLS) API Reference

I’m working on a web-portal kind of system, which will support multiple languages and needed to find a table with all the CultureName etc.

After finding different tables which was lacking the information I needed, I came across this one which have everything you need to start Localizing :)

http://msdn.microsoft.com/en-us/goglobal/bb896001.aspx

Update: I’ve made a SQL table to store all the above information. No need for anyone else to do this, so here’s the SQL scripts to create table and insert data:

Could not load file or assembly 'name' or one of its dependencies (VS2010, ASP.NET 4.0 beta 1)

Setting up my VS2010 Beta 1 environment and a website running against IIS 7, I encountered this error:

Could not load file or assembly 'Name' or one of its dependencies. An attempt was made to load a program with an incorrect format.

After a bit of research it turns out that this is caused by the fact that I’m running a 64bit version of Vista, my DLL’s is compiled to x86 .. and the IIS applicationpool does not allow execution of 32bit (x86) code!!

My DLL was (by default) compiled to x86 (32 bit) code by VS2010:

VS2010buildsettings

.. and my ASP.NET 4.0 (integrated mode) ApplicationPool did not allow 32bit code to execute:

IIS7aspnet4_32bit

(Note that in the above screenshot I’ve turned on the ability to run 32bit code within the ApplicationPool)

I could of course have changed the DLL to compile x64 code instead.

EF4.0 – Model First video

If you’re looking at/using VS2010 and “playing around” with EF4.0, take a look at this video about “Model First” (a new feature in EF4.0):

http://channel9.msdn.com/shows/10-4/10-4-Episode-15-Model-First-Development-with-the-Entity-Framework-40/

Data Driven ASP.NET Localization Resource Provider

Rick Strahl has put together a real nice blog post about Creating a Data Driven ASP.NET Localization Resource Provider and Editor, complete with free code sample and everything :-)

It’s part of his West Wind Web & Ajax Toolkit for ASP.NET which is free for personal and non-commercial use.

If you planning to use a data driven Localization resource provider then you should definitely take a look at Ricks article.