Blog
Getting the Location of the executing Assembly on the .NET Compact Framework
Had some time today to familirize myself with the .NET Compact Framework. Took me some time to find out how to get the location of the program on the device. Here is what i came up with afer some research.
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)Marc
Deleting all default wiki pages in Trac
I am currently evaluating Trac as a web management tool for a school project. By default Trac comes with lots of standard wiki content, mostly help instructions, which i don't need. So here is a simple script which saves the current wiki content and then deletes all pages.
cd /path/to/your/trac/project
mkdir wiki-exported && trac-admin . wiki dump wiki-exported
for page in $(trac-admin . wiki list | awk '{ if($1 ~ /^(Trac|Wiki).*$/) print $1}'); do
$(trac-admin . wiki remove $page);
doneIf you want to restore your wiki content then run
trac-admin . wiki load wiki-exportedTo upgrade to the latest help instruction issue the following command
trac-admin . wiki upgradeMarc
Comparison between Java and C#
As i am still trying to get familiar with C# i found the following comparison between Java and C# quite usefull.
MSDN - sucks use the API Documentation in CHM Format
In my day job i am currently developing a C#/.NET Compact Framework application and one of my first experience is that the MSDN documentation -- well pretty sucks -- it's just way too slow. Fortunately the API Documentation is also available in CHM format.
Marc
Isolate a buggy commit with git bisec
A few weeks a go i made a blog post about my success in running Age of Empires II with Wine. Unfortunately the upgrade from wine-0.9.31 to 0.9.32 broke it again. The game doesn't even start anymore and just displays the following message:
See the AppDB Comments for further discussions.
So i decided to try to isolate the commit which is responsible for the breakage. The first step was to get all the required build dependencies installed. Next i did a checkout of the wine source and started regression testing as explained on the wine-wiki.
By telling git bisect the last good state and a known broken one it can perform a binary search for the buggy commit.
git bisect start
git bisect good wine-0.9.31
git bisect bad wine-0.9.32Then you can compile Wine and test whether the bug is still there.
CFLAGS=-fno-stack-protector ./configure && make clean && make depend && make
Depending on the result you run git bisect good or git bisect bad respectively. If you want to see which commits could cause the error run git bisect visualize. Recompile and repeat the above steps until you can isolate the problematic commit.
In my case it was the following:
27113156d96d20296409fcb92839609c8dd7e34a is first bad commit
commit 27113156d96d20296409fcb92839609c8dd7e34a
Author: Stefan Dösinger <stefan@codeweavers.com>
Date: Mon Feb 19 15:24:00 2007 +0100
wined3d: Remove IWineD3DDevice::EnumDisplayModes.
So know that i have isolated the commit, filled a bug report.
Marc
