Showing posts with label jokes. Show all posts
Showing posts with label jokes. Show all posts

Sunday, June 22, 2008

Hello World Programs .....

High School/Jr.High


10 PRINT "HELLO WORLD"
20 END

First year in College

program Hello(input, output)
begin
writeln('Hello World')
end.

Senior year in College

(defun hello
(print
(cons 'Hello (list 'World))))

New professional

#include
void main(void)
{
char *message[] = {"Hello ", "World"};
int i;

for(i = 0; i < 2; ++i)
printf("%s", message);
printf("\n");
}

Seasoned professional

#include
#include

class string
{
private:
int size;
char *ptr;

public:
string() : size(0), ptr(new char('\0')) {}

string(const string &s) : size(s.size)
{
ptr = new char[size + 1];
strcpy(ptr, s.ptr);
}

~string()
{
delete [] ptr;
}

friend ostream &operator <<(ostream &, const string &);
string &operator=(const char *);
};

ostream &operator<<(ostream &stream, const string &s)
{
return(stream << s.ptr);
}

string &string::operator=(const char *chrs)
{
if (this != &chrs)
{
delete [] ptr;
size = strlen(chrs);
ptr = new char[size + 1];
strcpy(ptr, chrs);
}
return(*this);
}

int main()
{
string str;

str = "Hello World";
cout << str << endl;

return(0);
}

Master Programmer

[
uuid(2573F8F4-CFEE-101A-9A9F-00AA00342820)
]
library LHello
{
// bring in the master library
importlib("actimp.tlb");
importlib("actexp.tlb");

// bring in my interfaces
#include "pshlo.idl"

[
uuid(2573F8F5-CFEE-101A-9A9F-00AA00342820)
]
cotype THello
{
interface IHello;
interface IPersistFile;
};
};

[
exe,
uuid(2573F890-CFEE-101A-9A9F-00AA00342820)
]
module CHelloLib
{

// some code related header files
importheader();
importheader();
importheader();
importheader("pshlo.h");
importheader("shlo.hxx");
importheader("mycls.hxx");

// needed typelibs
importlib("actimp.tlb");
importlib("actexp.tlb");
importlib("thlo.tlb");

[
uuid(2573F891-CFEE-101A-9A9F-00AA00342820),
aggregatable
]
coclass CHello
{
cotype THello;
};
};


#include "ipfix.hxx"

extern HANDLE hEvent;

class CHello : public CHelloBase
{
public:
IPFIX(CLSID_CHello);

CHello(IUnknown *pUnk);
~CHello();

HRESULT __stdcall PrintSz(LPWSTR pwszString);

private:
static int cObjRef;
};


#include
#include
#include
#include
#include "thlo.h"
#include "pshlo.h"
#include "shlo.hxx"
#include "mycls.hxx"

int CHello::cObjRef = 0;

CHello::CHello(IUnknown *pUnk) : CHelloBase(pUnk)
{
cObjRef++;
return;
}

HRESULT __stdcall CHello::PrintSz(LPWSTR pwszString)
{
printf("%ws\n", pwszString);
return(ResultFromScode(S_OK));
}


CHello::~CHello(void)
{

// when the object count goes to zero, stop the server
cObjRef--;
if( cObjRef == 0 )
PulseEvent(hEvent);

return;
}

#include
#include
#include "pshlo.h"
#include "shlo.hxx"
#include "mycls.hxx"

HANDLE hEvent;

int _cdecl main(
int argc,
char * argv[]
) {
ULONG ulRef;
DWORD dwRegistration;
CHelloCF *pCF = new CHelloCF();

hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);

// Initialize the OLE libraries
CoInitializeEx(NULL, COINIT_MULTITHREADED);

CoRegisterClassObject(CLSID_CHello, pCF, CLSCTX_LOCAL_SERVER,
REGCLS_MULTIPLEUSE, &dwRegistration);

// wait on an event to stop
WaitForSingleObject(hEvent, INFINITE);

// revoke and release the class object
CoRevokeClassObject(dwRegistration);
ulRef = pCF->Release();

// Tell OLE we are going away.
CoUninitialize();

return(0); }

extern CLSID CLSID_CHello;
extern UUID LIBID_CHelloLib;

CLSID CLSID_CHello = { /* 2573F891-CFEE-101A-9A9F-00AA00342820 */
0x2573F891,
0xCFEE,
0x101A,
{ 0x9A, 0x9F, 0x00, 0xAA, 0x00, 0x34, 0x28, 0x20 }
};

UUID LIBID_CHelloLib = { /* 2573F890-CFEE-101A-9A9F-00AA00342820 */
0x2573F890,
0xCFEE,
0x101A,
{ 0x9A, 0x9F, 0x00, 0xAA, 0x00, 0x34, 0x28, 0x20 }
};

#include
#include
#include
#include
#include
#include "pshlo.h"
#include "shlo.hxx"
#include "clsid.h"

int _cdecl main(
int argc,
char * argv[]
) {
HRESULT hRslt;
IHello *pHello;
ULONG ulCnt;
IMoniker * pmk;
WCHAR wcsT[_MAX_PATH];
WCHAR wcsPath[2 * _MAX_PATH];

// get object path
wcsPath[0] = '\0';
wcsT[0] = '\0';
if( argc > 1) {
mbstowcs(wcsPath, argv[1], strlen(argv[1]) + 1);
wcsupr(wcsPath);
}
else {
fprintf(stderr, "Object path must be specified\n");
return(1);
}

// get print string
if(argc > 2)
mbstowcs(wcsT, argv[2], strlen(argv[2]) + 1);
else
wcscpy(wcsT, L"Hello World");

printf("Linking to object %ws\n", wcsPath);
printf("Text String %ws\n", wcsT);

// Initialize the OLE libraries
hRslt = CoInitializeEx(NULL, COINIT_MULTITHREADED);

if(SUCCEEDED(hRslt)) {


hRslt = CreateFileMoniker(wcsPath, &pmk);
if(SUCCEEDED(hRslt))
hRslt = BindMoniker(pmk, 0, IID_IHello, (void **)&pHello);

if(SUCCEEDED(hRslt)) {

// print a string out
pHello->PrintSz(wcsT);

Sleep(2000);
ulCnt = pHello->Release();
}
else
printf("Failure to connect, status: %lx", hRslt);

// Tell OLE we are going away.
CoUninitialize();
}

return(0);
}

The Leave Applications

Infosys , Bangalore :
An employee applied for leave as follows:
'Since I have to go to my village to sell my land along with my wife , please sanction me one-week leave.'

This is from Oracle Bangalore:
From an employee who was performing the 'mundan' ceremony of his 10 year old son:
'as I want to shave my son's head , please leave me for two days..'


From H.A.L. Administration Dept:
'As my mother-in-law has expired and I am only one responsible for it , please grant me 10 days leave.'

Another employee applied for half day leave as follows:


'Since I've to go to the cremation ground at 10 o-clock and I may not return , please grant me half day casual leave'

An incident of a leave letter:
'I am suffering from fever , please declare one-day holiday.'

A leave letter to the headmaster:
'As I am studying in this school I am suffering from headache. I request you to leave me today'

Another leave letter written to the headmaster:
'As my headache is paining , please grant me leave for the day.'

Covering note:
'I am enclosed herewith...'

Another Note:
'Dear Sir: with reference to the above , please refer to my below...'

Letter writing:
'I am well here and hope you are also in the same well.'

Thursday, May 8, 2008

Types of Computer Girls ( Computer Humor )

CD-ROM GIRLS
She is always faster and faster.

EMAIL GIRLS
Every ten things she says, eight are nonsense .

HARD DISK GIRLS
She remembers everything, FOREVER

INTERNET GIRLS
Difficult to access

MULTIMEDIA GIRLS
She make horrible thing look beautiful

SCREENSAVER GIRLS
She is good for nothing but at least she is fun

RAM GIRLS
forget about you, the moment turn her off

WINDOW GIRLS
Everyone know that she can't do a thing right, but no one can live without her.

VIRUS GIRLS
Also known as "wife'' when you are not expecting her, she comes, install herself and uses all your resources. If you try to uninstall her you will lose something, if don't try to uninstall her you will lose everything...

SERVER GIRLS
Always busy when you need her.

Mathematician in love

My Dear SweetHeart,
Yesterday, I was passing by your rectangular house in trigonometric lane.

There I saw you with your cute circular face,conical nose and spherical eyes,standing in your triangular garden.

Before seeing you my heart was a null set, but when a vector of magnitude (likeness) from your eyes at a deviation of theta radians made a tangent to my heart, it differentiated.

My love for you is a quadratic equation with real roots, which only you can solve by making good binary relation with me.

The cosine of my love for you extends to infinity.

I promise that I should not resolve you into partial functions but if I do so, you can integrate me by applying the limits from zero to infinity.

You are as essential to me as an element to a set.

The geometry of my life revolves around your acute personality.

My love, if you do not meet me at parabola restaurant on date 10 at sunset, when the sun is making an angle of 160 degrees, my heart would be like a solved polynomial of degree 10.

With love from your higher order derivatives of maxima and minima, of an unknown function.

Saturday, February 16, 2008

Jokes

Some Funny Stuff Jokes:

HEADLINES DATED 1ST JAN 2025:

1. Kyunki saas bhi kabhi bahu thi completed 2,50,000 episodes & Baa has completed 400yrs.
2. Dhoom 17 ready for release.
3. I will play next world cup - Sachin Tendulkar
4. Salman, Vivek and Abhishek attends Aishwarya's 3rd marriage.
5. Mein to aabhi jawan hu - Dev Anand's new film, staring himself in the lead role.
6. Petrol Rs.999/lt.
7. N.Siddhu will launch his own TV channal where he can speak for a whole day.
8. Coach Ganguly resigns, as India went out of world cup in 1st round after losing to Korea .
9. Riots in the Parliament as the newly elected MP MALLIKA SHERAWAT enters the assembly.


1.What is height of Fashion?
Dhoti with a zip

2. What is height of Secrecy?
Offering blank visiting cards .

3. What is height of Activelaziness?
Asking for a lift to house while on a morning walk.

4. What is height of Craziness?
Getting a blank paper Xeroxed.

5. What is height of Forgetfulness?
Seeing the mirror and trying to recollect when you saw him / her last.

6. What is height of Stupidity?
A man looking through a keyhole of a glass door.

7. What is height of Honesty?
A pregnant woman taking one and a half ticket.

8. What is height of Suicide?
A dwarf jumping from the footpath on the road.

9. What is height of De-hydration?
A cow giving milk powder

Q : What will u call a person who is leaving India??
A : Hindustan Leaver.
Q : What will u call a person who leaves India, but doesn't travel much??
A : Hindustan Leaver Limited.

Q : Why was Santa writing the exam near the door?
A : Because it was an entrance exam.