The thing about life

Most people start out with a blank slate. No expectations. No desires. Except perhaps for living - survival. Important as that may be, it is not what makes us unique. As we grow older we start having different desires, different things we strive for. It starts out with very basic things - perhaps that new bicycle for Christmas. The last cookie in the jar mom hid in the cupboard. But as we grow older these things attain a certain depth to them.

For some people they desire love. Other want that perfect job. Some want power, other recognition, some fame and some other just to be healthy. Problem is very few people attain their childhood dreams. Mostly because the childhood dreams are not realistic - they are either impossible or improbable.

I think people who are happy are those people who came close to attaining their childhood dreams. Unfortunately that accounts for a tiny fraction of the population - it just is not likely that you will achieve what you desire simply because your reference frame as a child is incomplete and does not consider the realities of the real world.

Full Article

Hillarious

weird green mother fucking germs
weird green mother fucking germs

JBoss Seam: rich:dataTable with huge datasets

Have you ever wanted to implement Seam's rich:DataList but the search results could be in the tens or hundreds of thousand of records? Well, I did recently run into that exact issue. For the first attempt I tried to use the standard binding method, but knew it could never work in a production environment.

The problem is that in this mode, the DB is queried for all matching results. In my case that could be up to 200 000 records. So those 200 000 records would be returned from the DB (an arduous task), and then kept in memory - consuming all available resources. I have not measured it but my gut tells me a list like that would easily consume 500MB of RAM in Java. Coupled with the fact that sorting on table headers will sort that huge list in memory on the server, and it is clear that this is not even a solution for a single user system. I am to support about a thousand clients on one server. Ouch!

So I googled the topic and came across this website. I copied this guy's code for the PagingDataModel and related classes (hope I was allowed to do that - did not see any copyright notices in the source code!), and it almost worked.

Full Article

Cannot connect to a network share by netbios name?

I recently had the odd situation where trying to connect to a shared printer on a Windows XP workstation, a member of the AD domain, did not work. It failed to connect. However, connecting using the IP address of the host worked just fine.

DNS entries were all registered correctly for the netbios name, and pinging the host from the server resolved it just fine. No firewalls were blocking file/print sharing ports, file and print sharing was turned on...

After 30 minutes of verifying the usual suspects, I was ready to tear out the hair on my scalp. Fortunately I had a bright moment and actually read the error message - it referenced something about time not being correct. I looked at the server's time and then the workstation and alas - the workstation was set 1 day earlier. Once I fixed the time on the workstation I could access it using its netbios name once again.

Ubuntu 10.04 x64 and Sun JDK 1.6

If you are in the same boat as I am, upgrading from Ubuntu 9.10 to 10.04 you will find Sun's JDK not to be present after the upgrade. Trying to apt-get it does not work since the package is not present in the default sources.list. I usually download it from http://www.java.com/, and use

sh jdk-6u20-linux-x64.bin 

to execute it. In my case I received this error:

Full Article