If your are using an english locale in your system, xfig is not able to show the german umlauts as xfig does not understand unicode.
The solution is simple, just start xfig with the following command:
env LANG=de_DE xfig
Search This Blog
Saturday, 16 November 2013
Sunday, 8 September 2013
Useful awk examples
A good starting point for awk is here.
- Print all lines between a start and an end marker:
awk /START/,/END/ filename | grep -v 'START END'
The comma separated pattern: /start/,/stop/ {print} is equivalent to the following code:
1: {
2: if ($0 ~ /start/) {
3: triggered=1;
4: }
5: if (triggered) {
6: print;
7: if ($0 ~ /stop/) {
8: triggered=0;
9: }
10: }
11: }
Friday, 7 June 2013
git basics
The basic git workfow:
- Check the log:
git log - What files have I changed:
git diff --name-only - What has changed:
git diff- Commit the changes:
git commit -a -m "text to describe this commit"- Push it to the repo:
git push origin
Labels:
git,
software engineering
Wednesday, 29 May 2013
Android and OpenCV
How to render text in Android with OpenCV:
Draw a cross on the screen:
Scalar c = new Scalar(255, 0, 0, 255);
Core.putText(inputFrame, "1.234m", new Point(100,100), 3, 1, c, 2);
Draw a cross on the screen:
void drawCross(Mat inputFrame, Point center, int width)
{
Scalar crossColor = new Scalar(0, 255, 0, 255);
Point point1x = new Point(center.x + width/2, center.y);
Point point2x = new Point(center.x - width/2, center.y);
Core.line(inputFrame, point1x, point2x, crossColor, 3);
Point point1y = new Point(center.x, center.y + width/2);
Point point2y = new Point(center.x, center.y - width/2);
Core.line(inputFrame, point1y, point2y, crossColor, 3);
}
Friday, 25 January 2013
Upgrade Ubuntu 11.04 to 12.10 (nvidia problems)
After having successfully upgraded my desktop, I did the upgrade from Ubuntu 11.04 (Natty Narwhal) to 12.10 (Quantal Quetzal) on my laptop. Unfortunately this cannot be done in one step, three complete upgrades have to be done:
- 11.04 to 11.10
no problems occurred. - 11.10 to 12.04
The x-server could not start up. The screen just changed from green to red, from red to orange and so on ...
Somehow the nvidia driver modules were removed. To recover from this I had to reboot in "recovery mode" and to select "basic video".
Once this was done I installed the nvidia driver again and the module was added automatically to the kernel. Now rebooting worked nicely and the nvidia drivers are running again. - 12.04 to 12.10
ongoing ...
Wednesday, 23 January 2013
Backup with tar and rsync
For example to archive your home directory you could use the following command:
The integrity of the compressed archive can then be tested by decompressing it again:
Until recently I believed that the
tar cvfj home.tar.bz2 --exclude=home.tar.bz2 /home/myusername The integrity of the compressed archive can then be tested by decompressing it again:
tar xvjf home.tar.bz2 -O > /dev/null
Until recently I believed that the
cp command was safe. However I observed that it fails quite regularly when copying large files to a windows file system. I hope rsync can solve this problem:rsync -av home.tar.bz2 /windows_partition/ Upgrade Ubuntu 11.10 to 12.04
I have done an upgrade from Ubuntu 11.10 (Oneiric Ocelot) to 11.10 (Precise Pangolin) using the "Update Manager".
This time the grub bootloader was configured correctly and also the old kernel images were deleted correctly. This is a major improvement compared to the previous upgrades.
I have seen an error message "broken pipe" during start-up. No idea what is behind this message, however the system seems to work.
As usual the /etc/apache2/apache2.conf was overwritten. To enable phpmyadmin one needs to add the following line:
This time the grub bootloader was configured correctly and also the old kernel images were deleted correctly. This is a major improvement compared to the previous upgrades.
I have seen an error message "broken pipe" during start-up. No idea what is behind this message, however the system seems to work.
As usual the /etc/apache2/apache2.conf was overwritten. To enable phpmyadmin one needs to add the following line:
Include /etc/phpmyadmin/apache.conf
Labels:
Ubuntu
Subscribe to:
Comments (Atom)