Sunday, September 13, 2009
1. Coca-Cola was originally green.
2. The most common name in the world is Mohammed.
3.The name of all the continents end with the same letter that they start with.
4. The strongest muscle in the body is the tongue.
5. There are two credit cards for every person in the United States.
6. TYPEWRITER is the longest word that can be made using the letters only on one row of the keyboard.
7. Women blink nearly twice as much as men!
8. You can't kill yourself by holding your breath.
9. It is impossible to lick your elbow.
10. People say "Bless you" when you sneeze because when you sneeze,your heart stops for a millisecond.
11. It is physically impossible for pigs to look up into the sky.
12. The "sixth sick sheik's sixth sheep's sick" is said to be the toughest tongue twister in the English language.
13. If you sneeze too hard, you can fracture a rib. If you try to suppress a sneeze, you can rupture a blood vessel in your head or neck and die.
14. Each king in a deck of playing cards represents great king from history.
Spades - King David
Clubs - Alexander the Great,
Hearts - Charlemagne
Diamonds - Julius Caesar.
15. 111,111,111 x 111,111,111 = 12,345,678,987,654,321
16. If a statue of a person in the park on a horse has both front legs in the air, the person died in battle.
If the horse has one front leg in the air,the person died as a result of wounds received in battle.
If the horse has a all four legs on the ground, the person died of natural causes.
17. What do bullet proof vests, fire escapes, windshield wipers and laser printers all have in common?
Ans. - All invented by women.
18. Question - This is the only food that doesn't spoil. What is this?
Ans. - Honey
19. A crocodile cannot stick its tongue out.
20. A snail can sleep for three years.
21.. All polar bears are left handed.
22. American Airlines saved $40,000 in 1987 by eliminating one olive from each salad served in first-class.
23. Butterflies taste with their feet.
24. Elephants are the only animals that can't jump.
25. In the last 4000 years, no new animals have been domesticated.
26. On average, people fear spiders more than they do death.
27. Shakespeare invented the word 'assassination' and 'bump'.
28. Stewardesses is the longest word typed with only the left hand.
29. The ant always falls over on its right side when intoxicated..
30. The electric chair was invented by a dentist.
31. The human heart creates enough pressure when it pumps out to the body to squirt blood 30 feet.
32. Rats multiply so quickly that in 18 months, two rats could have over million descendants.
33. Wearing headphones for just an hour will increase the bacteria in your ear by 700 times.
34. The cigarette lighter was invented before the match.
35. Most lipstick contains fish scales.
36. Like fingerprints, everyone's tongue print is different
Labels: Facts
Tuesday, September 8, 2009
Recently, I had to send a mail to all my friends.
So I was searching for a method to do it.
That's when I found this pretty useful video in youtube!
Labels: GOOGLE
Monday, September 7, 2009
That's when this idea struck me. If you have a number, say x.
It shall be represented as (9*n)+y.
If we identify y then that's the sum of digits.
Say the number is 103
It's simple 99+4, (9*11)+4 hence 4.
y is nothing but (9+9+9+9....11 times) +4
So we skip all those nines and take the 4 alone.
In simpler words if x is the number then (x modulus 9) is the sum of the digits.
So in a programmer's perspective its just x%9.
Labels: Programming
Sunday, September 6, 2009
What Java does not have?
No functions in Java (Only Methods)
Function vs. Method
1. C++ functions could be present inside and outside the class.
2. But java methods could be written inside classes only.
No pointers in Java
1. Pointers lead to confusion.
2. Pointers crash program easily. (Addition of 2 pointers, Runtime memory leakage-dangling pointers)
3. Pointers break security.
No operator overloading in Java
1. Operators are immutable in java.
2. Operator’s meaning cannot be changed in java.
No preprocessor directives in Java
No multiple inheritance in Java
No static memory in Java
No destructors in Java
No goto statement in Java
Well, there seems to be more features available in C and C++ than in java. Why learn Java then? Doesn’t your brain ask this question? My brain did ask.
And I began searching for the answer.
First we have to compare C and Java to understand how the languages work.
Here is a small comparison between C and Java
C vs. Java
So Java is powerful mainly because, of the byte code. It could be interpreted by the Java Virtual Machine. So based on the system, different JVMs are used. But the class file remains the same unlike C's exe file. It’s quite an interesting fact that JVM was written using C.
There is a big table with all the differences between C and Java mentioned in it. I would suggest you to skip it if you feel it to be too big.
Click here to view that table.
C uses a compiler or an interpreter (only one at a time).
Java uses both compiler and interpreter together.
In addition to this it uses a pretty interesting JIT. Now what does this JIT do?
Wikipedia gives the following definition:
In computing, just-in-time compilation (JIT), also known as dynamic translation, is a technique for improving the runtime performance of a computer program. JIT builds upon two earlier ideas in run-time environments: byte code compilation and dynamic compilation. It converts code at runtime prior to executing it natively, for example byte code into native machine code. The performance improvement over interpreters originates from caching the results of translating blocks of code, and not simply reevaluating each line or operand each time it is met. It also has advantages over statically compiling the code at development time, as it can recompile the code if this is found to be advantageous, and may be able to enforce security guarantees. Thus JIT can combine some of the advantages of interpretation and static (ahead-of-time) compilation.
The paragraph does not make complete sense to you unless you already know about JIT ;-).
Now let me try to put it simple.
Consider the following code:
for(i=1;i<=10;i++)
print i
It is a program to print from one to ten.
Normally, a compiler will convert the print i code ten times (say it takes ten
nanoseconds).
JIT Compiler will load print i at a place in the memory with an increment in it
and call it ten times (it takes just 2 nanoseconds).
Convert print I --------> 1 nanosecond.
Load it in memory -----> 1 nanosecond.
I have told you what Java does not have?
Why Java does not have those features is the question you have to think upon. Keep meditating till the next post.
Labels: Java
I had been spending my last fortnight with Java. As I was studying, I understood its power and the flexibility it gives to a programmer. Though I have learnt Java in bits and pieces, I have not learnt it from the basic (ie., from the origin, history, architecture,..). In my college, we students have not been attending the classes for the past one week due to the fear of getting infected from swine flu in the campus! This has been like a blessing in disguise, I was able to peacefully explore Java. As I was exploring Java, I got an idea of making a small tutorial for people like me who have learnt Java in bits and pieces.
I will be posting my tutorial here in my blog once in a while! It is a tedious process so there is no fixed timeline on my tutorial posts. Continue your support.
Labels: Java
Friday, September 4, 2009
Following are few photoshop works I liked.
A baby playing his own trick to the mum
Young at heart(s)-Shadow acts as the mind reader
Labels: Photography
A lady in a faded gray dress and her husband, dressed in a homespun suit walked in timidly without an appointment into the Harvard University President's outer office. The secretary could tell in a moment that such backwoods, country hicks had no business at Harvard and probably didn't even deserve to be in Harvard.
"We want to see the President "the man said softly.
"He'll be busy all day "the secretary snapped.
"We'll wait" the lady replied.
For hours the secretary ignored them, hoping that the couple would finally become discouraged and go away. They didn't and the secretary grew frustrated and finally decided to disturb the president.
"Maybe if you see them for a few minutes, they'll leave" she said to him. The President, stern faced and with dignity, strutted toward the couple.
The lady told him "We had a son who attended Harvard for one year. He loved Harvard. He was happy here. But about a year ago, he was accidentally killed. My husband and I would like to erect a memorial to him, somewhere on campus."
The president wasn't touched....He was shocked. "Madam" he said, gruffly, “We can't put up a statue for every person who attended Harvard and died. If we did, this place would look like a cemetery."
"Oh, no" the lady explained quickly "We don't want to erect a statue. We thought we would like to give a building to Harvard."
The president rolled his eyes. He glanced at the gingham dress and homespun suit, and then exclaimed, "A building! Do you have any earthly idea how much a building costs? We have over seven and a half million dollars in the physical buildings here at Harvard."
For a moment the lady was silent. The president was pleased. Maybe he could get rid of them now. The lady turned to her husband and said quietly, "Is that all it costs to start a university? Why don't we just start our own?"
Her husband nodded. The president's face wilted in confusion and bewilderment. Mr. and Mrs. Leland Stanford got up and walked away, traveling to Palo Alto, California where they established the University that bears their name. Stanford University, a memorial to a son that Harvard no longer cared about.
Most of the time we judge people by their outer appearance, which can be misleading. And in this impression, we tend to treat people badly by thinking they can do nothing for us. Thus we tend to lose our potential good friends, employees or customers.
Remember
In our Life, we seldom get people with whom we want to share & grow our thought process. But because of our inner EGO we miss them forever.
It is you who have to decide with whom you are getting associated in your life.
Labels: Deepak's Scribble
Tuesday, September 1, 2009
This includes property damage and expenses incurred related to the accident such as cleanup and industry losses. Many of these accidents involve casualties which obviously cannot be measured in dollar terms. Each life lost is priceless and is not factored into the equation. Deliberate actions such as war or terrorism and natural disasters do not qualify as accidents and therefore are not included in this list.
# 10. Titanic - $150 Million
The sinking of the Titanic is possibly the most famous accident in the world. But it barely makes our list of top 10 most expensive. On April 15, 1912, the Titanic sank on its maiden voyage and was considered to be the most luxurious ocean liner ever built. Over 1,500 people lost their lives when the ship ran into an iceberg and sunk in frigid waters. The ship cost $7 million to build ($150 million in today's dollars).
# 9. Tanker Truck vs. Bridge - $358 Million
On August 26, 2004, a car collided with a tanker truck containing 32,000 liters of fuel on the Wiehltal Bridge in Germany . The tanker crashed through the guardrail and fell 90 feet off the A4 Autobahn resulting in a huge explosion and fire which destroyed the load-bearing ability of the bridge. Temporary repairs cost $40 million and the cost to replace the bridge is estimated at $318 Million.
# 8. MetroLink Crash - $500 Million
On September 12, 2008, in what was one of the worst train crashes in California history, 25 people were killed when a Metrolink commuter train crashed head-on into a Union Pacific freight train in Los Angeles . It is thought that the Metrolink train may have run through a red signal while the conductor was busy text messaging. Wrongful death lawsuits are expected to cause $500 million in losses for Metrolink..
# 7. B-2 Bomber Crash - $1.4 Billion
Here we have our first billion dollar accident (and we're only #7 on the list). This B-2 stealth bomber crashed shortly after taking off from an air base in Guam on February 23, 2008. Investigators blamed distorted data in the flight control computers caused by moisture in the system. This resulted in the aircraft making a sudden nose-up move which made the B-2 stall and crash. This was 1 of only 21 ever built and was the most expensive aviation accident in history. Both pilots were able to eject to safety.
# 6. Exxon Valdez - $2.5 Billion
The Exxon Valdez oil spill was not a large one in relation to the world's biggest oil spills, but it was a costly one due to the remote location of Prince William Sound (accessible only by helicopter and boat). On March 24, 1989, 10.8 million gallons of oil was spilled when the ship's master, Joseph Hazelwood, left the controls and the ship crashed into a Reef. The cleanup cost Exxon $2.5 billion.
# 5. Piper Alpha Oil Rig - $3.4 Billion
The world's worst off-shore oil disaster. At one time, it was the world's single largest oil producer, spewing out 317,000 barrels of oil per day. On July 6, 1988, as part of routine maintenance, technicians removed and checked safety valves which were essential in preventing dangerous build-up of liquid gas. There were 100 identical safety valves which were checked. Unfortunately, the technicians made a mistake and forgot to replace one of them. At 10 PM that same night, a technician pressed a start button for the liquid gas pumps and the world's most expensive oil rig accident was set in motion.
Within 2 hours, the 300 foot platform was engulfed in flames. It eventually collapsed, killing 167 workers and resulting in $3.4 Billion in damages.
# 4. Challenger Explosion - $5.5 Billion
The Space Shuttle Challenger was destroyed 73 seconds after takeoff due on January 28, 1986 due to a faulty O-ring. It failed to seal one of the joints, allowing pressurized gas to reach the outside. This in turn caused the external tank to dump its payload of liquid hydrogen causing a massive explosion.. The cost of replacing the Space Shuttle was $2 billion in 1986 ($4.5 billion in today's dollars). The cost of investigation, problem correction, and replacement of lost equipment cost $450 million from 1986-1987 ($1 Billion in today's dollars).
# 3. Prestige Oil Spill - $12 Billion
On November 13, 2002, the Prestige oil tanker was carrying 77,000 tons of heavy fuel oil when one of its twelve tanks burst during a storm off Galicia , Spain . Fearing that the ship would sink, the captain called for help from Spanish rescue workers, expecting them to take the ship into harbour. However, pressure from local authorities forced the captain to steer the ship away from the coast. The captain tried to get help from the French and Portuguese authorities, but they too ordered the ship away from their shores. The storm eventually took its toll on the ship resulting in the tanker splitting in half and releasing 20 million gallons oil into the sea.
According to a report by the Pontevedra Economist Board, the total cleanup cost $12 billion.
# 2. Space Shuttle Columbia - $13 Billion
The Space Shuttle Columbia was the first space worthy shuttle in NASA's orbital fleet. It was destroyed during re-entry over Texas on February 1, 2003 after a hole was punctured in one of the wings during launch 16 days earlier. The original cost of the shuttle was $2 Billion in 1978. That comes out to $6.3 Billion in today's dollars. $500 million was spent on the investigation, making it the costliest aircraft accident investigation in history. The search and recovery of debris cost $300 million.
In the end, the total cost of the accident (not including replacement of the shuttle) came out to $13 Billion according to the American Institute of Aeronautics and Astronautics.
# 1. Chernobyl - $200 Billion
On April 26, 1986, the world witnessed the costliest accident in history. The Chernobyl disaster has been called the biggest socio-economic catastrophe in peacetime history. 50% of the area of Ukraine is in some way contaminated. Over 200,000 people had to be evacuated and resettled while 1.7 million people were directly affected by the disaster. The death toll attributed to Chernobyl , including people who died from cancer years later, is estimated at 125,000. The total costs including cleanup, resettlement, and compensation to victims has been estimated to be roughly $200 Billion. The cost of a new steel shelter for the Chernobyl nuclear plant will cost $2 billion alone. The accident was officially attributed to power plant operators who violated plant procedures and were ignorant of the safety requirements needed.
Labels: News
Achluophobia Fear of darkness.
Acousticophobia Fear of noise.
Acrophobia Fear of heights.
Agoraphobia Fear of open spaces or of being in crowded places.
Ailurophobia Fear of cats.
Alektorophobia Fear of chickens.
Alliumphobia Fear of garlic.
Allodoxaphobia Fear of opinions.
Altophobia Fear of heights.
Amaxophobia Fear of riding in a car.
Ambulophobia Fear of walking.
Ancraophobia or Anemophobia Fear of wind.
Androphobia Fear of men.
Anglophobia Fear of England, English culture, etc.
Anthrophobia Fear of flowers.
Antlophobia Fear of floods.
Anuptaphobia Fear of staying single.
Apeirophobia Fear of infinity.
Aphenphosmphobia Fear of being touched.
Apiphobia Fear of bees.
Apotemnophobia Fear of persons with amputations.
Arachnephobia/Arachnophobia Fear of spiders.
Arithmophobia Fear of numbers.
Arrhenphobia Fear of men. Arsonphobia Fear of fire.
Astraphobia/Astrapophobia Fear of thunder and lightning.
Astrophobia Fear of stars/space.
Ataxophobia Fear of disorder or untidiness.
Atelophobia Fear of imperfection.
Athazagoraphobia Fear of being forgotton or ignored or forgetting.
Atychiphobia Fear of failure.
Aurophobia Fear of gold.
Automatonophobia Fear of ventriloquist's dummies, animatronic creatures, wax statues
Automysophobia Fear of being dirty.
Autophobia Fear of being alone or of oneself.
Aviophobia/Aviatophobia Fear of flying.
Bacillophobia Fear of microbes.
Bacteriophobia Fear of bacteria.
Bathmophobia Fear of stairs or steep slopes.
Batophobia Fear of heights.
Batrachophobia Fear of amphibians (like frogs)
Belonephobia Fear of pins and needles.
Bibliophobia Fear of books.
Botanophobia Fear of plants.
Brontophobia Fear of thunder and lightning.
Cacophobia Fear of ugliness.
Cainophobia/Cainotophobia Fear of newness, novelty.
Caligynephobia Fear of beautiful women.
Carnophobia Fear of meat.
Catagelophobia Fear of being ridiculed.
Catoptrophobia Fear of mirrors.
Cenophobia / Centophobia Fear of new things or ideas.
Ceraunophobia Fear of thunder.
Chaetophobia Fear of hair.
Chionophobia Fear of snow.
Chiraptophobia Fear of being touched.
Chirophobia Fear of hands.
Chorophobia Fear of dancing.
Chrometophobia/Chrematophobia Fear of money.
Chromophobia/Chromatophobia Fear of colors.
Chronomentrophobia Fear of clocks.
Cibophobia/Sitophobia/Sitiophobia Fear of food.
Claustrophobia Fear of confined spaces.
Climacophobia Fear of stairs.
Clinophobia Fear of going to bed.
Coimetrophobia Fear of cemeteries.
Coulrophobia Fear of clowns.
Cyberphobia Fear of computers.
Cyclophobia Fear of bicycles.
Cymophobia Fear of waves.
Cynophobia Fear of dogs.
Demophobia Fear of crowds.
Dendrophobia Fear of trees.
Dentophobia Fear of dentists.
Didaskaleinophobia Fear of going to school.
Dipsophobia Fear of drinking.
Dishabiliophobia Fear of undressing in front of someone.
Dromophobia Fear of crossing streets.
Eisoptrophobia Fear of mirrors.
Elurophobia Fear of cats.
Emetophobia Fear of vomiting.
Entomophobia Fear of insects.
Ephebiphobia Fear of teenagers.
Epistaxiophobia Fear of nosebleeds.
Equinophobia Fear of horses.
Ergophobia Fear of work.
Felinophobia Fear of cats.
Gamophobia Fear of marriage.
Geliophobia Fear of laughter.
Genophobia Fear of sex.
Gephyrophobia, Gephydrophobia, or Gephysrophobia Fear of crossing bridges.
Gerascophobia Fear of growing old.
Glossophobia Fear of speaking in public or of trying to speak.
Gynephobia/Gynophobia Fear of women.
Haphephobia/Haptephobia Fear of being touched.
Harpaxophobia Fear of being robbed.
Heliophobia Fear of the sun.
Hemophobia/Hemaphobia/Hematophobia Fear of blood.
Hierophobia Fear of priests or sacred things.
Hominophobia Fear of men.
Hylophobia Fear of forests.
Iatrophobia Fear of doctors.
Ichthyophobia Fear of fish.
Judeophobia Fear of Jews.
Keraunophobia Fear of thunder and lightning.
Kymophobia Fear of waves.
Lachanophobia Fear of vegetables.
Ligyrophobia Fear of loud noises.
Limnophobia Fear of lakes.
Liticaphobia Fear of lawsuits.
Lockiophobia Fear of childbirth.
Logizomechanophobia Fear of computers.
Logophobia Fear of words.
Lygophobia Fear of darkness.
Macrophobia Fear of long waits.
Mageirocophobia Fear of cooking.
Maieusiophobia Fear of childbirth.
Megalophobia Fear of large things.
Melissophobia Fear of bees.
Methyphobia Fear of alcohol.
Microphobia Fear of small things.
Misophobia Fear of being contaminated with dirt/germs.
Monophobia Fear of solitude or being alone.
Motorphobia Fear of automobiles.
Musophobia/Murophobia Fear of mice.
Necrophobia Fear of death / dead things.
Neophobia Fear of anything new.
Nosocomephobia Fear of hospitals.
Numerophobia Fear of numbers.
Ochlophobia Fear of crowds or mobs.
Ophidiophobia Fear of snakes.
Ophthalmophobia Fear of being stared at.
Ornithophobia Fear of birds.
Pedophobia Fear of children.
Peladophobia Fear of bald people.
Phasmophobia Fear of ghosts.
Placophobia Fear of tombstones.
Plutophobia Fear of wealth.
Pogonophobia Fear of beards.
Potamophobia Fear of rivers or running water.
Pteronophobia Fear of being tickled by feathers.
Pupaphobia fear of puppets.
Pyrophobia Fear of fire.
Rhytiphobia Fear of getting wrinkles.
Rupophobia Fear of dirt.
Scolionophobia Fear of school.
Selachophobia Fear of sharks.
Sesquipedalophobia Fear of long words.
Tachophobia Fear of speed.
Technophobia Fear of technology.
Telephonophobia Fear of telephones.
Testophobia Fear of taking tests.
Theophobia Fear of gods or religion.
Trypanophobia Fear of injections.
Venustraphobia Fear of beautiful women.
Verbophobia Fear of words.
Verminophobia Fear of germs.
Vestiphobia Fear of clothing.
Xenoglossophobia Fear of foreign languages.
Zoophobia Fear of animals
Labels: List of Phobia(s)