Webocreation

Friday, January 28, 2011

The famous jobs jokes

An applicant was filling out a job application. When he came to the question, "Have you ever been arrested?" He answered, "No."

The next question, intended for people who had answered in the affirmative to the last one, was "Why?" The applicant answered it anyway: "Never got caught."



A business was looking for office help. They put a sign in the window, stating the following:
HELP WANTED
Must be able to type, have computer skills, and be
bilingual. We are an Equal Opportunity Employer.
A dog trotted up to the window, saw the sign and went inside. He looked at the receptionist and wagged his tail, then walked over to the sign, looked at it and whined a bit.Getting the idea, the receptionist got the office manager. The office manager looked at the dog and was surprised, to say the least. However, the dog looked determined, so he led him into the office. Inside, the dog jumped up on a chair and stared at the manager. The manager said "I can't hire you. The sign says you have to be able to type."
The dog jumped down, went to the typewriter and proceeded to type out a perfect letter. He took out the page and trotted over to the manager and gave it to him, then jumped back up on the chair. The manager was stunned, but then told the dog, "The sign also says you have to be good with a computer."
The dog jumped down again and went to the computer. The dog proceeded to enter and execute a perfect spreadsheet that worked flawlessly the first time.
By this time, the manager was totally dumb-founded! He looked at the dog and said, "I realize that you are a very intelligent dog and have some interesting abilities. However, I still can't give you the job."
The dog jumped down and went over to a copy of the sign and put his paw on the sentence about being an Equal Opportunity Employer.
The manager said "Yes, but the sign also says that you have to be bilingual." The dog looked at that manager calmly and said, "Meow."




A man applied for a job as an industrial spy. Together with several other applicants, he was given a sealed envelope and told to take it to the fourth floor. As soon as the man was alone, he stepped into an empty hallway and opened the envelope. Inside, a message read: "You're our kind of person. Report to the fifth floor Personnel Office."

I m in class, writing note, putting up status /comments . this is called multi-tasking

chor lai jhappu hanney lai jail ma halyo, bachha haru lai jhappu hanera afno education ra greatness dekhauney Teacher haru lai pani jail mai kochnu parney ho

Those who judge people from outer apperance are the biggest illeterate and stupid. and people doing this are teachers and asshole police

Dear WikiLeaks , do leak our exam questions too :P

kanoon vaneko khukuri jasto hunu parchha
jaslai pani kaatchha yesle banaunelai pani choddaina...........

  Employer to applicant: "In this job we need someone who is responsible."

Applicant: "I'm the one you want. On my last job, every time anything went wrong, they said I was responsible."


"Young man, do you think you can handle a variety of work?"

"I ought to be able to. I've had ten different jobs in four months."


Reaching the end of a job interview, the Human Resources person asked a young applicant fresh out of Business School, "And what starting salary are you looking for?"

The applicant said, "In the neighborhood of $125,000 a year, depending on the benefits package."

The interviewer said, "Well, what would you say to a package of 5-weeks vacation, 14 paid holidays, full medical and dental, company matching retirement fund to 50% of salary, and a company car leased every two years - say, a red Corvette?"

The applicant sat up straight and said, "Wow! Are you kidding?"

And the interviewer replied, "Yeah, but you started it."



In a job interview for policemen the applicants are shown a profile picture of a man, and the interviewer says, "The job that you're applying for requires powers of observation. Make one observation about this man."

The first applicant enters and says, "This man has just one ear."
"Get out!!" screams the interviewer.

The second applicant enters and says, "This man has one ear."
"Get out!!" screams the interviewer again.

Then the third applicant gets up to go in for his interview. The first two guys are out there and they tell him, "The guy that's giving the interview doesn't like to hear that the man in the picture has one ear."
"Thanks for the tip" says the third applicant.

So the third applicant enters, stares at the picture for a while and finally he says, "This man wears contact lenses."
The interviewer is impressed and says, "Excellent observation. Tell me, how could you tell?"
So the guy says, "Well, this man has just one ear, how could he wear glasses?"



When you hire people that are smarter than you are, you prove you are smarter than they are.
R.H. Grant

The local sheriff was looking for a deputy, so Gomer went in to try out for the job.
"Okay," the sheriff drawled, "Gomer, what is 1 and 1?"
"11" he replied.
The sheriff thought to himself, "That's not what I meant, but he's right."

"What two days of the week start with the letter 'T'?"
"Today and tomorrow."
The sheriff was again surprised that Gomer supplied a correct answer that he had never thought of himself.

"Now Gomer, listen carefully: Who killed Abraham Lincoln?"
Gomer looked a little surprised himself, then thought really hard for a minute and finally admitted, "I don't know."
"Well, why don't you go home and work on that one for a while?"

So, Gomer wandered over to the barbershop where his pals were waiting to hear the results of the interview. Gomer was exultant. "It went great! First day on the job and I'm already working on a murder case!"



An applicant was being interviewed for admission to a prominent medical school. "Tell me," inquired the interviewer, "where do you expect to be ten years from now?"

"Well, let's see," replied the student. "It's Wednesday afternoon. I guess I'll be on the golf course by now."



The navy psychiatrist was interviewing a potential sailor. To check on the young man's response to trouble, the psychiatrist asked, "What would you do if you looked out of that window right now and saw a battleship coming down the street?"
The baby sailor said, "I'd grab a torpedo and sink it."
"Where would you get the torpedo?"
"The same place you got your battleship!"


HR Manager to job candidate: "I see you've had no computer training. Although that qualifies you for upper management, it means you're under-qualified for our entry level positions."


Several weeks after a young man had been hired, he was called into the personnel manager's office.

"What is the meaning of this?" the manager asked. "When you applied for the job, you told us you had 5 years' experience. Now we discover this is the first job you've ever had."

"Well," the young man said, "in your ad you said you wanted somebody with imagination."



"Where did you receive your training?"
"Yale."
"Good, and what's your name?"
"Yim Yohnson."


Employer Speak: what they say and what they mean by it

Entry level position:
    You'll be making minimum wage.
Entry level position in an up-and-coming company:
    You'll be making minimum wage; we'll be bankrupt in a year.
Profit sharing plan:
    Once it's shared between the higher-ups, there won't be a profit.
Competitive salary:
    We remain competitive by paying less than our competitors.
Join our fast-paced company:
    We have no time to train you; you'll have to introduce yourself to your coworkers.
Nationally recognized leader:
    Inc. Magazine wrote us up a few years ago, but we haven't done anything innovative since.
Immediate opening:
    The person who used to have this job gave notice a month ago. We're just now running the ad.
Casual work atmosphere:
    We don't pay enough to expect that you'll dress up, although a couple of the real daring guys wear earrings.
Competitive environment:
    We have a lot of turnover.
Must be deadline oriented:
    You'll be six months behind schedule on your first day.
Some overtime required:
    Some time each night and some time each weekend.
Flexible hours:
    Work 40 hours; get paid for 25.
Must have an eye for detail:
    We have no quality control.
College degree preferred:
    Unless you wasted those four years studying something useless like Philosophy, English or Social Work.
Career minded:
    Female Applicants must be childless (and remain that way).
Apply in person:
    If you're old, fat or ugly you'll be told the position has been filled.
No phone calls please:
    We've filled the job; our call for resumes is just a legal formality.
Problem solving skills a must:
    You're walking into a company in perpetual chaos.
Requires team leadership skills:
    You'll have the responsibilities of a manager, without the pay or respect.




Applicant Speak: what they say and what they mean by it

I know how to deal with stressful situations:
    I'm usually on Prozac. When I'm not, I take lots of cigarette and coffee breaks.
I seek a job that will draw upon my strong communication & organizational skills:
    I talk too much and like to tell other people what to do.
I'm extremely adept at all manner of office organization:
    I've used Microsoft Office.
My pertinent work experience includes:
    I hope you don't ask me about all the McJobs I've had.
I take pride in my work:
    I blame others for my mistakes.
I'm balanced and centered:
    I'll keep crystals at my desk and do Tai Chi in the lunchroom.
I have a sense of humor:
    I know a lot of corny, old jokes and I tell them badly.
I'm willing to relocate:
    As I leave San Quentin, anywhere's better.
I'm extremely professional:
    I carry a Day-Timer.
My background and skills match your requirements:
    You're probably looking for someone more experienced.
I am adaptable:
    I've changed jobs a lot.
I am on the go:
    I'm never at my desk.
I'm highly motivated to succeed:
    The minute I find a better job, I'm outta there.
I have formal training:
    I'm a college dropout.
I interact well with co-workers:
    I've been accused of sexual harassment.
Thank you for your time and consideration:
    Wait! Don't throw me away!




Are you qualified to this job?

    * Wanted: Hair-cutter. Excellent growth potential.
    * Wanted: Man to take care of cow that does not smoke or drink.
    * Wanted: Part-time married girls for soda fountain in sandwich shop.
    * Girl wanted to assist magician in cutting-off-head illusion. Blue Cross and salary.
    * Wanted: Preparer of food. Must be dependable, like the food business, and be willing to get hands dirty.




New Job Interview Technique

Take the prospective employee and put him in a room with only a table and two chairs. Leave him alone for two hours, without any instruction. At the end of that time, go back and see what he is doing.

If he has taken the table apart, put him in Engineering.
If he is counting the butts in the ashtray, assign him to Finance.
If he is waving his arms and talking out loud, send him to Consulting.
If he is talking to the chairs, Personnel is a good spot for him.
If he is sleeping, he is Management material.
If he is writing up the experience, send him to the Technical Documentation team.
If he doesn't even look up when you enter the room, assign him to Security.
If he tries to tell you it's not as bad as it looks, put him into Marketing.
If he is wearing green sunglasses and need a haircut, Software is his niche.
If he mentions what a good price we got for the table and chairs, send him to Purchasing.
If he mentions that hardwood furniture does not come from rainforests, Public Relations will suit him well.



How many applicants does it take to change a light bulb?

    * Only one, but 200 applied for the job.
    * Thirteen. One to change the bulb and a dozen others to make sure that everyone has an equal opportunity to apply for the job.

Work Experience

"Why are you so excited?", the surgeon asked the patient that was about to be anesthetized.
"But doc, this is my first operation."
"Really? It's mine too, and I am not excited at all."



A young man, hired by a supermarket, reported for his first day of work. The manager greeted him with a warm handshake and a smile, gave him a broom and said, "your first job will be to sweep out the store."

"But I'm a college graduate," the young man replied indignantly.

"Oh, I'm sorry. I didn't know that," said the manager. "Here, give me the broom, I'll show you how."



Three men took a small plane to the wilderness in northern Canada to hunt moose over the weekend. The last thing the pilot said was, "Remember, this is a very small plane and you will only be able to bring ONE moose back."

But of course, they killed one each and returned to the plane with three moose.
The pilot said: "I have told you to bring one moose only".
"That's what you told us last year," the hunters replied, "but for an additional $100 you allowed us to bring three moose. Here, take $100 now."
The pilot agrees, and lets them bring all three dead moose onboard.

Just after takeoff, the plane stalled and crashed. In the wreckage, one of the men woke up, looked around and said: "Where the hell are we?"
"Oh, just about a hundred yards east of the place where we crashed last year."



A Manager of a retail clothing store is reviewing a potential employee's application and notices that the man has never worked in retail before. He says to the man, "For a man with no experience, you are certainly asking for a high wage."

"Well Sir," the applicant replies, "the work is so much harder when you don't know what you're doing!"



The classified ad said, "Wanted: a very experienced lumberjack". A man answered the ad and was asked to describe his experience.
"I've worked at the Sahara Forest."
"You mean the Sahara Desert" said the interviewer.
The man laughed and answered "Oh sure, that's what they call it now!"


Experience is directly proportional to the amount of equipment ruined.

Experience is something you do not get until just after you need it.

Experience is what causes a person to make new mistakes instead of old ones.

Experience is what you get when you were expecting something else.

Experience is knowledge acquired when it's too late.

Experience is that marvelous thing that enables you recognize a mistake when you make it again.



Hunting an ElephantElephant by Deddi shy

Mathematicians hunt elephants by going to Africa, throwing out everything that is not an elephant, and catching one of whatever is left.
Experienced mathematicians will prove the existence of at least one unique elephant and then leave the detection and capture of an actual elephant as an exercise for their graduate students.

Computer programmers hunt elephants by exercising Algorithm A:
1. Go to Africa.
2. Start at the Cape of Good Hope.
3. Work northward in an orderly manner, traversing the continent alternately east and west.
4. During each traverse pass,
   a. Catch each animal seen.
   b. Compare each animal caught to a known elephant.
   c. Stop when a match is detected.
Experienced computer programmers modify Algorithm A by placing a known elephant in Cairo to ensure that the algorithm will terminate.

Economists don't hunt elephants, but they believe that if elephants are paid enough, they will hunt themselves.
Experienced economists never saw an elephant, but they try to hunt one by controlling the interest rates.

Statisticians hunt the first gray animal they see N times and call it an elephant.
Experienced statisticians add that there is a small probability that the animal they hunted is a mouse.

Lawyers can let hunting a single elephant drag out for several years.
Experienced lawyers can make it last even longer.

Consultants don't hunt elephants, and many have never hunted anything at all, but they can be hired by the hour to advise those people who do.
Experienced consultants can also measure the correlation of hat size and bullet color to the efficiency of elephant-hunting strategies, if someone else will only identify the elephants.

Politicians don't hunt elephants, but they will share the elephants you catch with the people who voted for them.
Experienced politicians take the elephant for themselves and blame the press.

Managers set broad elephant-hunting policy based on the assumption that elephants are just like field mice, but with deeper voices.
Experienced managers keep in the project file the advise that claims that elephants are just like field mice.

Sales people don't hunt elephants but spend their time selling elephants they haven't caught, for delivery two days before the season opens.
Experienced sales people ship the first thing they catch and write up an invoice for an elephant.

Computer sales people catch gray animals at random, and sell any one of them weighs within plus or minus 15 percent of any previously observed elephant.
Experienced computer sales people catch gray rabbits, and sell them as desktop elephants.

jobs jokes, interview jokes, most famous work jokes that i liked

Solar Beer Power to heat the water

Solar Beer Power

This can be also possible in Nepal so i encourage to Engineers students to do the same so that it can be beneficial to the Nepali  markets. A Chinese farmer has made his own solar-powered water heater out of beer bottles and hosepipes.

A Chinese farmer has made his own solar-powered water heater out of beer bottles and hosepipes.
'I invented this for my mother. I wanted her to shower comfortably,' says Ma Yanjun, of Qiqiao village, Shaanxi province. Ma's invention features 66 beer bottles attached to a board. The bottles are connected to each other so that water flows through them.
Sunlight heats the water as is passes slowly through the bottles before flowing into the bathroom as hot water, reports China Economy Network. Ma says it provides enough hot water for all three members of his family to have a shower every day. More than 10 families in the village have already followed suit and installed their own versions of Ma's invention.



Funny Beer Chandelier

A Wife Sends Her Husband to a Grocery Store:

"And don't forget to buy the milk, do you hear me?!"
"I hear you..."
"And take the low fat one, don't mix up!"
"Take it easy, I won't..."
"And don't buy wine instead, like you did the last time, do you remember?!"
"Of course I remember..."
"And no beer, like the time before that, understand?!"
"I do, I do...."
"Well, go then!"
... Ten minutes later in the grocery store:
"What did she tell me to buy - was it wine or beer? Oh, well, I'll better take both, just in case."



Thursday, January 27, 2011

Creating sortable lists with PHP and AJAX


Creating sortable lists with PHP and AJAX

Creating our database and populating it

We will now create the database table we need in order to create this example. We won’t be writing all the code for inserting, editing and deleting of data, as it is beyond the scope of this example. As such, we will simply provide insert statements to create a static list of data.
The examples below are for PostgreSQL and MySQL.

Create your database

First up, you need to create a database for this article. This may be in either PostgreSQL or MySQL. Additionally, you may need to setup a username and password to access the database, depending on your system setup.

MySQL database schema

Highlight: SQL

create table movies (
    movie_id    int             not null    auto_increment,
    title       varchar(255)    not null,
    ranking     int,
 
    primary key (movie_id)
);

PostgreSQL database schema

Highlight: SQL

create table movies (
    movie_id    serial          not null,
    title       varchar(255)    not null,
    ranking     int,
 
    primary key (movie_id)
);

Database data

Highlight: SQL

insert into movies (title) values ('American Pie');
insert into movies (title) values ('Die Hard');
insert into movies (title) values ('Clerks');
insert into movies (title) values ('Air Force One');
insert into movies (title) values ('Titanic');
insert into movies (title) values ('The Shawshank Redemption');
insert into movies (title) values ('Gone In 60 Seconds');

About the schema

The database table is fairly simple, it just consists of an ID, a movie title, and a field to store the ordering. There’s no particular reason why the ranking field is allowed to be null, other than the values won’t be set when we initially insert our data.

the easiest way to sort things with the help of ajax

How ajax makes things easy


A couple of days ago I was browsing the net for some remote scripting (also known as AJAX) examples and how to use the XmlHttpRequest object. However, all examples were quite nasty in imiplementation so I decided to write an nice little javascript wrapper around the XmlHttpRequest object.
// JavaScript Document
function EzRemoteScripter() {
   
//private variables
   
var _XmlHttpRequest = null;
    var
_This = null;
   
   
//public properties
   
this.GetResponseXML = function() {
        return (
_XmlHttpRequest) ? _XmlHttpRequest.responseXML : null;
    }
   
   
this.GetResponseText = function() {
        return (
_XmlHttpRequest) ? _XmlHttpRequest.responseText : null;
    }
   
   
this.GetXMLHttpRequestObj = function() {
        return
_XmlHttpRequest;
    }
   
   
//public methods
   
this.InitXmlHttpRequest = function(Method, CallUri) {
       
_InitXmlHttpRequest();
       
_This = this;
        switch(
arguments.length ) {
            case
2:
               
_XmlHttpRequest.open(Method, CallUri);   
                break;
            case
3:
               
_XmlHttpRequest.open(Method, CallUri, arguments[2]);
                break;
        }
       
        if(
arguments.length >= 4) {
           
_XmlHttpRequest.open(Method, CallUri, arguments[2], arguments[3]);
        }
    }
   
   
this.Commit = function(Data) {
        if(
_XmlHttpRequest ) {
           
_XmlHttpRequest.send(Data);
        }
    }
   
   
this.Close    = function() {
        if(
_XmlHttpRequest ) {
           
_XmlHttpRequest.abort();
        }
    }
   
   
//public events
   
this.OnUninit         = function() {};
   
this.OnLoading         = function() {};
   
this.OnLoaded         = function() {};
   
this.OnInteractive     = function() {};
   
this.OnSuccess        = function() {};
   
this.OnFailure         = function() {};
   
   
//private events
   
function _OnUninit()         { _This.OnUninit(); };
    function
_OnLoading()         { _This.OnLoading(); };
    function
_OnLoaded()         { _This.OnLoaded(); };
    function
_OnInteractive()     { _This.OnInteractive(); };
    function
_OnSuccess()         { _This.OnSuccess(); };
    function
_OnFailure()         { _This.OnFailure(); };
   
   
//private methods
   
function _InitXmlHttpRequest() {
       
_XmlHttpRequest = _GetXmlHttpRequest();
       
_XmlHttpRequest.onreadystatechange = _StateHandler;
    }
   
    function
_StateHandler() {
        switch(
_XmlHttpRequest.readyState) {
            case
0:
               
window.setTimeout("void(0)", 100);
               
_OnUninit();
                break;
            case
1:
               
window.setTimeout("void(0)", 100);
               
_OnLoading();
                break;
            case
2:
               
window.setTimeout("void(0)", 100);
               
_OnLoaded();
                break;
            case
3:
               
window.setTimeout("void(0)", 100);
               
_OnInteractive();
                break;
            case
4:
                if (
_XmlHttpRequest.status == 200) {
                   
_OnSuccess();
                } else {
                   
_OnFailure();
                }
                return;
                break;
        }
    }
   
    function
_GetXmlHttpRequest() {
        var
requester
        try
{
           
requester = new XMLHttpRequest();
        }
catch (error) {
           
try {
               
requester = new ActiveXObject("Microsoft.XMLHTTP");
            }
catch (error) {
                return
null;
            }
        }
        return
requester;
    }
}



The code is quiet selfexplanatory. However i have here also an exmaple of the usage. It is very simple.

Here is first the html (yes html file) that will show us our little example:
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
    <
head>
        <
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <
title>Untitled Documenttitle>
        <
script language="javascript" type="text/javascript" src="NIS.RemoteScripter.js">
       
   
   
       

       
   


and here out php script that will supply us with data:
php
header
("Content-type: text/xml");
echo
"h123ohello2asdddo3";
?>


Note the usage of the header. It is very important to identify the data as xml so that the XmlHttpRequest object can use the data in order to be manipulated with the standart DOM methods.


Just create a new javascript file with the name test.js (or whatever you want to) and write following:
// JavaScript Document
////////////////////////////////////////////////////////////
var test = new EzRemoteScripter();
var
div = window.document.getElementById("DataContainer");

//this function is used to find our div element that will
//show all data that is being returned by our wrapper.
function SetDiv() {
    if( !
div) {
       
div = window.document.getElementById("DataContainer");
    }
}

////////////////////////////////////////////////////////////
//here we set the OnUninit event with a function.
//this event is fired if the XmlHttpRequest object was not
//initialized when we call the remote php script.
test.OnUninit         = function() {
   
SetDiv();
   
div.innerHTML = "Uninitialized!!";
}
////////////////////////////////////////////////////////////   
//This event is firing while data is being received from our remote script. Notice that when using document.getElement[..] you have to make sure that the element is set to our variable div.
test.OnLoading         = function() {
   
SetDiv();
   
div.innerHTML = "Loading...";
}
////////////////////////////////////////////////////////////   
//Event is fired when data finished loading
test.OnLoaded         = function() {
   
SetDiv();
   
div.innerHTML = "Loaded...";
}
////////////////////////////////////////////////////////////
//now this event is kinda tricky. Now when finished loading all data resides in the XmlHttpRequest object.
//however when getting the data from the XmlHttpRequest object the OnInteractive event is fired. That means it is the data transfer between the XmlHttpRequest object and your script.
test.OnInteractive     = function() {
   
SetDiv();
   
div.innerHTML = "Interacting...";
}
////////////////////////////////////////////////////////////
//this event is the most used and most important event.
//it is fired if the data has been loaded with a success.
//
test.OnSuccess        = function() {
   
SetDiv();
   
div.innerHTML = "";
       
// here we are getting the data from the XmlHttpRequest object (OnInteractive is being fired)
        //alternatively you may get the data as a string using the test.GetResponseText()
   
var obj = test.GetResponseXML();
    var
books = obj.getElementsByTagName("book");
    for(var
i=0; i < books.length; i++) {
        var
myLI = document.createElement("LI");
       
myLI.innerHTML = books[i].firstChild.data;
       
div.appendChild(myLI);
    }
}
////////////////////////////////////////////////////////////
test.OnFailure         = function() {
   
SetDiv();
   
div.innerHTML = "Failed!";
}
////////////////////////////////////////////////////////////
//this is the funciton that actually calls out php script to get the xml data. pretty easy to use.
//However, you HAVE to init and commit on each call otherwise the script won't work. you may also use the POST method to tranfer data instead of get. To do this you would have to do following:
//d.InitXmlHttpRequest("POST", "test.php");
//d.Commit("myVar=hello&mySecondVar=world");
//
//if you don't want to send any data just pass null to the Commit method. If you leave it empty FireFox will complain.
function Go(d) {
   
d.InitXmlHttpRequest("GET", "test.php");
   
d.Commit(null);
}