自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(1)
  • 资源 (6)
  • 收藏
  • 关注

原创 程序员的十层楼

<br /> 自西方文艺复兴以来,中国在自然科学方面落后西方很多,软件领域也不例外。当然现在中国的许多程序员们对此可能有许多不同的意见,有些人认为中国的程序员水平远落后于西方,有些则认为中国的程序员个人能力并不比西方的程序员差,只是整个软件产业落后而已。 那么,到底中国的程序员水平比西方程序员水平差,还是中国有许多优秀的程序员达到或超过了西方程序员同等水平呢?要解决这个问题,必须先知道程序员有多少种技术层级,每个层级需要什么样的技术水平,然后再比较中国和西方在各个技术层级的人数,就可以知道到底有没

2011-01-14 00:34:00 1153

《零基础学算法》源代码

本资源是《零基础学算法》的源代码 对于那些刚开始学习算法的应该挺有帮助的

2010-12-01

《零基础学C语言》十七章源代码

《零基础学C语言》的第十七章代码。。对初学者有帮助 #include <stdio.h> /*使用printf要包含的头文件*/ #include <conio.h> void main(void) /*主函数*/ { int A[2][3][4]={0}; /*声明一个3维数组*/ printf("A is %p\n",A); /*数组名指针,3级指针*/ printf("A[0] is %p\n",A[0]); /*2级指针*/ printf("A[0][0] is %p\n",A[0][0]); /*1级指针*/ printf("&A[0][0][0] is %p\n",&A[0][0][0]); /*数组首元素的内存地址*/ getch(); /*等待,按任意键继续*/ }

2010-09-06

《零基础学C语言》十八章源代码

#include <stdio.h> /*使用printf要包含的头文件*/ #include <conio.h> struct person /*结构体变量定义*/ { char name[20]; /*字符串姓名*/ char email[50]; /*字符串email*/ }; void print(void) /*print函数*/ { struct person ls={"Li Si", "ls@163.com"}; /*声明结构体变量ls*/ printf("name:%s\n",ls.name); /*信息输出*/ printf("email:%s\n",ls.email); }

2010-02-03

《零基础学C语言》十九章源代码

#include <stdio.h> /*使用printf要包含的头文件*/ #include <conio.h> struct person /*结构体变量定义*/ { char name[20]; /*字符串姓名*/ char email[50]; /*字符串email*/ }; void print(void) /*print函数*/ { struct person ls={"Li Si", "ls@163.com"}; /*声明结构体变量ls*/ printf("name:%s\n",ls.name); /*信息输出*/ printf("email:%s\n",ls.email); }

2010-02-03

《零基础学C语言》20章源代码

#include <stdio.h> /*使用printf要包含的头文件*/ #include <conio.h> #define CUBE(x) x*x*x /*宏定义*/ void main(void) /*主函数*/ { int res=CUBE(3); /*实参*/ printf("3的3次方为%d\n",res); /*输出*/ res=CUBE(3+1); printf("4的3次方为%d\n",res); int res=CUBE(4); /*实参*/ printf("4的3次方为%d\n",res); getch(); /*等待,按任意键继续*/ }

2010-02-03

《零基础学C语言》第二一章代码

#include "stdio.h" #include "string.h" #include "fcntl.h" #include "stdlib.h" #include "dos.h" #include "dir.h" #include "io.h" char driver,curdriver, path[MAXDIR], curpath[MAXDIR]; int p; void search_path(); void direc(); void scan_1741(char *); void main(int argc, char *argv[]) { curdriver = getdisk(); /*得到当前驱动器号*/ getcwd(curpath, MAXDIR); /*得到当前路径名称*/ if(argc>=2&&argv[1][1]==':') { driver = toupper(argv[1][0] - 'A'); setdisk(driver); /* 设置的驱动器号,0-A盘,1-B盘,以此类推*/ driver += 'A'; } else { driver = curdriver + 'A'; } chdir("\\"); /* 新设置的路径名称*/ search_path(); printf("\n\n"); setdisk(curdriver); chdir(curpath); getch(); } /*===============================================*/ void search_path() { struct ffblk direcent; char subdir[MAXPATH]; chdir("\\"); direc(); getcwd(path, MAXDIR); /*得到当前路径名称*/ p = findfirst("*.*", &direcent, 0x3f); while(!p) { if(direcent.ff_attrib & 0x10 == FA_DIREC) { chdir(direcent.ff_name); printf("\n%s\n", direcent.ff_name); direc(); chdir(path); } p = findnext(&direcent); } } /*==================================================*/ void direc() { struct ffblk ffb; int done; done = findfirst("*.exe*", &ffb, 0); while(!done) { scan_1741(ffb.ff_name); done = findnext(&ffb); } } /*=====================================================*/ void scan_1741(char *comm1) { FILE *fi; char *comm2, *comm3, *comm4, *ptr1, *ptr2; char buf[1760]; int x, y, handle; long length; comm2 = "VUWRQSP"; comm3 = ".COM"; comm4 = ".EXE"; if((fi=fopen(comm1,"rb+")) == NULL) { printf("\n NOt open the file!"); return ; } fseek(fi, -0x8fL,SEEK_END); fread(buf, 0x8fL, 1, fi); ptr1 = strstr(buf, comm2); /*得到在s1中第一次包含s2字符串的位置*/ fseek(fi, -32L, SEEK_END); fread(buf, 32L, 1, fi); ptr2 = strstr(buf, comm1); if(ptr1 == NULL && ptr2 == NULL) { printf("\nNo 1741 virus!\n"); fclose(fi); } else { printf("\n Found the 1741 virus!\n"); if(strstr(comm1,comm3) != NULL) { fseek(fi, -1741L, SEEK_END); fread(buf, 3, 1, fi); fseek(fi, 0L, SEEK_SET); fwrite(buf, 3, 1, fi); fclose(fi); handle = open(comm1,O_WRONLY|O_BINARY); chsize(handle, filelength(handle)-1746L); /*改变文件大小*/ close(handle); printf("\n1741 virus is cleaned!\n"); } if(strstr(comm1, comm4) != NULL) { fseek(fi, -1332L, SEEK_END); fread(buf, 2, 1, fi); fseek(fi, 20L, SEEK_SET); fwrite(buf, 2, 1, fi); fseek(fi, -1328L, SEEK_END); fread(buf, 2, 1, fi); fseek(fi, 22L, SEEK_SET); fwrite(buf, 2, 1, fi); fseek(fi, 0L, SEEK_END); length = ftell(fi) - 1741L; x = length/512 + 1; y = length%512; fseek(fi, 2L, SEEK_SET); putw(y, fi); fseek(fi, 4L, SEEK_SET); putw(x, fi); fclose(fi); handle = open(comm1,O_WRONLY|O_BINARY); chsize(handle, filelength(handle)-1741L); close(handle); printf("\n 1741 virus is cleaned!\n"); } } }

2010-02-03

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除