Skip to main content

Posts

Showing posts with the label it

Creating trigger for DB2

Recently I was solving a problem, where a trigger for DB2 database was needed. Using few of available tutorials on the internet, I started to build my first DB2 trigger. Everything seemed to be easy understand, until my first test of the trigger. After couple minutes of googling I have eventually discovered what did the mysterious error in the console mean. The problem was in termination character for the SQL query. As the query, which should be ran after triggering event has to be terminated with a semicolon, the trigger query itself has to be terminated with something else apparently - so that the SQL engine won't start the execution after first semicolon it sees after the action query. Solution The solution is quiet simple - change the termination character. --#SET TERMINATOR @ CREATE TRIGGER trg1 BEFORE INSERT ON table FOR EACH ROW BEGIN ATOMIC VALUES 1; --here you can see the semicolon, which normally causes problems :) END @ --SET TERMINATOR ; ...

Resolution configaration using xrandr - Ubuntu

I was recently solving a problem with my secondary monitor screen resolution. I have 24'' 16:9 widescreen LCD monitor but the maximum resolution available in GUI monitor config tool was only 1680x1050. What I needed was 1920x1080 to make my monitor even sharper. After some googling I have found this Ubuntu Wiki page which describes many possible display configurations using the xrandr command line tools. Xrandr enables you to add new resolution mode for your monitor. To add new mode use this command: xrandr --newmode "1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync xrandr --addmode VGA-0 1920x1080_60.00 After that, you can easily set the new resolution mode for your output device (in this case name of the device is VGA-0) xrandr --output VGA-0 --mode 1920x1080_60.00 You can do also other stuff with xrandr command line tool (such as setting primary monitor xrandr --output VGA-0 --primary ) I would recommend to use this comm...

Disk scanner

Pred nedávnom som sa trápil nedostatkom voľného miesta na disku, na ktorom mám nainštalovaný operačný systém. Aj keď som premazal skoro všetky dočasné súbory, stále toho miesta akosi nepribúdalo. Pomohol mi však tento šikovný nástroj na vizualizáciu disku - Disk Scanner Pomocou tohto šikovného nástroja si môžete urobiť prehľad o tom aké veľkosti majú jednotlivé priečinky vo vašom počítači a eventuálne aj zistiť, ktorý priečinok je nezmyselne veľký aj keď ho už vlastne nepoužívate (V mojom prípade to boli napríklad priečinky so zdieľanými virtuálnymi strojmi pre Oracle Virtual Box, ktoré aj po odinštalovaní programu ostali na disku a zbytočne zaberali miesto) Dúfam, že vám tento program pomôže vyriešiť vaše problémy.