petek, 18. julij 2008
Java in Hollywood
I've just finished watching movie called Antitrust. The movie is about a system called SYNAPSE. Couple of time you can see a snippet of code that makes SYNAPSE and the code is Java. Cool! I've never before seen Java in a movie.
četrtek, 12. junij 2008
ponedeljek, 14. april 2008
Why I like NetBeans 6.1
Of course, because it is getting faster and faster, better and better editor, JEE and Glassfish support,.. I could get on and on.
But the greatest thing, for me at least, is that when I open a file it gets opened on the far right side of all editor tabs. NetBeans 6.0 had this issue with this and files got put somewhere in the middle of tabs, sometimes at the end, ... The algorithm was a total mistery for me.
I just hope this won't get lost by the time 6.1 is released.
But the greatest thing, for me at least, is that when I open a file it gets opened on the far right side of all editor tabs. NetBeans 6.0 had this issue with this and files got put somewhere in the middle of tabs, sometimes at the end, ... The algorithm was a total mistery for me.
I just hope this won't get lost by the time 6.1 is released.
petek, 28. marec 2008
ponedeljek, 11. februar 2008
Custom resolution with VMWare Server
I'm using VMWare to run Windows on my Linux machine and the machine supports 1680x1050 which is not supported by default when you install VMware Tools.
To get it to work you can follow this steps:
- open regedit
- go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video\{device id}\0000 use {device id} that has VMWare SVGA II in the description
- add a new binary value Resolution.x (x being by one bigger that other Resolution.y values), for example Resolution.11
- enter the value 31 36 38 30 78 31 30 35 30 (binary for 1680x1050)
- exit regedit and reboot
You can read more here and here.
To get it to work you can follow this steps:
- open regedit
- go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video\{device id}\0000 use {device id} that has VMWare SVGA II in the description
- add a new binary value Resolution.x (x being by one bigger that other Resolution.y values), for example Resolution.11
- enter the value 31 36 38 30 78 31 30 35 30 (binary for 1680x1050)
- exit regedit and reboot
You can read more here and here.
četrtek, 31. januar 2008
Total size of a table in DB2
If you wonder how to get the total size of a table in DB2 you can use following SQL statement which gives you 30 largest tables:
SELECT TABSCHEMA, TABNAME, DATA_OBJECT_P_SIZE + INDEX_OBJECT_P_SIZE + LONG_OBJECT_P_SIZE + LOB_OBJECT_P_SIZE + XML_OBJECT_P_SIZE AS TOTAL_SIZE FROM SYSIBMADM.ADMINTABINFO ORDER BY TOTAL_SIZE DESC FETCH FIRST 30 ROWS ONLY WITH UR
Total size here means size of data + size of indexes + size of long objects + size of LOB objects + size of XML objects.
More about this can be found at IBM DB2 InfoCenter or directly here.
SELECT TABSCHEMA, TABNAME, DATA_OBJECT_P_SIZE + INDEX_OBJECT_P_SIZE + LONG_OBJECT_P_SIZE + LOB_OBJECT_P_SIZE + XML_OBJECT_P_SIZE AS TOTAL_SIZE FROM SYSIBMADM.ADMINTABINFO ORDER BY TOTAL_SIZE DESC FETCH FIRST 30 ROWS ONLY WITH UR
Total size here means size of data + size of indexes + size of long objects + size of LOB objects + size of XML objects.
More about this can be found at IBM DB2 InfoCenter or directly here.
New ATI drivers and hibernate
As you might remember I didn't have ATI drivers enabled since hibernate did not function correctly. Couple of days ago I installed ATI driver version 8.452.1 and hibernate does work.
ponedeljek, 21. januar 2008
GNUCash
For the past 18 days (yes, New Years' resolution) I've been using GnuCash for managing my finances. The biggest problem I've seen with it it that you cannot protect the file where transactions are written.
Today I came across a Wiki entry how to encrypt that file using GnuPG.
This script can be also used for other applications, not only GnuCash.
Today I came across a Wiki entry how to encrypt that file using GnuPG.
This script can be also used for other applications, not only GnuCash.
petek, 18. januar 2008
sobota, 12. januar 2008
Changing the CVS keywork substitution mode
If you want to change the CVS keywork substitution mode, you unfortunately cannot do it with NetBeans, but you can use this few steps:
- let's say the new keyword substitution mode should be -kkv
- cvs admin -kkv File.java
- cvs update -kkv File.java
- edit the File.java to change it a bit
- cvs commit -fm "Change substitution mode" File.java
I've used this on number of files, so it does work.
- let's say the new keyword substitution mode should be -kkv
- cvs admin -kkv File.java
- cvs update -kkv File.java
- edit the File.java to change it a bit
- cvs commit -fm "Change substitution mode" File.java
I've used this on number of files, so it does work.
History of CVS changes
If you want to know what you and your colleagues changed in a period of time in the whole CVS managed project, just right click the root directory of the CVS managed project and use Search history command. There you can search by revision or date. Great. :)
You can for example see how much work did you do in year.
You can for example see how much work did you do in year.
ponedeljek, 10. december 2007
Insert Unicode
If you need Insert Unicode module you can get it here. I didn't develop this module, I only compiled it to work on NetBeans 6.0. The original author is Jesse Glick.
ponedeljek, 3. december 2007
petek, 30. november 2007
Depp Copy of Objects
Ever wanted to do a clone of a Vector for example. You could use the clone() method on all objects that are in the Vector, but there are better solutions:
- Exploit Serialization To Perform Deep Copy
- Faster Deep Copies of Java Objects
- Low-Memory Deep Copy Technique for Java Objects
Whatever approach suits you best is the one for you. :)
- Exploit Serialization To Perform Deep Copy
- Faster Deep Copies of Java Objects
- Low-Memory Deep Copy Technique for Java Objects
Whatever approach suits you best is the one for you. :)
četrtek, 8. november 2007
Migrating Class libraries between NetBeans versions
There is a nice entry in NetBeans Wiki on how to migrate class libraries between different IDE versions, so you don't have to manually enter them.
Cooler T60
After a week of using Ubuntu 7.10 I've noticed that my T60 is much cooler that it was running Ubuntu 7.04. I'm running BOINC all day long and the temperature of the CPU is 10˚C lower than on Ubuntu 7.04.
petek, 2. november 2007
Ubuntu 7.10
I've upgraded my T60 to Ubuntu 7.10. the main thing I noticed is that now hibernate/resume works as it should. Ubuntu 7.04 had a nasty bug when sound did not work anymore after resume. This has been fixed now.
And since I have an ATI x1400 card inside I also wanted to test the latest ATI drivers that support composite so compiz-fusion can work. But the drivers have a bug which prevents a notebook to go to hibernate mode. So now, until ATI releases new driver's, I'll not be using compiz-fusion since hibernate is more important to me. And for me these compiz gets in a way after a while, but it has some very nice graphics effects.
And since I have an ATI x1400 card inside I also wanted to test the latest ATI drivers that support composite so compiz-fusion can work. But the drivers have a bug which prevents a notebook to go to hibernate mode. So now, until ATI releases new driver's, I'll not be using compiz-fusion since hibernate is more important to me. And for me these compiz gets in a way after a while, but it has some very nice graphics effects.
sobota, 29. september 2007
Description of DB2 sqlcodes
Did you ever need a description of a sqlcode in a programming language like Java? Did you ever wanted to know if an sqlcode is an error or a warning?
You can use SYSPROC.SQLERRM function for that:
VALUES(SYSPROC.SQLERRM('SQL0911N', '', '', 'en_US', 0))
There is a sqlcode: in the description and id this is negative then you have an error, otherwise a warning. I consider sqlcodes that don't have sqlcode: in the description as not important. :)
You can use SYSPROC.SQLERRM function for that:
VALUES(SYSPROC.SQLERRM('SQL0911N', '', '', 'en_US', 0))
There is a sqlcode: in the description and id this is negative then you have an error, otherwise a warning. I consider sqlcodes that don't have sqlcode: in the description as not important. :)
Naročite se na:
Objave (Atom)