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
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();
}
}
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
Rediscovered xkcd
Recently I rediscovered the well-known webcomic xkcd created by Randall Munroe.
Have fun!
foreach( Environment.SpecialFolder folder in Enum.GetValues(typeof(Environment.SpecialFolder)))
{
Console.WriteLine(Enum.GetName(typeof (Environment.SpecialFolder), folder) + ": " + Environment.GetFolderPath(folder));
}
Read more…
April Fool – Google.com
April Fool – Stackoverflow.com
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.
Klassische Ansicht für Benutzerkonten
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
- Resharper – (C#/VB.NET – commerical)
- Nitriq – (.NET – free version available)
- FxCop – (.NET – free) *
- Gendarme – (Mono – free)
- CppCheck – (C/C++ – free)
- CAT .NET – (C#/VB.NET – free)
Style checker:
- StyleCop – (C# – free)
Duplicate code
- Clone Detective for Visual Studio (C# – free)
- Simian (many languages – free for personal use)
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