摘要: int width(BTree *bt) { BTree *p=bt; if(bt)return 0; BTree *q[100]; int front=0,rear=0;//队头指针,队尾指针 int last=0;//同一层最右结点在队列中位置 int temp=0,maxw=0;//当前层宽度 阅读全文
posted @ 2016-05-26 09:08 bshaozi 阅读(174) 评论(0) 推荐(0) 编辑
摘要: [java] view plaincopy /** * * Heap sort * @author ljs * 2011-06-03 * * */ public class HeapSort { public static void solve(int[] data){ heapify(data); 阅读全文
posted @ 2016-05-26 09:08 bshaozi 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Makefile生成自动依赖的方法有两种: 1. 将所有.o文件的依赖关系写入单独文件,然后在Makefile中调用该文件 2. 每个.c文件对应一个.d文件,将依赖关系写入.d文件中 一、对于第一种方法,Makefile的写法如下: #file start CC = gcc SRCS := $(w 阅读全文
posted @ 2016-05-26 09:07 bshaozi 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 1 查看物理CPU的个数#cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc –l 2、 查看逻辑CPU的个数#cat /proc/cpuinfo |grep "processor"|wc –l 3、 查看CPU是几核#cat /proc/cpui 阅读全文
posted @ 2016-05-26 09:06 bshaozi 阅读(115) 评论(0) 推荐(0) 编辑
摘要: int cvFindContours( CvArr* image, CvMemStorage* storage, CvSeq** first_contour,int header_size=sizeof(CvContour),int mode=CV_RETR_LIST,int method=CV_C 阅读全文
posted @ 2016-05-26 09:05 bshaozi 阅读(407) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python import osimport sysimport os.path def find_import(line): line=line.strip() IMPORT_CMD="import " if not line.startswith(IMPORT_CM 阅读全文
posted @ 2016-05-26 08:54 bshaozi 阅读(520) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-05-25 12:15 bshaozi 阅读(2) 评论(0) 推荐(0) 编辑