Wednesday, May 28, 2008

Shell Scripting One Liners

To capture date parameters on shell
Day = date cut -d' ' -f1
Month = date cut -d' ' -f2
Date = date cut -d' ' -f3
Hour = date cut -d' ' -f4 cut -d':' -f1
Minutes = cut -d' ' -f4 cut -d':' -f2
Seconds = date cut -d' ' -f4 cut -d':' -f3

Monday, May 26, 2008

The Hot New Supernova

Stellar scientists announced last week that they've spotted the youngest supernova remnant ever seen in the Milky Way. Called "G1.9+0.3," the remnant's estimated age is just 140 years--meaning that's when the radio waves started reaching Earth. (The actual supernova happened 26,000 years ago.) How young is that, in supernova remnant terms? Until last week, the youngest remnant ever seen in our galaxy was a 330-year-old named "Cassiopeia A." So, why hadn't scientists spotted "G1.9+0.3" before, if its radio waves first reached us in the 1860s?
Because to see it, they had to peer through a thick cloak of interstellar dust. While astronomers pore over their super new data, we're here to help you understand what supernovas really are. It's all about the hot life and violent death of a big star.






A Star Is BornLike humans, stars are born through contractions--though the contractions here are not of muscle, but of massive clouds of gas and dust in interstellar space. Every now and then, such a cloud accumulates enough matter for gravitational forces to pull it together even more. A protostar is born, and gets hot. When the temperature near its center hits 18 million degrees Fahrenheit (10 million degrees Celsius), nuclear reactions kick in. Newborn stars are made mostly of hydrogen. At their cores, they "burn" hydrogen and generate helium. Of course, they don't use matches or flames. The burning at a young star's heart is a nuclear fusion reaction, in which four hydrogen atoms fuse to produce a single helium atom. The mass of that helium atom is less than the combined mass of the four hydrogen atoms, and the leftover mass is released as energy. The release of that energy drives the temperature inside the star way up--in some cases to hundreds of millions (even billions) of degrees Fahrenheit. Pressure inside the star increases enough to counteract the gravitational forces still trying to contract it. At the same time, heat pours from the star's core toward its cooler surface, and from there radiates into space. Presto: a relatively stable star is burning bright.Twinkle, Twinkle, Supergiant StarStars survive a long time by human measures, but eventually they all run out of gas, literally. And those that live larger burn out quicker. A relatively small star--like our sun--might burn for 10 billion years, and then linger for eons as a cosmic cinder called a "white dwarf." A star 10 times as massive might live just 10 million years, and then go out with a bang. When a star's core runs out of hydrogen to burn, it begins to contract again. The core's temperature increases until the helium made earlier ignites. Now a helium fusion reaction produces carbon and oxygen in the star's core, while hydrogen fusion fires up in a thin shell around it. The star generates far more energy than before, and puffs up accordingly. If the star started out modest, it grows into a red giant. If it started out big, it becomes a supergiant. Smaller stars' nuclear careers generally end with the burning of core helium. But big stars start burning the carbon and oxygen fused in the helium reaction, too. They go on to produce elements like neon, magnesium, silicon, and sulfur. Then they burn the silicon to produce iron. Such stars wind up layered like onions--with a central core of iron, surrounded by layers of burning silicon, magnesium, neon, oxygen, carbon, helium, and hydrogen.Out with a BangAfter taking several million years to grow up, a supergiant builds its iron core in about a day. At its peak, the iron core is around two-thirds the size of the Earth but contains more mass than the sun. It's also caught in an enormous gravitational crunch. The star's core no longer generates energy to counteract the forces of contraction--to fuse iron requires energy input rather than leading to energy release--so it can't hold out for long. When it goes, it goes fast. In less than a second, the core collapses from a 5,000-mile-wide sphere (8,000 km) into a 12-mile-wide one (20 km). The sudden crash releases a huge amount of energy--100 times the energy our sun will produce in its entire 10-billion-year life. Tiny particles called neutrinos carry most of that energy off into space. The rest races out through the star's layers in a supercharged shockwave. The resulting explosion blasts the star's gaseous shell into space at speeds exceeding 10 million miles per hour (16 million km/h). For a few weeks, this "supernova" burns brighter than a billion suns. And for millennia to come, the former star's gaseous shell plows into the interstellar medium. Meanwhile, the star's collapsed iron core carries on as a neutron star--or, in some cases, becomes a black hole. In the cosmos, it seems, big stars burn out and fade away.

Tuesday, May 20, 2008

A Camel In A Cage

A baby camel asked his mother, "Why do we have such large hooves on our feet?" She turned to him. "God made us that way for a very special reason," and she began her explanation. "The big hooves are to keep us from sinking into the sand."

"Oh! So why do we have long eyelashes?"

"It's to protect our eyes from the sand."

"Why the big humps?"

"That is to store fat and have enough energy to go long distances in the hot desert!"

"I see!" The baby camel stretched his neck and looked up at his mother, "The big hooves are to keep from sinking into the sand, the long eyelashes are to keep the sand out of our eyes, and the humps are to store energy to travel long distances--then what are we doing in this cage in the middle of a zoo?"

Like the camel, I had asked the same kind of questions. When my blindness set in, I initially locked myself in a cage of self-pity and bitterness. Weary from pacing within that gloomy cage, something nudged me to see beyond my circumstance and unfortunate plight.

Heavens! What was I thinking? Those bars were self-imposed. But worst of all, I'd supported them with the cold metal of my negative attitude.

Eventually, eagerness to leave my stuffy cell of discontent prompted me to open my ears to hear a reassuring whisper--God had created me for much more.

Itching to break free, I broke down those bars and stepped out into the desert of life. I trudged through the heat with determination and drive. I endured the blistering sun with perseverance and tenacity. I quenched my thirst with fresh inspiration and encouragement. And the hooves of confidence kept me from sinking into the sand of insecurity.

Thinking ahead, I made sure I'd stored a healthy supply of wisdom and positive attitude to take me through the long haul.

Goodness gracious. Each time I reached another point in my journey, my eyes saw a whole new world with opportunities to make a difference. Best of all, I was delighted with the affirmation that I was indeed created for much more! Bars come in all sizes and shapes. Some are physical, others are emotional or even mental. But none can withstand the force of determination that breaks them down. The effort is worth it and the results, simply amazing! So, batting my long eyelashes to keep out the sand of discouragement, I challenge you...

Step back and peek at what bars limit you. Take a deep breath, break them down, and emerge into the freshness of a new life!


What do you feel ??

Monday, May 19, 2008

Deadlock

Boss said to secretary: For a week we will go abroad,
so make arrangement.

Secretary make call to Husband: For a week my boss and
I will be going abroad, you look after yourself.

Husband make call to secret lover: My wife is going
abroad for a week, so lets spend the week together.

Secret lover make call to small boy whom she is giving
private tution: I have work for a week, so you need
not come for class.

Small boy make call to his grandfather: Grandpa, for a
week I don't have class 'coz my teacher is busy. Lets
spend the week together.

Grandpa(the 1st boss ;) ) make call to his secretary: This week I am
spending my time with my grandson. We cannot attend
that meeting.

Secretary make call to her husband: This week my boss
has some work, we cancelled our trip.

Husband make call to secret lover: We cannot spend
this week together, my wife has cancelled her trip.

Secret lover make call to small boy whom she is giving
private tution: This week we will have class as usual.

Small boy make call to his grandfather: Grandpa, my
teacher said this week I have to attend class. Sorry I
can't give you company.

Grandpa make call to his secretary: Don't worry this
week we will attend that meeting, so make arrangement

See how life catchs you from behind :)

Sunday, May 18, 2008

Secrets of Success

You will find the eight keys to success right there in your very own room where you are sitting now.

The Fan says BE COOL.
The Roof says AIM HIGH.
The Window says take PAINS.
The Clock says every minute is PRECIOUS.
The Mirror says reflect before you ACT.
The Calendar says be up-to-date.
The Door says push.
The Lamp says illuminate your mind by Education.

Listen to what things around are trying to tell you to achieve greater heights of success.


Friday, May 16, 2008

SideCar Investment

What Does it Mean?

An investment strategy in which one investor allows a second investor to control where and how to invest the capital. The sidecar investment will usually be used when one of the parties lacks the ability or confidence to invest for themselves. The strategy will place trust in someone else's ability to gain profits.

Investopedia Says...

The word "sidecar" refers to a motorcycle sidecar; the person riding in the sidecar must place his or her trust in the driver's skills. This differs from coattail investing, where one investor mimics the moves of another. For example, suppose there are two individuals - Fred, who is experienced in trading stock, and Barney, who has a background in real estate. They decide to work together in a sidecar investing strategy. In this case, Fred would give Barney money to invest in real estate on his behalf and Barney would give Fred money to invest in stocks. This setup allows both Fred and Barney to diversify their portfolios and benefit from one another's expertise.

Thursday, May 15, 2008

Happy For No Reason

From 'Happy for No Reason' by Marci Shimoff with Carol Kline. Copyright 2008 by Marci Shimoff. Reprinted by permission of Free Press, a Division of Simon & Schuster, Inc.


If you and I were sitting over some tea at a sidewalk café and I asked you, "Are you happy?," what would your answer be?

A few of you might say, "Absolutely—if I were any happier, I'd be twins!" (Okay, that would be a very few of you.)

A lot of you would probably reply, "Sometimes."

But I'd bet dollars to doughnuts that at least half of you would say, "No, not really."

Some people enjoy their lives no matter what happens, while others can't find happiness no matter how hard they try. Most of us fall somewhere in between.

The reason for this puzzling disparity is the happiness set-point. Researchers have found that no matter what happens to you in life, you tend to return to a fixed range of happiness. Like your weight set-point, which keeps the scale hovering around the same number, your happiness set-point will remain the same unless you make a concerted effort to change it.

In fact, there was a famous study conducted that tracked people who'd won the lottery—what many people think of as the ticket to the magic kingdom of joy. Within a year, these lucky winners returned to approximately the same level of happiness they'd experienced before their windfall. Surprisingly, the same was true for people who became paraplegic. Within a year or so of being disabled, they also returned to their original happiness level.

Whatever the experience—positive or negative—people return to their happiness set-point. Further research has shown only three exceptions to this phenomenon: losing a spouse, which can take more time to recover from; chronic unemployment; and extreme poverty.

Okay, you may be thinking, if my happiness level is set—how did it get there? Dr. David Lykken, a scientist at the University of Minnesota, had the same question. To determine how much of a person's happiness comes from nature and how much from nurture, Lykken and his team, in the late 1980s, began studying thousands of sets of twins, including a number of identical twins who had been raised apart. After extensive testing they found that approximately 50 percent of our happiness set-point is genetic and the other 50 percent is learned. Half of the reason you walk around generally cheery or perennially dreary is that you were born that way, the other half is determined by your thoughts, feelings, and beliefs formed in response to your life experiences.

In a recent review of the literature and studies on happiness, positive psychology researchers Sonja Lyubomirsky, Kennon Sheldon, and David Schaade confirmed Lykken's earlier findings that 50 percent of our happiness comes from our genetics. But more exciting was the new information they uncovered about the remaining 50 percent. It appears that only 10 percent of our happiness set-point is determined by circumstances such as our level of wealth, marital status, and job. The other 40 percent is determined by our habitual thoughts, feelings, words, and actions. This is why it's possible to raise your happiness set-point. In the same way you'd crank up the thermostat to get comfortable on a chilly day, you actually have the power to reprogram your happiness set-point to a higher level of peace and well-being.

The discovery of the happiness set-point and our ability to change it turns everything we've all believed about being happy upside down. We spend our entire lives searching for happiness, yearning for it, trying to get the things we are sure will make us happy: wealth, beauty, relationships, career, and so on. But the truth is, to be truly happy, all you have to do is raise your happiness set-point.

I sure wish I'd known I was just one of those people who had a low happiness set-point before spending so much time and energy chasing after reasons to be happy. From my interviews,

I've come to see that genuinely happy people are Happy for No Reason.