02 2014 档案

摘要:一个数据矩阵,选定某个位置的数据元作为参考,寻找与该数据元值相同的连成一片的最大范围。如下二维数组中所示,选择arr[1][3]作为参考对象,从位置(1,3)开始寻找所有相连的值为‘1’的元素。 阅读全文
posted @ 2014-02-28 19:28 samu 阅读(617) 评论(1) 推荐(0) 编辑
摘要:// QuickSort.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"int partition( int*p, int l, int r ){ int val,ml, mr, tmp; val = p[l]; ml=l+1; mr=r; /// while(1) { for( ; ml val ) break; } for( ; mr>ml; mr-- ) { if( p[mr] val ) ... 阅读全文
posted @ 2014-02-26 14:15 samu 阅读(205) 评论(0) 推荐(0) 编辑
摘要:test markdowngoodvery goodgood job 阅读全文
posted @ 2014-02-26 14:13 samu 阅读(98) 评论(0) 推荐(0) 编辑
摘要:IPC mechanisms supported by Linux include pipes, named pipes, semaphores, message queues, shared memory, and futexes. 阅读全文
posted @ 2014-02-22 20:35 samu 阅读(126) 评论(0) 推荐(0) 编辑
摘要:CentOS 6.5自动内核升级的主要步骤:1)内核文件下载到/usr/src/kernel/目录下;如:2.6.32-431.5.1.el6.x86_64编译后差不多有48M大小;2)生成的引导文件放置在/boot/目录下;3)修改/boot/grub/grup.conf配置文件。uname -a"Linux sam.lilya 2.6.32-431.5.1.el6.x86_64 #1 SMP Wed Feb 12 00:41:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux"cat /etc/redhat-release"C 阅读全文
posted @ 2014-02-21 20:57 samu 阅读(214) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/allenlinrui/article/details/5964046 阅读全文
posted @ 2014-02-20 22:06 samu 阅读(141) 评论(0) 推荐(0) 编辑
摘要:假设我们写了一个C代码文件 code.c包含下面代码:int accum = 0;int sum(int x, int y){ int t = x + y; accum += t; return t;} 这是用echo命令输入源码的效果,简单的就是最好的:) 一、查看GCC生成的汇编代码 在命令行上用“-S”选项,就能看到C编译器产生的汇编代码: #gcc -S code.c 注意:这里是大写的-S,如果用小写gcc会说找不到main函数 会在当前目录下生成code.s文件,直接打开即可 这段汇编代码没有经过优化: .file "code.c".g... 阅读全文
posted @ 2014-02-20 21:58 samu 阅读(1234) 评论(0) 推荐(0) 编辑
摘要:http://stackoverflow.com/questions/501105/comm 阅读全文
posted @ 2014-02-20 21:05 samu 阅读(329) 评论(0) 推荐(0) 编辑