Developer Notes

A few good references I’ve found over the past few days:

Popularity: 1% [?]

Visiting Sydney with Type 1 Diabetes

Recently on Hansleminutes, Scott Hanselman gives a great insight into living with Type I diabetes.

He is also coming to Sydney to present at Web Camps.

I really like his style.  While he is pro Microsoft, Scott has a good way of seperating himself from the drama.

Anyway, in his podcast he discusses the difficulty of going out for dinner when he is a strange town.

So Scott, to make your visit to Sydney, or if you find yourself in Sydney and with Diabetes here is what you should do:

  • This year, Web Camps will be at The Powerhouse museum which is in Ultimo,
  • It is an easy 10 minute walk, South East from the Sydney CBD.  (You could catch the Mono Rail or Light Rail but it is tacky and only tourist use it.)
  • That part of sydney is near the Uni and lots of Youth Hostels.  So Subway is going to be open at all hours.  (I’ve seen Subway at George St at 1:00am).

I’ve mapped all the Subway Restaurants in the area.  (More information is on the Subway website)

Enjoy!

Popularity: 3% [?]

Setting up Mercurial server in IIS7

A short article on how to Setting up Mercurial server in IIS7

Then, follow these steps to install a self signed ssl certificate.

I was surprised how easy it is.  It worked for me!

Enjoy!

Popularity: 1% [?]

VS 2010, Mysql, Entity Framework and Setup wizard ended prematurely because of an error

UPDATE: If you found this from this Stackoverflow question, could you help me out?  If you liked my answer, vote it up, if you don’t then post a comment why.  There are other higher voted answers that are wrong!  Thanks.

Below are the steps required to get the Entity Framework on VS 2010 to talk to MYSQL.

First step is to install the .net Connector.  I had to use v6.3.1 (alpha).

I tried this with 6.1.3, 6.1.4, 6.2.4 or 6.3.0 but none of them worked.  (For some reason they kept ignoring vs 2010)

Still, 6.3.1 gave me the message:  ”Setup wizard ended prematurely because of an error” message and it quit.

The workaround is to rename your config folder C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Config to Configxxx fixed this.  See this link for more information

Happy days!

[UPDATE] 6.2.3 is now under general release.  This still doesn’t work for VS2010.  As @Marcus mentions below, 6.3.2 is in beta and I can confirm this does work!  (It also doesn’t have “Setup wizard ended” error.)

Popularity: 100% [?]

Getting VS 2008 & mysql to play nicely!

I love linq!

But getting mysql to place nicely isn’t so straight forward.   To get mysql running on .net 3.5 or 4.0 I had to do the following:

1.  Install the mysql .net connector
2.  Add the MySQL Data Provider line in the DbProviderFactories to your machine.config file:

<system.data>
    <DbProviderFactories>
        <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.1.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
    </DbProviderFactories>
</system.data>

(see here for more information)

3.  Restart Visual Studio
4.  Add your models and go nuts!

This Stack Overflow question helped

Good luck!

Popularity: 4% [?]

Linq – Multiple Group By

This has been bugging me for a LONG time!

I’ve finally found an example of how to group by multiple values using LINQ:
IList doc_infos = new List();

doc_infos.Add(new doc_info { region = "UK", price = 100, currency = "US" });
doc_infos.Add(new doc_info { region = "US", price = 100, currency = "US" });

var docs = doc_infos.GroupBy(x => new { x.price, x.currency })
.Select(group => new { d = group.Key, Count = group.Count() });

For more examples, have a look here.

Popularity: 4% [?]