HTML input allow only numeric values

HTML 5 can use. '<input type="number"/>
Non HTML 5 below code:

<input id="numbersOnly" onkeypress='validate()' />
function validate(){
  var returnString;
  var text = document.getElementByID('numbersOnly').value;
  var regex = /[0-9]|\./;
  var anArray = text.split('');
  for(var i=0; i<anArray.length; i++){
     anArray[i] = '';
  for(var i=0; i<anArray.length; i++) {
    returnString += anArray[i];
  document.getElementByID('numbersOnly').value = returnString;

Tags: Numeric-input

Lizard Has One-Way Breathing Hints at How Dinosaurs Breathed

Air flows only one way through its lungs—other than the American alligator, it’s the only other known reptile found to have this trait.

That’s surprising, because the unidirectional airflow of birds was thought to have evolved due to the high-oxygen demands of flight: Instead of being partially filled with stale, depleted air like human lungs, avian lungs contain air with a much higher average oxygen content and are much more efficient at getting oxygen to the blood.

So this method of breathing was generally considered to be unique to both warm-blooded animals and birds.

That changed in 2010, when Colleen Farmer of the University of Utah and colleagues found that alligators breathe one way.

Now, Emma Schachner, a postdoctoral researcher in Farmer’s lab, has added another species to that list.

“Finding this trait in a [cold-blooded] lizard means that warm-bloodedness and unidirectional airflow have no relationship whatsoever,” Schachner said.

As I Live and Breathe

When humans or other mammals breathe, the air flows through the same lung passages during both an inhale and an exhale. As we inhale, the air flows in through our nose and mouth and down through the windpipe, where it splits and flows into a bronchi, or passageway, that leads to each lung.

The airways divide and divide again, each time getting smaller and smaller. Eventually, the air makes it to tiny alveolar sacs, where oxygen travels from the air into the bloodstream.

courtesy: NGC

Tags: Ngc, Lizard

cmake prefix equivalent to configure

How to mention prefix path for "cmake" same as ./configure --prefix=/home/dir1

cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/dir1 . && make all install

This command will set the prefix path (install destionation) for build source, same as configure command.

Tags: Cmake, Prefix, Configure

Battling India's Illegal Tiger Trade

The overwhelming demand for tiger parts on the Asian market means India's tigers face constant peril from poachers. Conservationist Belinda Wright and her team at the Wildlife Protection Society of India are working to save tigers by helping enforcement authorities track down and arrest suspected poachers.

Courtesy : NGC

Tags: Tigers, Trade, Illegal

Is Ice Melt Altering NG Maps?

National Geographic's soon-to-be-published Atlas of the World, tenth edition, will show the most dramatic change in Arctic ice since the 1963 publication of the first edition. For more about the National Geographic Atlas of the World and how the shrinking Arctic is changing part of its look, read Shrinking Arctic Ice Prompts Drastic Change in National Geographic Atlas.

Tags: Artic, National Geographic, Global Warming

கிரானைட், தாது மணல் கொள்ளை: விசாரணை நடத்த சகாயம் ஐ.ஏ.எஸ். தலைமையில் குழு- சென்னை ஹைகோர்ட் அதிரடி!

சென்னை: தமிழகத்தில் கிரானைட் மற்றும் தாது மணல் கொள்ளை குறித்து விசாரணை நடத்த ஐ.ஏ.எஸ். அதிகாரி சகாயம் தலைமையில் குழு ஒன்றை அமைத்து சென்னை உயர்நீதிமன்றம் அதிரடியாக உத்தரவிட்டுள்ளது. சென்னையைச் சேர்ந்த சமூக ஆர்வலர் டிராபிக் ராமசாமி உயர்நீதிமன்றத்தில் கடந்த ஜூன் மாதம் ஒரு வழக்கைத் தொடர்ந்தார். அந்த வழக்கில், கிரானைட், தாது மணல் மூலம் அரசுக்கு பல்லாயிரக்கணக்கான கோடி ரூபாய் இழப்பீடு ஏற்படுகிறது, மதுரையை போல் மற்ற மாவட்டங்களிலும் கிரானைட் மற்றும் தாது மணல் முறைகேட்டை கண்டறிய ஐ.ஏ.எஸ் அதிகாரி சகாயம் தலைமையில் குழு அமைக்க வேண்டும் என்று வலியுறுத்தப்பட்டிருந்தது. இந்த மனுவை விசாரித்த சென்னை உயர் நீதிமன்றம், சட்டவிரோத கிரானைட், தாது மணல் கொள்ளை தொடர்பாக மத்திய, மாநில அரசுகள் பதிலளிக்க நோட்டீஸ் அனுப்பியிருந்தது.

இன்றைய விசாரணையின் போது, நேர்மையான அதிகாரியான சகாயத்தை ஏன் அரசு அடிக்கடி இடம் மாற்றம் செய்கிறது என்றும் நீதிபதிகள் கேள்வி எழுப்பி தமிழக அரசை விமர்சித்தனர்

சென்னை உயர்நீதிமன்றத்தின் இந்த உத்தரவு குறித்து கருத்து தெரிவித்த ஐ.ஏ.எஸ். அதிகாரி சகாயம், என்னிடம் ஒப்படைக்கப்படும் வழக்குகளை நேர்மையாக கையாளுவேன் என்று கூறியுள்ளார்.

அதே நேரத்தில் தன்னுடைய பணி இடம் மாற்றம் குறித்து எந்த ஒரு கருத்தையும் தெரிவிக்க இயலாது என்றும் ஐ.ஏ.எஸ். அதிகாரி சகாயம் கூறியுள்ளார்.
தற்போது அறிவியல் நகரத்தின் துணைத் தலைவராக இருக்கும் சகாயம் ஐ.ஏ.எஸ். அதற்கு முன்னர் கோ ஆப்டெக்ஸில் இயக்குநராக இருந்தார். அத்துறையின் அமைச்சரான கோகுல இந்திரா தனக்கு வேண்டியவர்களுக்கு டெண்டர்களை கொடுக்க சொன்னது உள்ளிட்டவைகளை சகாயம் துணிச்சலாக நிராகரித்து வந்தார். இதனால் அவர் மருந்துகள் சேவை கழகத்துக்கு மாற்றப்பட்டார். அடுத்த சில மணி நேரங்களிலேயே அறிவியல் நகரத்தின் துணைத்தலைவராக மாற்றப்பட்டார்.

இப்படி தனது பணிக்காலத்தில் 24 முறை சகாயம் பணி இடம் மாற்றம் செய்யப்பட்டதாலேயே சென்னை உயர்நீதிமன்றம் இது பற்றிய அதிருப்தியைத் தெரிவித்திருக்கிறது

இந்த நிலையில் சென்னை உயர்நீதிமன்றத்துக்கு அண்மையில் தலைமை நீதிபதியாக பொறுப்பேற்ற எஸ்.கே. கவுல் தலைமையிலான பெஞ்ச் அதிரடியாக நேர்மையான அதிகாரி சகாயம் தலைமையிலான குழுவை அமைத்து உள்ளது குறிப்பிடத்தக்கது. 

Tags: Highcourt, Ias, Sagayam

IRNSS-1C launched by PSLV-C26 successfully placed in orbit

Indian Regional Navigation Satellite System (IRNSS) 

IRNSS-1C is the third navigation satellite of the seven satellites constituting the IRNSS space segment. Its predecessors, IRNSS-1A and IRNSS-1B wre launched by PSLV-C22 and PLV-C24 in July 2013 and April 2014 respectively. IRNSS-1C has a lift-off mass of 1425.4KG. The configuration of IRNSS-1C is similar to the of IRNSS-1A and IRNSS-1B. the satellite has been realised in less than six months after launch of its predecessor.


IRNSS is an independent regional navigation satellite system being developed by India. It is designed to provide accurate position information service to users in India as well as the region extending up to 1500 km from its boundary, which is its primary service area. IRNSS will provide two types of services, namely, Standard Positioning Service (SPS) and Restricted Service (RS) and is expected to provide a position accuracy of better than 20 m in the primary service area. 


Tags: Isro, Irnss-1c, Pslv-c26, Gps

WhatsApp available on Web

To connect your web browser to your WhatsApp client, simply open in your Google Chrome browser. You will see a QR code --- scan the code inside of WhatsApp, and you’re ready to go.

You have now paired WhatsApp on your phone with the WhatsApp web client. Your phone needs to stay connected to the internet for our web client to work, and please make sure to install the latest version of WhatsApp on your phone. Unfortunately for now, we will not be able to provide web client to our iOS users due to Apple platform limitations.

We really hope you find web client useful in your everyday lives.

Tags: Whatsapp, Web, Mobile

Uthama Villain official tracklist revealed – Music from March 1st

The audio launch of Uthama Villain will happen tomorrow amidst a lot of expectations.Uthama Villain, directed by Ramesh Aravind, stars Kamal Haasan in the lead role. A galaxy of stars, including Jayaram, Urvashi, Andrea, Parvathi Menon and Pooja Kumar, are also included in the star cast. Ghibran has composed the tunes for Uthama Villain.

Uthama Villan

Check out the tracklist of Uthama Villain:

1. Love ah Love ah

Singers: Kamal, Sharanya Gopinath

Lyrics: Viveka

2. Kaadhalam Kadavul Mun

Singers:  Padmalatha

Lyrics: Kamalhassan

3. Uthaman Arimugam

Singer: Kamal

Lyrics: Subbu Arumugam

4. Sagavaram

Singer: Kamal

Additional Vocals – Yazin Nizar, Iyaappan, Ranjith

Lyrics: Kamalhassan

5. Iranya Nadagam

Singers: Kamal

Lyrics: Kamal

6. Mutharasan Kadhai

Singers: Kamal

Lyrics: Kamal

7. Uthaman Kadhai

Singers:  Kamal

Additional Vocals: M.S. Bhaskar

8. Uthama Villain Theme – Instrumental

9. Guru & Sishya – Instrumental

10. Father & Daughter – Instrumental

11. Uttaman & karpagavalli – Instrumental

12. Father & Son – Instrumental

13. Letter From & To Yamini – Instrumental

14. Dr. Arpana – Instrumental

15. Kaadhalam Kadavul Mun – Karaoke

16. Sagavaram – Karaoke

17. Iranya Nadagam – Karaoke

Tags: Uthama Villain, Kamal Hassan, Songs, Villan

Tree Grows 40 Kinds of Fruit

Sam Van Aken, an artist and professor at Syracuse University, uses "chip grafting" to create trees that each bear 40 different varieties of stone fruits, or fruits with pits. The grafting process involves slicing a bit of a branch with a bud from a tree of one of the varieties and inserting it into a slit in a branch on the "working tree," then wrapping the wound with tape until it heals and the bud starts to grow into a new branch. Over several years he adds slices of branches from other varieties to the working tree. In the spring the "Tree of 40 Fruit" has blossoms in many hues of pink and purple, and in the summer it begins to bear the fruits in sequence—Van Aken says it's both a work of art and a time line of the varieties' blossoming and fruiting. He's created more than a dozen of the trees that have been planted at sites such as museums around the U.S., which he sees as a way to spread diversity on a small scale.

Courtesy: NGC

Tags: Fruits, 40 Kinds, Single Tree

Amazon EC2 Abuse Report

Issue Summary

External traffic attacks received by Apache web server running on Amazon EC2 Instance.


- Create security group to allow inbound access only to the subnet provided in the VPC.

Tags: EC2 Attack, EC2 Abuse Report

Linux find which process is using which port

Below commands can be used to find what are the ports currently used and associated process.

$ netstat -ant

Which tells the list of ports currently used by the system

$ lsof -i:8080

Above command lists the process name with details which uses the port 8080. Also shows process id PID and in which user the process is running.

 $ fuser 80/tcp

Also can find the process/service listening on a particular port by running the command below (specify the port).

Tags: Linux, Networking Commands

How to reset root MySQL

If you have forgotten MySQL root password and have root access to linux system follow the below steps.

  • Stop the MySQL server process as root users using command
$ sudo service mysql stop
  • Start MySQL serve rin safe mode with skip grant table command
$ sudo mysqld_safe —skip-grant-tables —skip-networking &
If it throughs any error saying mysqld folder not found. Create the folder
$ sudo mkdir -p /var/run/mysqld
  • login with MySQL server using command, it won't ask for password.
$ mysql -u root -p
  • Once logged in follow below MySQL sql query to change new password
mysql> use mysql;
​mysql> update user set authentication_string=password('NEWPASSWORD') where user='root';
​mysql> flush privileges;
​mysql > quit
  • Now stop MySQL server using kill command
$ killall mysqld_safe
  • Start MySQL server using default service and login with new password.
$ sudo service mysql start  


$ sudo /etc/init.d/mysql start

Also can be reset using temporary file using below steps

  1. Kill/Stop running MySQL server first
$ sudo  kill `cat /mysql-data-directory/`


$ sudo killall mysqld
  1. Create a temporary file (init_mysql.tmp) with following sql with new password in place of "MyNewPassword" in current folder.
    1. For MySQL 5.7.6 and later:
      ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPassword';
    2. For MySQL 5.7.5 and earlier:
      SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');
  2. Start MySQL server using temporary file created in previous step.
$ mysqld --init-file=/home/me/init_mysql.tmp &
  1. After the server has started successfully delete the temporary file /home/me/init_mysql.tmp
  2. Now login in to MySQL server with the pemoprary password give in file and reset using the below SQL commands
mysql> UPDATE mysql.user SET authentication_string = PASSWORD('MyNewPass'), password_expired = 'N'     WHERE User = 'root' AND Host = 'localhost';
  1. Once set restart the MySQL server and all done.

Tags: MySQL, Reset Password

Elon Musk Unveils Falcon Heavy Rocket Photos Ahead of Maiden Flight

SpaceX founder Elon Musk unveiled a tantalizing first glimpse at his company's new megarocket — the Falcon Heavy — which is expected to launch on its maiden flight next month. 

In an early morning Twitter post, Musk revealed several views of the new rocket under assembly inside SpaceX's hangar at Pad 39A of NASA's Kennedy Space Center in Cape Canaveral, Florida. The images show stunning views of the Falcon Heavy from above and one imposing shot of the rocket's 27 first-stage engines, nine on each of its three main boosters.

SpaceX's Falcon Heavy is a heavy-lift launch vehicle powered by two first-stage boosters from the company's Falcon 9 rockets and a central core booster that itself is a modified Falcon 9. The rocket will stand 230 feet (70 meters) tall when complete and is designed to launch payloads of up to 119,000 lbs. (57 metric tons) into space.

The Falcon Heavy is the most powerful U.S. rocket since NASA's Saturn V moon rocket and is capable of launching twice as much payload as the current record-holder, the Delta IV Heavy built by United Launch Alliance. SpaceX's rocket is also designed to be reusable, with the three core boosters built to fly back to Earth and land like SpaceX's current Falcon 9 rockets. The company test-fired the Falcon Heavy's core stage for the first time earlier this year, in May.

Musk has said that Falcon Heavy's first payload will be his own midnight-cherry-red Tesla Roadster, launched on a trajectory aimed for Mars orbit. However, Musk has said that there's a fair chance the rocket could fail on its debut test flight. The Falcon Heavy is expected to perform its first static-fire test on Pad 39A by the end of 2017, SpaceX representatives have said. 

SpaceX also plans to use a Falcon Heavy and Dragon space capsule to launch two passengers around the moon by the end of 2018.


Tags: Elon Musk, SpaceX, Falcon, Rocket, NASA

Use full Linux commands

Here are some of Linux usefull general commands

View all Environment variables

env command can be used to view all enviroment variable and its value for current logged user via terminal.

ubuntu@ip-xx-xx-xx-xx:~/maven/JavaProj$ env
SSH_CLIENT= 54904 22

Set Environment Variables on Linux

You can modify each environmental or system variable using the export command. Set the PATH environment variable to include the directory where you installed the bin directory with perl and shell scripts:

export ANT_HOME=/path/to/ant/dir
export PATH=${PATH}:${ANT_HOME}/bin:${JAVA_HOME}/bin

Above command will set value for variable ANT_HOME and append it to PATH

Unset a environment variable

Enviroment variable can be removed from current user environment dynamically without any reboot and affecting other user or same user any other environment using unset command as follows

unset ANT_HOME

Above command remove the ANT_HOME variable and it's value from current user enviroment without affecting same user other enviroment.

View verbose output for git command

Normal git command will not show the output of communication performed with GIT server while executing clone/pull/push command. To view the output of full culr response header value, we need to set the verbose output as true while executing every git command as follows.

GIT_CURL_VERBOSE=1 git clone

command will output the request and response for curl command performand by git command.

ubuntu@ip-xxx-xx-xx-xxx:~/maven/JavaProj$ GIT_CURL_VERBOSE=1 git pull
* Couldn't find host in the .netrc file; using defaults
*   Trying
* Connected to ( port 443 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 596 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_128_CBC_SHA1
*        server certificate verification OK
*        server certificate status verification SKIPPED
*        common name: (matched)
*        server certificate expiration date OK
*        server certificate activation date OK
*        certificate public key: RSA
*        certificate version: #3
*        subject:
*        start date: Thu, 14 Dec 2017 00:00:00 GMT
*        expire date: Fri, 14 Dec 2018 12:00:00 GMT
*        issuer: C=US,O=Amazon,OU=Server CA 1B,CN=Amazon
*        compression: NULL
* ALPN, server did not agree to a protocol
> GET /v1/repos/PHPWordPress/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/2.7.4
Accept: */*
Accept-Encoding: gzip
Accept-Language: en-US, *;q=0.9
Pragma: no-cache
< HTTP/1.1 401 Unauthorized



Tags: GIT, CURL, Env, Export