eM Client - Another Outlook Killer ?

Looking for another alternative to Microsoft Outlook? While Mozilla Thunderbird offers many of the same features as Microsoft's email client, you need to install plugins to add calendar and task management features. eM Client, on the other hand, comes equipped with a full featured email client and contact, task, and calendar managers.

While it's not exactly an Outlook killer yet, eM Client's developers are working on a few killer features:
  • Google Calendar and Contacts Sync
  • ActiveSync support
  • Universal translation tool
  • Facebook integration
  • IM integration
  • Anti-virus integration
eM Client also has a highly customizable interface, which is always nice.

How to reverse a doubly linked list ?

I talked about how to reverse a singly linked list earlier. That was slightly tricky to understand.
Reversing a doubly linked list is relatively easy. The logic is : You need to keep on changing the next and previous pointers as you traverse the entire list. Here is the code snippet in Java :

public void reverse()
if (first == null)

DoubleNode previous = first;
DoubleNode current = first.next;
first.next = null;
while (current != null)
DoubleNode next = current.next;
current.next = previous;
previous = current;
current = next;
first = previous;

Google Calendar going offline ?

It looks like Google is preparing to add offline functionality to Google Calendar. A few days ago the folks at the Digital Streets blog noticed that Google seemed to have added some code to the Google Calendar page that would bring up a prompt to install Google Gears for access to 3 months worth of calendar data while you're offline. But once you install Google Gears, nothing happens.

Googlified noticed a new option in the settings section of Google Calendar. Go ahead and check, odds are you'll see an "Offline" tab in your own calendar settings. When you click the tab, you're told to download Google Gears. Unfortunately, once you install Google Gears, nothing seems to happen. Visiting Google Calendar with Gears installed just brings up the plain old Google Calendar with no option to save your data for offline viewing. But we get the feeling that Google wouldn't be adding features to the Google Calendar settings menu if the company didn't plan to activate those features soon.

Master Firefox Configurations.

Configuration Mania
is a Firefox add-on that organizes and displays many of the options that are normally only available through about:config. Here are just a few o the things you can change using Configuration Mania:

  • Location bar auto-complete behavior
  • Default domain guessing behavior (should Firefox add www or .com when you type a word into the location bar?)
  • Tab behavior (where to display the close button, default tab width, etc)
  • Hide the Go button next to location bar
  • Change your user agent
  • Adjust cache settings
Configuration Mania is available for Firefox 2 and Firefox 3 beta.  [via gHacks]

Hulu is here...finally!

It's been hyped, dissed, and privately tested for five months, but now you can check out Hulu, a streaming video site created by NBC Universal and News Corp.,

Implement a Queue using two stacks

Recently I encountered a trivial but interesting question. "How to implement a queue using two stacks ? ". My first reaction was "Why would I do that ..? " But if I am forced to do such a thing, how would I go about doing it ? So, here is how we implement a queue using two stacks.
Logic : We'll implement a FIFO queue using two stacks. Lets call the stacks Instack and Outstack. An element is inserted in the queue by pushing it into the Instack. An element is extracted from the queue by popping it from the Outstack. If the Outstack is empty then all elements currently in Instack are transferred to Outstack but in the reverse order.
We start with a Stack Interface :
public interface Stack {
void push( Object x );
Object pop( );
Object top( );
boolean isEmpty( );
void makeEmpty( );

and a class that implements this interface :
public class ArrayStack implements Stack {
private Object [ ] theArray;
private int topOfStack;
private static final int DEFAULT_CAPACITY = 10;
public ArrayStack( ) {
theArray = new Object[ DEFAULT_CAPACITY ];
topOfStack = -1;
public boolean isEmpty() {
return topOfStack==-1;
public void makeEmpty() {
topOfStack= -1;
public Object pop() {
return theArray[topOfStack--];
return null;
public void push(Object x) {

theArray[++topOfStack] = x;
public Object top() {
return theArray[topOfStack];
public static void main(String[] args) {
//Not relevant to our code
public boolean isFull()
return (topOfStack == theArray.length);


Now we come to actual class that implements a Queue using two stacks.

public class stackQueue {

ArrayStack inStack = new ArrayStack();
ArrayStack outStack = new ArrayStack();

public static void main(String[] args)
stackQueue queue = new stackQueue();
queue.enqueue(new String("first"));
queue.enqueue(new String("second"));
queue.enqueue(new String("third"));
queue.enqueue(new String("fourth"));
queue.enqueue(new String("fifth"));
System.out.println("1. " + queue.dequeue());
System.out.println("2. " + queue.dequeue());
System.out.println("3. " + queue.dequeue());
System.out.println("4. " + queue.dequeue());
System.out.println("5. " + queue.dequeue());

public void enqueue(Object value)
public Object dequeue()
while( ! inStack.isEmpty())
return outStack.pop();