for example, consider, you want to apply colour, border colour and visiblity to an element with id myElement
document.getElementById("myElement").style.color = "#000";
document.getElementById("myElement").style.borderColor = "blue";
document.getElementById("myElement").style.visiblity = "visible";
document.getElementById("myElement").style.cssText = "color: #000; border-color: blue; visibility: visible";
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
document.getElementById("myElement").style.cssText +=';'+ "color: #000; border-color: blue; visibility: visible";
document.getElementById("demo").setAttribute("style", "color: #000; border-color: blue; visibility: visible");
if(typeof functionName == 'function')
If you want to reduce the number of strings hanging around in your code, try this instead
if (typeof(possibleFunction) == typeof(Function))
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:
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
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.
A viewing from a construction site near our apartment, on Christmas day.
To keep their families happy with good food and living environment, these daily wages workers cannot take a day off, even on Christmas Day.
It’s easy to complain about what’s wrong. It’s hard to come up with solutions to fix the problem. My former manager at LivingSocial said, “Be a problem solver, not spotter,” and I’ve taken this advice to heart in my everyday life. If you see a problem, don’t address the situation with what’s wrong; address the situation with an answer. If you don’t have a real solution, wait until you do. Sarah Ware, Markerly
I just had a cup of boiled water with added sugar and colour for Rs.10 from trivandrum railway station. They call it as TEA.
“Secrets from the science of persuasion” by Robert Cialdini and Steve Martin offer some great tips for utilizing the power of persuasion and beginning to master a critical life skillset! It’s always great to have a starting point, and this video certainly provides a wonderful way to begin.
It is extraordinary when you think about it how much of our time we spend practicing the science of persuasion. With our peers at work, with our children, with our parents, with our friends…
Yet it is rare that we consciously think about getting better at this critical skill. While it takes a lifetime to get good at effective persuasion, this short video might be a great way to take the first step. Print out the six principles, stick them on your office wall, bathroom mirror, kitchen fridge and consciously try to get better.
- Reciprocation: People like (even feel obligated) to return favors
- Authority: People tend to look to experts for guidance. This can include precedent.
- Commitment/Consistency: People like to feel that they live and act in accordance with their values, that they keep their word.
- Scarcity: We tend to want what we can’t have. This makes the “fading or limited time offer” effective. In other words, “That which we obtain too cheaply, we esteem too lightly.”
- Rapport/Liking: If we like or care about others, we want to please them, say yes to them. People like to bond, to belong.
- Social Proof: The behavior of the group frequently guides individuals’ behavior. We look to others for clues on how to react.