When you have to display the latest global svn revision number in your application you face different options.
Using Subversion keywords, like $Revision$ or $Id$, sounds like the most natural approach. Unfortunately the keywords are updated only when you change and commit the corresponding file. In short: if you intend to grab the revision ID from a central header file, like version.h, this file has to be edited and committed whenever a svn commit on any file in your project takes place. So either you do that manually (“erm, no?” – right!), or you create a commit hook and bloat your repository.
Another approach is to fetch the latest number of the latest revision and update your version.h as part of your build. In short: whenever you trigger a build by calling make, ant or build your project in your IDE, you invoke a script that generates your header file (or .java, .cs, .rb … you name it). On Linux and Unix, you might use a script just like this:
Read more…
Microsoft added a new command line tool to Vista and Windows 7: clip.exe. This nifty little utility allows user to copy program output to the clipboard on the windows command line. Its usage is pretty straightforward:
dir | clip – copies the output of the dir command to the clipboard
clip < example.txt – copy the contents of the file example.txt to the clipboard
I came across a really annoying problem while using win32 sockets one of my bigger projects. In short, the VisualC compiler complained about redefinitions of basic Windows socket macros:
C:\sdk\windows\v6.0a\include\ws2def.h(91) : warning C4005: 'AF_IPX' : macro redefinition
C:\sdk\windows\v6.0a\include\winsock.h(460) : see previous definition of 'AF_IPX'
C:\sdk\windows\v6.0a\include\ws2def.h(124) : warning C4005: 'AF_MAX' : macro redefinition
C:\sdk\windows\v6.0a\include\winsock.h(479) : see previous definition of 'AF_MAX'
C:\sdk\windows\v6.0a\include\ws2def.h(163) : warning C4005: 'SO_DONTLINGER' : macro redefinition
C:\sdk\windows\v6.0a\include\winsock.h(402) : see previous definition of 'SO_DONTLINGER'
C:\sdk\windows\v6.0a\include\ws2def.h(206) : error C2011: 'sockaddr' : 'struct' type redefinition
C:\sdk\windows\v6.0a\include\winsock.h(485) : see declaration of 'sockaddr'
C:\sdk\windows\v6.0a\include\ws2def.h(384) : error C2143: syntax error : missing '}' before 'constant'
C:\sdk\windows\v6.0a\include\ws2def.h(384) : error C2143: syntax error : missing ';' before 'constant'
C:\sdk\windows\v6.0a\include\ws2def.h(384) : error C2059: syntax error : 'constant'
C:\sdk\windows\v6.0a\include\ws2def.h(437) : error C2143: syntax error : missing ';' before '}
(...)
Read more…
When dealing with foreign names, it is a matter of both correctness and courtesy to use the right spelling. But quite often it is also a problem of “how do I enter this darn character”.
Luckily, there is abcTajpu, a Firefox extension that allows you to select foreign characters, umlauts, … quite easily.
Free, no ads – really worth a try

The support for Google Contacts and Google Calendar in KDE 4.4 is pretty good. All you need is libgcal (sudo apt-get install libgcal0 in Kubuntu). This library provides Akonadi access to your Google account. Once it is installed you just have to configure it in Akonadi, and then you can access your Google contacts and calendar in KMail, KAddressBook, Kontact and Korganizer.
Unfortunately there is no sync option for Akregator and Google Reader yet.