自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(171)
  • 资源 (2)
  • 收藏
  • 关注

原创 [CV] bundler安装

从 http://www.cs.cornell.edu/~snavely/bundler/ 下载安装了源码包,在安装配置中会出现以下一些问题sift在64位系统上运行 从lowe主页中下载的sift是一个32位的静态库文件 ./bin/sift: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically li

2015-12-13 21:19:58 815

原创 [Linux]My Ubuntu

http://linuxtools-rst.readthedocs.org/zh_CN/latest/tool/gdb.html

2015-11-20 13:40:00 553

转载 欢迎使用CSDN-markdown编辑器

欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl

2015-11-12 11:31:56 408

原创 [Data Mining] kNN implementaion in Matlab

Matlab提供了一个机器学习的工具箱,里面提供了一个封装类用于kNN分类器。这里以matlab2015a的documentation的为准。Descriptionknn是一种基于最近邻的分类器,distance metric和邻域k需要被指定。使用训练数据训练kNN模型,使用predict方法对一个新的观测量进行预测。Construction mdl = fitcknn(X,y) 创建一个kN

2015-11-03 23:03:47 1320

原创 [Data Mining] kNN: k-nearest neighbor classification

最近在跟着赖博做一个图片配诗的小pro,需要用到kNN算法。 先转一篇左耳朵兔子的一篇文章K Nearest Neighbor算法 k-Means算法,主要用来聚类,将相同类别的样本点聚为同一类。 kNN算法,主要用来归类,给定一个待分类的样本点,通过计算样本空间中与自己最近的K个样本来判断这个待分类数据属于哪个分类。所以这里一个待分类的样本点的类别主要由最近的K个样本中最多的类别,下

2015-10-31 23:10:42 732

原创 [Python]python环境配置

python目前有两个版本2.x版本和3.x版本,这两个版本是不兼容的,因为现在Python正在朝着3.x版本进化,在进化过程中,大量的针对2.x版本的代码要修改后才能运行,所以,目前有许多第三方库还暂时无法在3.x上使用。为了保证你的程序能用到大量的第三方库,我们的教程仍以2.x版本为基础,确切地说,是2.7版本。请确保你的电脑上安装的Python版本是2.7.x,这样,你才能无痛学习这个教程。在

2015-10-30 15:37:03 605

原创 [Linux]cmake工具的使用

本文主要介绍CMake工具的使用,主要是在linux系统下结合OpenCV的一些使用例程。Cmake简介CMake 是一个跨平台的自动化建构系统,它使用一个名为 CMakeLists.txt 的文件来描述构建过程,可以产生标准的构建文件,如 Unix 的 Makefile 或Windows Visual C++ 的 projects/workspaces 。文件 CMakeLists.txt 需要手

2015-10-27 23:10:20 801

原创 [Linux] ubuntu 中的pkg-config

pkg-config 命令简介:pkg-config 是一个常用的库信息提取工具。pkg-config 工具从.pc文件中提取编译链接配置路径。pkg-config 从一个叫做PKG_CONFIG_PATH的环境变量中查找pc文件设置 环境变量命令:

2015-10-15 21:26:02 2343 1

原创 [Linux] ubuntu下安装opencv

安装平台:ubuntu 14.04 TLS 安装库:opencv2.49 并且支持多版本opencv安装一、安装下载opencv 2.49的源码包 opencv2.49解压源码包unzip opencv-2.4.9.zip 上面的命令是将下载的opencv249的源码解压到当前目录下unzip,tar等工具可以参考tar等命令这个文章。安装一些依赖库 sudo apt-get ins

2015-10-15 20:49:52 622

原创 [微软]题目4 : Image Encryption

时间限制:10000ms单点时限:1000ms内存限制:256MB描述A fancy square image encryption algorithm works as follow:0. consider the image as an N x N matrix1. choose an integer k∈ {0, 1, 2, 3}2. rotate the square image k

2015-09-29 21:27:28 819 2

原创 [微软]题目3 : Fibonacci

时间限制:10000ms单点时限:1000ms内存限制:256MB描述Given a sequence {an}, how many non-empty sub-sequence of it is a prefix of fibonacci sequence.A sub-sequence is a sequence that can be derived from another seque

2015-09-29 21:26:30 661

原创 [微软]题目2 : Total Highway Distance

时间限制:10000ms单点时限:1000ms内存限制:256MB描述Little Hi and Little Ho are playing a construction simulation game. They build N cities (numbered from 1 to N) in the game and connect them by N-1 highways. It is

2015-09-29 21:25:48 1131 2

原创 [微软]题目1 : Farthest Point

题目1 : Farthest Point时间限制:5000ms单点时限:1000ms内存限制:256MB描述Given a circle on a two-dimentional plane.Output the integral point in or on the boundary of the circle which has the largest distance from th

2015-09-29 21:24:20 989

原创 [LeetCode]Validate Binary Search Tree

Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only nodes with keys less than the node's key.The right

2015-09-29 11:10:23 237

原创 [LeetCode] Unique Binary Search Trees(!!DP)

Unique Binary Search Trees Given n, how many structurally unique BST’s (binary search trees) that store values 1…n? For example, Given n = 3, there are a total of 5 unique BST’s. 1 3

2015-09-27 13:38:08 253

原创 [LeetCode] Binary Tree Inorder Traversal

Binary Tree Inorder Traversal My Submissions Question Solution Total Accepted: 85535 Total Submissions: 232962 Difficulty: Medium Given a binary tree, return the inorder traversal of its nodes’

2015-09-26 22:58:56 257

原创 [LeetCode]Restore IP Addresses(!!!!BackTrace)

Restore IP Addresses My Submissions Question Solution Total Accepted: 41299 Total Submissions: 192823 Difficulty: Medium Given a string containing only digits, restore it by returning all

2015-09-26 22:08:57 381

原创 统计硬币

题目描述 假设一堆由1分、2分、5分组成的n个硬币总面值为m分,求一共有多少种可能的组合方式(某种面值的硬币可以数量可以为0)。 输入格式 输入数据第一行有一个正整数T,表示有T组测试数据。接下来的T行,每行有两个数n,m,n和m的含义同上。 输出 对于每组测试数据,请输出可能的组合方式数,每组输出占一行。 样例输入 2 3 5 4 8 样例输出 1 2

2015-09-16 23:06:25 2398

原创 [LeetCode] Gray Code

Gray Code My Submissions Question Solution Total Accepted: 41835 Total Submissions: 125744 Difficulty: Medium The gray code is a binary numeral system where two successive values differ in only

2015-09-16 20:42:05 307

原创 [LeetCode] Decode Ways(!!!DP)

Decode Ways My Submissions Question Solution Total Accepted: 47576 Total Submissions: 290697 Difficulty: Medium A message containing letters from A-Z is being encoded to numbers using the follow

2015-09-16 13:24:11 314

原创 [C++]C++11新特性

1、for 遍历数据的几种方式 第一个不好,万一numSet[i]不是O(1)的呢,容器可不止vector一种。 第二个太长了。 第三个是推荐的。 第四个是VC++的C++/CLI或C++/CX扩展,不过他跟第三个其实完全没有区别,因为互相都可以用。 第五个很难讲,主要是你要把整个程序写成函数式或响应式的,用这个才有额外的好处。

2015-09-14 09:45:12 299

原创 [C++]函数调用栈

函数调用时发生栈内存上的,这里主要涉及几个元素,函数调用,被调函数,函数参数。 涉及的过程主要有使用堆栈传递函数参数、保存返回地址、临时保存寄存器原有值(即函数调用的上下文)以备恢复以及存储本地局部变量。程序的内存可以参考进程内存 对于程序,编译器会对其分配一段内存,在逻辑上可以分为代码段,数据段,堆,栈 代码段:保存程序文本,指令指针EIP就是指向代码段,可读可执行不可写 数据段:保存初始

2015-09-12 16:40:16 2361 1

原创 [C++] volatie关键字

volatie关键字在嵌入式系统中这个关键字用的比较多,主要的用途是避免的编译器的优化。提醒它所声明的这个变量随时可能改变,所以,编译后的程序每次需要存储或读取这变量的时候,都会直接从变量地址中读取数据。比如一个信号量是某个 io口的高低电平,由于访问寄存器的速度要快于RAM,所以编译器一般都会作减少存取外部RAM的优化。一般来说,volatile用在如下的几个地方 1、中断服务程序中修改的供其

2015-09-11 15:10:57 640

原创 [LeetCode] Clone Graph(!!!!graph&dfs&bfs)

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 # a

2015-09-10 22:37:06 330

原创 [LeetCode] Remove Duplicates from Sorted List II

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5. Given

2015-09-09 21:13:12 267

原创 [LeetCode] Reverse Linked List II(!!!)

Reverse Linked List II Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2->5->NULL.

2015-09-05 14:58:09 266

原创 [C++]模板与泛型编程(3)

成员模板普通(非模板)类的成员模板 我们设计一个类,包含一个重载的函数调用运算符,它接受一个指针并对此指针执行delete。与默认删除器不同,我们还在删除器被执行时打印一条信息。class DebugDelet{public: DebugDelet(std::ostream &s =std::cerr):os(s){} //与任何函数模板一样,T的类型有编译器推断 tem

2015-09-04 21:43:30 270

原创 [C++] 模板与泛型编程(2)

类模板类模板(class template)是用来生成类的蓝图的。与函数模板的不同之处是,编译器不能为类模板推断模板参数类型实现strblob的模板版本,提供对元素的共享(且核查过的)访问能力。template <typename T> class Blob{public: typedef T value_type; typedef typename std::vector<T>:

2015-09-04 14:53:07 348

原创 [C++] 模板与泛型编程(1)

面向对象编程(OOP)和泛型编程都能处理在编写程序时不知道类型的情况。不同之处在于,OOP能处理类型在程序运行之前都未知的情况;而在泛型编程中,在编译时就能获知类型了。STL中典型的容器、迭代器和算法都是泛型编程的例子。模板是泛型编程的基础。函数模板先说明下函数重载,重载就是函数名相同但实参的类型或数量不同的函数的调用。注意有两种:实参是类型不同或数量不同。(为什么不说形参,因为会有默认值的存在)如

2015-09-03 22:54:43 367

原创 [LeetCode] Largest Rectangle in Histogram

Largest Rectangle in Histogram Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.

2015-09-01 10:51:00 301

原创 [LeetCode] Maximal Square(!!!!DP优化)

定义一个D[i][j] 表示的是以i,j为右下角的最大子正方形的边长。这个边长是受限于D[i-1][j],D[i][j-1] ,D[i-1][j-1]中最小的那个的。class Solution {public: int maximalSquare(vector<vector<char>>& A) { int m = A.size(); if(m==0) retu

2015-08-27 20:13:28 346

原创 [LeetCode] Maximal Rectangle(!!!DP)

关于最大某某问题,使用DP思想来求解,在最大子问题系列中有较为详细的解答。 Maximal Rectangle Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing all ones and return its area. (实在不能理解为什么要用char)c

2015-08-27 16:08:06 561

原创 [LeetCode] Set Matrix Zeroes (!!!!时间空间复杂度)

Set Matrix Zeroes Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up: Did you use extra space? A straight forward solution

2015-08-27 14:40:47 356

原创 [LeetCode] Edit Distance(!!!!!DP)

Edit Distance Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have the following 3 opera

2015-08-27 11:13:30 320

原创 [LeetCode] Merge Sorted Array

Merge Sorted Array Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: You may assume that nums1 has enough space (size that is greater o

2015-08-25 11:00:36 299

原创 [LeetCode] Partition List(!!!!巧妙的链表插入)

Partition List Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order

2015-08-24 21:39:29 254

原创 [LeetCode] Remove Duplicates from Sorted Array II

Remove Duplicates from Sorted Array II Follow up for “Remove Duplicates”: What if duplicates are allowed at most twice? For example, Given sorted array nums = [1,1,1,2,2,3], Your fun

2015-08-24 19:43:59 271

原创 [LeetCode] World Search(!!!!回溯&&char *代替string&&递归)

Word Search Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where “adjacent” cells are those horizon

2015-08-24 15:50:27 348

原创 [LeetCode] Subsets(!!!!!回溯&&迭代&&位操作)(to be updated)

Subsets Given a set of distinct integers, nums, return all possible subsets. Note: Elements in a subset must be in non-descending order. The solution set must not contain duplicate subsets.

2015-08-23 22:58:07 565

原创 [LeetCode] Combinations

Combinations Given two integers n and k, return all possible combinations of k numbers out of 1 … n. For example, If n = 4 and k = 2, a solution is: [ [2,4], [3,4], [2,3], [1,2]

2015-08-23 22:27:40 258

C 大型程序欣赏

c语言的大型程序 建议已经学过C 语言的人看 刚学的不适合

2010-10-11

c语言上机操作指导(tc和bc)

详细讲解TC和BC在windows下的上机操作

2010-03-26

空空如也

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

TA关注的人

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