Palindromes
Horror
Illusion
Humor >>
3D
9/11
Academic
Amphoebia
Animal
Computer
Jokes-Chinese
Jokes-Indian
Jokes-Vietnamese
Medical
Kids
Bangla>>
Tokai
Unmad
Alpin@Prothom-Alo
|
|
| 81) Computer Prayer |
Dear God,
Help me log on without fretting
Guide me, as I am interneting
Bless my downloading and uploading
Keep my browser from exploding
May my website be protected?
Let not my password be rejected
Keep my line always connected
And all my inputs be accepted
Please keep my entire program alive
And to remember to back up my hard drive
And protect my computer from crashing drive,
From a virus that would make it nesting hive
Amen
|
| 82) Conversation between Moses and G-d |
A Conversation Between Moses and G-d
"Excuse me, Sir."
"Is that you again, Moses?"
"I'm afraid it is, Sir."
"What is it this time, Moses. More computer problems?"
"How did you guess?"
"I don't have to guess, Moses. Remember?"
"Oh, yeah. I forgot."
"Tell me what you want, Moses."
"But you already know. Remember?"
"Moses!"
"Sorry, sir."
"Well, go ahead, Moses. Spit it out!"
"Well, I have a question, sir. You know those ten things
you sent me."
"You mean the commandments, Moses?"
"That's it. I was wondering if they were important."
"What do you mean WERE important, Moses? Of course, they ARE
important. Otherwise I wouldn't have sent them to you."
"Well, sorry, but I lost them. I could say the dog ate them,
but of course you would see right through that."
"What do you mean 'you lost them! Are you trying to tell me
you didn't save them, Moses?"
"No, sir. I forgot. I was going to, but I forgot. I did send
them to some people before I lost them though. "
"And did you hear back from any of them?"
"You already know I did."
"What about the one guy who said he never uses 'shalt not'.
Can he change the words a little bit?"
"Yes, Moses. As long as he doesn't change the meaning."
"And what about the guy who thought your stance was a little
harsh and recommended calling them the Ten Suggestions or
letting people pick one or two to try for a while?"
"Moses, I'll act like I didn't hear that."
"I think that means, 'no'. Well, what about the guy who said I
was scamming him?"
"I think that is spamming, Moses."
"Oh, yeah. I e-mailed him back and told him I don't even eat
that stuff and I have no idea how you can send it to someone
through a computer."
"And what he did say?"
"You know what he said. He used Your name in vain. You don't
think he might have sent me one of those plagues and that's
the reason I lost those ten things, do you?"
"They're called viruses, Moses."
"Whatever! This computer stuff is just too much for me. Can
we just go back to those stone tablets? It was hard on my
back taking them out and reading them each day, but I never
lost them."
"We'll do it the new way, Moses."
"I was afraid you would say that, sir."
"Moses, what did I tell you to do if you messed up?"
"You told me to hold up this rat and stretch it out toward the
computer."
"It's a mouse, Moses. Mouse! Mouse! And did you do that?"
"No, I decided to try the technical support first. After all,
who knows more about this stuff than you, and I really like
your hours. By the way, sir, did Noah have two of these mice
on the ark?"
"No, Moses."
"One other thing. Why didn't you name them frogs instead of mice,
because didn't you tell me the thing they sit on is a pad?"
"I didn't name them, Moses. Man did, and you can call yours a frog
if you want to."
"Oh, that explains it. Kind of like Adam, huh, sir? I bet some
woman told him to call it a mouse. After all, wasn't it a woman
who named one of the computers Apple?"
"Say good night, Moses."
"Wait a minute, sir. I am stretching out the mouse and it seems to
be working. Yes, a couple of the ten things have come back."
"Which ones are they, Moses?"
"Let's see. 'Thou shalt not steal from any grave an image and
'Thou shalt not uncover thy neighbor's wife.'
"Turn the computer off, Moses. I'm sending you another set of
stone tablets. How does 'Same Day Air' sound?" |
| 83) Cup Holders |
Caller: "Hello, is this Tech Support?"
Tech Rep: "Yes, it is. How may I help you?"
Caller: "The cup holder on my PC is broken and I am within my warranty period. How do I go about getting that fixed?"
Tech Rep: "I'm sorry, but did you say a cup holder?"
Caller: "Yes, it's attached to the front of my computer."
Tech Rep: "Please excuse me if I seem a bit stumped, it's because I am. Did you receive this as part of a promotional, at a trade show? How did you get this cup holder? Does it have any trademark on it?"
Caller: "It came with my computer, I don't know anything about a promotional. It just has '4X' on it."
|
| 84) Customers do Strange Things |
Customers Do The Strangest Things
From ComputerWorld
Ontrack Data Recovery in Eden Prairie, Minn., specializes in recovering
data from hard drives damaged by natural or man-made disasters. Here are
a few true stories from Ontrack's files:
- One customer guessed that maybe his hard drive didn't work because it
had been "sitting in a snowdrift by the barn for a while."
- Another customer, concerned that he would void the warranty if he
disassembled the hard drive by removing the screws, used a hack saw
instead.
- An Ontrack representative told a customer to pack his hard drive in
peanuts for protection during shipping. The drive arrived the next day
packed in salted peanuts - instead of foam peanuts.
- Another drive arrived smelling fresh & clean, wrapped in Bounce fabric
softener sheets. The customer had been told to pack it with antistatic
material before shipping. |
| 85) Dvorak |
The following appeared in a computer magazine in Mr. Dvorak's column:
Dear Mr. Dvorak:
Ann Landers wouldn't print this. I have nowhere else to turn. I have
to get the word out. Warn other parents. I must be rambling on. Let me
try and explain. It's about my son, Billy. He's always been a good,
normal ten-year-old boy. Well, last spring we sat down after dinner to
select a summer camp for Billy. We sorted through the camp brochures.
There were the usual camps with swimming, canoeing, games, singing by the
campfire -- you know. There were sports camps and specialty camps for
weight reduction, music, military camps and camps that specialized in
Tibetan knot tying. I tried to talk him into Camp Winnepoopoo. It's
where he went last year. (He made an adorable picture out of painted
pinto beans and macaroni). Billy would have none of it. Billy pulled a
brochure out of his pocket. It was for a COMPUTER CAMP! We should have
put our foot down right there, if only we had known. He left three
weeks ago. I don't know what's happened. He's changed. I can't explain
it. See for yourself. These are some of my little Billy's letters.
Dear Mom,
The kids are dorky nerds. The food stinks. The computers are the
only good part. We're learning how to program. Late at night is the
best time to program, so they let us stay up.
Love, Billy.
Dear Mom,
Camp is O.K. Last night we had pizza in the middle of the night.
We all get to choose what we want to drink. I drink Classic Coke. By
the way, can you make Szechuan food? I'm getting used to it now. Gotta
go, it's time for the flowchart class.
Love, Billy.
P.S. This is written on a wordprocessor. Pretty swell, huh? It's
spell-checked too.
Dear Mom,
Don't worry. We do regular camp stuff. We told ghost stories by
the glow of the green computer screens. It was real neat. I don't have
much of a tan 'cause we don't go outside very often. You can't see the
computer screen in the sunlight anyway. That wimp camp I went to last
year fed us weird food too. Lay off, Mom. I'm okay, really.
Love, Billy.
Dear Mom,
I'm fine. I'm sleeping enough. I'm eating enough. This is the best
camp ever. We scared the counselor with some phony worm code. It was
real funny. He got mad and yelled. Frederick says it's okay. Can you
send more money? I spent mine on a pocket protector and a box of blank
diskettes. I've got to chip in on the phone bill. Did you know that
you can talk to people on a computer? Give my regards to Dad.
Love, Billy.
Dear Mother,
Forget the money for the telephone. We've got a way to not pay.
Sorry I haven't written. I've been learning a lot. I'm real good at
getting onto any computer in the country. It's really easy! I got into
the university's in less than fifteen minutes. Frederick did it in five,
he's going to show me how. Frederick is my bunk partner. He's really
smart. He says that I shouldn't call myself Billy anymore. So, I'm not.
Signed, William.
Dear Mother,
How nice of you to come up on Parents Day. Why'd you get so upset?
I haven't gained that much weight. The glasses aren't real. Everybody
wears them. I was trying to fit in. Believe me, the tape on them is
cool. I thought that you'd be proud of my program. After all, I've made
some money on it. A publisher is sending a check for $30,000. Anyway,
I've paid for the next six weeks of camp. I won't be home until late
August.
Regards, William.
Mother,
Stop treating me like a child. True -- physically I am only ten
years old. It was silly of you to try to kidnap me. Do not try again.
Remember, I can make your life miserable (i.e. - the bank, credit bureau,
and government computers). I am not kidding. O.K.? I won't write again
and this is your only warning. The emotions of this interpersonal
communication drain me.
Sincerely, William.
See what I mean? It's been two weeks since I've heard from my little
boy. What can I do, Mr.Dvorak? I know that it's probably too late to
save my little Billy. But, if by printing these letters you can save
JUST ONE CHILD from a life of programming, please, I beg of you to do so.
Thank you very much.
Sally Gates, Concerned Parent |
| 86) Email Addiction Sign |
You know you are an e-mail addict when...
1) You wake up at 2 a.m. to go to the bathroom and stop to check your e-mail on the way back to bed.
2) You get a tattoo that reads "This body best viewed with Internet Explorer 2.0 or higher."
3) You name your children Eudora, Mozillia and Dotcom.
4) You turn off your modem and get this awful empty feeling, like you just pulled the plug on a loved one.
5) You spend half the plane trip with your laptop on your lap and your child in the overhead compartment.
6) You decide to stay in college for an additional year or two, just for the free Internet access.
7) You laugh at people with 9600-baud modems.
8) You start using smilies in snail mail.
9) Your hard drive crashes. You haven't logged in for two hours. You start to twitch. You pick up the phone and manually dial your ISP's access number. You try to hum to communicate with the modem .... and you succeed.
10) You find yourself typing "com" after every period when using a word processor.com
11) You refer to going to the bathroom as "downloading."
12) You start introducing yourself as "JohnDoe at AOL dot com."
13) Your cat has its own home page.
14) All of your friends have an @ in their names.
15) You can't call your mother .... she doesn't have a modem.
16) You check your e-mail. It says "No new messages." So you check it again.
17) Your phone bill comes to your doorstep in a box.
18) You move into a new house and decide to Netscape before you landscape.
19) You tell the cab driver you live at http://1000.Madison.ridge/house/brick.phpl"
20) You get up at 4:45 am and login so you can use the computer before your husband gets up and hogs it for the rest of the day!
|
| 87) Engineering Identification Test |
Engineering is so trendy these days that everybody wants to
be one. The word "engineer" is greatly overused. If there's
somebody in your life who you think is trying to pass as an
engineer, give him this test to discern the truth.
Engineer Identification Test
You walk into a room and notice that a picture is hanging
crooked. You...
A. Straighten it.
B. Ignore it.
C. Buy a CAD system and spend the next six months designing a solar-powered, self-adjusting picture frame while often stating aloud your belief that the inventor of the nail was a total moron.
The correct answer is "C" but partial credit can be given to
anybody who writes "It depends" in the margin of the test or
simply blames the whole stupid thing on "Marketing."
Social Skills
Engineers have different objectives when it comes to social
interaction.
"Normal" people expect to accomplish several unrealistic
things from social interaction:
Stimulating and thought-provoking conversation
Important social contacts
A feeling of connectedness with other humans
In contrast to "normal" people, engineers have rational
objectives for social interactions:
Get it over with as soon as possible.
Avoid getting invited to something unpleasant.
Demonstrate mental superiority and mastery of all subjects.
Fascination with Gadgets
To the engineer, all matter in the universe can be placed
into one of two categories:
Things that need to be fixed, and
Things that will need to be fixed after you've had a few minutes to play with them.
Engineers like to solve problems. If there are no problems
handily available, they will create their own problems.
Normal people don't understand this concept; they believe
that if it ain't broke, don't fix it. Engineers believe that
if it ain't broke, it doesn't have enough features yet.
No engineer looks at a television remote control without
wondering what it would take to turn it into a stun gun. No
engineer can take a shower without wondering if some sort of
Teflon coating would make showering unnecessary. To the
engineer, the world is a toy box full of sub-optimized and
feature-poor toys.
Fashion and Appearance
Clothes are the lowest priority for an engineer, assuming
the basic thresholds for temperature and decency have been
satisfied. If no appendages are freezing or sticking together,
and if no genitalia or mammary glands are swinging around in
plain view, then the objective of clothing has been met.
Anything else is a waste.
Dating and Social Life
Dating is never easy for engineers. A normal person will
employ various indirect and duplicitous methods to create a
false impression of attractiveness. Engineers are incapable
of placing appearance above function.
Fortunately, engineers have an ace in the hole. They are
widely recognized as superior marriage material: intelligent,
dependable, employed, honest, and handy around the house.
While it's true that many normal people would prefer not to
date an engineer, most normal people harbor an intense desire
to mate with them, thus producing engineerlike children who
will have high-paying jobs long before losing their virginity.
Male engineers reach their peak of sexual attractiveness
later than normal men, becoming irresistible erotic dynamos
in their mid thirties to late forties. Just look at these
examples of sexually irresistible men in technical
professions:
Bill Gates.
MacGyver.
Etcetera.
Female engineers become irresistible at the age of consent
and remain that way until about thirty minutes after their
clinical death. Longer if it's a warm day.
Honesty
Engineers are always honest in matters of technology and
human relationships. That's why it's a good idea to keep
engineers away from customers, romantic interests, and other
people who can't handle the truth.
Engineers sometimes bend the truth to avoid work. They say
things that sound like lies but technically are not because
nobody could be expected to believe them. The complete list
of engineer lies is listed below.
"I won't change anything without asking you first."
"I'll return your hard-to-find cable tomorrow."
"I have to have new equipment to do my job."
"I'm not jealous of your new computer."
Frugality
Engineers are notoriously frugal. This is not because of
cheapness or mean spirit; it is simply because every spending
situation is simply a problem in optimization, that is, "How
can I escape this situation while retaining the greatest
amount of cash?"
Powers of Concentration
If there is one trait that best defines an engineer it is
the ability to concentrate on one subject to the complete
exclusion of everything else in the environment. This
sometimes causes engineers to be pronounced dead prematurely.
Some funeral homes in high-tech areas have started checking
resumes before processing the bodies. Anybody with a degree
in electrical engineering or experience in computer programming
is propped up in the lounge for a few days just to see if he
or she snaps out of it.
Risk
Engineers hate risk. They try to eliminate it whenever they
can. This is understandable, given that when an engineer
makes one little mistake the media will treat it like it's a
big deal or something.
Examples of Bad Press for Engineers
Hindenberg.
Space Shuttle Challenger.
SPANet(tm)
Hubble space telescope.
Apollo 13.
Titanic.
Ford Pinto.
Corvair.
The risk/reward calculation for engineers looks something
like this:
RISK: Public humiliation and the death of thousands of innocent people.
REWARD: A certificate of appreciation in a handsome plastic frame.
Being practical people, engineers evaluate this balance of
risks and rewards and decide that risk is not a good thing.
The best way to avoid risk is by advising that any activity
is technically impossible for reasons that are far too
complicated to explain.
If that approach is not sufficient to halt the project, then
the engineer will fall back to a second line of defense:
"It's technically possible but it will cost too much."
Ego
Ego-wise, two things are important to engineers:
How smart they are.
How many cool devices they own.
The fastest way to get an engineer to solve a problem is to
declare that the problem is unsolvable. No engineer can walk
away from an unsolvable problem until it's solved. No illness
or distraction is sufficient to get the engineer off the case.
These types of challenges quickly become personal -- a battle
between the engineer and the laws of nature.
Engineers will go without food and hygiene for days to solve
a problem. (Other times just because they forgot.) And when
they succeed in solving the problem they will experience an
ego rush that is better than sex -- and I'm including the
kind of sex where other people are involved.
Nothing is more threatening to the engineer than the
suggestion that somebody has more technical skill. Normal
people sometimes use that knowledge as a lever to extract
more work from the engineer. When an engineer says that
something can't be done (a code phrase that means it's not
fun to do), some clever normal people have learned to glance
at the engineer with a look of compassion and pity and say
something along these lines: "I'll ask Bob to figure it out.
He knows how to solve difficult technical problems."
At that point it is a good idea for the normal person to not
stand between the engineer and the problem. The engineer
will set upon the problem like a starved Chihuahua on a pork
chop.
Seth Croston Barber <kn1ght@cyberis.net>
Last modified: Wed Oct 06 13:29:35 PDT 1999
|
| 88) Evil Tv |
The Evil Side of Television
by Joe Lavin
This is the story of my nineteen inch television and how I tried to
ship it from California to Massachusetts. Brace yourself. It is not a
happy story. I tell this story so that others may learn from my
mistake. Never -- I repeat -- never try to ship a nineteen inch
television.
Problem #1 -- I wake up that day and realize I need a box. That's no
problem at all, I think. I head to the Box Depot, a store that
features not only many boxes but also a rodent-like dog who insists on
attacking my friend repeatedly. Suffice it to say that their slogan
seems to be, "Sparky!!!! No bite!" I eventually get a twenty-four inch
cube. My friend eventually gets out alive. I also buy packing supplies
-- $9 worth of little white peanuts or, as they soon will be called,
little white minions of Satan.
Problem #2 -- At first, it looks like there won't be a second problem
and that everyone in the world will live happily ever after. I put
the television in the box, drop in hundreds of the little minions,
seal it up, and bring it to my car. All runs smoothly until . . .
Well, the box doesn't fit in the car. I understand that it doesn't fit
in the trunk. As I look at the trunk, I realize I could never get away
with murder because I wouldn't be able to fit the body in the trunk.
Practically nothing fits in the trunk, but somehow I just can't
believe that the box won't fit in the back seat. I realize that my
unscientific measurement of the car door earlier in the day really
should have been far more scientific.
Problem #3 -- I call a few shipping companies to see if they'll pick
it up. However, the shipping fees they want to charge are slightly
more than the value of the television, which is several years old and
often has to be unplugged to be turned off.
Luckily, without the box, the television will fit in the back seat.
Our new plan is to pack it outside the UPS building. We remove the
television from the box and put it in the back seat, which of course
causes millions of the little white minions of Satan to go flying onto
the ground. It takes about fifteen miserable minutes to pick up the $9
of white things. Eventually, we collect them all, fold up the box,
throw it in with the television, and are on the road ready for . . .
Problem #4 -- UPS is in the ghetto. Well, not exactly. There are worse
sections of Los Angeles, but there are so many more that are nicer. My
computer is also in the car, and I grit my teeth as I drive my most
valuable possessions through this neighborhood. Red lights last for
eternity.
Problem #5 -- Can you believe it? I am running out of the god damn
white things. Initially, I had more than I could comprehend, but
somehow many have escaped through the time-space continuum into a
parallel white things universe. After we pack the television in the
parking lot, there is now a gaping space at the top of the box.
UPS closes in a few minutes, and I have to leave the next day. I must
do something. I search frantically through my car for stuff to put in
the box so that the television won't rattle. I find some towels. I
find a plastic container of water. I empty what's left of the
container and throw it in the box along with the towels. I feel like a
damn fool, but the box really doesn't look that bad. At least, that's
what I keep telling myself. It almost looks like everything might work
out until of course I come across . . .
Problem #6 -- UPS Guy: "I see this isn't the original box."
Me: "Um."
UPS Guy: "I have to open it."
Me: "No!!!"
UPS Guy: "What?"
Me: "I mean, you don't really need to do that. I mean, it's fine the
way it is. Um, right?"
UPS Guy: "I'm sorry. I have to see if it's packed properly."
Me: "No, please!"
That, of course, is the end. The first thing he sees is the empty
water container. A few drops of water drip out as he picks it up.
"It has to be in its original box or packed professionally." He says.
"But it's --" Well, it hasn't been packed professionally, and I know
it. Frankly, being called a mere amateur in the field of packing
stings. I explain how I had been told by UPS that I didn't need the
original box, but he doesn't care. He just shrugs and tells me that
he can't take the box.
It would be one thing if I could blame him for being rude or nasty,
but I can't. He is perfectly nice and listens patiently as I vent my
anger. He nods frequently and even apologizes occasionally. He seems
to be a wonderful person. I hate him. I am not thinking rationally.
Just to be a pain in the ass, I insist that he seal the box up again.
I return to my car and of course . . .
Problem #7 -- Well, the box still doesn't fit in my car. So there I am
with my wonderfully patient friend in this dark, lousy neighborhood,
looking at a giant box that won't fit in my car. That's when I decide
just to leave the stupid television in the parking lot and drive away.
Well, that would be the perfect ending, but I don't have quite enough
guts to do that. Instead, we unseal the box, take the television out,
and put it in the back seat. And of course, the white minions of Satan
go flying all over the UPS parking lot. Somehow, all the ones I lost
before mysteriously reappear. A few hundred more from that parallel
universe seem to have joined them. I'd like to leave them there, but a
security guard is giving me a dirty look. And so we spend the next ten
minutes again picking up white things off the ground and throwing them
into my trunk.
There is a happy ending, sort of. The television eventually made it to
Massachusetts. On my drive across country, I put it in the back seat
and drove it through San Francisco, Las Vegas, Denver, Kansas City,
St. Louis, Chicago, Columbus, Harrisburg, and into New England.
Here's the strange part. Remember how I said the television wouldn't
always turn off. Well, now that it's been loaded in and out of my car
dozens of times, carried up the steps of several hotels, driven across
the bumps of fourteen states, and cursed at more times than I can
remember, it no longer has this problem. Yes, now that I hate my
television and never want to see it ever again, it works just
perfectly.
Go figure.
__________
Copyright 1998 by Joe Lavin
|
| 89) Evolution of Product Documentation |
Evolution of Product Documentation
Most documentation starts as hastily scrawled notes from
sleep-deprived developers who weren't necessarily hired for their
keen communication skills. Those notes are then fleshed out by
recently graduated English majors who have spent their last four
years immersed in works of fiction. The results are then passed on
to the marketing department whose job it is to make sure that no word
or phrase will reflect unfavorably on the product ("I don't think
that the word 'Basic' properly communicates the exciting nature of
the product. Why don't we call it 'Visual Zesty?!'"). It is then
beset by lawyers who finish the job by making sure that they haven't
explicitly promised that the product will actually do anything. By
the time the documentation gets into your hands, it has been so
sanitized for your protection and generalized beyond recognition that
you usually have to go out and buy a 3rd-party manual (that was, more
likely than not, written by the same non-technical technical writer
who wrote the original documentation) in a vain attempt to get an
unbiased, unexpurgated, and unfiltered view of just how you're really
supposed to use the stuff.
-Introduction
About The "@ Novell" Series
November 3, 1998
|
| 90) Evolution of a Programmer |
The Evolution of a Programmer- read to the end ...
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[i]);
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);
}
Apprentice Hacker
#!/usr/local/bin/perl
$msg="Hello, world.\n";
if ($#ARGV >= 0) {
while(defined($arg=shift(@ARGV))) {
$outfilename = $arg;
open(FILE, ">" . $outfilename) || die
"Can't write $arg: $!\n";
print (FILE $msg);
close(FILE) || die "Can't close $arg:
$!\n";
}
} else {
print ($msg);
}
1;
Experienced Hacker
#include
#define S "Hello, World\n"
main(){exit(printf(S) == strlen(S) ? 0 :
1);}
Seasoned Hacker
% cc -o a.out ~/src/misc/hw/hw.c
% a.out
Guru Hacker
% cat
Hello, world.
^D
New Manager
10 PRINT "HELLO WORLD"
20 END
Middle Manager
mail -s "Hello, world." bob@b12
Bob, could you please write me a program
that prints "Hello, world."?
I need it by tomorrow.
^D
Senior Manager
% zmail jim
I need a "Hello, world." program by this
afternoon.
Chief Executive
% letter
letter: Command not found.
% mail
To: ^X ^F ^C
% help mail
help: Command not found.
% damn!
!: Event unrecognized
% logout
|
|
|
|