05 2016 档案
摘要:// ConsoleApplication2.cpp : Defines the entry point for the console application.// #include "stdafx.h"#include "FlyCapture2.h"#include <iostream>#inc
阅读全文
摘要:bool screenshot(const char* filename){GLenum lastBuffer;GLbyte* pBits = 0; // 图像数据unsigned long lImageSize;GLint iViewport[4]; // 视图大小glGetIntegerv(GL
阅读全文
摘要:0. 静态,动态转换 statci_cast 一般用于同一类型的转化,可以不是指针和引用: 如:pKernel = static_cast<DynamicKernel*>(xGroup->mpCompiledFormula);,这里 xGroup->mpCompiledFormula就是Dynami
阅读全文
摘要:awk 'NF {if(NR > 500){print $0 "\n"}else{print $0}}' Bloom_result.csv > ./Bloom.csv awk '{print $0"\n"}' Bloom_result.csv > ./Bloom.csv awk '{print $0
阅读全文
摘要:find ./ \( -type f \) -exec dos2unix {} \; find ./ * -exec touch {} \;
阅读全文
摘要:命令 说明 命令 说明 run 运行某个程序 list 显示源程序 break 设置断点 Info local 显示局部变量 watch 监视某个变量 Info break 显示断点 next 单步,函数跳过 display 显示变量或函数值 step 单步,函数跳入 delete/clear 删除
阅读全文
摘要:#include "stdio.h" #include "string.h" #include <iostream> #include <pthread.h> #include <vector> #include <assert.h> pthread_mutex_t mutex = PTHREAD_
阅读全文
摘要:#include "stdio.h" #include "string.h" #include <iostream> #include <pthread.h> pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; class Product { pri
阅读全文
摘要:throw和throws的区别::::: 区别四: throw语句用在方法体内,表示抛出异常,由方法体内的语句处理 throws语句用在方法声明后面,表示再抛出异常,由调用这个方法的上一级方法中的语句来处理. 区别五: throws主要是声明这个方法会抛出主这种类型的异常,使其他地方调用它时知道要捕
阅读全文
摘要:vector是可以快速地在最后添加删除元素,并可以快速地访问任意元素list是可以快速地在所有地方添加删除元素,但是只能快速地访问最开始与最后的元素deque在开始和最后添加元素都一样快,并提供了随机访问方法,像vector一样使用[]访问任意元素,但是随机访问速度比不上vector快,因为它要内部
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号