Archive for June, 2007

TortoiseSVN: missing overlay icons

Friday, June 29th, 2007
TortoiseSVN is a nice feature-rich wrapper for subversion, that offers a visual file-status representation and all subversion commands one click away. Unfortunately, it is only available for Windows...

Today, I decided to move my subversion-controlled projects from vmware's virtual disk to a local Linux shared directory, so I could access them from both Windows and Ubuntu. I copied the folders but the overlay icons did not show up. At first, I thought that maybe the .svn directories failed to copy, but that was not it.

The real reason was that I don't access my shared folders from \\.host\Shared Folders, instead I use a mapped drive letter, which I think is a convenient shortcut to avoid typing long network paths. TortoiseSVN, by default, decorates the files and folders that reside in local hard drives, but not the ones found in network drives.

To tell TortoiseSVN to display overlay icons for network drives, open the Windows Explorer's context menu and choose TortoiseSVN Settings Overlay Icons. In the Drive Types section make sure that you have checked Network drives and apply changes. You should be able to see the overlay icons now.

GRkbd 1.4 released

Sunday, June 24th, 2007
uk-gr1.jpg After seven whole years, I finally released an update for GRkbd. Of course, no one is using this program since long ago. But I don't care...

There was a major bug in GRkbd 1.3.3 that prevented greek characters to be generated on many systems. The reason was the GRkbd used hard-coded ISO codes, instead of using the keysym values defined in X11/keysymdef.h. This is fixed in 1.4.

I tested it in my Feisty box. It compiled well. It worked well. It can now Rest In Peace in the realm of abandonware.

how to type Euro Sign (€) on GNOME

Sunday, June 24th, 2007
a bag with the euro sign on it First, you have to set your AltGr key(s). Go to System → Preferences → Keyboard → Layout Options → Third level choosers. In this section, you select what key(s) will be used as "AltGr". (I prefer the Right Alt).

Your keyboard layout(s) may not include the Euro Sign, so you may need to add it to certain keys. You do that go to Layout Options → Adding the EuroSign to certain keys. Select the key(s) you want to add the EuroSign to. Choose one that suits your keyboard.

It should be working by now. Open a text editor and test wether the Euro Sign is generated by pressing the "AltGr"+"EuroSign" key combination you defined in the previous steps.

NExcelAPI - a .NET port of JExcelAPI

Friday, June 22nd, 2007
 JExcelAPI is a neat "Java API to read, write, and modify Excel spreadsheets", written by Andy Khan. It is very easy to use and it does a great job. Unfortunately, at work I have to deal with .NET projects as well. I thought it would be great to take advantage of the JExcelAPI's functionality in my .NET projects too, and get rid of the Microsoft Interop crap.

Thankfully, porting JExcelAPI to .NET was a piece of cake because all source files could be easily imported into a J# class library project, and compile with nothing but slight changes. To use it, download the visual studio solution and build the class library (you will need vs 2005). If you are not familiar to JExcelAPI, you can take a glance at the Test C# project do get an idea of how it works. However, make sure that you read the tutorial. Javadoc is also available.

I want to clarify that I did nothing more than drag'n'drop the original java files into a J# project. All glory and honour goes to Andy Khan. Thank you Andy.

Skipping lines from the beginning of text files

Saturday, June 16th, 2007
Sometimes you may need to process a text file from the unix shell excluding some lines at the beginning of the file. You can do that using the tail command:

# tail -n +5 myfile.txt

This instructs the tail command to skip the first 4 lines and dump myfile.txt starting from the 5th line.

You can also combine tail with head to get specific lines within a specific range, for example:

# head -5 myfile.txt | tail -n +3

This will print lines 3 to 5 to the standard output.