Interesting Facts about India



  • India never invaded any country in her last 100000 years of history.
  • When many cultures were only nomadic forest dwellers over 5000 years ago, Indians established Harappan culture in Sindhu Valley (Indus Valley Civilization)
  • The name 'India' is derived from the River Indus, the valleys around which were the home of the early settlers. The Aryan worshippers referred to the river Indus as the Sindhu.
  • The Persian invaders converted it into Hindu. The name 'Hindustan' combines Sindhu and Hindu and thus refers to the land of the Hindus.
  • Chess was invented in India.
  • Algebra, Trigonometry and Calculus are studies, which originated in India.
  • The 'Place Value System' and the 'Decimal System' were developed in India in 100 B.C.
  • The World's First Granite Temple is the Brihadeswara Temple at Tanjavur, Tamil Nadu. The shikhara of the temple is made from a single 80-tonne piece of granite. This magnificent temple was built in just five years, (between 1004 AD and 1009 AD) during the reign of Rajaraja Chola.
  • India is the largest democracy in the world, the 6th largest Country in the world, and one of the most ancient civilizations.
  • The game of Snakes & Ladders was created by the 13th century poet saint Gyandev. It was originally called 'Mokshapat'. The ladders in the game represented virtues and the snakes indicated vices. The game was played with cowrie shells and dices. In time, the game underwent several modifications, but its meaning remained the same, i.e. good deeds take people to heaven and evil to a cycle of re-births.
  • The world's highest cricket ground is in Chail, Himachal Pradesh. Built in 1893 after leveling a hilltop, this cricket pitch is 2444 meters above sea level.
  • India has the largest number of Post Offices in the world.
  • The largest employer in the world is the Indian Railways, employing over a million people.
  • The world's first university was established in Takshila in 700 BC. More than 10,500 students from all over the world studied more than 60 subjects. The University of Nalanda built in the 4th century was one of the greatest achievements of ancient India in the field of education.
  • Ayurveda is the earliest school of medicine known to mankind. The Father of Medicine, Charaka, consolidated Ayurveda 2500 years ago.
  • India was one of the richest countries till the time of British rule in the early 17th Century. Christopher Columbus, attracted by India's wealth, had come looking for a sea route to India when he discovered America by mistake.
  • The Art of Navigation & Navigating was born in the river Sindh over 6000 years ago. The very word Navigation is derived from the Sanskrit word 'NAVGATIH'. The word navy is also derived from the Sanskrit word 'Nou'.
  • Bhaskaracharya rightly calculated the time taken by the earth to orbit the Sun hundreds of years before the astronomer Smart. According to his calculation, the time taken by the Earth to orbit the Sun was 365.258756484 days.
  • The value of "pi" was first calculated by the Indian Mathematician Budhayana, and he explained the concept of what is known as the Pythagorean Theorem. He discovered this in the 6th century, long before the European mathematicians.
  • Algebra, Trigonometry and Calculus also originated in India.Quadratic Equations were used by Sridharacharya in the 11th century. The largest numbers the Greeks and the Romans used were 106 whereas Hindus used numbers as big as 10*53 (i.e. 10 to the power of 53) with specific names as early as 5000 B.C.during the Vedic period.Even today, the largest used number is Terra: 10*12(10 to the power of 12).
  • Until 1896, India was the only source of diamonds in the world
    (Source: Gemological Institute of America).
  • The Baily Bridge is the highest bridge in the world. It is located in the Ladakh valley between the Dras and Suru rivers in the Himalayan mountains. It was built by the Indian Army in August 1982.
  • Sushruta is regarded as the Father of Surgery. Over2600 years ago Sushrata & his team conducted complicated surgeries like cataract, artificial limbs, cesareans, fractures, urinary stones, plastic surgery and brain surgeries.
  • Usage of anaesthesia was well known in ancient Indian medicine. Detailed knowledge of anatomy, embryology, digestion, metabolism,physiology, etiology, genetics and immunity is also found in many ancient Indian texts.
  • India exports software to 90 countries.
  • The four religions born in India - Hinduism, Buddhism, Jainism, and Sikhism, are followed by 25% of the world's population.
  • Jainism and Buddhism were founded in India in 600 B.C. and 500 B.C. respectively.
  • Islam is India's and the world's second largest religion.
  • There are 300,000 active mosques in India, more than in any other country, including the Muslim world.
  • The oldest European church and synagogue in India are in the city of Cochin. They were built in 1503 and 1568 respectively.
  • Jews and Christians have lived continuously in India since 200 B.C. and 52 A.D. respectively
  • The largest religious building in the world is Angkor Wat, a Hindu Temple in Cambodia built at the end of the 11th century.
  • The Vishnu Temple in the city of Tirupathi built in the 10th century, is the world's largest religious pilgrimage destination. Larger than either Rome or Mecca, an average of 30,000 visitors donate $6 million (US) to the temple everyday.
  • Sikhism originated in the Holy city of Amritsar in Punjab. Famous for housing the Golden Temple, the city was founded in 1577.
  • Varanasi, also known as Benaras, was called "the Ancient City" when Lord Buddha visited it in 500 B.C., and is the oldest, continuously inhabited city in the world today.
  • India provides safety for more than 300,000 refugees originally from Sri Lanka, Tibet, Bhutan, Afghanistan and Bangladesh, who escaped to flee religious and political persecution.
  • His Holiness, the Dalai Lama, the exiled spiritual leader of Tibetan Buddhists, runs his government in exile from Dharmashala in northern India.
  • Martial Arts were first created in India, and later spread to Asia by Buddhist missionaries.
  • Yoga has its origins in India and has existed for over 5,000 years.


Labels: , , , , , ,

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

StringBuffer versus String

What is the performance impact of the StringBuffer and String classes?


Java provides the StringBuffer and String classes, and the String class is used to manipulate character strings that cannot be changed. Simply stated, objects of type String are read only and immutable. The StringBuffer class is used to represent characters that can be modified.

The significant performance difference between these two classes is that StringBuffer is faster than String when performing simple concatenations. In String manipulation code, character strings are routinely concatenated. Using the String class, concatenations are typically performed as follows:
     String str = new String ("Stanford  ");      str += "Lost!!"; 

If you were to use StringBuffer to perform the same concatenation, you would need code that looks like this:

     StringBuffer str = new StringBuffer ("Stanford ");      str.append("Lost!!"); 

Developers usually assume that the first example above is more efficient because they think that the second example, which uses the append method for concatenation, is more costly than the first example, which uses the + operator to concatenate two String objects.

The + operator appears innocent, but the code generated produces some surprises. Using a StringBuffer for concatenation can in fact produce code that is significantly faster than using a String. To discover why this is the case, we must examine the generated bytecode from our two examples. The bytecode for the example using String looks like this:

  • 0 new #7
  • 3 dup
  • 4 ldc #2
  • 6 invokespecial #12
  • 9 astore_1
  • 10 new #8
  • 13 dup
  • 14 aload_1
  • 15 invokestatic #23
  • 18 invokespecial #13
  • 21 ldc #1
  • 23 invokevirtual #15
  • 26 invokevirtual #22
  • 29 astore_1


The bytecode at locations 0 through 9 is executed for the first line of code, namely:

     String str = new String("Stanford "); 

Then, the bytecode at location 10 through 29 is executed for the concatenation:

     str += "Lost!!"; 

Things get interesting here. The bytecode generated for the concatenation creates a StringBuffer object, then invokes its append method: the temporary StringBuffer object is created at location 10, and its append method is called at location 23. Because the String class is immutable, a StringBuffer must be used for concatenation.

After the concatenation is performed on the StringBuffer object, it must be converted back into a String. This is done with the call to the toString method at location 26. This method creates a new String object from the temporary StringBuffer object. The creation of this temporary StringBuffer object and its subsequent conversion back into a String object are very expensive.

In summary, the two lines of code above result in the creation of three objects:

  1. A String object at location 0
  2. A StringBuffer object at location 10
  3. A String object at location 26

Now, let's look at the bytecode generated for the example using StringBuffer:
  • 0 new #8
  • 3 dup
  • 4 ldc #2
  • 6 invokespecial #13
  • 9 astore_1
  • 10 aload_1
  • 11 ldc #1
  • 13 invokevirtual #15
  • 16 pop

The bytecode at locations 0 to 9 is executed for the first line of code:
     StringBuffer str = new StringBuffer("Stanford "); 

The bytecode at location 10 to 16 is then executed for the concatenation:
     str.append("Lost!!"); 

Notice that, as is the case in the first example, this code invokes the append method of a StringBuffer object. Unlike the first example, however, there is no need to create a temporary StringBuffer and then convert it into a String object. This code creates only one object, the StringBuffer, at location 0.

In conclusion, StringBuffer concatenation is significantly faster than String concatenation. Obviously, StringBuffers should be used in this type of operation when possible. If the functionality of the String class is desired, consider using a StringBuffer for concatenation and then performing one conversion to String.

Labels: , ,

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati

Info: Blogger FTP Shutdown



(Cross-posted from Blogger Buzz)
" Last May, we discussed a number of challenges facing Blogger users who relied on FTP to publish their blogs. FTP remains a significant drain on our ability to improve Blogger: only .5% of active blogs are published via FTP — yet the percentage of our engineering resources devoted to supporting FTP vastly exceeds that. On top of this, critical infrastructure that our FTP support relies on at Google will soon become unavailable, which would require that we completely rewrite the code that handles our FTP processing.

Three years ago we
launched Custom Domains to give users the simplicity of Blogger, the scalability of Google hosting, and the flexibility of hosting your blog at your own URL. Last year's post discussed the advantages of custom domains over FTP and addressed a number of reasons users have continued to use FTP publishing. (If you're interested in reading more about Custom Domains, our Help Center has a good overview of how to use them on your blog.) In evaluating the investment needed to continue supporting FTP, we have decided that we could not justify diverting further engineering resources away from building new features for all users.

For that reason,
we are announcing today that we will no longer support FTP publishing in Blogger after March 26, 2010. We realize that this will not necessarily be welcome news for some users, and we are committed to making the transition as seamless as possible. To that end:

  • We are building a migration tool that will walk users through a migration from their current URL to a Blogger-managed URL (either a Custom Domain or a Blogspot URL)that will be available to all users the week of February 22. This tool will handle redirecting traffic from the old URL to the new URL, and will handle the vast majority of situations.
  • We will be providing a dedicated blog and help documentation to provide as much information as possible to help guide users through the migration off of FTP.
  • Blogger team members will also be available to answer questions on the forum, comments on the blog, and in a few scheduled conference calls once the tool is released.
We have a number of big releases planned in 2010. While we recognize that this decision will frustrate some users, we look forward to showing you the many great things on the way. Thanks for using Blogger. "

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • Reddit
  • Spurl
  • StumbleUpon
  • Technorati