摘要:
Chapter 1. Arrays and Strings 1.1 Unique Characters of a String 1.2 Reverse String 1.3 Permutation String 1.4 Replace Spaces 1.5 Compress String 1.6 R
阅读全文
posted @ 2016-01-27 13:44
Grandyang
阅读(9027)
推荐(0)
摘要:
Given an integer array nums, return the number of range sums that lie in [lower, upper] inclusive.Range sum S(i, j) is defined as the sum of the eleme
阅读全文
posted @ 2016-01-27 11:33
Grandyang
阅读(18433)
推荐(0)
摘要:
在MatLab做的GUI界面,我们有时候会希望界面的大小能改变,并且上面的控件也会跟着界面变大或者缩小,MatLab在这方面做的非常好,不像Qt的GUI那样实现起来那么麻烦,只需要把界面的属性Resize改成ON,把各个控件的Unit属性改成Normalized即可。
阅读全文
posted @ 2016-01-23 09:34
Grandyang
阅读(5812)
推荐(0)
摘要:
在MatLab的GUI界面编程,我们在调试的时候需要打印出一些变量,那么介绍下我用到的两种调试方法:第一种,使用弹出对话框来打印变量,要注意的是打印的东西必须是string类型的,所以其他类型的变量需要转换成string类型的,比如用num2str()函数将数字转为字符串显示出来。我们还可以用cla...
阅读全文
posted @ 2016-01-22 13:33
Grandyang
阅读(2464)
推荐(0)
摘要:
在MatLab中,我们用GUI时,有时候需要导入mat格式的图片,但是在GUI中调用load和在命令行里调用load不一样,在命令行里调用load('im.mat'),加载进去是uint8的矩阵,但是我们在GUI中写代码加进去,默认得到的是一个struct结构体,如果我们此时强行用imshow来显示...
阅读全文
posted @ 2016-01-22 13:24
Grandyang
阅读(3048)
推荐(0)
摘要:
Given an m x n integers matrix, return the length of the longest increasing path in matrix. From each cell, you can either move in four directions: le
阅读全文
posted @ 2016-01-21 13:54
Grandyang
阅读(20048)
推荐(1)
摘要:
Write a program to find the nthsuper ugly number.Super ugly numbers are positive numbers whose all prime factors are in the given prime listprimesof s...
阅读全文
posted @ 2016-01-20 13:45
Grandyang
阅读(15543)
推荐(0)
摘要:
Journal Article[1] Davis, A. R., Bush, C., Harvey, J. C. and Foley, M. F., "Fresnel lenses in rear projection displays," SID Int. Symp. Digest Tech. P...
阅读全文
posted @ 2016-01-20 02:20
Grandyang
阅读(564)
推荐(0)
摘要:
Download VTKMY 3.3Download VS2010Download CMake 3.2.0I assume you've already installedVS2010 and CMake 3.2.0 correctly.Compile the VTKMY:Start CMake 3...
阅读全文
posted @ 2016-01-20 01:54
Grandyang
阅读(375)
推荐(0)
摘要:
Download FLTK 1.3.3 Download VS2010 I assume you've already installed VS2010 correctly. Compile the FLTK: Go to your FLTK 1.3.3 folder (C:\FLTK\fltk-1
阅读全文
posted @ 2016-01-19 06:03
Grandyang
阅读(640)
推荐(0)
摘要:
Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[2] < nums[3].... Example 1: Example 2: Note:You may assume all input has v
阅读全文
posted @ 2016-01-18 13:59
Grandyang
阅读(34662)
推荐(2)
摘要:
Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the...
阅读全文
posted @ 2016-01-18 13:20
Grandyang
阅读(14684)
推荐(1)
摘要:
Given an integer, write a function to determine if it is a power of three. Example 1: Example 2: Example 3: Example 4: Follow up:Could you do it witho
阅读全文
posted @ 2016-01-18 06:41
Grandyang
阅读(19956)
推荐(0)
摘要:
You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money. Return
阅读全文
posted @ 2016-01-18 02:39
Grandyang
阅读(42243)
推荐(3)
摘要:
Given two arrays of length m and n with digits 0-9 representing two numbers. Create the maximum number of length k <= m + n from digits of the two. Th
阅读全文
posted @ 2016-01-17 07:07
Grandyang
阅读(18023)
推荐(0)
摘要:
Download ITK 3.20.1 Download VS2010 Download CMake 3.2.0 I assume you've already installed VS2010 and CMake 3.2.0 correctly. Compile the VTK: Start CM
阅读全文
posted @ 2016-01-16 08:45
Grandyang
阅读(1218)
推荐(0)
摘要:
Download VTK 5.10.1 Download VS2010 Download CMake 3.2.0 I assume you've already installed VS2010 and CMake 3.2.0 correctly. Compile the VTK: Start CM
阅读全文
posted @ 2016-01-16 07:50
Grandyang
阅读(830)
推荐(0)
摘要:
Download FLTK 1.3.3Download CMake 3.2.0Start CMake 3.2.0, fill the source and destination:source:C:/FLTK/fltk-1.1.10destination:C:/FLTK/buildClick Con...
阅读全文
posted @ 2016-01-14 03:29
Grandyang
阅读(860)
推荐(0)
摘要:
Download FLTK 1.1.10 at here. Download VS2010 Download CMake 2.8.12 I assume you've already installed VS2010 and CMake 2.8.12 correctly. Compile the V
阅读全文
posted @ 2016-01-13 03:10
Grandyang
阅读(465)
推荐(0)
摘要:
在C++中,类与类之间的关系大概有四种,分别为继承,关联,聚合,和组合。其中继承我们大家应该都比较熟悉,因为是C++的三大特性继承Inheritance,封装Encapsulation,和多态Polymorphism之一。继承Inheritance:是指一个类(子类)来继承另一个类(基类),并增加自...
阅读全文
posted @ 2016-01-10 01:02
Grandyang
阅读(1679)
推荐(1)
摘要:
There are n bulbs that are initially off. You first turn on all the bulbs, then you turn off every second bulb. On the third round, you toggle every t
阅读全文
posted @ 2016-01-04 20:06
Grandyang
阅读(14701)
推荐(0)
摘要:
Given a string arraywords, find the maximum value oflength(word[i]) * length(word[j])where the two words do not share common letters. You may assume t...
阅读全文
posted @ 2015-12-30 21:06
Grandyang
阅读(11376)
推荐(0)
摘要:
Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your
阅读全文
posted @ 2015-12-29 13:09
Grandyang
阅读(20098)
推荐(0)
摘要:
You are given an integer array nums and you have to return a new counts array. The countsarray has the property where counts[i] is the number of small
阅读全文
posted @ 2015-12-26 17:42
Grandyang
阅读(31164)
推荐(0)
摘要:
[转]2013年十大免费空间综合排行榜-稳定,可靠,速度快,可建站免费空间
阅读全文
posted @ 2015-11-30 14:24
Grandyang
阅读(550)
推荐(0)
摘要:
Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloon
阅读全文
posted @ 2015-11-30 10:21
Grandyang
阅读(29198)
推荐(5)
摘要:
这是一个用OpenCV2.4.10打开摄像头的一个例子,参见代码如下:#include #include #include using namespace cv;using namespace std;int main(int argc, char *argv[]){ CvCapture* c...
阅读全文
posted @ 2015-11-28 14:18
Grandyang
阅读(4594)
推荐(0)
摘要:
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 roote
阅读全文
posted @ 2015-11-27 12:25
Grandyang
阅读(26364)
推荐(0)
摘要:
Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complet...
阅读全文
posted @ 2015-11-26 13:03
Grandyang
阅读(32439)
推荐(1)
摘要:
[总结]FFMPEG视音频编解码零基础学习方法
阅读全文
posted @ 2015-11-25 02:58
Grandyang
阅读(488)
推荐(0)
摘要:
14.6 Implement a CircularArray class that supports an array-like data structure which can be efficiently rotated.The class should use a generic type, ...
阅读全文
posted @ 2015-11-24 13:11
Grandyang
阅读(1801)
推荐(0)
摘要:
Java反射——引言Java反射——Class对象Java反射——构造函数Java反射——字段Java反射——方法Java反射——Getter和SetterJava反射——私有字段和私有方法Java反射——注解Java反射——泛型Java反射——数组Java反射——动态代理Java反射——类的动态加...
阅读全文
posted @ 2015-11-23 04:26
Grandyang
阅读(748)
推荐(0)
摘要:
Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. The update(i, val) function modifies nums by upd
阅读全文
posted @ 2015-11-22 11:22
Grandyang
阅读(24722)
推荐(1)
摘要:
Additive number is a string whose digits can form additive sequence. A valid additive sequence should contain at least three numbers. Except for the f
阅读全文
posted @ 2015-11-18 12:18
Grandyang
阅读(12823)
推荐(0)
摘要:
14.5 Explain what object reflection is in Java and why it is useful.Java中的对象反射机制可以获得Java类和对象的反射信息,并可采取如下操作:1. 在运行阶段获得类内部的方法和字段信息2. 新建类的实例3.通过获取字段引用来获得...
阅读全文
posted @ 2015-11-17 13:42
Grandyang
阅读(554)
推荐(0)
摘要:
在C语言中,内存的主要分为下列几部分:1. Text/Code Segment 文本/代码区2. Initialized Data Segments 初始化的数据区3. Uninitialized Data Segments 未初始化的数据区4. Stack Segment 栈区5. Heap Se...
阅读全文
posted @ 2015-11-16 12:58
Grandyang
阅读(2191)
推荐(0)
摘要:
strtol是一个C语言函数,作用就是将一个字符串转换为长整型long,其函数原型为:long int strtol (const char* str, char** endptr, int base);下面我们来看下每个参数的意义:str是要转换的字符enptr是指向第一个不可转换的字符位置的指针...
阅读全文
posted @ 2015-11-15 08:46
Grandyang
阅读(20950)
推荐(1)
摘要:
14.4 Explain the difference between templates in C++ and generics in Java.在Java中,泛式编程Generic Programming的实现是通过一种就做类型擦除Type Erasure的机制来实现的。当源码转为Java虚拟机...
阅读全文
posted @ 2015-11-14 12:41
Grandyang
阅读(649)
推荐(0)
摘要:
Change Qt::WFlags to Qt::WindowFlags
阅读全文
posted @ 2015-11-13 04:11
Grandyang
阅读(3217)
推荐(0)
摘要:
Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2
阅读全文
posted @ 2015-11-12 13:59
Grandyang
阅读(13267)
推荐(1)