Thursday, October 27, 2005

Happy Birthday Myself

Well, tomorrow I will finish 22 years of staying alive, every year at this day, after all the partying is over, I set with my self, and try to remember what have I done in the last year.
And as this year there would be no partying (None of my friends are in Jordan), I think I would do it now.
As I remember my last birthday, we were some bunch of guys who had some good time that evening (nothing really interesting just good time).

I remember I had the worst New Year day, a lot of troubles happened that night I just hate to remember.

I also remember that in the beginning of January I started taking German course at Goethe Institute. I met some interesting people there, also I have advanced a lot in the German language (as I knew nothing), I've finished four courses, and I'm off for the last 2 months, I will get back in the beginning of November.

Also in this year (at the beginning of May), I've quit my job at MSCT, and started the worst experience of my life by working at **** ******, this company (or some stupid store) has gone beyond any company which can get worst, I think they have reached the bottom and start digging, and I guess they are enjoying it, which made me leave my job after 3 months without even finding a new one. Which has made me Enjoy one of the worst days of my life, I was there, searching for a job, with no money, with almost no hope, this was the worst 3 weeks of the year, (but even though it's better than imagining your self working at **** ****** for the rest of the year).

This period just needed to end, and it did, I found a new good job at Maktoob.com Inc., which I'm still in (and I guess I would be for some time).

Here at Maktoob I found some new interesting people, and also a good working environment, I've learned a lot here, so I like it …

I guess this is a brief description of my life in the last year, I guess I would leave it as is.

Happy Birthday Me.

Tuesday, October 18, 2005

South Park new Episode 908


A Global Warming State of Emergency is declared in South Park this Wednesday, October 19 at 10:00 P.M. on Comedy Central

Global Warming is determined to be the cause of the massive flood that destroys a neighboring town. It’s a brand new episode of “South Park” entitled “Two Days Before the Day After Tomorrow,” premiering Wednesday, October 19 at 10:00 p.m. on Comedy Central.

The world’s largest beaver dam breaks and the waters overtake the adjacent town of Beaverton.. As the victims wait for help to arrive, everyone in South Park tackles priority number one: who is to blame? The President, the mayor, scientists, the press and even the flood victims themselves are all busy pointing fingers. Only Stan and Cartman know who’s really at fault.

Sunday, October 16, 2005

Some JavaScript functions I use

/* This function is used to validate that a string contains only [A-Za-z0-9.-_] which are the only valid characters in an email, (or perhaps a username). */

function valid(str) {
for(var i = 0; i < str.length; i++) {
var charcode = str.charCodeAt(i);

/* A-Z */
if(charcode >= 0x41 && charcode <= 0x5A) {
continue;
}

/* a-z */
if(charcode >= 0x61 && charcode <= 0x7A) {
continue;
}

/* 0-9 */
if(charcode >= 0x30 && charcode <= 0x39) {
continue;
}

/* . - _ */
if(charcode == 0x2D charcode == 0x2E charcode == 0x5F) {
continue;
}

return false;
}

return true;
}




/* This function is used to test that an e-mail address looks logical. This function uses the function valid() above. */

function testemail(email) {
var atpos = email.indexOf("@");

if(atpos == -1) {
return false;
}

if(atpos == 0) {
return false;
}

var dotpos = email.indexOf(".", atpos+2);

if( dotpos == -1) {
return false;
}

if(dotpos == (email.length - 1) ) {
return false;
}

var fpart = email.substring(0,atpos);
var host = email.substring(atpos + 1, dotpos);
var domain = email.substr(dotpos +1);

if(!( valid(fpart) && valid(host) &amp;& valid(domain))) {
return false;
}

var afterat = email.substr(atpos + 1);
if(afterat.lastIndexOf(".") == (afterat.length - 1)) {
return false;
}

for(var i = 1; i < afterat.length; i++) {
if(afterat.charAt(i) == "." && afterat.charAt(i-1) == ".") {
return false;
}
}

return true;
}


/* This function is used to trim a string (Removes the spaces before and after). */

function trim(str) {
var from_start = 0;
var from_end = str.length - 1;
var return_value;

while(str.charAt(from_start) == ' ') {
from_start ++;
}

while(str.charAt(from_end) == ' ') {
from_end --;
}

if(from_end < from_start) {
return '';
}
return_value = str.substring(from_start,from_end+1);
return return_value;
}



/* Hope that these functions would be useful to somebody out there as they where useful to me, hope you enjoy. */

Monday, October 10, 2005

My First Blog Entry


This is just a test for the new blog