- 博客(42)
- 资源 (2)
- 收藏
- 关注
原创 提取gz文件中的压缩部分数据,C语言实现
gz文件是gzip产生的压缩文件。前几天接到一个小任务,说是要将其中被压缩的数据提取出来。于是动手写了个小程序实现之。 关于gzip文件格式的相关信息,可以查看RFC 1952代码如下:#include#include#include#includeint main(int argc,char* argv[]){ FILE* sfp=NULL;
2012-08-07 15:02:40
3746
原创 小话C语言中的cotinue和break
#includeint fun(){ printf("fun\n"); return 1;}int main(int argc,char *argv[]){ int c=0; printf("please input your num ,case 3 to break\n"); do{ scanf("%d",&c);
2012-07-24 15:41:40
896
原创 函数返回值是指针小例
/* ret_ptr.h */#ifndef RET_PTR_H#define RET_PTR_Hextern char *get_a_day(int idx);#endif/* ret_ptr.c */#include #include "ret_ptr.h"static const char *msg[] = {"Sunday", "Monday", "Tuesday",
2012-07-19 09:34:03
634
原创 最近学C当中,仿写了2个函数。
char* strcpy(char* dest, const char * source){ char* tmp=dest; while(*source) { *dest++=*source++; } return tmp;}char* shrink_space(char* dest,const char* sou
2012-07-18 09:20:17
2737
原创 U盘+ULTRAISO启动安装ubuntu-12.04-alternate-i386.iso
用ULTRAISO将U盘制作成启动盘,一般的系统可以应付的了,但是到了UBUNTU X.X之后这个方法不能简单的实现了。需要修改2个地方。详细的请看: http://forum.ubuntu.org.cn/viewtopic.php?f=77&t=355114 下载帖子中的2个文件并进行相应的操作。 制作完启动盘之后先别急着关机重启,因为在安装过程中会报错,提
2012-05-01 11:19:18
13803
2
原创 关于我今天遇到的ORA-01034错误
今天在LINUX下创建一个ORACLE数据库练练手,结果创建是创建了好多回,终于创建成功了,但是就是怎么连也连不上,什么listener.ora,tnsnames.ora都配置好了,就是conn system/manager@mysid的时候提示: ORA-01034: ORACLE not availableORA-27101: shared memory realm does no
2012-04-26 23:09:34
675
原创 关于指向结构体的指针
struct mystruct{ int a; int b;};struct mystruct* p=malloc(sizeof(struct mystruct)*5);/*要取下一个结构体,指针+1*/p+1;
2012-04-07 17:14:20
579
原创 正则表达式匹配日期,支持闰年,格式为YYYYMMDD
年份:[\d]{4}带31的月份:(0[13578]|1[02])((0[1-9])|([12][0-9])|(3[01]))非2月不带31日的月份:((0[469])|11)((0[1-9])|([12][1-9])|30)平年2月份 : 02((0[1-9])|(1[0-9])|(2[1-8]))闰年2月份:02((0[1-9])|(1[0-9])|(2[1-9]))
2012-04-02 16:41:26
14992
3
原创 Bash Shell判断输入的是否是数字,并判断是否是偶数
check_even_num.sh#! /bin/bashif [ $# != 1 ] ; then echo wrong arg,please input one arg exit 1;fi sh check_num.sh -i $1#执行check_num脚本,如果返回0,则说明是数字if [ $? == 0 ] ; then #是数字,判断是否是偶数
2012-03-30 20:10:17
25660
原创 lfunc.h
/*** $Id: lfunc.h,v 2.4.1.1 2007/12/27 13:02:25 roberto Exp $** Auxiliary functions to manipulate prototypes and closures** See Copyright
2011-10-17 15:54:59
1333
原创 lfunc.c
/*** $Id: lfunc.c,v 2.12.1.2 2007/12/28 14:58:43 roberto Exp $** Auxiliary functions to manipulate prototypes and closures** See Copyrigh
2011-10-17 15:54:36
529
原创 ldump.c
/*** $Id: ldump.c,v 2.8.1.1 2007/12/27 13:02:25 roberto Exp $** save precompiled Lua chunks** See Copyright Notice in lua.h*/#include
2011-10-17 15:54:19
667
原创 ldo.h
/*** $Id: ldo.h,v 2.7.1.1 2007/12/27 13:02:25 roberto Exp $** Stack and Call structure of Lua** See Copyright Notice in lua.h*/#ifndef
2011-10-17 15:54:03
577
原创 ldo.c
/*** $Id: ldo.c,v 2.38.1.3 2008/01/18 22:31:22 roberto Exp $** Stack and Call structure of Lua** See Copyright Notice in lua.h*/#incl
2011-10-17 15:53:33
947
原创 ldebug.h
/*** $Id: ldebug.h,v 2.3.1.1 2007/12/27 13:02:25 roberto Exp $** Auxiliary functions from Debug Interface module** See Copyright Notice i
2011-10-17 15:53:10
667
原创 ldebug.c
/*** $Id: ldebug.c,v 2.29.1.6 2008/05/08 16:56:26 roberto Exp $** Debug Interface** See Copyright Notice in lua.h*/#include #include
2011-10-17 15:52:46
1054
原创 ldblib.c
/*** $Id: ldblib.c,v 1.104.1.3 2008/01/21 13:11:21 roberto Exp $** Interface from Lua to its debug API** See Copyright Notice in lua.h*/
2011-10-17 15:52:14
624
原创 lcode.h
/*** $Id: lcode.h,v 1.48.1.1 2007/12/27 13:02:25 roberto Exp $** Code generator for Lua** See Copyright Notice in lua.h*/#ifndef lcode
2011-10-17 15:51:44
662
原创 lcode.c
/*** $Id: lcode.c,v 2.25.1.3 2007/12/28 15:32:23 roberto Exp $** Code generator for Lua** See Copyright Notice in lua.h*/#include #
2011-10-17 15:51:24
1242
原创 lbaselib.c
/*** $Id: lbaselib.c,v 1.191.1.6 2008/02/14 16:46:22 roberto Exp $** Basic library** See Copyright Notice in lua.h*/#include #inclu
2011-10-17 15:50:20
892
原创 lauxlib.h
/*** $Id: lauxlib.h,v 1.88.1.1 2007/12/27 13:02:25 roberto Exp $** Auxiliary functions for building Lua libraries** See Copyright Notice
2011-10-17 15:49:47
3249
原创 lauxlib.c
/*** $Id: lauxlib.c,v 1.159.1.3 2008/01/21 13:20:51 roberto Exp $** Auxiliary functions for building Lua libraries** See Copyright Notice
2011-10-17 15:48:28
953
原创 LAPI.H
/*** $Id: lapi.h,v 2.2.1.1 2007/12/27 13:02:25 roberto Exp $** Auxiliary functions from Lua API** See Copyright Notice in lua.h*/#ifnd
2011-10-17 15:46:50
667
原创 LUA\SRC\LAPI.C
/*** $Id: lapi.c,v 2.55.1.5 2008/07/04 18:41:18 roberto Exp $** Lua API** See Copyright Notice in lua.h*/#include #include #include
2011-10-17 15:40:03
1441
转载 利用google directions api计算距离
api介绍在http://code.google.com/apis/maps/documentation/directions/ 用经纬度查询格式如下 http://maps.googleapis.com/maps/api/directions/xml?origin=
2011-10-09 23:33:27
1727
转载 RATIONAL CODE
PACKAGE RSPS_Evaluation rational 1.5 1C0AB0D69C73 \COMPONENTS="PerformanceStudioSuite:1.0:1 \LTmaster:7.1:1 LTgui:7.1:10 LTvu:7.1:100 \
2011-10-06 15:50:59
708
转载 软件测试职业发展方向
软件测试职业发展方向 最近准备研究一下软件测试职业的发展方向,一是增长自己的知识,二是为自己的职业规划做个参考,在网上找到一篇很好的东东,将它整理了一下,放上来吧,以备以后查看。软件测试职业发展方向,大体上可以分为管理路线、技术路线、管理+技术路线。测试初级阶段:
2011-09-30 13:32:32
731
转载 软件测试工程师职业规划
软件测试工程师职业规划初级测试工程师——入门级,具有一些手工测试经验,开发测试脚本并开始熟悉测试生存周期和测试技术; 测试工程师——能够独立编写自动测试脚本程序并担任测试编程初期的领导工作,进一步拓展编程语言、操作系统、网络与数据库方面的技能; 高级测试工程师——
2011-09-30 13:26:08
1159
原创 51单片机学习(四)用点阵LED显示I LOVE YOU!
转自我的单片机博客:先看看效果:这段时间一直在折腾单片机的显示设备,今天折腾到了点阵LED。板子上配的是8X8的点阵LED,不过学会了8X8的之后更大的点阵LED也可以套用这个模式进行编程啦。点阵LED的电路图如下:
2011-09-08 00:16:02
11362
1
原创 51单片机学习(三)数码管秒表完成啦!
转自我的单片机博客:点我打开 话说经过大概2天的奋战,终于把带停表,开始计时功能的秒表完成了!误差在可以接受的范围内,运行90多秒,大概会有0。2秒的误差,一般用途还是够了吧。上一篇《用数码管显示1到9》已经为本文打下不少基础,对于怎样显示数字,我就不多做说明了。秒
2011-09-08 00:10:22
15657
原创 51单片机学习笔记(二) 单个数码管显示1到9
转自我的博客:http://sincos.in/?p=20数码管,其实就是8个发光二极管按顺序排列而成的,所以让数码管显示特定的数字,只需要将该亮的二极管点亮,不该亮的灭了就好了。为了达到这个目的,就得参考电路图了,51HEI开发板的电路图在我的相册里有,但是整张贴出来就
2011-09-04 20:27:54
16278
原创 Android电子书和platforms下载【【【115网盘】】】
今天上传的,希望和大家分享一下,不要浪费http://u.115.com/file/dn1997xs 【eoeAndroid特刊】第一期_Andriod_1.5_SDK简介.pdfhttp://u.115.com/file/e65rrocq 【eoeAndroid特刊】第二期_图像处理篇.pdfhttp://u.115.com/file/e65rrbr4 【eoeAndroid特刊】第三期_An
2011-06-16 20:02:00
2007
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人