上一页 1 ··· 39 40 41 42 43 44 45 46 47 ··· 53 下一页

2018年11月20日

摘要: problem Plus One code 注意可能有进位,而且可能有多个进位,另外注意最高位有进位的情况。 参考 1.leetcode; 完 阅读全文
posted @ 2018-11-20 09:23 鹅要长大 阅读(132) 评论(0) 推荐(0) 编辑
摘要: problem Length of Last Word 只有一个字符的情况; 最后一个word至字符串末尾之间有多个空格的情况; code1 code2 发现while循环好像比for循环要快。。。 题目求解的是最后一个word的长度,所以还要考虑最后一个word之后还有空格的情况。 参考 1.le 阅读全文
posted @ 2018-11-20 08:53 鹅要长大 阅读(187) 评论(0) 推荐(0) 编辑

2018年11月16日

摘要: problem MaximumSubarray code 参考 1. https://leetcode.com/problems/maximum-subarray/description/ 完 阅读全文
posted @ 2018-11-16 14:06 鹅要长大 阅读(142) 评论(0) 推荐(0) 编辑

2018年11月14日

摘要: 前言 opencv中Mat存在各种类型,其中mat有一个type()的函数可以返回该Mat的类型。类型表示了矩阵中元素的类型以及矩阵的通道个数,它是一系列的预定义的常量,其命名规则为CV_(位数)+(数据类型)+(通道数)。U表示无符号整数,S表示有符号整数,F表示浮点数。 具体的有以下值: err 阅读全文
posted @ 2018-11-14 14:59 鹅要长大 阅读(3877) 评论(0) 推荐(1) 编辑

2018年11月13日

摘要: kalman filter KCF 尺度变化是跟踪中比较基本和常见的问题,前面介绍的三个算法都没有尺度更新,如果目标缩小,滤波器就会学习到大量背景信息,如果目标扩大,滤波器就跟着目标局部纹理走了,这两种情况都很可能出现非预期的结果,导致漂移和失败。 https://blog.csdn.net/wfe 阅读全文
posted @ 2018-11-13 20:25 鹅要长大 阅读(967) 评论(0) 推荐(0) 编辑
摘要: problem Count and Say xiangjian Look-and-say sequence https://en.wikipedia.org/wiki/Look-and-say_sequence code class Solution { public: string countAn 阅读全文
posted @ 2018-11-13 20:22 鹅要长大 阅读(135) 评论(0) 推荐(0) 编辑

2018年11月12日

摘要: 前言 按照官网步骤安装opencv的过程中进行到98%时一直没有继续进行。 原因 后台一直在编译运行,只需等待即可,参考here; bash 参考 1.stackoverflow; 完 阅读全文
posted @ 2018-11-12 17:01 鹅要长大 阅读(3541) 评论(0) 推荐(0) 编辑
摘要: problem Search Insert Position 一种容易想到的是暴力破解法,一种是常用的二分法。 暴力破解法1(不推荐) class Solution { public: int searchInsert(vector<int>& nums, int target) { int ind 阅读全文
posted @ 2018-11-12 16:37 鹅要长大 阅读(232) 评论(0) 推荐(0) 编辑
摘要: problem Implement strStr code class Solution { public: int strStr(string haystack, string needle) { if(needle.size()==0) return 0; if( (haystack.size( 阅读全文
posted @ 2018-11-12 16:09 鹅要长大 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 常用的技术网站 1.c++网站; cplusplus http://www.cplusplus.com/ 主要用于查找c++一些知识点及其使用。 视频学习: modern_cpp_youtube 2.linux学习; 鸟哥的linux私房菜基础学习篇 http://cn.linux.vbird.or 阅读全文
posted @ 2018-11-12 15:34 鹅要长大 阅读(953) 评论(0) 推荐(1) 编辑
摘要: 找到opencv某个版本的源码文件,进入build目录; 之后再删除源码目录即可; https://docs.opencv.org/trunk/d7/d9f/tutorial_linux_install.html 阅读全文
posted @ 2018-11-12 13:36 鹅要长大 阅读(4198) 评论(0) 推荐(0) 编辑

2018年11月11日

摘要: problem RemoveElement class Solution { public: int removeElement(vector<int>& nums, int val) { if(nums.size()==0) return 0; int len = 0; for(size_t i= 阅读全文
posted @ 2018-11-11 17:48 鹅要长大 阅读(156) 评论(0) 推荐(0) 编辑
摘要: problem RemoveDuplicatesfromSortedArray 注意数组为空的情况要首先考虑,并给出返回值; 注意也要同时给出新的数组的数值; 注意数组最后两个元素的处理; class Solution { public: int removeDuplicates(vector<in 阅读全文
posted @ 2018-11-11 17:27 鹅要长大 阅读(140) 评论(0) 推荐(0) 编辑

2018年11月9日

摘要: problem MergeTwoSortedLists 一种方法是迭代,一种方法是递归; code /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode 阅读全文
posted @ 2018-11-09 12:48 鹅要长大 阅读(253) 评论(0) 推荐(0) 编辑

2018年11月8日

摘要: problem Valid Parentheses code class Solution { public: bool isValid(string s) { stack<char> paren; for(const auto& c : s) { switch(c) { case '(': cas 阅读全文
posted @ 2018-11-08 17:27 鹅要长大 阅读(190) 评论(0) 推荐(0) 编辑

2018年11月7日

摘要: 前言 /****************************************************************************** * File: get_traindata.cpp * Coder: AMY * Email: happyamyhope@163.co 阅读全文
posted @ 2018-11-07 17:13 鹅要长大 阅读(1106) 评论(0) 推荐(0) 编辑
摘要: 字符数组转化成string类型char ch [] = "ABCDEFG";string str(ch);//也可string str = ch;或者char ch [] = "ABCDEFG";string str;str = ch;//在原有基础上添加可以用str += ch;将string类型 阅读全文
posted @ 2018-11-07 16:54 鹅要长大 阅读(576) 评论(0) 推荐(0) 编辑
摘要: 前言 在linux系统运行程序,小鹅知道的有3种编译方式,一种是直接命令行编译,一种是使用Cmake,一种是使用脚本文件(*.sh)。本文介绍的是使用命令行编译。 使用过程 注意不同系统的编译器版本可能有所不同,gcc是C语言的编译器,g++是c++的编译器。 1. 使用Jsoncpp开源库 2. 阅读全文
posted @ 2018-11-07 15:31 鹅要长大 阅读(6325) 评论(0) 推荐(0) 编辑
摘要: 前言 参考 1. https://www.cnblogs.com/skyfsm/p/7136709.html 完 阅读全文
posted @ 2018-11-07 14:10 鹅要长大 阅读(1172) 评论(0) 推荐(0) 编辑
摘要: 前言 标注数据导出文件是json格式的,也就是python的dict格式,需要读取标注结果,可以使用c++或者python,本文使用c++实现的。 JsonCpp简介 JsonCpp是一种轻量级的数据交换格式,是个跨平台的开源库,可以从github和sourceforge上下载源码。查找资料的过程中 阅读全文
posted @ 2018-11-07 10:32 鹅要长大 阅读(5564) 评论(0) 推荐(0) 编辑
上一页 1 ··· 39 40 41 42 43 44 45 46 47 ··· 53 下一页

导航