Sunday, February 22, 2009

Ubuntu 8.10 is good

Nice work by ubuntu team again, I liked everything after I installed it, especially my wifi, webcam, ( Dell 1525 lappy) worked out-of-box.


One thing slightly missing mplayer in the add remove programs small googling and u find this, I am looking fwd towards 9.

Wednesday, October 8, 2008

फ़िर से शुरुवात करने की कोशिश.

ऐसा लगता था की मेरी ज़िन्दगी थोडी थोडी स्थिर होती जा रही थी जब तरह से मैं गाजियाबाद मैं था। नौकरी ठीक ठाक चल रही थी घर मैं ज़रूरत का सामान भी धीरे धीरे जोड़ चुका था ।मेरा भाई सुमित तो मेरे साथ रहता ही था और माता पिता जी भी समय समय पर हमारे साथ रहने आते रहते थे। यका यक मैंने अपनी नौकरी बदलने की सोची बहुत बड़े संगठन से था तो तो गहरी सूच मैं डूब गया था मैं की मुझे क्या करना चाहीए, बहुत लोगो से सलाह मशवरा भी किया और अंततः मैंने यह फैसला किया की मैं नौकरी बदल ही लेता हूँ। परन्तु समस्या यह थी की नए संघठन के साथ सम्मिलित होने के लिए मुझे बंगलोर जाना पड़ता । मैंने एक सक्थ फैसला किया और बंगलोर आ गया, मुझे यहाँ एक महीना हो गया है जब मैं यह ब्लॉग लिख रहा हूँ। मुझे ऐसा लगता है की बहुत कुछ बदल गया है स्थिर से अस्थिर हो गया है कुछ तो, घर वालों से दूर रहना क्या होता है मुझे काफी समय से पता है परन्तु इतना दूर रहना की जा के मिल भी न सकूं दीपावली पे यह एक बहुत अलग अनुभव है, मैंने धर्य नही छोडा है अभी तक तो और मैं उस समय का इंतज़ार कर रहा हूँ जब हम सब एक बार फ़िर से साथ रह रहे होंगे।

Wednesday, June 11, 2008

MySQL Index varchar fields partially

Once upon a time :) I had a simple table.
+----------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+---------------------+------+-----+---------+-------+
| pnrkey | bigint(20) unsigned | NO | MUL | NULL | |
| pr_aac | char(2) | NO | MUL | NULL | |
| pr_pn_fn | varchar(99) | NO | MUL | NULL | |
| pr_pn_ln | varchar(99) | NO | MUL | NULL | |
+----------+---------------------+------+-----+---------+-------+
I created it using the following create statement..
DROP TABLE IF EXISTS ePDI_passengername;
CREATE TABLE ePDI_passengername (

pnrkey BIGINT UNSIGNED NOT NULL,
pr_aac CHAR(2) NOT NULL,
pr_pn_fn VARCHAR(99) NOT NULL,
pr_pn_ln VARCHAR(99) NOT NULL,

INDEX ePDI_passangername_index_pr_fn(pr_pn_fn),
INDEX ePDI_passangername_index_pr_aac(pr_aac),
INDEX ePDI_segmentData_index_pnrkey(pnrkey),
INDEX ePDI_passengername_index_pn_ln(pr_pn_ln)

)PARTITION BY RANGE(pnrkey)(
PARTITION p0802 VALUES LESS THAN (2008030000001),
PARTITION p0803 VALUES LESS THAN (2008040000001),
PARTITION p0804 VALUES LESS THAN (2008050000001)
);

I added 500,000 records to my table, and saw that the index table MYI was bigger in size than the data one MYD. also I was not happy with the performance of indexes on pr_pn_fn & pr_pn_ln as mysql ignored indexes in like '%string%' kind of searches and the performance was very poor in like 'string%' kind of searches

I shortened the indexes and found improvement in performance

Altering table indexes
alter table ePDI_passengername drop Index ePDI_passangername_index_pr_fn;
alter table ePDI_passengername add Index ePDI_passangername_index_pr_fn(pr_pn_fn(10));

Database interview questions

  1. What is the difference between a primary key and a unique key.
  2. How do I find all the people whose salary are the third highest in an organization.
  3. Why do we partition tables
  4. What is the difference between Inner join and outer join.

Saturday, June 7, 2008

Eclipse security component error in Ubuntu

If you get this error "Could not initialize the application security component. The most likely cause is problems with files in your application's profile directory. Please check that this directory has no read/write restrictions and your hard disk is not full or close to full. It is recommended that you exit the application and fix the problem. If you continue to use this session, you might see incorrect application behaviour when accessing security features"
try this
mkdir ~/.mozilla/eclipse
chmod 777 ~/.mozilla/eclipse

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.