2008-07-18

Riding back horses

Me and my brother tried riding back horses last week. I was brave enough to settle the horse and ride back immediately to the nature, while my brother decided to take theoretical lesson first. This week we both go to ride horses freely in the nature so we will see...

Visit to the State Opera Prague

At the beginning of July I took the chance and visited the ballet performance in the State Opera Prague. I also invited my close friends. Swan Lake is the famous opera from Tchaikovsky and we all enjoyed it very much. After that we took a cup of hot chocolate and went for sight seeing in the evening city.

Firefox: Open new window in new tab

How to force open new window to new tab in Firefox 2.0?

Open location
about:config

Set Filter
browser.link.open

Variables:
browser.link.open_external
Rule for opening links from external programs (e.g. Thunderbird, Psi, ...)
browser.link.open_newwindow
Rule for opening links targeted to new window by the 'target' attribute
browser.link.open_newwindow.restriction
Rule for opening restrictions by Javascript

Values:
The value sets opening links in:
1 current tab
2 new window
3 new tab in current window

2008-07-10

Xlib: connection refused by server

Trying run under root:
su
swscanner
I received following error message:
Xlib: connection to ":0.0" refused by server

Easy solution, run under regular user:
xhost +localhost
OR:
xhost local:root

Then run under root:
export XAUTHORITY=/home/regular_user_name/.Xauthority

Where
regular_user_name is name of the user doing command su.


2008-07-07

Acer TravelMate 5720 - video drivers

How To install video drivers to Acer TravelMate 5720 (thanks to Miro):
Proprietary binary drivers for Debian:
apt-get install fglrx-driver fglrx-driver-dev fglrx-control fglrx-kernel-src
cd /usr/src/
tar -xjvf fglrx.tar.bz2
cd modules/
./make.sh
mkdir -p /lib/modules/`uname -r`/misc
cp fglrx.ko /lib/modules/`uname -r`/misc/
depmod -ae

Oracle DB server notes

Oracle Error:
Warning: ocifetch(): OCIFetch: ORA-24374: define not done before fetch or execute and fetch in /home/martin/dev/www/inc/ora_funct.php on line 15

Reason and solution:

sometimes wrong syntax but mostly missing access rights to accessed table. You can solve this problem by granting sufficient rights to the user which is accessing the table.

Oracle sql date comparison:
SELECT column
FROM table
WHERE start_date <= TO_DATE('20080401', 'yyyy-mm-dd');

2008-06-24

Spelling with ispell and related tasks

Change default ispell dictionary:
dpkg-reconfigure ispell
or:
select-default-ispell

Using ispell by non-interactive way:
echo string | ispell -a | grep -v 'Ispell version' | grep -v '^

Optionaly we can define another dictionary:
ispell -d dictionary_name

We can choose the dictionary from istalled files:
ls /usr/lib/ispell/*.hash | sed 's/.*\///' | sed 's/.hash//'

One kind of errrors while using xargs:
xargs: unmatched double quote
OR:
xargs: unmatched single quote
Solution:
find . -type f -print | xargs grep pattern

I experienced error message while using iconv:
iconv illegal input sequence at position 0
Solution:
ispell --null

Converting UTF8 to 7bit ASCII:
iconv -f UTF-8 -t ASCII//TRANSLIT < input.txt > output.txt