Skip to content
4 July 2010

Syntax highlighting for your code snippets in wordpress.com

If’ve seen people using screenshots or plugins in the IDE to post their source code in wordpress.com. But it’s much easier. Just use the [sourcecode] tag in HTML mode (example for C# syntax):

[sourcecode language="css"]
your code here
[/sourcecode]

For more information see this

4 July 2010

Print all properties of Environment class

If you need a quick overview of the system configuration you can use this code snippet:

public class EnvironmentHelper
{
    public static string GetAllEnvironmentInformations()
    {
        StringBuilder builder = new StringBuilder();

        Type type = typeof(Environment);
        PropertyInfo[] propertyInfos = type.GetProperties();
        foreach (PropertyInfo propertyInfo in propertyInfos)
        {
            object value = propertyInfo.GetValue(null, null);
            if( value != null)
            {
                builder.AppendLine(propertyInfo.Name + ": " + value);
            }
        }

        return builder.ToString();
    }
}

7 June 2010

Interactive calendar for FIFA World Cup 2010

Get all details for the World Cup 2010 in South Africa:

  • World Cup 2010 Schedule
  • Cities And Stadiums
  • Groups And Stages
  • National Teams
  • and more

http://www.marca.com/deporte/futbol/mundial/sudafrica-2010/calendario-english.html

image

7 June 2010

Rediscovered xkcd

Recently I rediscovered the well-known webcomic xkcd created by Randall Munroe.

Have fun!

1 June 2010

Print all folders of enum Environment.SpecialFolder

foreach( Environment.SpecialFolder folder in Enum.GetValues(typeof(Environment.SpecialFolder)))
{
 Console.WriteLine(Enum.GetName(typeof (Environment.SpecialFolder), folder) + ": " + Environment.GetFolderPath(folder));
}

Read more…

1 April 2010

April Fool – Google.com

Google has a new measuring unit for displaying the search results.

gigawatts? femtogalactic years? times the velocity of an unladen swallow? nanocenturies? parsecs? nanocenturies? microfortnights? skidoo? …

image

image

1 April 2010

April Fool – Stackoverflow.com

First I thought my account was hacked but everybody has a new picture with a fairy-tale unicorn. Nice!

image

image image image image image image

 image image image

18 March 2010

Google products failed in Search Engine Optimization

Google itself started an analyze about Search Engine Optimization (SEO) for its own products (Picasa, Adwords, etc) and has to confess that there is still enough work to do.

See the full report here and try to consider the suggestions for your own homepages.

17 March 2010

Klassische Ansicht für Benutzerkonten

Unter Vista kann man die klassische Ansicht für Benutzerkonten mit folgendem Befehl anzeigen lassen:

Start –> control userpasswords2

image

8 March 2010

My favorite coding tools

I always try to highlight the benefits of automatic coding tools to make the code better. You can improve your quality, increase your performance and boost efficiency. It’s easy, cheep and timesaving and everybody should use it. Come on guys, there are no disadvantage and don’t be shy to use them.

Here are my favorites:

Static code analysis

Style checker:

Duplicate code

Verfication

* [Update 2010-07-15]
A downloadable version of FxCop is no longer available and is now part of Microsoft Windows SDK for Windows 7 and .NET Framework 4

Follow

Get every new post delivered to your Inbox.