摘要:
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;//当前层宽度 阅读全文
摘要:
[java] view plaincopy /** * * Heap sort * @author ljs * 2011-06-03 * * */ public class HeapSort { public static void solve(int[] data){ heapify(data); 阅读全文
摘要:
Makefile生成自动依赖的方法有两种: 1. 将所有.o文件的依赖关系写入单独文件,然后在Makefile中调用该文件 2. 每个.c文件对应一个.d文件,将依赖关系写入.d文件中 一、对于第一种方法,Makefile的写法如下: #file start CC = gcc SRCS := $(w 阅读全文
摘要:
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 阅读全文
摘要:
int cvFindContours( CvArr* image, CvMemStorage* storage, CvSeq** first_contour,int header_size=sizeof(CvContour),int mode=CV_RETR_LIST,int method=CV_C 阅读全文
摘要:
#!/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 阅读全文