Deleting all default wiki pages in Trac

03.04.2007 at 20:00

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); 

If you want to restore your wiki content then run

trac-admin . wiki load wiki-exported

To upgrade to the latest help instruction issue the following command

trac-admin . wiki upgrade


» read more » comments

Comparison between Java and C#

28.03.2007 at 11:16

As i am still trying to get familiar with C# i found the following comparison between Java and C# quite usefull.

» read more » comments

MSDN - sucks use the API Documentation in CHM Format

27.03.2007 at 17:19

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.


» read more » comments

Isolate a buggy commit with git bisec

25.03.2007 at 13:34

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:

Could not initialize graphics system. Make sure your video card and driver are compatible with directdraw.

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.32

Then 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 <>
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.


» read more » comments

SQL fun: order before group with a subquery

19.02.2007 at 17:49

I have came across a problem within a sql statement. Say we have 2 tables which are in a 1:n relationship. So we want to join them together normally the sql engine will just use the first match based on the auto increment key within the table. This isn't what i needed so i searched a way to actually sort the data before the grouping happened. The solution seems to be a subquery which isn't ideal performance wise but worked for my use case. So i ended up with something like this:

    SELECT lastname, firstname, address_addition FROM address
    LEFT JOIN othertable ON address.somefield = othertable.somefield
    ORDER BY whatever
) as addresses GROUP BY addresses.address_id

Which brought me to the next problem, the sql standard doesn't allow duplicate column names within a subquery and mysql does actually implement this part of the standard -- surprise ;)

So i had to "retag" a few fields in the selected clause with AS. Lesson learned: always use a short table prefix.


» read more » comments

<< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 >>