Tuesday, March 16, 2010

Unable to run Star Tales benchmark.....and even worse

I was downloading Nvidia drivers and I saw this benchmark for Star Tales. Basically it's rendering 5 girls dancing to Wonder Girl's monster hit, Nobody. It's supposed to demonstrate the power of the PhysX in enhancing games. Here's a video of the benchmark


I downloaded the benchmark and installed it. When I tried to run it, the program complained of missing files. That's pretty bad, but worse was to come.

Today, I saw this

That's evil, dude!
That's evil, dude!

Monday, January 25, 2010

It's offficial: Spring 3.0 is not compatible with Hibernate 3.5 beta3

After fiddling around with the persistence.xml for a while, I found the bug report here.

Get the 3.0.1 snapshot!

Thursday, December 24, 2009

Steam promotion for the holidays - up to 80% off!

Steam is having a sale for the holidays, some of the games are up to 80% off! And there are the daily specials: for today, Mirror's Edge is going for $4.99 USD, S.T.A.L.K.E.R. is going for $1.99 USD! I doubt there's a better deal anywhere else!

Saturday, November 14, 2009

Reinstalling PostgreSQL - deleting the "postgres" service account

I was playing around with PostgreSQL 8.4 for my personal project. After my initial installation, I uninstalled it and tried to reinstall it. During the installation, I was prompted to enter the password for the "postgres" service account, which I don't remember. To continue with the installation, I needed to enter the following command and create a new password

net user /delete postgres

Friday, November 6, 2009

Removing external Javascript from Spring 3 documentation with jEdit

The Spring 3 reference in HTML format loads Javascript files from external sites. It's a bit annoying to wait for the loading of the scripts, particularly when I need to navigate between the pages frequently.

I used jEdit to search for the following regular expressions in the HTML files and replace them with a space
(?s)Begin Google Analytics code.*End Google Analytics code

(?s)Begin LoopFuse code.*End LoopFuse code

Thursday, November 5, 2009

Problems creating a JDBC resource with Glassfish 3 and PostgreSQL 8.4 drivers

What I initially thought was a straight-forward task turns out to be more complex than I imagined. After dumping the jars for PostgreSQL 8.4 driver (postgresql-8.3-701.jdbc3.jar
, postgresql-8.4-701.jdbc4.jar) into <GLASSFISH>/domains/domain1/lib/databases, I started the GF 3 server and tried to create a connection pool. I tried to create a javax.sql.ConnectionPoolDataSource resource using org.postgresql.ds.PGConnectionPoolDataSource. However I kept getting this error:
Can't find ConfigModel.Property for attr -isolation-level-guaranteed on interface com.sun.enterprise.config.serverbeans.JdbcConnectionPool

I get this error even when I do not specifiy "guranteed" for the isolation level.

Googling around,  I finally found someone with a similar problem. Seems that there is a bug in some of the earlier builds, so I downloaded the latest build (build 70)and reinstalled GF3.

All's well? Not quite. When I tried to start the server, I get some problem with using port 7676 for the default JMS host. I dont think I've gotten this error before in the older builds. Well, I did change the http-listener-2 port in domain1's domain.xml, not sure if I introduced some typo error there, so I ran
asadamin verify-domain-xml

and checked that the domain.xml is ok. The error is something along the line of
java.net.SocketException: Address family not supported by protocol family: bind

It turns out that for some reason the new GF3 build has problem using Vista's default hosts file (at C:\Windows\System32\drivers\etc).

To get it to work, change
::1 localhost

to
127.0.0.1 localhost
#::1 localhost

Restart the server again.

Now proceed to create the connection pool. However, according to the PostgreSQL driver download website,
It comes in two flavors, JDBC3 and JDBC4. If you are using the 1.6 JVM, then you should use the JDBC4 version.

.....

JDK 1.6 - JDBC4. Support for JDBC4 methods is limited. The driver builds, but the majority of new methods are stubbed out.

So, you'll need to specify an additional property JDBC30DataSource and set it to true when configuring the connection pool. That should be about it, now you can get some real work done.

Thursday, September 24, 2009

Overheard conversations

I was at Cash Converters the other day, rummaging through some stacks of CDs when I heard this conversation between a female customer and a male sales assistant.
女:请问你们有PS2吗?

男:有。

女:怎么卖?

男:69快。

女:是不是买回家就可以玩?

男:我们保证原装的disc可以玩。

女:这样说就是不可以玩啦?

男:如果是原装的disc一定可以玩。如果不可以玩,可以拿回来换。

女:那么pirated的可以玩吗?

男:我们只保证原装的disc可以玩。

女:那么就是pirated的不可以玩啦?

男:小姐,你还是听不懂我的意思。

For those who don't read Chinese, here's a translation.
F: Do you sell PS2 here?

M: Yes.

F: How much?

M: 69 bucks.

F: So I just bring it home then I can play?

M: We guarantee that you can play original discs.

F: That means it cannot play?

M: If it's original discs, it can play, if it doesn't work you can bring it back for exchange.

F: What about pirated ones?

M: We only guarantee that original discs can be played.

F: That means I cannot play pirated games?

M: Ma'am, you still don't understand what I mean.