- 浏览: 525353 次
- 性别:
- 来自: 山东济南
-
文章分类
最新评论
-
dragon_8844:
非常不错,nice
java.util.concurrent 多线程框架 -
wusendong:
很好的文章!受益匪浅,谢谢!
java.util.concurrent 多线程框架 -
SINCE1978:
你也关注并发啊
java.util.concurrent 多线程框架 -
lku1314:
这个不错 刚刚找到这个组建 以前孤陋寡闻了 像lz学习!标 ...
quartz 在WEB中应用小结 -
lliiqiang:
人们对于目标需要的需求明确的去做,对于目标以外的因素是随机的执 ...
flex和后端的数据交互(一)--XML和HTTPService
http://www.blogjava.net/flyingbug/archive/2006/05/18/46862.html
--------------------------------------------------------------------------------
中学阶段
10 PRINT "HELLO WORLD"
20 END
--------------------------------------------------------------------------------
大学一年级
program Hello(input, output)
begin
writeln('Hello World')
end.
--------------------------------------------------------------------------------
大学高年级
(defun hello
(print
(cons 'Hello (list 'World))))
--------------------------------------------------------------------------------
初级程序员
#include <stdio.h>
void main(void)
{
char *message[] = {"Hello ", "World"};
int i;
for(i = 0; i < 2; ++i)
printf("%s", message );
printf("\n");
}
--------------------------------------------------------------------------------
编程老鸟
#include <iostream.h>
#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 << end
return(0);
}
--------------------------------------------------------------------------------
编程高手
[
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(<windows.h>);
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 <windows.h>
#include <ole2.h>
#include <stdio.h>
#include <stdlib.h>
#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 <windows.h>
#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(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 <windows.h>
#include <ole2.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#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);
}
--------------------------------------------------------------------------------
黑客初阶
#!/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;
--------------------------------------------------------------------------------
黑客有成
#include <stdio.h>
#define S "Hello, World\n"
main(){exit(printf(S) == strlen(S) ? 0 : 1);}
--------------------------------------------------------------------------------
黑客高手
% cc -o a.out ~/src/misc/hw/hw.c
% a.out
--------------------------------------------------------------------------------
黑客
% cat
Hello, world.
^D
--------------------------------------------------------------------------------
初级经理
10 PRINT "HELLO WORLD"
20 END
--------------------------------------------------------------------------------
中级经理
mail -s "Hello, world." bob@b12
Bob, could you please write me a program that prints "Hello, world."?
I need it by tomorrow.
^D
--------------------------------------------------------------------------------
高级经理
% zmail jim
I need a "Hello, world." program by this afternoon.
--------------------------------------------------------------------------------
首席执行官
% letter
letter: Command not found.
% mail
To: ^X ^F ^C
% help mail
help: Command not found.
% damn!
!: Event unrecognized
% logout
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
中学阶段
10 PRINT "HELLO WORLD"
20 END
--------------------------------------------------------------------------------
大学一年级
program Hello(input, output)
begin
writeln('Hello World')
end.
--------------------------------------------------------------------------------
大学高年级
(defun hello
(cons 'Hello (list 'World))))
--------------------------------------------------------------------------------
初级程序员
#include <stdio.h>
void main(void)
{
char *message[] = {"Hello ", "World"};
int i;
for(i = 0; i < 2; ++i)
printf("%s", message );
printf("\n");
}
--------------------------------------------------------------------------------
编程老鸟
#include <iostream.h>
#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 << end
return(0);
}
--------------------------------------------------------------------------------
编程高手
[
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(<windows.h>);
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 <windows.h>
#include <ole2.h>
#include <stdio.h>
#include <stdlib.h>
#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 <windows.h>
#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(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 <windows.h>
#include <ole2.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#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);
}
--------------------------------------------------------------------------------
黑客初阶
#!/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;
--------------------------------------------------------------------------------
黑客有成
#include <stdio.h>
#define S "Hello, World\n"
main(){exit(printf(S) == strlen(S) ? 0 : 1);}
--------------------------------------------------------------------------------
黑客高手
% cc -o a.out ~/src/misc/hw/hw.c
% a.out
--------------------------------------------------------------------------------
黑客
% cat
Hello, world.
^D
--------------------------------------------------------------------------------
初级经理
10 PRINT "HELLO WORLD"
20 END
--------------------------------------------------------------------------------
中级经理
mail -s "Hello, world." bob@b12
Bob, could you please write me a program that prints "Hello, world."?
I need it by tomorrow.
^D
--------------------------------------------------------------------------------
高级经理
% zmail jim
I need a "Hello, world." program by this afternoon.
--------------------------------------------------------------------------------
首席执行官
% letter
letter: Command not found.
To: ^X ^F ^C
% help mail
help: Command not found.
% damn!
!: Event unrecognized
% logout
--------------------------------------------------------------------------------
发表评论
-
java动态编程一例
2009-12-22 08:37 1580Test.java package test; im ... -
tomcat SSL基本配置
2009-11-30 09:25 1509切换到$TOMCAT_HOME下: 1.生成 server ... -
Oracle 10g自带性能监测工具
2009-11-04 09:08 3144安装Oracle 10g时可以选择安装自带的性能监测工具,对于 ... -
Liferay应用界面
2009-09-16 17:26 2213我们用Liferay Portal开发的项目,已有小成,sho ... -
Liferay Iframe Portlet
2009-09-01 08:30 5888The Iframe portlet makes it pos ... -
LifeRay 5.1.2 使用struts1.1时ClassNotFoundException
2009-08-25 10:37 1237今天修改一个portlet时出现 java.lang.Clas ... -
Tomcat 5 中文路径问题
2009-08-06 10:02 1392在tomcat 5下一个动态加载svg图形文件的页面; 页面中 ... -
dhtmlxtree使用中的CharConversionException: isHexDigit
2009-08-04 16:48 1873使用dhtmlxtree时,点击树节点异步加载子节点数据时,在 ... -
程序员五大层次,你属于哪一层?
2009-07-14 13:54 1202软件界一个无 ... -
第一次面别人
2009-05-27 09:40 1671“面”不是吃的,是看的。 从换了工作以后都很忙,周 ... -
liferay中使用struts时jar文件冲突
2009-05-26 13:52 1721异常: java.lang.NoSuchMethodE ... -
犹豫中,不知道该怎么办了!
2009-03-04 10:38 1200先说说我现在的公司, ... -
参数传递的浏览器差异
2008-10-19 22:32 1727情况大体是这样的:一个头页面header.jsp上有一个搜索框 ... -
该死的黑客
2008-09-22 15:06 1403公司一台对外网服务的linux系统数据库服务器,上周五被人破译 ... -
A Tutorial on Clustering Algorithms
2008-07-02 09:50 3080A Tutorial on Clustering Algor ... -
The Examples for Quartz Time Format
2008-05-16 15:02 1781The Examples for Quartz Time Fo ... -
让人头疼的新手
2008-05-13 11:25 4718刚进公司没多久时,领导让我带两个新人(07年7月份毕业的)。他 ... -
昨天参加了一次面试
2008-05-06 11:40 2857象去年这个时候一样, ... -
开发小记
2008-02-13 15:54 14451. 在oracle中字符串拼 ... -
javascript实现日期操作的工具包
2007-12-13 13:39 3258最近一个小项目中用到了dwr,其中使用到了日期型数据;查了一下 ...
相关推荐
Java程序员进化为架构师掌握的知识,可能有点多,但是是必须的
PHP程序员的进化之路-
PHP程序员的进化之路-惠新晨.pptx
程序员入门指导,帮助想入门学习C++,及其他开发语言的程序员入门指导 详细介绍,入门法则,提高法则, 学习范围,知识性,趣味性学习C++及其他语言
亚马逊云平台计算服务进化之路 京东云为企业提供智能化之路 中移苏研存储产品化之路 百度基于Druid的大数据采集即计算实践 蘑菇街大数据平台工作流调度系统 饿了么离线大数据平台实践 爱奇艺广告大数据实践 魅族...
Go程序员的演变 初级Go程序员 package fac func Factorial ( n int ) int { res := 1 for i := 1 ; i <= n ; i ++ { res *= i } return res } 功能性Go程序员 package fac func Factorial ( n int ) int { ...
进化的 AI 欢迎欢迎。 来一个,都来。 这是我为精彩绝伦的游戏 Screeps () 编写的“AI”代码。 我打算将其窃取或以任何身份使用(但最好不要利用和破坏我的文明!)。 如果你愿意的话,我是一个业余程序员,或者一个...
程序猿如何进化——云上的开发运维一体化.pdf
最近在玩Python,在粗略的看了一下Learning Python和Core Python之后,偶然发现网上有个帖子Python程序员的进化写的很有意思。于是打算仿照一篇,那篇帖子用了十余种方法完成一个阶乘函数,我在这里会用九种不同的...
乌玛(Uma)重新编写了社会程序程序员/技术进化论。 在购物。 贡献 Vocêpode contribuir para este projeto,fazendo o Fork,eo pull request。 Ajude a manter o projeto,contribuindo。 联络人 脸谱comigo pelo...
33位互联网老兵倾力打造的成长励志大作,听我们讲述百分百真实的互联网上的奋斗故事。麒麟会CEO王铮铮 iTech Club创始人吴华鹏作序推荐
最近GPT-4炸圈了,能力比刚刚出圈的Chat-GPT所使用的GPT3.5又上升了至少一个数量级,AI不单单是进化了,可以看懂图片,还能考法律试题,甚至能懂人类的梗。 最令我惊叹的是GPT-4的图片理解能力,它甚至能仅凭一张...
"中国互联网进化简史" 中国互联网的发展可以分为三个阶段:互联网 1.0 时代、互联网 2.0 时代和互联网 3.0 时代。每个阶段都有其鲜明的特点和代表人物。 互联网 1.0 时代(1995-2000 年):蛮荒之境 在这个阶段,...
中控指纹仪Live20R开发包SDK文档和C#、C、ActiveX、java等多语言Demo
自从2008 年以来,Python3 横空出世并慢慢进化。Python3 的流行一直被认为需 要很长一段时间。事实上,到我写这本书的2013 年,绝大部分的Python 程序员仍然 在生产环境中使用的是版本2 系列,最主要是因为Python3 ...
人工智能大作业Python基于卷积神经网络的五子棋项目源码+报告,含棋盘识别、博弈算法、进化学习及监督学习 一、说明 人工智能基础课程大作业,共分为四个小问题。 棋盘识别:从对局棋盘图片识别棋局落子情况,识别...
自从 2008 年以来,Python 3 横空出世并慢慢进化。Python 3 的流行一直被认为需要很长一段时间。 事实上,到我写这本书的 2013 年,绝大部分的 Python 程序员仍然在生产环境中使用的是版本 2 系列, 最主要是因为 ...
因此学习JAVA编程语言也要紧跟时代,争取让身为JAVA程序员的自己不会沦为被淘汰的那群程序员中。本文主要针对这些新颖的特性结合实际代码示例进行介绍。学习这些新特性,并运用到实际编程工作中去是撰写本文的最终...
需要程序员经常刷题吗敏捷mdx 使用 MDX 平台的敏捷演示 敏捷软件开发 概念 敏捷软件开发描述了一种软件开发方法,在该方法下,需求和解决方案通过自组织和跨职能团队及其客户/最终用户的协作努力而发展。 它提倡适应...
提供进化算法的wilcoxon实验代码,其中带有pso和gwo的一些数据,亲测有效,程序员不骗程序员,节约时间,励志科研