conversion of px to em, % and pt

JSFIDDLE: http://jsfiddle.net/jnelsonin/ctfy158o/

This simple formula will help you to convert a px value in CSS to corresponding em, % and pt.

consider we have a pixel value of 8. Based on the above formula,

pt = (8 * 3) / 4 = 6pt

em = 8 / 12 = 0.5em

% = 0.5 * 100 = 50%

Dos and Don’ts for Blood Donation

You can donate blood if

  • you are between age group of 18-60 years
  • your weight is 45 kgs or more
  • your hemoglobin is 12.5 gm% minimum
  • Your last blood donation was 3 months earlier
  • you are healthy and have not suffered from malaria, typhoid or other transmissible disease in the recent past
  • you have eaten a low fat healthy diet few hours before donating blood

Do not donate blood if you have any of the following conditions: Continue reading

how to remove the blue highlighting from select element in internet explorer

In Interner Explorer, When we bring the focus to a select element, the element gets highlighted with a blue background, like in this given image. This is the default bahavior of Internet Explorer browser to indicate that, the focus is on select element.

focus-select-ie

How can we remove this highlighting?

Pure CSS method

 jQuery method

 

Two reasons why I uninstalled facebook application and Facebook messenger from my mobile

Reason 1

Facebook recently pushed an update of their application, which requires a lot of additional permissions.

I tried to upgrade facebook application on my mobile, and got worried to see the permissions they are asking to run this application.

Take a look at this picture. I took 4 screenshots and combined together to get a single image.

Have a closer look at the permissions which is marked in red. Continue reading

Set multiple css style properties in Javascript

In three different methods you can set multiple style properties to an element using javascript.

for example, consider, you want to apply colour, border colour and visiblity to an element with id myElement

Method 1

Method 2

Now, the above step is going to replace the existing inline style. If you want to keep existing inline style and add these styles additionally, here is the trick

Method 3

How to check if a javascript function exists or is defined?

To check if a Javascript function exists before calling it, try this:

If you want to reduce the number of strings hanging around in your code, try this instead

ARE YOU A DEFENSIVE DRIVER?

Defensive driving refers to adopting a proactive attitude and anticipating potential hazards instead of simply reacting to them. Here are a few techniques to help you avoid dangers proactively:

BE AWARE

Eliminate the potential distractions of cell phones, loud music and passengers who may distract you while on the road. Keep your eyes on the road at all times, and check your mirrors- internal as well as the external ones which collectively give you a complete panoramic view. Side vision is as important as your view of the front- do not put shades of sun film that can block your view of the sides. Continue reading

Link

http://www.thehindu.com/sci-tech/technology/gadgets/google-develops-contact-lens-glucose-monitor/article5585648.ece?homepage=true

Excerpts from news

The lenses use a minuscule glucose sensor and a wireless transmitter to help those among the world’s 382 million diabetics who need insulin keep a close watch on their blood sugar and adjust their dose.

The contact lenses were developed during the past 18 months in the clandestine Google X lab that also came up with a driverless car, Google’s Web-surfing eyeglasses and Project Loon, a network of large balloons designed to beam the Internet to unwired places.

The device looked like a typical contact lens when Otis held one on his index finger. On closer examination, sandwiched in the lens are two twinkling glitter-specks loaded with tens of thousands of miniaturized transistors. It’s ringed with a hair-thin antenna.

“It doesn’t look like much, but it was a crazy amount of work to get everything so very small,” Otis said at Google’s Silicon Valley headquarters. It took years of soldering hair—thin wires to miniaturize electronics, essentially building tiny chips from scratch, to make what Otis said is the smallest wireless glucose sensor ever made.

The Google team built the wireless chips in clean rooms, and used advanced engineering to get integrated circuits and a glucose sensor into such a small space.