JQUERY – How to get label inside span tag in html

I have run into a situation that I need to get html value from a label tag which doesn’t have any id. After some googling, I found out that label can be reference directly. Here is how:

Let’s say you have the following html span tag; containing an input and a label.

<span> <input id="mycheckboxid" type="checkbox" name="myname" /> <label for="mycheckboxid">By checking this box I acknowledge that I have read above ....</label> </span>

To get html value from the label with Jquery, you can do like this:


If you want to get the span tag, you can go up by using parent in Jquery


Virtual Time Line: Past-Present-Future

We have our memories of the past/past events. Some events we remember in details. Some we remember vaguely. Some scientists believe every thing, event is nothing more than information. We receive our memorial from our senses. Our brain receive information and translate them into memories. In memory, you can recall past events in an instant. In memory, you can play pleasant memories in a million loops. In memory, you can refresh old events to new ones. In memory, you can combine memories to create new memories. Some people claim to have the memories of the future (Precognition). Can we have memories of the present? How can you remember the information which is not happened yet?

My First Iphone Application : JogTip

Here we are, my first Iphone application; it is a tip calculator. But not the kind you are punching numbers in by keypad. Instead you rotate the wheels to change your numbers and make calculations. There are 2 wheels in total: Left for changing service (% for tip), Right for changing total amount. You can also split the total amount by person. For that another kind of wheel, the horizontal wheel. If you are struggle with  rotating a long time for a large amount, just hit the setting and change the sensitivity. It will increase or decrease as you wish.

Go and grab it Here


What are past, present and future? How do we divide and decide them? You can say past has already passed, present is now, and future is about to come. But how can we certain that “now” really is present? Some say time is like a river, and you can’t go into the same river twice because time is passing every moment. So how can we sure that “now” really is present and not the past or future?

Another way to define present is that it is between past and future, but when does past end and future start? In math, when we say a number is between 1 and 2, where is 1 actually end and 2 actually start? Can we say 1.5 is still on the 1 side? What about 1.9999…? When we say a border line between two countries, the end of one country’s border is actually the start of another country’s border. So where actually is between? When we talk about past and future, the end of past is actually the start of future. So when actually is present?

When we compare time of places with great distances, the notion of present becomes blurring. It takes approximately 8 minutes for light to travel from Sun to earth, and the Sun we see at current time is actually the Sun from 8 minutes ago. Since information can’t travel faster than light, every time we receive information (light, heat, etc.) from Sun, but it is actually from the past. Since nothing can travel faster than light, everything we see, hear, and even feel actually occurred before we actually see, hear and feel them. So what actually is present? Can two people actually perceive now at the same time? Let me elaborate this a bit: Can Jack and Jones have the same “now?” Since physically no two people can be at the same place at the same time, can we say “now” for Jack is the same as Jones?

Well it sounds crazy, seems crazy, and actually is crazy, but these are just my crazy thoughts. I would say that at least we should try to live in the present as close as we can.


Grandfather Paradox

Recently, I have been reading physics books of Michio Kaku, a very popular physicist, and these books make me wonder a lot. Sometimes I even have to bring back myself from tiny world of quantum particles to our every day world.

Is time travel possible? According to Kaku, there is no known law of physics that preventing us from traveling back in time. But obviously there are many limitations and problems we have to solve before we can actually travel back in time. Otherwise, We should have already seen many eager time traveler lining up to go visit their grandparents.

One interesting paradox related to time travel is called grandfather paradox. Suppose you go back in time and kill your grandfather before he get a chance to meet your grandmother. What will happen to you? Can you really go back to time and actually kill your grandfather? If you killed your grandfather in the past, you never existed, so how can you go back in time and kill your grandpa? You don’t necessarily go back and kill your grandpa:)

There can be more complex problems occur. I found the following video on youtube. Kaku himself talks about the paradox. enjoy!


Read more

Hello World!

Hello and Welcome! Most of the programming books start with a program called “Hello World.” So here is my hello world from theseconddot.

So here is a few statements to print out Hello World! in different programming languages.

In C: printf("Hello World!"); In C++: cout<<"Hello World!"; In C#: Console.WriteLine("Hello World!"); Visual J#: System.out.println("Hello World!"); PHP: printf("Hello World!"); SmallTalk: Transcript show:'Hello World!'. PL/SQL: dbms_output.put_line('Hello World!'); Perl: printf("Hello World!");

There you have it. Until next time!