02. May 2007

An Apple a day keeps …. away

apple.PNG

16. April 2007

Evolution of a Programmer - Printing Hello World.

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 < string.h>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 libraryimportlib(”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(< ole2.h>);
importheader(< except.hxx>);

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 < ole2.h>

#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(dwRegistrat ion);
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 */

0×2573F891,

0xCFEE,

0×101A,

{ 0×9A, 0×9F, 0×00, 0xAA, 0×00, 0×34, 0×28, 0×20 }
};

UUID LIBID_CHelloLib = { /* 2573F890-CFEE-101A-9A9F -00AA00342820 */
0×2573F890,

0xCFEE,
0×101A,

{ 0×9A, 0×9F, 0×00, 0xAA, 0×00, 0×34, 0×28, 0×20 } };
#include

#include < ole2.h >

#include < stdlib.h > #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);

}

Program Manager


“Program Manager” < pm@company.com >
06/14/2006 03:32 PM
 
To teamworker@company.com
ccSubject Urgent,  
Dear Team Member,
Please write a program to print “Hello World” before the EOD.

With regards, PM.

11. April 2007

A Story somehow related to …So called IT Proffessionals

A butcher watching over his shop is really surprised
when he sees a dog
coming inside the shop. He shoos him away. But later,
the dog is back
again. So, he goes over to the dog and notices it has
a note in its mouth.
He takes the note and it reads “Can I have 12 sausages
and a leg of lamb,
please”. The dog has money in its mouth, as well. The
butcher looks inside
and, there is a ten dollar note there. So he takes the
money and puts the
sausages and lamb in a bag, placing it in the dog’s
mouth.

The butcher is so impressed, and since it’s about
closing time, he decides
to shut the shop and follow the dog. So off he goes.
The dog is walking
down the street, when it comes to a level crossing;
the dog puts down the
bag, jumps up and presses the button. Then it waits
patiently, bag in
mouth, for the lights to turn. They do, and it walks
across the road, with
the butcher following him all the way.
The dog then comes to a bus stop, and starts looking
at the timetable. The
butcher is in awe as the dog stops a bus by pulling
its left leg up and
gets in it. The butcher follows the dog into the bus.
Then the dog shows a
ticket which is tied to its belt to the bus conductor.
The butcher is
nearly fainting at this sight, so are the other
passengers in the bus. The
dog then sits near the driver’s seat looking outside
waiting for the bus
stop to come. As soon as the stop is in sight, the dog
stands and wags its
tail to inform the conductor. Then, without waiting
for the bus to stop
completely, it jumps out of the bus and runs to a
house very close to the
stop. It opens the big Iron Gate and rushes inside
towards the door.
As it approaches the wooden door, the dog suddenly
changes its mind and
heads towards the garden. It goes to the window, and
beats its head against
it several times, walks back, jumps off, and waits at
the door.
The butcher watches as a big guy opens the door, and
starts abusing the
dog, kicking him and punching him, and swearing at
him.
The butcher surprised with this, runs up, and stops
the guy. “What in
heaven’s name are you doing? The dog is a genius. He
could be on TV, for
the life of me!” to which the Guy responds: “You call
this clever? This is
the second time this week that this stupid dog’s
forgotten his key.”

*Moral of the story: You may continue to exceed onlooker’s expectations but shall always fall short of the boss’ expectations. It’s dog’s life after all……………...

27. March 2007

Wired.com lists top 40 Innovative companies of 2007

Numbers after the names represent the corresponding companies rank in the previous year

1 Google | 1
The masters of the universe are busily converting ad dollars into a global network of fiber lines and data centers. A plan etary computer crunching ever- larger mountains of bits is an invention of historic import. Google’s power to inspire both awe and fear continues to grow.

2 Apple | 2
Tired: MP3 players. Wired: mobile handsets! And why not? Especially if the Apple crew can stuff most of a Mac into a futuristic gadget straight out of Minority Report. Cell phone + iPod + social networking = marketer’s dream.

3 Genentech | 4
When you target specific biological mechanisms, your drugs can sidestep the one-disease rut: Avastin has been OK’d for a growing list of cancers. And since 20 new drugs are set to enter the pipeline by 2010, the chances for more multiple hits are good.

4 Samsung | 3
Mobile handsets have joined PCs as the focus of some of high tech’s most brutal slugfests. Samsung’s upmarket strategy protects margins - a tactic it has been using to batter Sony in home theater and camcorders. Too bad about that iPhone.

5 News Corp. | 9
Why fly capital-sucking TV satellites when you’ve got 90 million MySpacers glued to their screens? King Rupert is feeding the greatest frenzy of media populism since the birth of the tabloid press. Now he needs to convert it into broadcast-style revenue.

6 Nintendo new!
Hot graphics? Nah. What’s delighting gamers - and blowing the smirk off Sony’s face - is the Wii’s acrobatic controller. Selling a million consoles a month gives the Pok master a happy challenge: turning a runaway hit into an enduring franchise.

7 Salesforce.com | 15
The pioneering purveyor of Web-based business apps keeps swiping small and midsize clients from giant rivals Oracle and SAP. Latest cool tool: a one-stop online marketing platform that ports your campaign directly to Google AdWords.

8 Cisco | 12
As the petabits surge, Cisco keeps outflanking cut-rate competitors and surfing the flood of online video. VoIP gear and set-top boxes contribute to ’90s-style earnings growth. Now CEO John Chambers hopes to sell the world on wall-size, hi-def telepresence.

9 General Electric | 8
Good-bye to the slow-lane plastics division. Hello to avionics, security systems, and medical labs in a box. Edison’s heirs keep doubling down on products too big, gnarly, or capital-intensive for companies that haven’t been ruling Big Tech for a century.

10 Nvidia | 21
Three trillion operations per second make for a killer demo: hyper-real renderings of glamazon Adrianne Curry. But the new GeForce 8800 chip is alsospeedy enough to launch gaming’s graphics powerhouse into totally new markets, like gene sequencing.

11 Baidu new!
In China, Google is just another imported also-ran. Baidu, which handles more than 60 percent of the country’s searches, is teaming up with recording giant EMI to deliver ad-supported music. On demand: the biggest hits from Hong Kong and Taiwan!

12 Toyota | 7
How about a buff Tundra CrewMax truck - with a dashboard nav screen that also displays the view from a tailgate-mounted camera - to tow your groovy Prius? Toyota doesn’t confine all that cool tech to little green geekmobiles.

13 SunPower | 17
Acquiring installation specialist PowerLight gives SunPower total command of the solar food chain, from R&D to rooftop. The plan is to shear overall system costs in half, enough to let sunshine compete head-on with cheap coal-fired grid power.

14 Infosys | 11
So much for cut-rate coding. The rajas of outsourcing are taking on R&D and computer-aided engineering. But the work is still massively human-intensive, which means battling upstart rivals to hire more than 500 new Infoscions a week.

15 Medtronic | 16
A chest implant that transmits vital signs to the Web for your cardiologist to view - the boomer iPhone! Medtronic’s $25,000 pacemaker-like device is just the start. Look for similar innovations that treat epilepsy, obesity, and depression.

16 Level 3 new!
Wiring the planet with fiber optics really was a great idea - it just took a while for YouTube and friends to come up with the petabits to make it pay. Level 3 boasts 50,000 miles of prime Net backbone. Now it can start working off that $6 billion in debt.

17 Exelon | 33
Emission caps? Carbon taxes? No worries when two-thirds of the 25,000 megawatts you produce are atom-powered. Exelon is aiming to build the first new US reactor in a generation. Now, if Uncle Sam would kindly figure out where to stash spent nuclear fuel.

18 Netflix | 14
CEO Reed Hastings is either a stone-cold visionary or the Hamlet of online media. After three years of indecision, Netflix is finally serving (B-list) movies online to select subscribers. Upgrade price tag: $40 million, most of last year’s DVD-by-mail profit.

19 Verizon | 22
Leading the telco charge against cable, Verizon’s 50-Mbps fiber-to-the-home service is almost twice as fast as its last rollout. Woo-hoo! Now competition has to bring stratospheric prices - upwards of $90 a month - down to earth.

20 Electronic Arts | 13
The King Kong of interactive games needs big hits to justify its Hollywood-size overhead and keep itself in bananas. Speed, sports, and shooter franchises all continue to pull their weight - but just barely. Spore needs to soar.

21 Monsanto | 25
Frankencorn engineered for ethanol production is so 2006. Bring on the trans-fat-free soybeans! After years of fighting cultural headwinds, Monsanto is finally figuring out how to go with the flow. Climate-change special: drought-tolerant corn.

22 Garmin new!
GPS technology has infiltrated cockpits, dashboards, and handhelds. Now industry leader Garmin is making the crucial leap into networked smartphones, laptops, and PTAs - that’s personal travel assistants. Let 10,000 localized services bloom.

23 Amazon.com | 6
Trying to be all stores to all shoppers, Amazon has to compete on a thousand fronts. Now CEO Jeff Bezos is bravely trying to mine value from the back end by offering to handle everything from computing to ecommerce for other businesses.

24 NTT DoCoMo new!
Fat and happy, Japan’s wireless Godzilla keeps ramping up its technology while the rest of the mobile world battles with debt. A hundred megabits a second? Coming right up. Linux for mobile? Domo arigato. Not everything big telcos do is evil.

25 EMC | 26
Disney Studios’ post-Pixar remodel includes two EMC CX3-80 storage networks - just the thing for stashing 1 billion 3-D textures. For the king of data warehousing, though, today’s big opportunity is selling digital closet space for online video.

26 Intercontinental Exchange new!
Once a back-room specialty, energy trading is now center stage. As the leading futures exchange for fossil fuels, electric power, and even emissions, the ICE is hot. Check its 2006 stock chart - up 300 percent - and weep.

27 Comcast | 39
Someday, bitstreams will be metered like water and electricity. Until then, Comcast’s fiesta of digital cable, VOD, DVR, and “triple play” connectivity rules. The challenge: fending off party-crashing telcos, satellite broadcasters, and online insurgents.

28 BP | 31
Oil spills and exploding refineries provide more incentive than ever for the number three oil company to move “beyond petroleum.” The recent $500 million investment in an alt-energy institute is a high profile step in that direction - and less than a week’s profit.

29 Disney new!
It’s the wedding of Hollywood and Silicon Valley, Rev. Steve Jobs presiding. Disney boldly took the iTunes plunge. Now John Lasseter is sprinkling Pixar dust over its studios and theme parks. Can CEO Bob Iger devise a digital makeover for the rest of Mouse house?

30 Yahoo | 5
Five hundred million users can’t be that wrong. Sure, Yahoo got stomped by the most spectacular upstart in business history. But big-brand advertisers, fearing Google uber alles, are pulling for Yahoo’s new Panama ad platform.

31 Boeing new!
Burt Rutan isn’t the only engineering visionary building edgy new planes. Fast, fuel-efficient, and rivet-free, Boeing’s carbon-fiber 787 Dreamliner will be the first truly 21st-century sky ride when it hits the runway next year. Sorry, Airbus.

32 eBay | 19
The perfect Internet business model generates outsize expectations - which means mistakes cost double. Wall Street slammed eBay for bungling in China and pissing off power sellers. Good thing PayPal and Skype are finally starting to earn their keep.

33 Flextronics | 23
The Santa’s workshop of globalization designs, builds, and ships everything from cell phones to printers - and now Lego blocks. Its hyperefficient supply chain fuels a Cambrian explosion of converging devices. And you gotta love what it does for prices.

34 Corningnew!
In high tech, glass used to mean fiber optics. Today, screens are the hot commodity, and Corning supplies LCD substrate to manufacturers like Samsung and Sharp. As prices for flat screens fall and volume soars, the glassmaster profits.

35 Gen-Probe | 35
Gen-Probe’s nucleic-acid tests screen more than 80 percent of the US blood supply, flagging HIV-1, hepatitis C, and West Nile. Assays for prostate cancer are already approved in Europe. Top priority: rapid detection of E. coli and other food-borne pathogens.

36 TSMC | 30
Astrophysicists are over the moon about the new Sing 512-core CPU, destined to simulate the cosmos in a next-gen supercomputer. Who etched its delicate traces? TSMC. The fab-for-hire does the clean-room dirty work so chip wizards can focus on design.

37 Lenovo | 29
Talk about global - the world’s number-three PC maker rotates its headquarters between Beijing, Singapore, Paris, and Raleigh, North Carolina. Lenovo is leveraging low-cost Chinese R&D into cool features like laptops secured by facial recognition.

38 IBM | 18
Its engineering ranks have been decimated by the shift to lucrative IT services, but Big Blue can still punch like a heavyweight. Proof: Linux server code, chips powering all three top game consoles, and social networking software for the suit set.

39 Intel | 24
The empire strikes back. AMD’s ambush of the PC processor market precipitated a hail of new Intel marvels, like a supercomputer on a chip that uses less power than a lightbulb. Now Apple and Sun have Intel inside. Don’t mess with smart, wealthy paranoids.

40 Microsoft | 36
Wanted: second career for rich, fat, nervous ex-monopolist. Desktop software is vanishing into the cloud, and as balance-sheet replacements, Xbox and Zune don’t pass the laugh test. Luckily, $31 billion in rainy-day money buys time and options. (But not Google.)

01. March 2007

HUMOROUS HRD NOTICE OF A COMPANY TO ALL EMPLOYEES

[ A circular was found in one of the office notice boards ]

Dear STAFF ,

Please be advised that these are NEW rules and regulations implemented to raise the efficiency of our firm.

____________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ ___

1) TRANSPORTATION:

It is advised that you come to work driving a car according to your salary.

a) If we see you driving a Honda, we assume you are doing well financially and therefore you do not need a raise.

b) If you drive a 10 year old car or taking public transportation, we assume you must have lots of savings therefore you do not need a raise.

c) If you drive a Pickup, you are right where you need to be and therefore you do not need a raise.

2) ANNUAL LEAVE :

Each employee will receive 52 Annual Leave days a year ( Wow! said 1 employee).

- They are called SUNDAYs.

3) LUNCH BREAK:

a) Skinny people get 30 minutes for lunch as they need to eat more so that they can look healthy.

b) Normal size people get 15 minutes for lunch to get a balanced meal to maintain their average figure.

c) Fat people get 5 minutes for lunch, because that's all the time needed to drink a Slim Fast and take a diet pill.

4) SICK DAYS:

We will no longer accept a doctor Medical Cert as proof of sickness.

- If you are able to go to the doctor, you are able to come to work.

5) TOILET USE:

Entirely too much time is being spent in the toilets.

a) There is now a strict 3-minute time limit in the cubicles.

b) At the end of three minutes, an alarm will sound, the toilet paper roll will retract, the door will open and a picture will be taken.

c) After your second offence, your picture will be posted on the company bulletin board under the “Chronic Offenders” category.

d) Subsequent pictures will be sold at public auctions to raise money to pay your salary.

6) SURGERY :

As long as you are an employee here, you need all your organs.

- You should not consider removing anything. We hired you intact.

- To have something removed constitutes a breach of employment.

7) INTERNET USAGE :

All personal Internet usage will be recorded and charges will be deducted from your bonus (if any) and if we decide not to give you any, charges

will be deducted from your salary.

- Important Note: Charges applicable as Rs.20 per minute as we have 4MB connection.

Just for information, 73% of staff will not be entitled to any salary for next 3 months as their Internet charges have exceeded their 3 months salary.

____________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ ____

Thank you for your loyalty to our company. We are here to provide a positive employment experience.

Therefore, all questions, comments, concerns, complaints, frustrations, irritations, aggravations, insinuations, allegations, accusations, contemplation, consternation and input should be directed elsewhere.

27. February 2007

Again!!!!!!!!!!!! ….. Blogger Error… is it happening only with me ??

Just now i was surfing through a blog

http://www.projetocarpediem.blogspot.com/
and i wanted to view blogger's profile .. again blogger beta threw me an error like

HTTP Status 503 - Servlet NewFrontend is currently unavailable

type Status report

message Servlet NewFrontend is currently unavailable

description The requested service (Servlet NewFrontend is currently unavailable) is not currently available.
Apache Tomcat/4.1.24

i dunnno what's happening in blogger website or is it only with me that i m getting such errors… i have already posted an error (java error) in my previous post..

below is the screenshot click on the image to enlarge it.

« Previous Entries   Next Entries »