| Subcribe via RSS

Would you leave your country?

May 15th, 2008 | No Comments | Posted in Story by dreamluverz

I got this from an email and wanted to share with you all. I guess it’s applicable for everybody from every country.

WRITTEN BY AN INDIAN SOFTWARE ENGINEER..
A
Bitter Reality
As the dream of most parents I had acquired a degree in
Software Engineering and joined a company based in USA, the
land of braves and opportunity. When I arrived in the USA, it
was as if a dream had come true.

Here at last I was in the place where I want to be. I decided I
would be staying in this country for about Five years in which
time I would have earned enough money to settle down in India.
My father was a government employee and after his retirement,
the only asset he could acquire was a decent one bedroom flat.



I wanted to do some thing more than him. I started feeling
homesick and lonely as the time passed. I used to call home and
speak to my parents every week using cheap international phone
cards. Two years passed, two years of Burgers at McDonald’s and
pizzas and discos and 2 years watching the foreign exchange
rate getting happy whenever the Rupee value went down.
Finally I decided to get married. Told my parents that I have
only 10 days of holidays and everything must be done within
these 10 days. I got my ticket booked in the cheapest flight.
Was jubilant and was actually enjoying hopping for gifts for
all my friends back home. If I miss anyone then there will be
talks. After reaching home I spent home one week going through
all the photographs of girls and as the time was getting
shorter I was forced to select one candidate.

In-laws told me, to my surprise, that I would have to get
married in 2-3 days, as I will not get anymore holidays. After
the marriage, it was time to return to USA, after giving some
money to my parents and telling the neighbors to look after
them, we returned to USA.

My wife enjoyed this country for about two months and then she
started feeling lonely. The frequency of calling India
increased to twice in a week sometimes 3 times a week. Our
savings started diminishing.
After two more years we started to
have kids. Two lovely kids, a boy and a girl, were gifted to us
by the almighty. Every time I spoke to my parents, they asked
me to come to India so that they can see their grand-children.

Every year I decide to go to India… But part work part
monetary conditions prevented it. Years went by and visiting
India was a distant dream. Then suddenly one day I got a
message that my parents were seriously sick. I tried but I
couldn’t get any holidays and thus could not go to India … The
next message I got was my parents had passed away and as there
was no one to do the last rights the society members had done
whatever they could. I was depressed. My parents had passed
away without seeing their grand children.

After couple more years passed away, much to my children’s
dislike and my wife’s joy we returned to India to settle down.
I started to look for a suitable property, but to my dismay my
savings were short and the property prices had gone up during
all these years. I had to return to the USA…

My wife refused to come back with me and my children refused to
stay in India… My 2 children and I returned to USA after
promising my wife I would be back for good after two years.
Time passed by, my daughter decided to get married to an
American and my son was happy living in USA… I decided that
had enough and wound-up every thing and returned to India… I
had just enough money to buy a decent 02 bedroom flat in a
well-developed locality.

Now I am 60 years old and the only time I go out of the flat is
for the routine visit to the nearby temple. My faithful wife
has also left me and gone to the holy abode.
Sometimes
I wondered was it worth all this?
My father, even after staying in India,
Had a house to his name and I too have
the same nothing more.
I lost my parents and children for just ONE EXTRA BEDROOM.
Looking out from the window I see a lot of children dancing.
This damned cable TV has spoiled our new generation and these
children are losing their values and culture because of it. I
get occasional cards from my children asking I am alright.. Well
at least they remember me.

Now perhaps after I die it will be the neighbors again who will
be performing my last rights, God Bless them.
But the question
still
remains ‘was all this worth it?’
I am still searching for an answer……………..!!!
START THINKING
IS IT JUST FOR ONE EXTRA BEDROOM???
LIFE IS BEYOND THIS ..DONT JUST LEAVE YOUR LIFE .
START LIVING IT
LIVE IT AS YOU WANT IT TO BE .

Tags:

linux cheat sheet

May 14th, 2008 | No Comments | Posted in linux by dreamluverz


Click on the image below to view the linux cheat sheet

Tags: ,

stopPropagation() and cancelBubble

May 14th, 2008 | No Comments | Posted in javascript by dreamluverz

Another way of doing the cancelBubble:

function dropButtonClick(e) { if( typeof( e ) == "undefined" && typeof( window.event ) != "undefined" ) e = window.event; // do things.... if (typeof( window.event ) != "undefined" ) { // IE e.cancelBubble=true; } else { // Firefox e.stopPropagation(); } }

source: http://blogs.charteris.com/blogs/edwardw/default.aspx

Tags: , ,

cancelBubble

May 14th, 2008 | No Comments | Posted in javascript by dreamluverz

I have this function but something was wrong with firefox. I got undefine value. After taking a closer look in my code I forgot to pass the 'event' parameter on my function.

function dps_cancel_bubble(e)
{
if (!e) var e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
}

so you need to call it like this.

<img src=”" onlickc=”dps_cancel_bubble(event)”> DONT EVER FORGET TO PASS event or else you’ll get crazy looking for the bug :P I almost did :lol:

Tags: , , , , , ,

array push in javascript

May 14th, 2008 | No Comments | Posted in javascript by dreamluverz

Example:

for(d = 0; d< arr.length; d++){
arr2[arr2.length++] = arr[d];
}

source: http://blog.dreamvib.com/programming/javascript-array_push/

Tags: ,

dreamlover by mariah carey

May 13th, 2008 | No Comments | Posted in Lyrics, movies/videos by denigmaz

I need a lover to give me
The kind of love
That will last always
I need somebody uplifting
To take me away

I want a lover who knows me
Who understands how I feel inside
Someone to comfort and hold me
Through the long lonely nights
Till the dawn
Why don’t you take me away

Dreamlover come rescue me
Take me up take me down
Take me anywhere you want to baby now
I need you so desperately
Won’t you please come around
‘Cause I wanna share forever with you baby

I don’t want another pretender
To disillusion me one more time
Whispering words of forever
Playing with my mind

I need someone to hold on to
The kind of love that won’t fly away
I just want someone to belong to
Everyday
Of my live
Always
So come and take me away

Dreamlover come rescue me
Take me up take me down
Take me anywhere you want to baby now
I need you so desperately
Won’t you please come around
‘Cause I wanna share forever with you baby

lyrics from: http://www.lyricsmania.com/lyrics/mariah_carey_lyrics_204/other_lyrics_1007/dreamlover_lyrics_11446.html

Tags: , , ,

For you

May 12th, 2008 | No Comments | Posted in Poetry by denigmaz

As the new day unfolds before my eyes
You’re the first thing in my mind
As the sun wakes up and shines it beauty
My heart keeps on loving you each day

———-

If I could just stop, but I can’t
If I could just stop the sun from shining
If I could just stop the trees from growing
If I could just stop the flow’rs from blooming
Id do, but I just simply can’t.

If I could just stop the wind from blowing
If I could just stop the birds from flying
If I could just stop my heart from beating…
But I can’t, coz it simply longs for you

—–

I’m just lying

if you think i’m happy,i’m lying
if you think i’m not hurting, i’m lying

if you think i love you, yes i am

———-

Tags: ,

Jason’s Date Input Calendar

May 12th, 2008 | No Comments | Posted in javascript by dreamluverz

Just check the source of this post below for the js code and sample. Anyway if you got them already You can use the additional info for your quick reference.

Additional Information

Below describes function “DateInput()” in detail, which you need to understand to take full advantage of this script:

DateInput(DateName, Required*, DateFormat*, DefaultDate*)

All parameters with a * are optional, and if not passed in a value, the default value is used.

DateName STRING - required. Name of the hidden form element to store the selected, formatted date  You do NOT need to create this field manually in your form.
Required BOOLEAN - optional. Default = FALSE (TRUE or FALSE). Determines whether user is required to make a date selection. If set to false (default), an extra “blank” field appears at the top of the month select menu (above January), in which selecting it causes nothing to be passed to the form.
DateFormat STRING- optional. Default is set as a global variable in the script (MM/DD/YYYY on this page). The format of the generated Date value. It can be one of the following:

  • YYYYMMDD
  • YYYY-MM-DD *
  • YYYY-DD-MM *
  • YYYY/MM/DD *
  • YYYY/DD/MM *
  • YYYY-DD-MON *   **
  • YYYY-MON-DD *   **
  • MM-DD-YYYY *
  • DD-MM-YYYY *
  • MM/DD/YYYY *
  • DD/MM/YYYY *
  • DD-MON-YYYY *   **
  • MON-DD-YYYY *   **

*   2-digit year can be used instead of 4-digit year
** 3-character month name abbreviation can also be specified as MMM.

DefaultDate STRING- optional. The default date displayed in the drop down menus. If none is specified, today’s date is used.

Source: http://www.dynamicdrive.com/dynamicindex7/jasoncalendar.htm

Tags: , , , ,

css: opacity

May 12th, 2008 | No Comments | Posted in css by dreamluverz

There’s an interesting site where you can use as a reference for opacity. You can check it here => http://www.mandarindesign.com/opacity.html

W3C SAYS
Opacity can be thought of conceptually as a postprocessing operation. Conceptually, after the element (including its children) is rendered into an RGBA offscreen image, the opacity setting specifies how to blend the offscreen rendering into the current composite rendering.

Name: 	        opacity
Value: 	        <alphavalue> | inherit
Initial: 	1
Applies to: 	all elements
Inherited: 	no
Percentages: 	N/A
Media: 	        visual
Computed value: The same as the specified
value after clipping the <alphavalue>
to the range [0.0,1.0].

<alphavalue>
Syntactically a <number>. The uniform opacity setting to be applied across an entire object. Any values outside the range 0.0 (fully transparent) to 1.0 (fully opaque) will be clamped to this range. If the object is a container element, then the effect is as if the contents of the container element were blended against the current background using a mask where the value of each pixel of the mask is <alphavalue>.

opacity 25 opacity 50 opacity 75 opacity 1.05

This example uses Mozilla proprietary code in conjunction with IE code. CSS3 is not fully defined as of today (August 2004). If you remove the -moz-opacity it will look like this.

Sample code:

fade{float:left;filter:alpha(opacity=100);-moz-opacity:1.0;opacity:1.0;}
Tags: , ,

xml 2 array and array to xml

May 12th, 2008 | No Comments | Posted in php by dreamluverz

I’ve tried this function with google feed but doesn’t seem to work. I haven’t look into details of it yet anyways you can try it and give it a shot. You can also use this for array to xml. Just check the link of the original post for more info.

PHP: XML to Array and backwards

Here the XML with PHP solution: XML->Array and Array->XML.
Work with it as with usual array.

Format XML->Array
_c - children
_v - value
_a - attributes

This is 1.1 :)

Example #1 (1.xml):

<ddd>
<onemore dd="55">
<tt>333</tt>
<tt ss="s1">555</tt>
<tt>777</tt>
</onemore>
<two>sdf rr</two>
</ddd>

The code:


$xml=xml2ary(file_get_contents(‘1.xml’));
print_r($xml);

Here is the Array result:


Array
(
[ddd] => Array (
[_c] => Array (
[onemore] => Array (
[_a] => Array (
[dd] => 55
)
[_c] => Array (
[tt] => Array (
[0] => Array (
[_v] => 333
)
[1] => Array (
[_a] => Array (
[ss] => s1
)
[_v] => 555
)
[2] => Array (
[_v] => 777
)
)
)
)
[two] => Array (
[_v] => sdf rr
)
)
)
)

function xml2ary(&$string) {
$parser = xml_parser_create();
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_parse_into_struct($parser, $string, $vals, $index);
xml_parser_free($parser);

$mnary=array();
$ary=&$mnary;
foreach ($vals as $r) {
$t=$r[‘tag’];
if ($r[‘type’]==‘open’) {
if (isset($ary[$t])) {
if (isset($ary[$t][0])) $ary[$t][]=array(); else $ary[$t]=array($ary[$t], array());
$cv=&$ary[$t][count($ary[$t])-1];
} else $cv=&$ary[$t];
if (isset($r[‘attributes’])) {foreach ($r[‘attributes’] as $k=>$v) $cv[‘_a’][$k]=$v;}
$cv[‘_c’]=array();
$cv[‘_c’][‘_p’]=&$ary;
$ary=&$cv[‘_c’];

} elseif ($r[‘type’]==‘complete’) {
if (isset($ary[$t])) { // same as open
if (isset($ary[$t][0])) $ary[$t][]=array(); else $ary[$t]=array($ary[$t], array());
$cv=&$ary[$t][count($ary[$t])-1];
} else $cv=&$ary[$t];
if (isset($r[‘attributes’])) {foreach ($r[‘attributes’] as $k=>$v) $cv[‘_a’][$k]=$v;}
$cv[‘_v’]=(isset($r[‘value’]) ? $r[‘value’] : ”);

} elseif ($r[‘type’]==‘close’) {
$ary=&$ary[‘_p’];
}
}

_del_p($mnary);
return $mnary;
}

// _Internal: Remove recursion in result array
function _del_p(&$ary) {
foreach ($ary as $k=>$v) {
if ($k===‘_p’) unset($ary[$k]);
elseif (is_array($ary[$k])) _del_p($ary[$k]);
}
}

// Array to XML
function ary2xml($cary, $d=0, $forcetag=) {
$res=array();
foreach ($cary as $tag=>$r) {
if (isset($r[0])) {
$res[]=ary2xml($r, $d, $tag);
} else {
if ($forcetag) $tag=$forcetag;
$sp=str_repeat(“\t”, $d);
$res[]=“$sp<$tag”;
if (isset($r[‘_a’])) {foreach ($r[‘_a’] as $at=>$av) $res[]=” $at=\”$av\”";}
$res[]=“>”.((isset($r[‘_c’])) ? “\n” : ”);
if (isset($r[‘_c’])) $res[]=ary2xml($r[‘_c’], $d+1);
elseif (isset($r[‘_v’])) $res[]=$r[‘_v’];
$res[]=(isset($r[‘_c’]) ? $sp : ”).“</$tag>\n”;
}

}
return implode(, $res);
}

// Insert element into array
function ins2ary(&$ary, $element, $pos) {
$ar1=array_slice($ary, 0, $pos); $ar1[]=$element;
$ary=array_merge($ar1, array_slice($ary, $pos));
}

source: http://mysrc.blogspot.com/2007/02/php-xml-to-array-and-backwards.html

Tags: , , ,