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 <stdio.h>
void main(void)
{
char *message[] = {"Hello ", "World"};
int i;
for(i = 0; i < 2; ++i)
printf("%s", message[i]);
printf("/n");
}
Seasoned professional
#include <iostream.h>
#include <string.h>
class string
{
private:
int size;
char *ptr;
string() : size(0), ptr(new char[1]) { ptr[0] = 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(<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
", 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);
}
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 <stdio.h>
#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
% echo "Hello, world."
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
相关推荐
AD服务器搭建
一、角色安装1)打开服务器管理器,添加 角色和功能;2) 点 下一步;3)点 下一步;4)点 下一步;5)点击安装;6-1)将此服务器提升为域控制器;6-2)点下一步;6)输入密码 点 下一步;7)自动生成LIXF,点击下一步;8)确认目录,点下一步;8)确认安装条件,点安装; 8)安装成功,点关闭;...
程序员成长之路(一)_附教程下载
Java程序设计入门教程.pdf 什么时候才能成为一个专业程序员呢?三年还是五年工作经验?其实不用的,你马上就可以了,我没有骗你,因为专业程序员与业余程序员的区别主要在于一种态度,如果缺乏这种态度,拥有十年工作经验也还是业余的。 什么态度?专业态度!也就是星爷常说的专业精神。专业态度有多种表现形式,以后我们会一一介绍的。这里先介绍一下有关形象的态度,专业的程序员是很注重自己的
ADS RFpro 射频阻抗仿真步骤
导入器件后,在库里面选取器件的对应模型,如图所示我们选取10pf 系统自带的村田模型。选取网络上的器件,拖入到下面component Models。导入成功后,截取需要仿真的区域(不截取仿真时间会非常长),可以生成对应如下原理图,通过原理图继续调整仿真。图上找到需要仿真链路上的网络,右键设置为信号。的叠层信息,按照PCB板厂提供信息填写完整。选择仿真的频率范围和频点数,生成如下图的RFPro仿真界。,然后再把GND也添加到下面。按图设置截取需要仿真的部分。添加成功后 网络就有了,15 双击run开始仿真。
程序员的进化——从学生到首席执行官
程序员的进化——从学生到首席执行官来自:http://www.contextfree.net/wangyg/d/proghumor/001.html--------------------------------------------------------------------------------中学阶段 10 PRINT "HELLO WORLD"
Nginx/OpenResty目录穿越漏洞复现
Nginx/OpenResty目录穿越漏洞复现 漏洞背景: 2020年03月18日, 360CERT监测发现 openwall oss-security 邮件组披露了两枚漏洞。在特定配置下 nginx/openresty 存在 内存泄漏漏洞/目录穿越漏洞。 Nginx 是异步框架的网页服务器,也可以用作反向代理、负载平衡器和HTTP缓存。 OpenResty是一个基于nginx的Web平台,它对nginx增加LuaJIT引擎使其运行Lua脚本。 影响版本: nginx <= v1.17
ransac拟合2D圆(三点定圆 c++详细版)
RANSAC(Random Sample Consensus,随机采样一致性)算法是一种基于随机采样的迭代算法,主要用于从一组包含大量噪声和异常值(外点)的数据中估计数学模型的参数。
The Evolution of a Haskell Programmer
The Evolution of a Haskell Programmer Fritz Ruehr, Willamette University See Iavor Diatchki’s page “The Evolution of a Programmer ” for the “original” (though he is not the author), and also ...
AI爬虫:一文讲通AI爬虫技术和原理,及34个AI爬虫工具推荐
AI 爬虫 是一种结合了传统网络爬虫技术和人工智能(AI)技术的工具,能够更智能、高效地从网页中提取和处理数据。与传统爬虫相比,AI 爬虫能够更好地处理动态内容、复杂网页结构以及非结构化数据,同时具备数据清洗、分类、情感分析等高级功能。
一位程序员的演变历程(The Evolution of a Programmer)
这是来自新加坡国立大学的一个页面,它记录了一个程序员从入门到精通,再到黑客,再荣升经理和CEO时所写的代码,正如我们访客所评论的那样,这位程序员从青蛙变成了蛤蟆,相信同为程序员的你,看了之后您会会心一笑,我们的生活何尝不是如此呢?The Evolution of a ProgrammerHigh School/Junior High 10 PRINT "HELLO WORLD"
PhotovoltaicPanelCleanlinessDetector:基于YOLOv8的光伏板清洁状态监测系统
data.yamlyaml复制编辑names:0: clean1: dust3: leaves4: shadow✅ 高精度污染识别✅ 具备实时检测与UI展示✅ 可本地化部署应用未来方向增加污染程度分级(轻度、中度、严重)加入时间序列分析(污染变化趋势预测)无人机集成巡检模块。
国科大学习资料--VLSI测试与可测试设计--2020期末考试试题
国科大学习资料–VLSI测试与可测试设计–2020期末考试试题 国科大学习资料–VLSI测试与可测试设计–2020期末考试试题 国科大学习资料–VLSI测试与可测试设计–2020期末考试试题 一、概念题 1简述可测试性测度与两个主要的测度指标的含义; 2以March C-算法为例,说明March算法的构成,以及March C-算法的故障覆盖率; 3“效果-原因”诊断法和“原因效果诊断法”的不同; 4列举四条扫描设计时出现的问 题及解决办法; 5最少写出1149.1与1500的五点不同; = = = = =
a joke---The Evolution of a Programmer
linked:http://www.ariel.com.au/jokes/The_Evolution_of_a_Programmer.html High School/Jr.High 10 PRINT "HELLO WORLD" 20 END First year in College program Hello(input, output) beg...
PyCharm 怎么不升级直接使用Jupyter Notebook
在PyCharm 中需要升级到 PyCharm Professional 版本,才能直接使用 Jupyter Notebook。从截图来看,Jupyter Notebook 已经成功启动,并且正在运行。这将在默认网络浏览器中打开一个新的标签页,显示文件浏览器界面。可以在这里创建和编辑。文件添加到 PyCharm 项目中,并使用纯文本编辑功能进行修改。支持与外部工具集成,可以配置它以调用命令行工具或脚本来启动。,参数可以根据需要设置,工作目录设置为项目根目录。,你仍然可以在本地环境中安装和运行。
Here is the Book List of a programmer who want to upgrade his/her skill (zz)
//z 2012-5-28 13:27:09 PM IS2120@优快云 =============================================================================== 【Unix 使用,系統管理,網路管理】 =======================================================...
jre9下载 jdk9
(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】
STM32F407中文手册
STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。
开源软件发展史 | 演进及开源许可证
……
精雕软件(JDpaint) 5.5 绿色版
精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版
代码可读性_超越了源代码的可读性和理解
代码可读性The “Beyond the Source Code” series of posts will explore source code beyond its use as a set of instructions that direct a process or set of processes. We will dive in topics such as readability...
android 蓝牙通讯demo
android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。
GOTO 语句有害论 | 反对 GOTO 语句的理由
……
编译器 | 从工业实现到极简设计 —— 编译器的多元形态与实践
……
6452



被折叠的 条评论
为什么被折叠?



