Tuesday, September 14, 2010

Instant Bing

Here comes Instant Bing but make sure yo do not press return/enter key :)

Instant Bing

Let me know what you think about it.

Twitter Instant Search

So now we have Twitter Instant Search. Took me over 2 hrs to develop it and over 2 yrs to deploy :)
but make sure yo do not press return/enter key :)
Twitter Search Instant

It needs some beautification, however works clean.
More instants to come :)

Let me know what you think.

Wednesday, July 7, 2010

I am singleton !

Yes i have renamed my blog URL from http://mejustlikethat.blogspot.com/ to http://iamsingleton.blogspot.com/
It reflects what i am.

Guess the output.

enum Q {a("enum Q { a(%c%s%c); Q(String t) {System.out.printf(t, 34,t, 34);System.exit(0);}}");Q(String t) {System.out.printf(t, 34, t, 34);System.exit(0);}}

Can you guess what is the output/result of the above program without executing it  ? :)

Tuesday, June 22, 2010

M.S. Software Systems : Programme Details- BITS Pilani and courses that I opted for.

M.S. Software Systems
Employed professionals in information technology industries with minimum 1 year
experience and holding an Integrated First Degree of BITS or its equivalent with adequate 
background in Mathematics. Employer consent with suitable mentor availability will be 
additional requirements.


Normally Four Semesters
Special Feature:
This is a specially designed Work-Integrated Learning Programme for catering to the 
Human Resource Development requirements of a diverse spectrum of information 
technology industries.

Semester wise pattern for students admitted in the First Semester of the Academic Session 2009-10

SemesterSLOTCourse NoCourse TitleGradeUnits
Courses for First Semester 2010-2011 (July 2009 - November 2009)

IS ZC462Network Programming3
C2SS ZG514Object Oriented Analysis & Design B4

C3SS ZG562Software Engineering & Management  B5

C4IS ZC361Data Structures & Algorithms A3

First Semester CGP : 8.4/10.0
Courses for Second Semester 2010-2011 (December 2000 - April 2010)
2C5EA ZC473Multimedia Computing  C3

C6SS ZG513Network Security   C4


CS ZG623Advanced Operating Systems 
C8IS ZC332Database Systems & Applications A3

Second Semester CGP : 8.27/10.0
Courses for Third Semester 2010-2011 (July 2010 - November 2010)
3C9SS ZG653Software Architectures  A5

SS ZG531Pervasive Computing 4
SS ZG515Data Warehousing 5
C12BITS ZG659Technical Communication A4
Third Semester CGP: 8.75/10.0 
Courses for Fourth Semester 2010-2011 (December 2010 - April 2011)
BITS ZG629TDissertation     A
Final CGP: 8.75/10.0 Wow, Its over
This page is taken from BITS Pilani website and modified as per the courses that i have opted for during my MSSS course from July 2009 - April 2011. BITS PILANI

Saturday, June 12, 2010

World Cup 2010 matches IST

List World Cup 2010 matches with time in IST.
June 11
07.30pm – South Africa Vs Mexico – Johannesburg (SC)
June 12
12.00am – Uruguay Vs France – Cape Town
05.00pm – South Korea Vs Greece – Johannesburg (SC)
07.30pm – Argentina Vs Nigeria – Port Elizabeth (Ellis)

June 13
12.00am – England Vs USA – Rustenburg
05.00pm – Algeria Vs Slovenia – Polokwane
07.30pm – Serbia Vs Ghana – Pretoria

June 14
12.00am – Germany Vs Australia – Durban
05.00pm – Netherlands Vs Denmark – Johannesburg (SC)
07.30pm – Japan Vs Cameroon – Bloemfontein

June 15
12.00am – Italy Vs Paraguay – Cape Town
05.00pm – New Zealand Vs Slovakia – Rustenburg
07.30pm – Ivory Coast Vs Portugal – Port Elizabeth

June 16
12.00am – Brazil Vs North Korea – Johannesburg (Ellis)
05.00pm – Honduras Vs Chile – Nelspruit
07.30pm – Spain Vs Switzerland – Durban

June 17
12.00am – South Africa Vs Uruguay – Pretoria
05.00pm – Argentina Vs South Korea – Johannesburg (SC)
07.30pm – Greece Vs Nigeria – Bloemfontein

June 18
12.00am – France Vs Mexico – Polokwane
05.00pm – Germany Vs Serbia – Port Elizabeth
07.30pm – Slovenia Vs USA – Johannesburg (Ellis)

June 19
12.00am – England Vs Algeria – Cape Town
05.00pm – Netherlands Vs Japan – Durban
07.30pm – Ghana Vs Australia – Rustenburg

June 20
12.00am – Cameroon Vs Denmark – Pretoria
05.00pm – Slovakia Vs Paraguay – Bloemfontein
07.30pm – Italy Vs New Zealand – Nelspruit

June 21
12.00am – Brazil Vs Ivory Coast – Johannesburg (SC)
05.00pm – Portugal Vs North Korea – Cape Town
07.30pm – Chile Vs Switzerland – Port Elizabeth

June 22
12.00am – Spain Vs Honduras – Johannesburg (Ellis)
07.30pm – Mexico Vs Uruguay – Rustenburg
07.30pm – France Vs South Africa – Bloemfontein

June 23
12.00am – Nigeria Vs South Korea – Durban
12.00am – Greece Vs Argentina – Polokwane
07.30pm – Slovenia Vs England – Port Elizabeth
07.30pm – USA Vs Algeria – Pretoria

June 24
12.00am – Ghana Vs Germany – Johannesburg (SC)
12.00am – Australia Vs Serbia – Nelspruit
07.30am – Slovakia Vs Italy – Johannesburg (Ellis)
07.30am – Paraguay Vs New Zealand – Polokwane

June 25
12.00am – Denmark Vs Japan – Rustenburg
12.00am – Cameroon Vs Netherlands – Cape Town
07.30am – Portugal Vs Brazil – Durban
07.30am – North Korea Vs Ivory Coast – Nelspruit

June 26
12.00am – Chile Vs Spain – Pretoria
12.00am – Switzerland Vs Honduras – Bloemfontein
Second Round – ROUND OF 16

June 26
07.30pm – Group A winner Vs Group B 2nd place – Port Elizabeth
June 27
12.00am – Group C winner Vs Group D 2nd place – Rustenburg
07.30pm – Group D winner Vs Group C 2nd place – Bloemfontein

June 28
12.00am – Group B winner Vs Group A 2nd place – Johannesburg (SC)
07. 30pm – Group E winner Vs Group F 2nd place – Durban

June 29
12.00am – Group G winner Vs Group H 2nd place – Johannesburg (Ellis)
07.30pm – Group F winner Vs Group E 2nd place – Pretoria

June 30
12.00am – Group H winner Vs Group G 2nd place – Cape Town

July 2
7.30pm – 1st Quarter-final – Port Elizabeth

July 3
12. 00am – 2nd Quarter-final – Johannesburg (SC)
7.30pm – 3rd Quarter-final – Cape Town

July 4
12.00am – 4th Quarter-final – Johannesburg (Ellis)

July 7
12.00am – 1st Semi-final – Cape Town

July 8
12.00am – 2nd Semi-final – Durban

Third Place (July 11)
12.00am – Semi-final losers – Port Elizabeth

Final (July 12)
12.00am – Semi-final winners – Johannesburg (SC)

Saturday, May 22, 2010

Out of range - Monitor

I got with a strange out of range (Frequency 90Hz/120Hz). This happened when the screen resolution was changed to a high resolution that is not supported by the monitor and then you end up seeing this on your screen. I spent quite sometime fixing this up. Finally here is the solution that got it back to working again.

a) Reboot the PC.
b) Once the computer is booting up press F8 or the function key that lets you to a menu which can start your computer in Safe Mode.
Among Safe mode there will be other options like 
a) Safe Mode
b) Safe Mode with Command Prompt
c) Safe Mode with Networking.
d) Normal Start up
e) Last good known configuration.

Select a and while the computer is booting up in safe mode, immediately press F8 this will show advanced options. Some stupid way to get to advanced options.

You will see a screen that would allow you to start the computer in VGA Mode. With VGA mode the screen resolution is auto set to 640 X 480 which works on all monitors. This will start the computer in VGA mode.
Once the system is up and running do the following
a) Go to desktop
b) Right click , Properties.
c) In Properties select Settings tab and choose 800 X 600 or the last known resolution that worked on your monitor.
d) Click Advanced 
e) In Compatibility section select Ask me before applying the new settings.
f) Press OK and your new resolution will be in safe mode.

Now you can reboot the computer and start in normal mode.

Thursday, May 13, 2010

Ctrl + C and Ctrl + V can be useful !

Ever got annoyed working on remote machines using for example Windows Remote desktop when you are not able to copy and paste text from remote desktop to local machine or vice versa ?

In order to get remote copy paste working make sure rdpclip.exe (Remote Clipboard) is running on remote desktop which will enable copy pate from remote desktop to local desktop and rdpclip.exe is running on local desktop which will enable copy pate from local desktop to remote desktop. In order to run rdpclip.exe just go to Windows + R (Run window) and run rdpclip.exe.

Once running you can now copy paste texts from remote to local desktop or vice versa.

Friday, April 9, 2010

Twitter Whale !

Twitter tweeted me a white whale !

Tuesday, March 30, 2010

Burning a bootable XP

I know most of them will ask Why Windows, I still prefer windows over linux when doing mundane tasks with my PCs. and i know XP has been replaced by Vista, but my PC runs XP better than Vista. I am sure most of them haven't upgraded their PCs to match vista requirements so here it goes.

After burning 3 cds and reading number of in-complete articles about creating bootable CD, i was finally able to learn the procedure of creating a bootable cd with XP. And now sharing which would save your time and CDs.

I used Nero 7.11.10 to create bootable CD.

1) Start Nero Express
2) Click on button with left arrow that would turn right on click.
3) Click on Switch to Nero Burning ROM and in meanwhile download boot.ima (Click on the link)
4) From compilation list select CD-ROM(Boot).
5) There are 4 tabs that needs to be configured as follows
   a) Boot Tab
       For boot image , give the path of the boot image that you downloaded in Step 3 and configure the rest of    the configuration for boot tab as shown in image below

      b) ISO Tab: Configure as shown below
      c) Label Tab: Configure as shown below
          d) Burn Tab: Configure as shown below

6) Now click on New and drag the contents of your original XP CD into the project for burning and click before you click on Burn re-check the four tabs.

I hope this will save few of your cd's and time.

Sunday, March 28, 2010

Voting Time !

                                                     Just shut up and Vote, Ur the Antidote !
                                                         Show the finger, but the right one !

Thursday, March 25, 2010

Twitter is my blog home page !

I found this cool blog template that resembles twitter home page.
Check it out @ http://btemplates.com/2010/03/08/twitter/

Replaced my blog template with Twitter template.

For more blog templates check out

Tuesday, March 9, 2010

Friday, March 5, 2010

I need to think big, I need Gig

Look what do i get to see today in the "world's fastest browser" and trying to access my favorite email and  "world's fastest growing email". This is what happens when you don't have infrastructure to back your applications. Snail, Lame, Dunce  this is what i would describe my internet connection. Today even 2Mbps internet connection is slow and thought to be dunce. I need a 1Gbps connection, off course i need it for cheaper price. Nothing becomes a revolution unless its cheap. Thinking of which, Outsourcing comes to my mind. Google can you bring Gig connection to India, Bangalore ? Let Airtel reach my home first :( Struggling with BSNL.

Monday, March 1, 2010

IE8 Vista : This tab has been recovered, looping

Woh, i have been running into lot of issues lately and here is one more. Since yesterday morning whenever I start IE8 on Vista, ok i have to use IE because the website that i want to access to connect to corporate network can run Juniper NetConnect only with IE.

I see this message "This tab has been recovered" when i start IE 8 on my laptop running Vista. It keeps happening in a loop making IE 8 unusable. However one can start IE in Add-ons disabled mode as Start -> Accessories -> System Tools -> Internet Explorer (No Add ons) and the problem disappeared. So looks like one of add on is causing IE to fail.

Well, at least I was able to get IE working again (Big deal huh !) but unfortunately running in Add on disabled mode means Net Connect addon will be disabled and I cannot connect to corporate network .... it would be sensible for Juniper to support Net connect to support Firefox if not chrome as working with just one browser means single point of failure, bad kitty.

One simple solution to the looping problem is to disable all the add-ons from Tools -> Manage Add ons and guess what, it worked. Back to work :)

Transliterate or localize your blog/website language.

I found this nice transliteration javascript from google. It works clean. It can translate your blog/website into many many languages.

Add the following javascript to you website or blog (Add a HTML/JS gadget)

<div id="google_translate_element"></div><script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
</script><script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

As you see a google drop down box. Happy Localization. It was neat to see my blog getting translated to so many different language with so ease.

Heap issue with Ant Task

Long time ago i had seen the following error message after running ant task for my project.

[java] Error occurred during initialization of VM
[java] Could not reserve enough space for object heap
[java] Could not create the Java virtual machine.

I had connected to my development server via a remote desktop from Windows. I have a 2 gig ram on my server and I felt because i was doing remote desktop there was insufficient memory for the ant task. Hence i tried using VNC viewer and guess what the error was no longer to be seen. However a new sort of problem or should i say frustration came along with VNC viewer. First i had to disconnect my remote desktop session and then connect in via vnc. However this would require atleast 15-20 frustrating attempts cause most of the times VNC would fail to connect saying Connection terminated by the host. After living with this frustration for some time , i finally decided i had it enough and decided to get a solution to my original problem of insufficient heap.

The portion of my ant script that was throwing the error is

The ant task i have here forks a VM for TomcatBootstrap. So if you see maxmemory was set to 1000m. At first i thought of setting it to 1500m , 2000m and 3000m and it did not help. The maxmemory field is the maximum amount of memory to allocate to the forked VM, the more you allocate the lesser heap will be left. Hence you would see insufficient heap, hence one should allocate only the required minimum heap to the forked ant. Thus reducing maxmemory to 200m solved the problem. No more woes with VNC viwer, i can now use remote desktop to run the project and spend some more time blogging. As they say "Less is more".

Friday, February 26, 2010

Learning to rank challenge from Yahoo !

Yahoo ! learning to rank challenge starts this March 1st. It will be exciting to see folks around the world present their innovative ranking algorithms may be i can think of one too :) .
Is this a move to take down the mighty Google Page Rank algorithm and Google as large ? http://en.wikipedia.org/wiki/PageRank

I think Microsoft will keep an eye on this.

Rin Vs Tide

Aunty q chok gayee ?

In past horlicks going one on one with Complan

Remember Coke against Pepsi ! The era of revolutionary advertising is back !

Income tax benefit for "not so common man" !

Income tax slab for Assessment Year 2010-11

Tax Slab


2009-10 & Early

Up to 1,60,000
Up to 1,90,000 (for women)
Up to 2,40,000 (for resident individual of 65 years or above)



1.6 - 5 Lakhs


1.60 – 3 Lakhs 10%

3 – 5 Lakhs 20%

5 – 8 Lakhs


Above 5 Lakhs 30%

Above 8 Lakhs



What this means is


Old Tax

New Tax


Upto 1.6 Lakhs




2 Lakhs




3 Lakhs




4 Lakhs




5 Lakhs




6 Lakhs




7 Lakhs




8 Lakhs




9 Lakhs




10 Lakhs




In addition to above there would be a surcharge of 10% of the total tax liability is applicable where the total income exceeds 10,00,000 which was there last year also.

Well this is truly this year's budget is a history in terms of a complete walk out of the opposition for the first time in Indian parliamentary history, it also marked a budget when the "not so common man" is benefited.

So where will you spend the extra money ?

Wednesday, February 24, 2010

java.lang.OutOfMemory exception.

I was attempting to run a jar file and then i bumped into java.lang.OutOfMemory exception.

Lets start with some background. As you know every program needs certain amount of memory in heap to run. There are two values known as initial heap size and maximum heal size. In Java 5.0 the initial heap size is set to 1/64th of available physical memory on the machine and the maximum heap size is set to 1/4th of available physical memory.

Now in case you run a program say using java command and run into java.lang.OutOfMemory this simply means that your program needs more heap memory than that is available and you can do that by overriding the initial heap size and maximum heap size. To overiride the initial heap size to say 150 MB you can use java -Xms150000K and to overiride the maximum heap size to say 250 MB you can use java -Xmx250000K. Remember maximum heap size must be set greater than initial heap size or else you see
Error occurred during initialization of VM
Incompatible initial and maximum heap sizes specified

So remember the options Xms and Xmx, these are called non-standard options. For a complete list of non-standard options run java -X

So suppose am running a jar file which had run into an java.lang.OutOfMemory exception. Then i could re-run it as follows
java -Xms150000K -Xmx250000K -jar myJar.jar

Unfortunately, the only way to determine the amount of heap that your program is running is via

// Get current size of heap in bytes
long heapSize = Runtime.getRuntime().totalMemory();

// Get maximum size of heap in bytes. The heap cannot grow beyond this size.
// Any attempt will result in an java.lang.OutOfMemoryException.
long heapMaxSize = Runtime.getRuntime().maxMemory();

Hence one has to keep changing the heap values and run the program until you stop seeing java.lang.OutOfMemoryException. I was able to run my program with initial heap 150MB and and maximum heap of 250MB.

Monday, February 22, 2010

environmental problem

Well, I woke up today and found that my system simply refuse to behave normally. I tried to run ant command from command prompt and Windows spit an error message "ant is not recoginzed as internal or external command", so was the problem with edit, del, copy, shutdown and everything. When i try to ran eclipse i got a message saying "Java is not installed".

I immediately checked the Path environment variable and it was perfect. I double checked all the paths in the Path variable, everything was fine. It had all the paths from system, system32, java and everything. I was wondering then what could the problem be... After a while i renamed the path environmental variable from "Path" to "PATH" and whooosh everything started working as it was.... Finally was able to resolve the environmental problem :)

This all was happening with my Windows XP SP3 box :) Glad that its working again ...

Fn keys problem or a feature.

Had got a new USB keyboard for my laptop (might sound weired), but I needed a separate numeric keypad hence had to get a new keyboard. After few days of plugging in the keyboard and using the num pad, the keyboard on my laptop started to behave weird.

If i press o i used to ket 6,if I pressed p i used to get *. Finally i realized that there was a virtual numeric keypad on my laptop keyboard. i. And the way to switch it on/off was to toggle Fn + NumLck or Fn + ScrLk..... never focussed on those keys till now :)

Well now my new USB keyboard looks obsolete.

Tuesday, February 2, 2010

Set 4

1. Write an algorithm to implement linked list.
2. Given an unsorted array with characters or digits, write an algorithm to print the number of occurrences of each item in array. a) Sort b) Without sorting
3. Given an array of integers, reverse the array without using temporary variables/sapce.
4. In JSP , who maintains the session and how is it maintained internally?
5. Explain URL Rewriting.
6. Explain Self Join with example.

Tuesday, January 26, 2010

Set #3

1. Explain the current project, your roles, tools and technology used.
2. Explain Singleton pattern. And how can you optimize it. Double Checked Singleton.
3. Write pseudo code for Stack Implementation.
4. Explain deadlock.
5 Explain synchronization.
6. Explain ConcurrentModificationException.
7. What you think about when you write multi threaded applications ?
8. What is the difference between single and multi threaded ?
9. Static initializer block intialize i to 10
Initialize i to 20 in constructor
In main Print values of i , instantiate and then print iagain.
10. In a HashMap:
String a = "xx", b="yy", c="zz"
HashMap x = new HashMap();
a = "lsi"
If the value of one of the keys say 'a' is changed , will the key value in hash map change?
11. In a single linked list there is a pointer to node x , how do you delete it?
12. An large array of consiting of only 1s 2s , how do you sort it in 0(n) time complexity?

Monday, January 18, 2010

Wednesday, January 13, 2010

Set #2

Here is another set.

1. Brief Introduction?

2. Explain your latest project, how does it work?

3. Explain Aggregation, Composition and Association with examples?

4. In case you have a huge data set and need really fast insertion and retrieval, which data structure can be used?

5. Write a program to reverse a number without using library functions.

6. Explain JVM Class loading?

7. Suppose you have app server which has multiple web applications. Each web application has its own version of say jdom.jar how does the app server handle this scenario?

8. Explain tag handler class life cycle.

9. What is the purpose of tld’s, tags?

10. Explain nesting of tags in case of JSPs. Custom tags?

Set #1

Here is the first set, hope more will follow.

1. Brief introduction?

2. What is the difference between method overloading and method overriding? Can we override methods with different return types?

3. What is the difference between Hashtable and HashMap?

4. What is TreeMap?

5. Which data structure one can use for fast insertion and fast deletion?

6. What is the significance of equals () and hashCode () when using HashMap ?

7. Explain wait () notify () and notifyAll ()?

8. What happens after the sleep () returns? Can one thread cause another thread to sleep?

9. Do static fields get serialized?

10. What are the differences between public and protected keywords?

11. How can you make class immutable? Deep Copy.

12. What is auto boxing?

13. Which data structure is used in buckets in HashMap?

Twitter Updates

    follow me on Twitter