摘要: Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] 阅读全文
posted @ 2017-08-03 16:03 两猿社 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: The input array will only contain 0 and 1. The length 阅读全文
posted @ 2017-08-03 10:10 两猿社 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of 阅读全文
posted @ 2017-08-02 16:32 两猿社 阅读(98) 评论(0) 推荐(0) 编辑
摘要: In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data. 阅读全文
posted @ 2017-08-02 14:43 两猿社 阅读(140) 评论(0) 推荐(0) 编辑
摘要: opencv3.1属于阉割版的opencv,很多以前的函数被改版,甚至删除掉,比如circle函数。 Mat初始化 Mat sampleMat = (Mat_<float>(1, 2) << j,i);是Mat的一种初始化方式,将每次循环的i,j输入进Mat,然后初始化。 .at<Vec3b>(i, 阅读全文
posted @ 2017-08-02 09:42 两猿社 阅读(3297) 评论(0) 推荐(1) 编辑
摘要: 一般来说出现这样的提示,是因为登陆的密码错误,如果密码中有数字,最好用主键盘输入,用数字键盘会有错误。 阅读全文
posted @ 2017-07-30 13:04 两猿社 阅读(1141) 评论(0) 推荐(0) 编辑
摘要: VS2013生成DLL文件 vs2013创建及使用DLL 一般来说项目偏爱生成dll动态库文件,因为可以解决静态库造成的空间浪费和更新困难问题,另外创建静态库时,我一般是建立空项目后,在项目配置类型中进行选择。 什么是库 库是写好的现有的,成熟的,可以复用的代码。现实中每个程序都要依赖很多基础的底层 阅读全文
posted @ 2017-07-29 20:24 两猿社 阅读(20368) 评论(1) 推荐(5) 编辑
摘要: C++学习【原创】transform函数的应用 transform(first,last,result,op);//first是容器的首迭代器,last为容器的末迭代器,result为存放结果的容器,op为要进行操作的一元函数对象或sturct、class。 transform(first1,las 阅读全文
posted @ 2017-07-28 21:29 两猿社 阅读(1081) 评论(0) 推荐(0) 编辑
摘要: WIN32_FIND_DATA结构描述了一个由FindFirstFile, FindFirstFileEx, 或FindNextFile函数查找到的文件信息, typedef struct _WIN32_FIND_DATA { DWORD dwFileAttributes; //文件属性 FILET 阅读全文
posted @ 2017-07-28 20:26 两猿社 阅读(4595) 评论(0) 推荐(0) 编辑
摘要: 参考博客:http://blog.csdn.net/zhenyusoso/article/details/7286456 std::string illegal(" \t\f\v\n\r\\/") 表示对其illegal字符串进行赋值。依次是空格,水平制表,换页,垂直制表,回车,左斜杠。 1.匹配查 阅读全文
posted @ 2017-07-28 19:44 两猿社 阅读(593) 评论(0) 推荐(0) 编辑