Latest Tweets:


Using ‘break’ and ‘continue’ with jQuery’s each() iterator

If you ever tried to use Javascript’s ‘break’ and ‘continue’ keywords within a jQuery each loop, you probably got a sytax error.

The ‘break’ and continue ‘keywords’ do not make sense in the context of a jQuery each loop, but you can use ‘return true’ or ‘return false’ within your loop to simulate continue and break respectively.

stevenbs put it well here:

To do a continue, at any point inside the function “return true” will simulate the same behavior as continue (that is, it will stop execution of everything else in the function, and go to the next item in the list).

To do a break, “return false”. That will simulate a break (That is, no more code in the loop will run…it will not go to the next item in the list)

Electricity: how organisms have been using it for a long time, but didn't know about it.


Long before any knowledge of electricity existed, people were aware of shocks from electric fish (circa 2750 BCE). It’s not until 1791, when Luigi Galvani published his discovery of bioelectricity, demonstrating that electricity was the medium by which nerve cells passed signals to the muscles.

So for hmm, maybe almost 80 million years, living beings have been using cells whose purpose is to transmit electric current without even knowing what electricity really was.

Could there be any other physical phenomena that our organisms use that we don’t yet know about?

Hehe. Tickles my brain, which BTW uses electricity too! Hmm, so we use electricity to compose thoughts and be able to understand electricity, nice one! :-]

Fun Fun Fun Fest 2011 - Austin TX

Fun Fun Fun Fest 2011 - Austin TX

"It’s a small world!"

"For me, it is far better to grasp the Universe as it really is than to persist in delusion, however satisfying and reassuring."

Carl Sagan

Now in Tumblr!

Now in Tumblr!