Jerminix

"Ramblings in Life Events On and Offline"

June 25th, 2009 | by | javascript, web

Jun
25

This is the reversal part of my previous post

Convert string to special characters you want using replace() function in javascript. Useful when converting characters to be saved in the database or passed as a parameter in a url.

function convertSC(oldstring)
{

oldstring = oldstring.replace(/_DQ_/g, “”");
oldstring = oldstring.replace(/_SQ_/g, “‘”);
oldstring = oldstring.replace(/_@_/g, “&”);
oldstring = oldstring.replace(/_AND_/g, “&”);
oldstring = oldstring.replace(/_LT_/g, “<");
oldstring = oldstring.replace(/_GT_/g, “>”);
oldstring = oldstring.replace(/_PC_/g, “%”);
oldstring = oldstring.replace(/_DQ_/g, “”");

return oldstring;
}

Example:
var convertme = convertSC(“Total is 100_PC_”);
alert(converme);

Output:
Total is 100%

No Comments »

June 16th, 2009 | by | funny

Jun
16

Two men met at a bus stop and struck up a conversation.

One of them kept complaining of family problems.

Finally, the other man said: “You think you have family problems? Listen
to my situation.”

“A few years ago, I met a young widow with a grown-up daughter. We got
married and I got myself a stepdaughter. Later, my father married my
stepdaughter. That made my stepdaughter, my step-mother.

And my father became my stepson. Also, my wife became mother-in-law of
her father-in-law.”

“Much later the daughter of my wife, my stepmother, had a son.

This boy was my half-brother because he was my father’s son. But he was
also the son of my wife’s daughter which made him my wife’s grand-son.
That made me the grand-father of my half-brother.”

“This was nothing until my wife and I had a son. Now the half-sister of
my son, my stepmother, is also the Grandmother. This makes my father,
the brother-in-law of my child, whose stepsister is my father’s wife, I am
my stepmother’s brother-in-law, my wife is her own child’s aunt, my son
is my father’s nephew & I am my OWN GRANDFATHER!”

“And you think you have FAMILY PROBLEMS!?”

No Comments »

June 8th, 2009 | by | entertainment

Jun
08

Getting stuck in the street during rush hours is one of the most annoying things that could happen anytime, not to mention the heavy traffic and the hot heads for everyone around, when going to work , school, or other important matters. I just got caught up in a traffic jam this morning, knowing the cause was engine trouble of an another car. It really happens particularly in the busy streets where the temperature is hot especially in summer.

In a taxi cab, it could get very warm and discomforting. There diesel parts that offers a solution to most of auto problems. For example the discount compressor, it is your source for automotive ac compressor and much more. We offer the lowest price on a/c compressor, condenser, drier, air conditioning compressor and more. The auto air conditioning compressor is an important part of the car and we have you covered.

Getting to know your vehicle is important because it you can determine if ever there is an engine trouble and know which part need repairs. You cannot always rely on someone to check up with your car over and over again, also to avoid extra cost in repairs. It is really tough purchasing a new vehicle in this time of global economic crisis. You might as well do the works in your vehicle rather that paying huge amount of bucks for extra service.

It is advisable to do a maintenance check of you cars and regular check up to make sure it will not get stuck in the streets and promote safety to yourself as well as public.

Related Posts Plugin for WordPress, Blogger...

No Comments »

Featuring Recent Posts WordPress Widget development by YD