Visual Studio 2010 style

The default colors of visual studio are, well, kind of boring. But now it’s possbible to change that with only a few mouse clicks! First go to http://studiostyles.info and download your favorite style. Then, in visual studio 2010, select Tools > Import and Export Settings:

style01

Check the Import selected environment settings, and click Next.

style02

You probably want to save the current settings, so accept the default and click Next.

style03

Then click the Browse button and select the template you downloaded:

style04

…and then the Next button.

style05

Finally click the Finish button.

style06

And if everything was ok:

style07

Click Close, and behold the new style :)

style09
May 7, 2010 05:18 by lustuyck
E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Creating a database table with zip codes

Today I needed a database table in Sql Server that contains all belgian zip codes and city names. Obviously I was not going to create this by hand, so I wanted to share how I did it because I think it’s a common requirement.

The first step was to find a list of zip codes and city names. On the site http://www.post.be/site/nl/residential/customerservice/search/postal_codes.html you can download this list in excel format. From this file I extracted the zipcode and city name and saved this as a csv-file, which then looked like:

1000;Brussel
1000;Bruxelles
1005;Ass. Réun. Com. Communau. Commune
1005;Brusselse Hoofdstedelijke Raad
1005;Conseil Region Bruxelles-Capitale
1005;Ver.Verg.Gemeensch.Gemeensch.Comm.
1006;Raad Vlaamse Gemeenschapscommissie
etc... 

The second step was to create the database table that will contain this information, so I created a table called City with the following columns:

ZipCode, int
Name, varchar(100)

The next step was the actual import from the csv file into the table. To do this, I used the bulk copy technique: just open a new query window and execute the following statement:

  1: BULK
  2: INSERT City
  3: FROM 'd:\postcodes.csv'
  4: WITH
  5: (
  6:   FIELDTERMINATOR = ';',
  7:   ROWTERMINATOR = '\n'
  8: )

And now the table City is filled with 2903 records:

zip_01

As a last step I added another column as the primary key:

Id, int, primary key (identity)

And now each entry has a primary key:

zip_02

I think this is probably the easiest way to create a table with zip codes and city names.

May 7, 2010 02:24 by lustuyck
E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Dummy text generator

Designing your web site also involves making sure that your lay-out works well in various screen resolutions and sizes, and afterwards this design has to be validated by users. To do that, you need dummy text you can use to fill up the parts of a web page. Recently I stumbled upon http://www.blindtextgenerator.com, which generates this for you. If you use this, users who have to validate the design will most likely focus on the design instead on the content – because the content is meaningless. In other words: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Understood? :)

May 6, 2010 07:12 by lustuyck
E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed