Monday, August 09, 2010

PostgreSQL: show tables;

I was using DB Designer Fork with PostgreSQL. Because it does not have direct support to PostgreSQL I downloaded ODBC driver of it and set up an ODBC data source. After using this ODBC data source DB Designer Fork could connect to the database and reverse-engineered the database. Then I got strange error after I tried to sync to the database after some change made to the database and found the error caused by "show tables;"

I had no clue of what's wrong because I remembered "show tables" is a command. After a few hours digging, I found this:
http://www.postgresql.org/docs/8.0/interactive/sql-show.html At the very bottom of this page:
Joe 12 Mar 2005 15:33:00
If you're looking for an equivalent to MySQL et al.'s "SHOW TABLES" see psql's \d command...
Thomas Christensen 03 Jun 2005 9:08:06
For functionality similar to mysql SHOW TABLES use:
select * from information_schema.tables where table_schema='public' and table_type='BASE TABLE'

It turns out, PostgreSQL does not support this command.

I am still wondering why there is no error to fetch tables in the first place when reverse-engineer it? Does it use another standard SQL command?

Wednesday, May 19, 2010

The coefficients for SVs in decision functions in LIBSVM

For support vector classifications, these coefficients for support vectors are positive originally. In LIBSVM, for some reason, they are returned as the product of the original coefficients and labels. At the first it could be confusing because there is no documentation on it. But it can be found at line 1454 in function static void solve_c_svc(…) in svm.cpp.

Tuesday, February 05, 2008

Climate change: what is the results of chaos?

Climate has changed and is changing still and we are not seeing it slows down and will not see the slow-down in near future. We have more and more extreme climatic phenomena which we have never seen before: when it rains, it is a storm or a flood; when it is hot, it is a new record of high temperature. This year, China had a wide range of snow storm across the nation especially in the provinces which normally no snow in winter. The probability of this happens is 1 in 100 years. The whole country was shocked and lots of people had difficulites to travle or get food in normal price. It happened at wrong time: just few weeks before Chinese New Year which is the greatest traditional Chinese national festivel when people go home to reunite with family. Through the whole world we will see more and more insurance companies will go bankrupt because more and more claims of the damage of severe climatic disasters.

The whole world started from a still mode and expends bigger and bigger. At the beginning, the world is simple and then more high creatures appeared. People had limited resources but gradually had more power to control and use resources. People have more power to "control" the nature. Based on natrual law: Anti force equals to force. What people done to the nature eventually it will come back to human being or demand pay-back.

The development of anything can be described by chaos theory: starts from simple, static then evlove to complex and dynamic systems. For the chaos to develop it needs energy. As we all known the energy does no disappear neither recreate. The whole system has a constant energy. Energy only changes from one type into another type. When no energy supports the development of chaos, chaos collapses and system cool down like we see from the movie The Day After Tomorrow.

Now the world just goes to a crazy state: share market goes through top or has a record low drop in just few days. It just evident of the correct of chaos.