自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(233)
  • 资源 (1)
  • 收藏
  • 关注

转载 gdb 调试

原文http://linuxtools-rst.readthedocs.io/zh_CN/latest/tool/gdb.html**1. gdb 调试利器**GDB是一个由GNU开源组织发布的、UNIX/LINUX操作系统下的、基于命令行的、功能强大的程序调试工具。 对于一名Linux下工作的c++程序员,gdb是必不可少的工具;1.1. 启动gdb对C/C++程序的调试,需要在...

2018-02-27 21:29:10 2963

原创 gcc 参数

gccgcc与 g++ 分别是GNU的C与 C++ 的编译器,在编译工作中分4步: 1. 预处理,生成.i文件 2. 编译器,编译后停下来,生成.o的目标文件 3. 汇编器,汇编后停下来,生成.s的汇编文件4. 连接器,链接目标代码,生成可执行程序gcc使用格式 gcc [-c|-S|-E] [-std=standard] [-g] [-pg] [-Ol...

2018-02-27 21:11:25 995

原创 linux col 过滤控制字符

参考http://blog.51cto.com/jim123/1833502使用过Unix系统的人肯定会知道man帮助的功能强大,是官方的帮助文档,我们平时可以通过它来查询不知道如何使用的命令或者查询linux的系统C函数,所以有的时候我们需要把man里的帮助信息导出来,但是我们用>>或>直接导出的文件打开会有乱码,在许多UNIX说明文件里,都有RLF控制字符。当我们运用...

2018-02-27 15:49:40 1166

转载 c/c++ 中 extern 用法

c/c++ 中extern 关键字详细参考http://www.cnblogs.com/yc_sunniwell/archive/2010/07/14/1777431.html基本解释:extern可以置于变量或者函数前,以标示该变量或者函数定义在其他的文件中,提示编译器遇到此变量或者函数时去其他模块寻找定义;此外extern也可以用来进行链接指定。extern 变量在一个...

2018-02-27 11:24:26 1210

原创 static笔记

c与c++ 中都有static 关键字,主要用于修饰局部变量、全局变量、函数;c++ 中还有类数据成员与成员函数。static 的主要作用包括: 1. 扩展生命周期 2. 限制作用域 3. 唯一性static修饰局部变量/*来自:http://blog.csdn.net/shanghairuoxiao/article/details/72904292static 修饰局部变量...

2018-02-26 22:48:11 241

原创 + - 与>> <<运算优先级

+、-运算符的优先级高于<< >>位移运算符int mian(){ int a=2,b=4; cout<<"a+b>>1="<<(a+b>>1)<<endl; cout<<"a+(b>>1)="<<(a+(b>>1))<<endl; return 0;}输出: a+b>>1=12 a+(b>>1)=10

2017-12-01 17:40:48 3501 4

原创 初识c++类(笔记)

类定义包含两部分类头,由关键字class 及其后面的类名构成类体由一对花括号包围起来类定义后面必须接一个分号或一列声明。 class Screen { /* … */ }; class Screen { /* … */ } myScreen, yourScreen; 每个类定义引入一个不同的类型,即使两个类具有全部的成员表,它们仍然是不同的类型。 除了静态(static)

2017-12-01 17:35:47 203

原创 win10 ubuntu16 双系统,无法grb引导的解决

安装win10与Ubuntu双系统,试了很多种方法,苦逼的挣扎了一天,都不能成功引导Ubuntu。 大体步骤参考:http://blog.csdn.net/fesdgasdgasdg/article/details/54183577 在win10的基础上使用U盘安装Ubuntu,和大家的方法没有什么不同,调整BIOS U盘启动,给ubuntu分了四个区,分别为 “/” “/boot” “/hom

2017-10-29 16:03:16 736

原创 172. Factorial Trailing Zeroes

/*Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.n!中包含多少尾随的010=2*5 n!中包含的0的个数就是因子2、5的个数,在n!中 2的个数多于5的个数,所以只要统计有多少个5即可。

2017-10-27 15:36:07 239

原创 60. Permutation Sequence

/*The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie, for n = 3):"123""132""213""231""312""

2017-10-20 20:22:09 228

原创 130. Surrounded Regions

/*Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'.A region is captured by flipping all 'O's into 'X's in that surrounded region.For example,X X X XX O O

2017-10-12 15:03:35 314

原创 684. Redundant Connection

/*In this problem, a tree is an undirected graph that is connected and has no cycles.The given input is a graph that started as a tree with N nodes (with distinct values 1, 2, ..., N), with one additi

2017-10-11 17:45:51 1100

原创 547. Friend Circles

/*There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, if A is a direct friend of B, and B is a direct friend of C, the

2017-10-11 15:15:25 289

原创 399. Evaluate Division

/*Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real number (floating point number). Given some queries, return the answers. If the answer

2017-10-09 22:27:55 225

原创 310. Minimum Height Trees

/*For a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all possible rooted trees, those with minimum height are called m

2017-10-07 22:47:46 244

原创 494. Target Sum

/*You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its new symbol.Find out how m

2017-09-28 09:19:55 236

原创 210. Course Schedule II

/*There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pa

2017-09-27 17:21:04 217

原创 207. Course Schedule

/*There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pa

2017-09-23 17:03:09 185

原创 394 decode string

/*Given an encoded string, return it's decoded string.The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note that k is gua

2017-09-23 14:25:20 307

原创 417. Pacific Atlantic Water Flow

/*Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the "Pacific ocean" touches the left and top edges of the matrix and the "Atlantic ocean" tou

2017-09-23 14:24:03 262

原创 133. Clone Graph

/*Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are labeled uniquely.We use # as a separator for each node,

2017-09-20 21:51:06 429

原创 542. 01 Matrix

/*Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell.The distance between two adjacent cells is 1.Example 1: Input:0 0 00 1 00 0 0Output:0 0 00 1 00 0 0Examp

2017-09-20 09:14:19 418

原创 200. Number of Islands

/*Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assu

2017-09-19 15:15:40 378

原创 515. Find Largest Value in Each Tree Row

/*You need to find the largest value in each row of a binary tree.Example:Input: 1 / \ 3 2 / \ \ 5 3 9 Output: [1, 3, 9]*//** * Definition for a bi

2017-09-18 20:54:18 343

原创 搜索策略及优化

暴力搜索 枚举所有可能的结果进行搜索,地毯式搜索。广度优先BFS 1.构造由根组成的队列Q 2.如果Q的第一个元素是目标节点,那么就停止搜索 3.从Q中删除元素x,并把x的所以子节点加入到队列的末尾 4.如果Q为空,则失败;否则返回2深度优先DFS 1.构造一个由根组成的栈S 2.如果栈顶元素是目标节点,就停止搜索 3.弹出栈顶元素,并把栈顶元素的所有子节点加入栈顶 4.如果S为空

2017-09-17 14:57:47 938

原创 C++ queue 队列

queue queue是模板类,定义在 < queue > 头文件里面。template < class T, class Container = deque<T> > class queue;T: Type of the elements. Container: Type of the underlying container object used to store and access

2017-09-16 22:33:24 346

原创 450. Delete Node in a BST

/*Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST.Basically, the deletion can be divided int

2017-09-16 21:04:43 220

原创 236. Lowest Common Ancestor of a Binary Tree

/*Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes v

2017-09-15 22:12:31 242

原创 235. Lowest Common Ancestor of a Binary Search Tree

/*Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between

2017-09-15 20:44:52 234

原创 230. Kth Smallest Element in a BST

/*Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.Note: You may assume k is always valid, 1 ≤ k ≤ BST's total elements.Follow up:What if the BST is mo

2017-09-15 20:07:29 305

原创 226. Invert Binary Tree

/*Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired by this original tweet by Max Howell:Goog

2017-09-14 22:59:46 192

原创 222. Count Complete Tree Nodes

/*Given a complete binary tree, count the number of nodes.Definition of a complete binary tree from Wikipedia:In a complete binary tree every level, except possibly the last, is completely filled, a

2017-09-14 22:17:21 192

原创 199. Binary Tree Right Side View

/*Given a binary tree, find the maximum path sum.For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child connections. The pa

2017-09-14 17:46:57 254

原创 129_sumRoottoLeafNumbers

/*Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which represents the number 123.Find the total sum of

2017-09-14 14:36:34 221

原创 124_binaryTreeMaximumPathSum

/*Given a binary tree, find the maximum path sum.For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child connections. The pa

2017-09-14 14:34:33 206

原创 117. Populating Next Right Pointers in Each Node II

/*Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution still work?Note:You may only use constant extra spac

2017-09-13 21:36:01 176

原创 116. Populating Next Right Pointers in Each Node

/*Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointer to point to its next right node. If there

2017-09-13 16:50:40 203

原创 114. Flatten Binary Tree to Linked List

/*Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened tree should look like: 1 \ 2

2017-09-13 16:00:25 193

原创 113. Path Sum II

/*Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree and sum = 22, 5 / \

2017-09-13 15:15:53 232

原创 112. Path Sum

/*Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.For example:Given the below binary tree and sum =

2017-09-13 14:18:02 213

基于ARM11视频采集的WiFi小车

采用ARM11(tiny6410,Linux系统可以直接采用官网的来烧写)做控制器,使用V4L2打开摄像头,opencv(2.0版本的)处理视频,其中包含人脸检测的程序(人脸检测参考的其他大神的程序),用QT写的界面程序并运行在ARM11上,通过socket通信和手机客户端通信并控制小车的运动状态。

2016-06-19

空空如也

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

TA关注的人

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