我来我网
https://5come5.cn
您尚未
登录
注册
|
菠菜
|
软件站
|
音乐站
|
邮箱1
|
邮箱2
|
风格选择
|
更多 »
vista
鍙よ壊涔﹂
card
wind
绮夌孩濂抽儙
帮助
统计与排行
无图版
我来我网·5come5 Forum
»
电脑技术
»
程序员之家
»
从入gate到精通,再到CEO
交 易
投 票
本页主题:
从入gate到精通,再到CEO
显示签名
|
打印
|
加为IE收藏
|
收藏主题
|
上一主题
|
下一主题
共产党人
∷
性别:
∷
状态:
∷
等级:
优秀会员
∷
发贴:
3353
∷
威望:
0
∷
浮云:
207
∷
在线等级:
∷
注册时间: 2006-11-24
∷
最后登陆: 2008-06-29
【
复制此帖地址
只看此人回复
】
5come5帮你背单词 [
sea
/si:/
n. 海,洋,大量
]
从入gate到精通,再到CEO
这是来自新加坡国立大学的一个页面,它记录了一个程序员从入gate到精通,再到黑客,再荣升经理和CEO时所写的代码,
正如我们访客所评论的那样,这位程序员从青蛙变成了[屏蔽],相信同为程序员的你,看了之后您会会心一笑,我们的生活何尝不是如此呢?
The Evolution of a Programmer
High School/Junior 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);
}
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
Posted: 2007-09-15 09:23 |
[楼 主]
天之痕
∷
性别:
∷
状态:
∷
等级:
人见人爱
∷
家族:
掌握文武半边天
∷
发贴:
2461
∷
威望:
0
∷
浮云:
1170
∷
在线等级:
∷
注册时间: 2007-09-16
∷
最后登陆: 2009-05-14
【
复制此帖地址
只看此人回复
】
5come5帮你背单词 [
oval
/'
ə
uv
ə
l/
a. 卵形的,椭圆形的;n. 卵形物
]
看来还是要一步一个脚印
Posted: 2007-10-19 12:07 |
[1 楼]
快速跳至
|- 站务管理
|- 惩罚,奖励公布区
|- 会员咨询意见区
|- 申请区
|- 已批准申请区
|- 威望和荣誉会员推荐区
|- 5come5名人堂·Hall of Fame
>> 休闲娱乐
|- 灌水乐园 大杂烩
|- 精水区
|- 幽默天地
|- 开怀大笑(精华区)
|- 灵异空间
|- 运动新时空·菠菜交流
|- 动之风.漫之舞
|- 新货上架
|- 古董挖挖
|- 唯美贴图
|- 创意&美化&设计
|- 5COME5头像及签名档图片引用专区
|- 艺术摄影
|- 音乐咖啡屋
|- 音道乐经
>> 热点讨论
|- 工作交流
|- 求职信息
|- 就业精华区
|- 同城联谊
|- 留学专版
|- 情感物语
|- 情感物语精华区
|- 带走一片银杏叶
|- 精华区
|- 新闻直通车
|- 众志成城,抗震救灾
|- 衣食住行
|- 跳蚤市场
|- 旅游出行
>> 学术交流
|- 学业有成
|- 智力考场
|- 考研专版
|- 外语乐园
|- 考试·毕业设计
|- 电子设计·数学建模
|- 学生工作·社团交流·RX
|- 电脑技术
|- 电脑F.A.Q.
|- 软件交流
|- 硬件·数码
|- 程序员之家
|- Linux专区
|- 舞文弄墨
|- 历史&文化
|- 军临天下
|- 军事精华区
|- 财经频道
>> 游戏新干线[电子竞技俱乐部]
|- Blizz@rd游戏特区
|- WarCraft III
|- 魔兽区档案库
|- 魔兽争霸3博彩专区
|- StarCraft(new)
|- 暗黑专区
|- 休闲游戏区
|- PC GAME综合讨论区
|- 实况足球专区
|- Counter-Strike专区
|- TV GAME& 模拟器
|- 网络游戏
>> 资源交流
|- 恋影部落
|- 连续剧天地
|- 综艺开心档
|- 书香小筑
|- 小说发布
|- 资源交流
|- 综艺、体育、游戏资源发布
|- 音乐资源发布区
|- 电影电视剧发布区
|- 字幕园地
我来我网·5come5 Forum
»
程序员之家
Total 0.009610(s) query 6, Time now is:11-23 03:44, Gzip enabled
Powered by PHPWind v5.3, Localized by
5come5 Tech Team
,
黔ICP备16009856号