自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(38)
  • 资源 (2)
  • 收藏
  • 关注

转载 MFC对话框创建和销毁窗口时,函数的调用顺序

以下是一点资料供参考,非模态对话框的销毁顺序:MFC应用程序中处理消息的顺序1.AfxWndProc()      该函数负责接收消息,找到消息所属的CWnd对象,然后调用AfxCallWndProc2.AfxCallWndProc()  该函数负责保存消息(保存的内容主要是消息标识符和消息参数)供应用程序以后使用,                    然后调用WindowPro

2012-11-14 15:02:22 656

原创 C++ primer 根据家族名查找所以的家族成员的名和生日

//============================================================================// Name : mapExam01.cpp// Author : // Version :// Copyright : Your copyright notice// Descript

2012-06-18 22:45:35 679

原创 查找最长和最短单词

//============================================================================// Name : stringExam04.cpp// Author : // Version :// Copyright : Your copyright notice// Descr

2012-06-17 16:18:43 879

原创 C++ prime查找字母和数字

#include #include #include #include #include #include using namespace std;void vession1(const string &dst,const string &num,const string &chara){ string::size_type pos3=0; while

2012-06-17 14:37:45 1108

翻译 bank 程序

CycQueue.h#include #include #include #define queuemax 15typedef struct { int mum; long time;}DATA;typedef struct { DATA data[queuemax]; int head; int tail;}CycQueue;Cyc

2012-04-21 22:23:18 540

转载 C++ JBACKUP

JBACKUP #include #include #include #define FILEMAX 300 // allow max. 300 files in each directory typedef struct _DESTFILE { WIN32_FIND_DATA fd;

2011-11-27 10:33:29 445

转载 C语言实现查看单精度浮点数的存储格式

#includetypedef union FloatData { float f; unsigned char h[4]; }FLOAT; int main() { float tmp; FLOAT t; p

2011-11-20 16:05:32 805

转载 C可变参数函数

#includeint max(int n,...){ char *paras; int max=0; int i=0; int temp; paras=(char *)&n +sizeof(n); while(n-->0) { temp=*(int *)(paras+(i++)*sizeof(n));

2011-11-19 20:30:03 350

原创 C实现获取文件的后缀名

#include#include#includevoid get_extension(const char *file_name,char *extension){ int i=0,length; length=strlen(file_name); while(file_name[i]) { if(file_name

2011-11-16 21:22:44 9282 1

原创 C语言现代方法之实现字符串的替换

#includechar *censor(char a[],char b[]){ int j=0; while(a[j]) { if(a[j]==b[0] && a[j+1]==b[1] && a[j+2]==b[2]) { a[j]='x'; a[j+1]='x';

2011-11-16 20:57:21 849

转载 sed手册

原始链接:http://phi.sinica.edu.tw/aspac/reports/96/96005/SED 手册中央研究院计算中心ASPAC 计划[email protected]技术报告: 960051996年12月1日Version:1.0-----------------------------------------------------

2011-11-02 20:01:42 762

原创 bash shel脚本创建一个名为datafile的文本文件(除非已存在了这个文件)。文件中的每条记录都包含由冒号分隔的字段

创建一个名为datafile的文本文件(除非已存在了这个文件)。文件中的每条记录都包含由冒号分隔的字段。记录包含的字段是:a) 名和姓b)电话号码c)地址d)出生日期e)工资#!/bin/bashwhile true;doread name number address birth count set $name $number $address $birth

2011-11-01 23:30:56 3415

原创 bash 脚本 实现文件的重命名

#!/bin/bashset -xif [ $# -lt 2 ];then echo "Usage:rename oldfilename newfilename"exit 1; fioldfilename=`dirname "$1"`/`basename "$1"`newfilename=`dirname "$2"`/`basename "$2"`if [ ! -

2011-11-01 22:42:50 2262

转载 Linux目录结构

下面以Red Hat Enterprise 4 AS 为例,详细列出了Linux 文件系统中各主要目录的存放内容。  /bin  bin 就是二进制(binary)英文缩写。在这里存放前面Linux 常用操作命令的执行文件, 如mv、ls、mkdir 等。有时,这个目录的内容和/usr/bin 里面的内容一样,它们都是放置一般用户使用的执行文件。  /boot  这个目录下存放操作系统启动

2011-11-01 12:33:35 364

原创 C实现字符串的移动

#includevoid move(int a[],int n,int i);int main(){ int a[20],n,m,i; printf("input the numbers:\n"); scanf("%d",&n); for(m=0;m<n;m++) { scanf("%d",&a[m]); }

2011-10-31 20:57:01 791

原创 C代码实现Armstrong数

【问题描述】Armstrong数具有如下特征:一个n位数等于其个位数的n次方之和。如: 153=13+53+33 1634=14+64+34+44 找出2、3、4、5位的所有Armstrong数。 #includevoid a(int);int main(void){ int k=0; for(k=2;k<=5;k++) { a(

2011-10-31 17:12:13 1855

原创 C语言实现/etc/passwd的逐行显示并打印行号和用户名

#include#includeint main(){ FILE *fp; char *str; int sum=0,i=0,j=0; char a[20]={'\0'};fp=fopen("/etc/passwd","rb");if(fp==NULL){ perror("read the passwd file error"); exit(1)

2011-10-31 15:17:45 2922

原创 不知道咋了

#include#include#include#define MAX_DIGITS 10int segments[MAX_DIGITS][7]={{1,1,1,1,1,1,0}, {0,1,1,0,0,0,0}, {1,0,0,1,1,0,1},

2011-10-30 17:09:04 404

原创 c现代编程 模拟投掷骰子的游戏

c现代编程 模拟投掷骰子的游戏 #include#include#include#define N 6int roll_dice(void);int play_game(void);int response(void);int main(){ int c,m=0,n=0; srand((unsigned) time(NULL));

2011-10-30 14:11:40 2662 2

原创 shell实现寻找合适分区的脚本

MAXSIZE=`df -a | grep -v 'Filesystem' | grep "/file[1-9][0-9]*"; |awk '{print $4}' |sort -n -u -r |head -1` if [ $MAXSIZE -lt 15728640 ];then echo "15G must have!" exit 1 fifi list

2011-10-25 16:43:13 538

原创 C语言实现检查单词是否为变位词(相同字母的重新排列)

#includeint main(){ int a[26]={0},i=0,n=0,j=0; int arr[20]={0}; char ch='\0'; printf("Enter first word:"); ch=getchar(); while(ch != '\n') { if(ch>='A' && ch<=

2011-10-24 22:20:37 8374 8

原创 selinux 状态修改为disabled

cd /etc/selinuxcat config |sed "s/\(SELINUX=\).*/\1disabled/" >bmv b config

2011-10-24 20:29:45 6820

原创 显示本机IP

ifconfig |grep "inet addr" |cut -d : -f 2 |sed 's/[a-zA-Z]//g' |grep -v "127.0.0.1"

2011-10-24 15:36:18 278

原创 自动化脚本框架1

automatic(){ list=`echo $list | tr ' ' '\n' | sort -u | tr '\n' ' '` for test_num in $list do case $test_num in 1|2|3|4)

2011-10-24 13:17:00 495

原创 C实现加密技术

#includeint main(){ char ch,a[80]={'\0'}; int n=0,m=0,i=0; printf("Enter message to be encrypted:"); ch=getchar(); while(ch!='\n') { a[i++]=ch; ch=getchar();

2011-10-23 21:54:10 524

原创 C语言实现 计算句子的平均句长

#includeint main(){ char ch,a[80]={'\0'}; int i=0,n=0,m=0,j=1; printf("Enter a first and last name:"); ch=getchar(); while(ch!='\n') { a[i++]=ch; ch=getchar()

2011-10-23 21:20:21 4011

原创 shell计时

#!/bin/bashstart=`date +%s`function a(){ while read a do echo $a sleep 1 done < $1}a "$1" end=`date +%s`(( time=end-start ))echo $time

2011-10-23 21:06:39 2554 1

原创 C 语言 实现外国人姓氏显示

#includeint main(){ char ch,a[80]={'\0'}; int i=0,n=0,m=0; printf("Enter a first and last name:"); ch=getchar(); while(ch!='\n') { a[i++]=ch; ch=getchar();

2011-10-23 20:56:04 949

原创 C实现 显示重复的数字

#includeint main(){ int i=0,k=0,a[10]={0}; long n; printf("Enter a number:"); scanf("%ld",&n); while(n>0) { k=n%10; if(a[k]) { a[k]

2011-10-23 17:37:05 489

原创 C实现 简单的小日历需输入天数和起始星期几

#includeint main(){ int n=0,m=0,i=0; printf("Enter number of days in month:"); scanf("%d",&m); printf("Enter starting day of the week (1=Sun,7=Sat)"); scanf("%d",&n);

2011-10-23 16:40:58 935

原创 C现代实现 求偶数平方

#include#includeint main(){ int n=0,i=0; printf("enter a number:"); scanf("%d",&n); for(i=2;i<=sqrt(n);i+=2) if((i*i)<=n) printf("%d\n",i*i); getch();}

2011-10-23 16:13:47 731

原创 C语言求最大公约数

#includeint main(){ int n=0,temp=0,k=0,m=0; printf("Enter two integers:"); scanf("%d%d",&n,&m); if (n>m) { temp=n; n=m; m=temp; } whil

2011-10-23 15:54:39 485

原创 C 输入24小时制的时间转换为12小时制得时间,暂不考虑错误处理

#include#include#define err(s,x) {perror(s);exit(x);}int main(){ int hour=0,fen=0; printf("Enter a 24-hour time:"); scanf("%d:%d",&hour,&fen); if(hour>=24 || hour<0)

2011-10-23 15:25:18 3158

原创 C现代实现方法 数字转换为英文单词

#includeint main(){ int d=0,a=0,b=0; printf("Enter a two-digit number:"); scanf("%d",&d); if(d/10==0|| (d/100)!=0) { perror("d"); exit(1); } a=d/10

2011-10-23 14:30:48 4960

原创 C现代实现方法校验位

#includeint main(){ int a[11]={0},i=0,sum1=0,sum2=0,total=0; char d='0'; printf("Enter the first 11 digits of a UPC:"); for(i=0;i<11;i++) { scanf("%c",&d);

2011-10-23 13:43:51 373

原创 C现代实现方法 进制转换

#includeint main(){ int n=0,a=0,b=0,sum=0; printf("Enter a number between 0 and 32767:"); scanf("%d",&a); if(a32767) { perror("a"); exit(1); } do {

2011-10-23 13:13:48 522

原创 C现代实现方法编程题2

#includeint main(){ int year,month,day; printf("Enter a date(mm/dd/yyyy):"); scanf("%d/%d/%d",&month,&day,&year); /* if(month0) printf("your entered the date %d0%d%d",

2011-10-23 12:22:35 450

原创 C现代实现方法编程题

#includeint main(){ int x=0,i=0,n,m; int a[4][4]={0},suml[4]={0},sumc[4]={0},sumx[2]={0}; printf("Enter the number from 1 to 16 in any order:\n");/* for(i=0;i<16;i++) { sca

2011-10-23 12:15:55 360

计算机网路基础实训教材

本书较少计算机网路方面的知识,提高基础 注重实际

2011-04-28

计算机网络实训报告教材哦

本实训以4人一组为单位进行,在大家的共同努力下我们实现了用二层交换机、ADSL组建局域网,并能正确使用局域网软件和互联网应用软件,绘制拓扑图等。

2009-07-07

空空如也

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

TA关注的人

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