November 11, 2010

Thought of the day

i'm not perfect and may be i'll never be; but its you who makes me want to be perfect and that's why i love you...

November 01, 2010

Thought of the day...

Success is to celebrate that you didn't screw up and failure is to remind you that you are not perfect. Rest in between is what we call life.

October 25, 2010

Thought of the day... 2

एहसास के लिए एक लम्हा भी काफी है वरना कमबख्त कभी कभी उम्र गुजर जाती है इन्तजार में ...

October 24, 2010

Thought of the day...

.. and then you realize
there is so much of life yet to live
and that you can't hold on to past
that can't be fixed

there is a future waiting for you
a new morning, a new sunlight,
new aspirations, new dreams, new hopes,
and new moments of happiness for you...

Amen!

October 23, 2010

C'est la Vie

I met old moments of happiness today,
all overjoyed.
In the end it left me with an emptiness
with the feeling of a deep loss
that it's been long lost
forever, from my life.
And then i cried... again!
Again with me and for the first time all of me...

September 27, 2010

Thought of the day...

Waiting is painful. Forgetting is painful. But not knowing which to do is the worse kind of suffering. - Paulo Coelho

September 14, 2010

Thought of the day...

Life is nothing but experiences and memories of them...

September 06, 2010

tumi asbe bolei

September 05, 2010

QOTD

Disappointment is for those who have appointments with the future.

Again taken from "Leaving Home" - the documentary on indian musical band "Indian Ocean"

तलाश...

This poem has been taken from a scene in "Leaving Home", the documentary on the indian musical band "Indian Ocean". The way Asheem quoted this, it just touched me.

यूँ निकल पड़ा हूँ सफ़र पे मैं, मुझे मंजिलों की तलाश है

नए रास्ते नए आसमां, नए हौसलों की तलाश है

जहाँ बंदिशों की हो हद खत्म, उस हसीं शहर की तलाश है

जहाँ रंग-ओ-खुशबू का हो मिलन, मुझे उस उफक की तलाश है

मुझे मंजिलों की फिकर नहीं, मुझे रास्तों से प्यार है

जो मेरे साथ साथ चल सके, उस हमसफ़र की तलाश है...

Found youtube link as well, see below:

June 28, 2010

Thought of the day...

When things go wrong as they sometimes will;
When the road you're trudging seems all uphill;
When the funds are low, and the debts are high;
And you want to smile, but you have to sigh;
When care is pressing you down a bit
Rest if you must, but don't you quit.

Success is failure turned inside out;
The silver tint of the clouds of doubt;
And you can never tell how close you are;
It may be near when it seems afar.
So, stick to the fight when you're hardest hit -
It's when things go wrong that you mustn't quit.

-- Anonymous

[Taken from Chadda]

April 13, 2010

Thought of the day...

 "Youth is not a time of life; it is a state of mind. People grow old only by deserting their ideals and by outgrowing the consciousness of youth. Years wrinkle the skin, but to give up enthusiasm wrinkles the soul... You are as old as your doubt, your fear, your despair. The way to keep young is to keep your faith young. Keep your self-confidence young. Keep your hope young." - Dr. L.F. Phelan

April 05, 2010

Thought of the day...

"Life’s not about expecting, hoping and wishing, it's about doing, being and becoming. It's about the choices you've just made, and the ones you're about to make, it's about the things you choose to say - today. It's about what you're going to do after you finish reading this." ---Mike Dooley

March 20, 2010

Thought of the day...

"लहरों से डरकर नौका पार नहीं होती,
कोशिश करने वालों की कभी हार नहीं होती.
असफलता एक चुनौती है स्वीकार करो,
क्या कमी रह गयी देखो और सुधार करो.
जब तक न सफल हो नींद चैन को त्यागो तुम,
संघर्षों का मैदान छोड़ मत भागो तुम,
कुछ किये बिना ही जय-जयकार नहीं होती...
कोशिश करने वालों की कभी भी हार नहीं होती!"

-हरिवंश राय बच्चन

February 27, 2010

Thought of the day...

Being fearless isn't being 100% not fearful, it's being terrified but you jump anyway.

In similar words "Throw yourself to the wolves and learn from the bites.. ;-)"

February 21, 2010

Patch for extjs ItemSelector

At work, extjs was the first javascript library we used. It provides very nice UI and probably has the best documentation and forum support available among other similar libraries. We modified its code to provide legend support which is nothing but title in the custom ItemSelector ui element. Below is the patch(not a big deal but i didn't want to loose this change so thought to post here).

### Eclipse Workspace Patch 1.0
Index: webcontent/ext-3.0.0/examples/ux/ItemSelector.js
===================================================================
--- webcontent/ext-3.0.0/examples/ux/ItemSelector.js (revision 230)
+++ webcontent/ext-3.0.0/examples/ux/ItemSelector.js (working copy)
@@ -41,6 +41,8 @@
     delimiter:',',
     bodyStyle:null,
     border:false,
+    legendFrom: 'Available',
+    legentTo: 'Selected',
     defaultAutoCreate:{tag: "div"},
     /**
      * @cfg {Array} multiselects An array of {@link Ext.ux.form.MultiSelect} config objects, with at least all required parameters (e.g., store)
@@ -60,17 +62,17 @@
 
         // Internal default configuration for both multiselects
         var msConfig = [{
-            legend: 'Available',
+            legend: (this.legendFrom || 'Available'),
             draggable: true,
             droppable: true,
-            width: 100,
-            height: 100
+            autoWidth: true,
+            autoHeight: true
         },{
-            legend: 'Selected',
+            legend: (this.legendTo || 'Selected'),
             droppable: true,
             draggable: true,
-            width: 100,
-            height: 100
+            autoWidth: true,
+            autoHeight: true
         }];
 
         this.fromMultiselect = new Ext.ux.form.MultiSelect(Ext.applyIf(this.multiselects[0], msConfig[0]));

And the result looks something like below

February 17, 2010

Thought of the day...

मुआ क्या कब्रिस्ताना माहौल है
सब ने खुद को किसी गम-ए-कब्र में दफना रखा है?

January 26, 2010

Transparent iframes

Firefox by default makes all iframes transparent (no effort required from the developer) if you don't define the background css property.

IE requires extra effort to ensure that the hosting page as well as the iframe's content owner both wanted this iframe to be transparent (few may agree with IE's approach while most will condemn M$). Whatever, here is the css (for page loaded in the iframe) and iframe tag declaration that works flawlessly:

body{
    background: transparent;
}



January 11, 2010

Bypassing browser history

Ahh, this was interesting thing@work. We've an iframe that opens within a website and its location keeps changing with user interactions. The problem was with all these new urls going into browser's history and interference with the default browser back/forward navigation (back/forward navigation gets enabled for the iframe instead).

Initially i thought it wasn't possible to control this (history object doesn't support it, i knew). But then came this simple thing i used in my first year while experimenting in one of my first few projects.

location.replace(newurl);

Ahh, what a savior. Works well in all the browsers. Here are the details from mozilla on this.

January 03, 2010

intercepting javascript errors from live system

Ever wondered how to intercept javascript errors (that happen on client side browsers) for your live system? Yep, i know! Despite all the efforts, a visitor might encounter an issue in his "foobar" browser that you just couldn't test before you went live. So how to do it? This little guy is the savior:
window.onerror = function(errorMessage, url, line) {
}

I just stumbled upon this blogpost by xing developer Christopher; who summarizes how they do it in xing. Pretty interesting and clever stuff, here is the code:
window.onerror = function(errorMessage, url, line) {
  var loggerUrl = "https://www.xing.com/js/logger";
  var parameters = "?description=" + escape(errorMessage)
      + "&url=" + escape(url)
      + "&line=" + escape(line)
      + "&parent_url=" + escape(document.location.href)
      + "&user_agent=" + escape(navigator.userAgent);
 
  /** Send error to server */
  new Image().src = loggerUrl + parameters;
};

For details read the original post here.