- 博客(18)
- 资源 (63)
- 收藏
- 关注
原创 求100以内的素数算法
废话不多说,直接上代码: #include #include #include using namespace std; void primeLessThanN(int n){ if(n bool *isPrime = new bool[n+1];//动态生成一个数组 memset((void*)isPrime, true, (n +
2013-03-05 17:20:17 1996 1
转载 vim rc 配置
{和[都可以补全,但是(不行.但是,在.vimrc中我是都设置的.设置如下:代码:inoremap ( ()iinoremap ) =ClosePair(')')inoremap { {}iinoremap } =ClosePair('}')inoremap [ []iinoremap ] =ClosePair(']')inoremap ' ''iino
2012-03-19 10:00:35 870
转载 mmap函数大文件读写可能出现的问题
转载:http://www.chineselinuxuniversity.net/articles/41953.shtml------------------------------------------------------------------------- mmap函数实现把一个文件映射到一个内存区域,从而我们可以像读写内存一样读写文件,他比单纯调用read/write也要
2012-03-16 15:02:32 3328
转载 linux c 大文件使用
转帖:http://hi.baidu.com/roxws/blog/item/785c4bcb61662ff853664f2d.html----------------------------------------------------------------------------------------支持大文件的两种方式:1、gcc 加 -D_FILE_OFFSET_
2012-03-16 14:40:50 448
转载 【网摘】Linux 守护进程的编程方法
Linux 守护进程的编程方法 守护进程(Daemon)是运行在后台的一种特殊进程。它独立于控制终端并且周期性地执行某种任务或等待处理某些发生的事件。守护进程是一种很有用的进程。Linux的大多数服务器就是用守护进程实现的。比如,Internet服务器inetd,Web服务器httpd等。同时,守护进程完成许多系统任务。比如,作业规划进程crond,打印进程lpd等。 守
2012-01-15 11:07:18 368
转载 【转载】 ssh 连接 通过公钥体制,无密码登陆
CSDN不准转载,我只能将博主的连接发上来了http://blog.csdn.net/jixiuffff/article/details/5968929
2012-01-15 00:39:42 352
原创 Linux timer example
#include #include #include #include void handler(){printf("hello\n");}int main(void){int i;signal(SIGALRM,handler);alarm(5);for(i=1;i{printf("sleep %d seconds...\
2012-01-14 23:32:56 475
原创 未来移动平台操作系统是谁的天下
现在比较主流的移动平台操作系统有ios,andriod,windows phoneios:从苹果的历史中可以得到这个结论。乔布斯不在了,ios用不了几年就会沦落。android:内核是linux的,开源,免费。开源软件的最大问题就是质量没有保障。就想现在的Linux操作系统,发展很迅猛,可就是干不过微软。windows phone:这个操作系统市场份额好像不大,而且价格昂贵,就
2012-01-11 20:40:43 401
转载 【网摘】opendir
#include #include #include main() { DIR * dir; struct dirent * ptr; int i; dir =opendir(“/etc/rc.d”); while((ptr = readdir(dir))!=NULL) { printf(
2012-01-09 22:57:32 284
转载 【网摘】Linux 下 C语言大文件读写(大于4G)
原文地址:下 C语言大文件读写(大于4G)" style="text-decoration:none; color:rgb(62,115,160)">Linux 下 C语言大文件读写(大于4G)作者:傲雪迎风以下的做法整理自论坛上的帖子。 如何create大文件要大就非常大,1T吧。有两种方法: 一.dddd if=/dev/zero of=1T.img bs=
2012-01-09 22:45:01 1098
转载 【网摘】在Linux下编写Daemon
在Linux下编写Daemon转自:http://blog.163.com/prevBlogPerma.do?host=manyhappy163&srl=1644768312010718111142260&mode=prev在Linux(以Redhat Linux Enterprise Edition 5.3为例)下,有时需要编写Service。Service也是程序,一般随系
2012-01-09 22:31:46 460
转载 【网摘】如何编写Linux Daemon后台程序(守护进程)
守护进程(Daemon)是运行在后台的一种特殊进程。它独立于控制终端并且周期性地执行某种任务或等待处理某些发生的事件。守护进程是一种很有用的进 程。Linux的大多数服务器就是用守护进程实现的。比如,Internet服务器inetd,Web服务器httpd等。同时,守护进程完成许多系统任 务。比如,作业规划进程crond,打印进程lpd等。守护进程的编程本身并不复杂,复杂的是各种版本的Un
2012-01-09 22:29:38 290
转载 【网摘】json
JSON定义 JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式,易于阅读和编写,同时也易于机器解析和生成。它基于ECMA262语言规范(1999-12第三版)中JavaScript编程语言的一个子集。 JSON采用与编程语言无关的文本格式,但是也使用了类C语言(包括C, C++, C#, Java, JavaScript, Perl, Py
2012-01-08 19:47:50 312
原创 【网摘】linux获取文件夹中的文件列表
opendir(); readdir(); closedir(); 这个三个函数足以,具体用法,看man,很简单。 ///////////////////////////////#include #include #include int main(int argc, char *argv[]) { DIR *d
2012-01-08 19:46:28 764
原创 Linux gcc 项目之持续集成
hudson是个好东西,开源工具。我是在Linux 上做c/c++开发的,在hudson上创建两个项目,一个用来编译工程,另外一个用来做覆盖率测试。每天build,实时看结果,有问题及时发现。这里涉及到很多问题,我会单独写文章一一介绍。我大致列一下大纲1. hudson环境搭建2.项目中会用到的工具以及插件安装3.工程创建4.覆盖率相关
2011-12-09 14:46:01 522
原创 pad和phone的整合产品草图
说明:1.整体上看,该产品是一个平板电脑内嵌一部手机2.平板电脑和手机可以单独工作3.手机单独使用时,只有最基础的打电话和发信息功能4.平板电脑单独使用时不能够通过sim卡上网,但可以通过wifi上网5.当手机内嵌到平板电脑里面时。手机使用平板的屏幕作为手机屏幕。6.当手机内嵌到平板电脑里面时。平板电脑增加了sim卡上网共功能
2011-12-09 13:39:23 320
原创 庆祝开通
以前在另外一个网站上写了一些技术文章,后来那个网站关闭了,我的博客也找不回来了,伤了我的心,后来就再没写过了。今天又有写的冲动了。这里正是开通一下。cheers!
2011-12-08 17:24:03 319
mysql-connector-c-6.0.2-linux-sles10-x86-64bit
2012-02-02
mysql5参考手册
2012-01-11
linux shell script cook book
2012-01-08
Design+Patterns_+Elements+Of+Reusable+Object-Oriented+Software.pdf
2011-09-16
beginning perl t3rd.pdf
2011-08-18
source insight 3.5
2011-03-24
automake source code
2012-05-09
EA文档一箩筐
2012-02-01
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人