01 2016 档案

摘要:Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or empty, flip it up 阅读全文
posted @ 2016-01-31 08:59 Grandyang 阅读(15639) 评论(3) 推荐(1) 编辑
摘要:VS2010 NVIDIA OpenCL 开发环境配置 CUDA 在线课程 [经典培训] 全球首套中文CUDA 教程-胡文美教授主讲 阅读全文
posted @ 2016-01-29 02:11 Grandyang 阅读(1092) 评论(0) 推荐(0) 编辑
摘要:Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to find the number of connected 阅读全文
posted @ 2016-01-28 15:14 Grandyang 阅读(17232) 评论(2) 推荐(0) 编辑
摘要:Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n] inclusive can be for 阅读全文
posted @ 2016-01-28 12:42 Grandyang 阅读(10976) 评论(11) 推荐(1) 编辑
摘要: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 阅读(8952) 评论(2) 推荐(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 阅读(18305) 评论(6) 推荐(0) 编辑
摘要:在MatLab做的GUI界面,我们有时候会希望界面的大小能改变,并且上面的控件也会跟着界面变大或者缩小,MatLab在这方面做的非常好,不像Qt的GUI那样实现起来那么麻烦,只需要把界面的属性Resize改成ON,把各个控件的Unit属性改成Normalized即可。 阅读全文
posted @ 2016-01-23 09:34 Grandyang 阅读(5714) 评论(0) 推荐(0) 编辑
摘要:在MatLab的GUI界面编程,我们在调试的时候需要打印出一些变量,那么介绍下我用到的两种调试方法:第一种,使用弹出对话框来打印变量,要注意的是打印的东西必须是string类型的,所以其他类型的变量需要转换成string类型的,比如用num2str()函数将数字转为字符串显示出来。我们还可以用cla... 阅读全文
posted @ 2016-01-22 13:33 Grandyang 阅读(2419) 评论(0) 推荐(0) 编辑
摘要:在MatLab中,我们用GUI时,有时候需要导入mat格式的图片,但是在GUI中调用load和在命令行里调用load不一样,在命令行里调用load('im.mat'),加载进去是uint8的矩阵,但是我们在GUI中写代码加进去,默认得到的是一个struct结构体,如果我们此时强行用imshow来显示... 阅读全文
posted @ 2016-01-22 13:24 Grandyang 阅读(2997) 评论(0) 推荐(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 阅读(19871) 评论(8) 推荐(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 阅读(15468) 评论(2) 推荐(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 阅读(535) 评论(0) 推荐(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 阅读(362) 评论(0) 推荐(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 阅读(625) 评论(0) 推荐(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 阅读(34530) 评论(12) 推荐(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 阅读(14573) 评论(0) 推荐(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 阅读(19788) 评论(10) 推荐(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 阅读(41775) 评论(17) 推荐(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 阅读(17912) 评论(6) 推荐(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 阅读(1212) 评论(0) 推荐(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 阅读(817) 评论(0) 推荐(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 阅读(842) 评论(0) 推荐(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 阅读(454) 评论(0) 推荐(0) 编辑
摘要:在C++中,类与类之间的关系大概有四种,分别为继承,关联,聚合,和组合。其中继承我们大家应该都比较熟悉,因为是C++的三大特性继承Inheritance,封装Encapsulation,和多态Polymorphism之一。继承Inheritance:是指一个类(子类)来继承另一个类(基类),并增加自... 阅读全文
posted @ 2016-01-10 01:02 Grandyang 阅读(1637) 评论(0) 推荐(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 阅读(14598) 评论(7) 推荐(0) 编辑

Fork me on GitHub