自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(49)
  • 资源 (10)
  • 收藏
  • 关注

原创 python3.3+numpy+matplotlib 实现绘图

找资源找了很久,全部打包到了我的资源库里了配置其实

2014-11-17 10:22:20 12422

原创 乐其面试题-求数组的最大三个数

#includeusing namespace std;void main(){ int a[]={3,6,2,3,1,3,1,9,3,7}; int onemax,secmax,thrmax; onemax=secmax=thrmax=a[0]; for(int i=1;i<sizeof(a)/sizeof(a[0]);i++) { if(onemax<a[i])

2014-10-30 12:54:47 1322

原创 百度面试题之 循环链表求出最短的包括所有元素的字串长度

#includeusing namespace std;void main(){ int qu[13]={0,1,2,2,2,2,2,3,1,3,3,2}; int i,j,value=0,min=14,count; for(i=0;i<13;i++) { count = 0; value = 0; for(j=i;(j+1)%13!=i;j=(j

2014-10-18 08:38:03 1259

原创 自定义字符串操作

#include#include#include#includeusing namespace std;class HString{private: char kind[2]; //操作类型 char *str; //字符串 int length;

2014-07-16 09:45:50 887

原创 matlab 蒙特卡洛

l = 1;n = 50000;m = 0;for k = 1: n x = unifrnd(0,1); y = unifrnd(0,1); if y < sqrt(1-x^2) m = m+1; endendm/n

2014-07-09 14:09:06 1855

原创 matlab 统计总结

方法一:tabulateTABLE = TABULATE(X), where X is a character array or a cell array of strings, returns TABLE as a cell array

2014-07-09 14:03:04 1033

原创 面试题

1.输入一棵二元查找树,将该二元查找树转换成一个排序的双向链表。#includeusing namespace std;struct BSTreeNode{ int m_Value; BSTreeNode *m_pLeft; BSTreeNode *m_pRight;};typedef BSTreeNode *DoubleList,*BSTree;DoubleList phe

2014-06-16 18:22:03 1247

原创 大数阶乘

求大数阶乘#include#include#include#includeint data[100000];void main(){ int m,n,i,j,len,t,temp; printf("请输入一个数组元素存多少位:"); scanf("%d",&m); t = (int)pow(10.0,m*1.0); printf("请输入

2014-06-13 10:55:42 694

原创 opencv轮廓提取

#include#include#includeusing namespace std;using namespace cv;int threshval = 160;int main(){ Mat img = imread("f:/mei.jpeg"); Mat gray ; cvtColor(img,gray,CV_RGB2GRAY); namedWindow("image

2014-06-09 20:04:38 2348 1

原创 数据拆分

不重复:#include#define N 20int stack[N];int top=0;void fun(int m,int n){ int i; if(n<=0 || m<=0) return; if(m==n) { stack[top++]=n; for(i=0;i<top;i++) printf("%d ",stack[i

2014-05-20 20:30:07 705

原创 STL for_each sort

#include#include#includeusing namespace std;void print(int elem) //自定义打印函数{ cout<<elem<<" ";}bool compare(int a, int b) //自定义排序函数规则{ return b<a;}void main(){ int a[]={1,2,1,3}; vector

2014-05-19 15:23:46 735

原创 stl accumulate transform

#include#include#include#include#includeusing namespace std;void main(){ //整数累加 int a[4]={12,34,44,55}; vector aint(a,a+4); int num = accumulate(aint.begin(),aint.end(),0); cout<<num<<end

2014-05-18 14:53:52 803

原创 c++ 随机生成社区数据

#include#include #include#include#include#include#includeusing namespace std;const int N = 1000005;vector g[N];map > mp;int getRand(int n){ int value = (rand()%n)*(rand()%n); //printf("%

2014-05-18 13:24:15 744

原创 资料

http://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumber=34//好的图像处理

2014-05-16 10:01:11 790

原创 lingo 简单整数组合问题

sets: s/n1..n22/:n,value;endsetsdata:value =55413.1534039.7829854.2138571.9331912.7644664.7967553.0361702.5883413.7292970.95279503.02265720.6260921.02117565.8535437.7134207.975672

2014-05-15 21:45:35 1180

转载 Meansift

function [] = select()close all;clear all;%%%%%%%%%%%%%%%%%%根据一幅目标全可见的图像圈定跟踪目标%%%%%%%%%%%%%%%%%%%%%%%I=imread('e:/jiansheng.jpg');figure(1);imshow(I);[temp,rect]=imcrop(I); %用户手选裁剪的区域[a,b,c

2014-05-15 13:36:34 1011

原创 python 无向图的生成

import random#n = int(input("please input n:"))#m = int(input("please input m:"))#vote = int(input("please input vote:"))#print(int(random.uniform(1,vote)))n = 4m = 6v = 3source ={}for i in

2014-05-14 13:56:39 9636

原创 opencv 形态学

#include#includeusing namespace std;using namespace cv;Mat src;int sizeval=3;static void on_tracker(int ,void *){ Mat out; Mat element = getStructuringElement(MORPH_RECT,Size(sizeval,sizeva

2014-05-14 10:31:11 905

原创 opencv 滤波

方框#include#includeusing namespace std;using namespace cv;Mat src;int sizeval=3;static void on_tracker(int ,void *){ Mat src1 = src; Mat out; boxFilter(src1,out,-1,Size(sizeval,sizeval

2014-05-13 20:51:40 802

原创 opencv tracker

#include#includeusing namespace std;using namespace cv;Mat src;int threshval=128;static void on_tracker(int ,void *){ Mat bin = src<threshval; //设置阈值 imshow("src",bin);}int main(){ s

2014-05-13 14:02:22 2683

原创 opencv split和merge操作

#include#include#include#includeusing namespace cv;using namespace std;int main(){ Mat srcImage=imread("e:/huangshan.jpg"); Mat imageBlue,imageGreen,imageRed; Mat mergeImage; //定义一个Mat向量容器保

2014-05-13 09:38:16 32766 3

原创 sscanf简单用法

拆分#includevoid main(){ char str[100]="123 ahdkf 345 sdhk 5 6 sdhk 7 sdfh 22 33"; char *pStr=str; int a; while(*pStr) { if(pStr == str && sscanf(pStr,"%d",&a)==1) p

2014-05-12 10:24:29 734

原创 matrix 重载操作,firend 函数实现 简单的例子

#include#define MAX 10using namespace std;class matrix;matrix& operator-(matrix& b,const matrix& c);class matrix{private: int row,col,(*a)[MAX];public: matrix(){} matrix(int r,int c,int (*b

2014-05-11 15:06:28 833

原创 heap中取出k个最小值

#includeusing namespace std;void MaxHeap(int heap[],int i,int len){ int largeIndex = -1; int left =i*2; int right =2*i+1; if(left heap[i]) largeIndex = left; else largeIndex = i; if (righ

2014-05-09 16:09:59 787

原创 字符串中查找字符串的位置

#includeusing namespace std;void findstr(char* src,char *dst){ int i=0,j=0,pos; for(;src[i];) { j=0; if(src[i]==dst[j]) { pos=i; while(dst[j]&&sr

2014-05-08 15:44:53 1370

原创 C显示系统时间

#include#includevoid main(){ time_t tim; struct tm *at; char now[40]; time(&tim); at=localtime(&tim); strftime(now,40,"%Y%m%d\n",at); puts(now); at->tm_mon+=3; strf

2014-05-06 18:20:56 1062

原创 C语言 递归拆分数字

#includeint stack[100];int top;int total,n;void dfs(int index){ int i; if(total==n) { printf("%d=",n); for(i=0;i<top-1;i++) printf("%d+",stack[i]); printf("%d\n",stack[top-1]);

2014-05-06 12:42:32 5186

原创 python的一些性质

a='[1,2,3]'a=eval(a)用eval可以将字符串转换为表达式,即将'[1,2,3]'转换为列表

2014-04-30 20:51:41 861

原创 VideoCapture

#include#includeusing namespace std;using namespace cv;int main(){ VideoCapture capture; capture.open("C:/Users/Administrator/Desktop/OpenTLD-master/datasets/06_car/car.mpg"); if(!capture.i

2014-04-30 16:57:25 4630

原创 vector二维操作

vector >vt; // vt.push_back(vector(10,1)); vt.push_back(vector(10,2)); for(vector >::iterator it=vt.begin();it!=vt.end();it++) { for(vector::iterator it1=it->begin();it1!=it->end();it1++) co

2014-04-30 11:02:30 5803 1

原创 Opencv Mat操作大全

#include#includeusing namespace std;using namespace cv;int main(){ float array[]={1,2,3}; float array1[]={2,3,1}; //用数组初始化Mat Mat mat=Mat(1,3,CV_32F,array); Mat mat1=Mat(1,3,CV_32F,array1);

2014-04-29 16:49:50 28215 3

原创 微软

第一题:把二元查找树转变成排序的双向链表 题目:输入一棵二元查找树,将该二元查找树转换成一个排序的双向链表。要求不能创建任何新的结点,只调整指针的指向。      10  / \ 6 14 / \ / \4 8 12 16     转换成双向链表4=6=8=10=12=14=16。     首先我们定义的二元查找树 节点的数据结构如下:

2014-04-25 15:18:52 844

转载 sift,surf匹配代码

#include "opencv2/highgui/highgui.hpp"#include "opencv2/calib3d/calib3d.hpp"#include "opencv2/imgproc/imgproc.hpp"#include "opencv2/features2d/features2d.hpp"#include "opencv2/nonfree/nonfree.hpp"

2014-04-23 16:24:17 5858 6

原创 hdu-acm

Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 +

2014-04-23 15:38:31 807

原创 华为

#includeusing namespace std;void stringZip(const char *pInputStr, long lInputLen, char *pOutputStr){ int count,pos=0; char temp; for(int i=0;i<lInputLen;) { count=0; temp=pInputStr[i]

2014-04-23 14:38:42 970

原创 Number Sequence

Problem DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to calculate the value of f(n).Input

2014-04-22 14:38:53 5975 1

原创 python 3.3 爬虫之爬取图片

今天没事用BeautifulSoup写了一个爬去

2014-04-21 16:35:39 10948 2

原创 python3.3 爬虫小例子

本文仿照大神:http://blog.csdn.net/pleasecallmewhy/article/details/8927832 的博客转化成python3.3第一个爬虫小例子:import urllib.request as requestimport urllib.parse as parseimport stringprint("""++++++++++++++++++

2014-04-20 14:41:19 39630 2

原创 BeautifulSoup 对象方法

from bs4 import BeautifulSoup,Tag,CDataimport redoc = ['Page title', 'This is paragraph one.', 'This is paragraph two.', '']soup = BeautifulSoup(''.join(doc))print(soup.pret

2014-04-19 21:38:57 1918

原创 python 爬虫

本人用python 3.3 这版本的爬虫资料有点少,从基础总结吧

2014-04-19 08:43:30 3247 1

python3.3+numpy+matplotlib+six-1.8

python3.3+numpy+matplotlib+six-1.8

2014-11-17

beautifulsoup

beautifulsoup4-4.3.2.tar.gz

2014-04-19

python urllib3

python urllib3 安装文件包

2014-04-19

Django小例子

可以运行的python django的小网站,有运行效果图

2014-04-16

总结vs2010调用lib,和dll

总结vs2010调用lib,和dll,有代码和运行效果图像

2013-07-17

飞机订票系统 c++

c++代码 和实验报告 飞机订票系统 c++

2013-07-04

用MFC如何获取本地主机名和IP地址

用MFC如何获取本地主机名和IP地址,简单的socket编程,大牛就绕道吧

2012-11-30

MFC中窗体界面保存成jpg,tif,tiff,emf,等各种文件

MFC中窗体界面保存成jpg,tif,tiff,emf,等各种文件,简短代码,加运行效果

2012-08-09

MFC,字体纵向显示,字体旋转,还要如何调用CFontDialg的属性值

本人天半时间,终于琢磨出了,代码加运行效果图,还有超简单的代码,

2012-08-09

VS2008连接SQL2005,附成功连接工程,和word版本操作方法

VS2008连接SQL2005,附成功连接工程,和word版本操作方法

2012-08-05

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除