Tuesday, May 27, 2008

Java interview questions

  1. What are the various ways to implement threads.
  2. How do we make a section of code thread-safe.
  3. What all do you know about Springs Framework.
  4. Which template have you used in Springs DAO.
  5. Explain some features of Hibernate.
  6. How is Hibernate different that Springs DAO.
  7. Which version of Struts have you worked on.
  8. Explain the flow of control in a struts framework.

Thursday, May 22, 2008

AverTV Super 007 on Linux ( Ubuntu )

I recently purchased this tuner card was disappointed to discover that it was not running on Ubuntu 8.04, I read forums and was happy to know that it was not impossible, but the issue was that a lot of stuff was written, I have filtered out to few steps that helped me to get the card working
  1. sudo apt-get install mercurial
  2. hg clone http://linuxtv.org/hg/v4l-dvb
  3. cd v4l-dvb
  4. sudo make
  5. sudo make load
Start tvtime and things should work.

PHP, MySQL Interview questions

  1. What are the differences between PHP4 & PHP 5.
  2. Give your ideas how you can scale up a LAMP based website.
  3. Which design pattern is used by Symfony.
  4. what is the difference between pass by value and pass by reference.
  5. Describe the highlights of MVC architecture.
  6. How many types of tables does MySQL have.
  7. What are the differences between MyIASM and INNODB table types.
  8. What could be a possible reason if someone is looking to store session information inside a database, what are the steps involved in doing the same.
  9. How would you do clustering in MySQL.
  10. What are the different types of Indexes in MySQL.
  11. Explain FullText index in MySQL.
  12. Can we overwrite a row using insert in MySQL if the primary key is unique.
  13. Suggest some optimization steps in MySQL and sql queries.
  14. How would you create a function which would accept variable number of inputs.

Thursday, May 8, 2008

Postgres showprocesslist

Looking for something like showporcesslist for postgres, here is something I found.
Edit your postgres.conf
stats_start_collector = true

This must be set to true for the statistics collector to be launched at all.

stats_command_string = true

This enables monitoring of the current command being executed by any server process. The statistics collector subprocess need not be running to enable this feature.


After restarting postgres the following query will show currently running queries


psql -U postgres template1 -c "select * from pg_stat_activity"

only as user "postgres"