上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 45 下一页
摘要: 将Qt4的项目迁到Qt5中并不需要新建一个Qt5的工程,可以直接在原工程文件上修改,这里我们使用的是VS2010和Qt5.4的环境,我们需要做以下修改: 1. 在工程里找到这个文件:工程名.vcxproj.user,将里面的Qtdir路径修改为:C:\Qt\5.4\msvc2010_opengl。我 阅读全文
posted @ 2017-02-08 00:17 Grandyang 阅读(1615) 评论(0) 推荐(0)
摘要: Given a binary array, find the maximum number of consecutive 1s in this array if you can flip at most one 0. Example 1: Input: [1,0,1,1,0] Output: 4 E 阅读全文
posted @ 2017-02-07 22:15 Grandyang 阅读(11474) 评论(2) 推荐(2)
摘要: When compile program using Visual Studio 2015, Matlab 2016b, and OpenCV 3.1.0, one might get the error as follow: Undefined function or variable ‘setI 阅读全文
posted @ 2017-02-07 02:14 Grandyang 阅读(1991) 评论(0) 推荐(0)
摘要: Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and t 阅读全文
posted @ 2017-02-06 11:25 Grandyang 阅读(12950) 评论(4) 推荐(0)
摘要: By now, you are given a secret signature consisting of character 'D' and 'I'. 'D' represents a decreasing relationship between two numbers, 'I' repres 阅读全文
posted @ 2017-02-05 00:07 Grandyang 阅读(7540) 评论(4) 推荐(1)
摘要: 在Qt和PCL联合编译的过程中,会出现各种各样的错误,解决这些错误的过程真是痛苦万分,所以总结一些常见错误方便自己也方便他人。比如我们要编译PCL1.8.0中的apps中的point_cloud_editor这个应用时,可能会遇到如下错误: 这个错误的解决方法很简单,哪个cpp文件产生了这些错误,就 阅读全文
posted @ 2017-02-04 07:28 Grandyang 阅读(1158) 评论(0) 推荐(0)
摘要: 在编译一些大型SDK的时候,比如Qt,OpenCV, PCL, VTK, ITK等等,在VS中,我们需要将编译生成的.lib文件加入Linker->Input中,但是往往生成的.lib文件有很多很多个,一个一个的把名字加进来实在是太累,我们可以用cmd命令行来快速获得某个文件夹下的所有文件的名字,打 阅读全文
posted @ 2017-02-03 04:53 Grandyang 阅读(392) 评论(0) 推荐(0)
摘要: Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first two di 阅读全文
posted @ 2017-02-02 10:00 Grandyang 阅读(8612) 评论(0) 推荐(0)
摘要: A magical string S consists of only '1' and '2' and obeys the following rules: The string S is magical because concatenating the number of contiguous 阅读全文
posted @ 2017-01-15 03:50 Grandyang 阅读(8163) 评论(2) 推荐(0)
摘要: 在Mac上使用Latex的话主流是安装MacTex,对于IDE的选择有很多,像什么自带的TexShop,或者是TexStudio,Latexian,Texpad,Texmaker等,甚至可以直接使用一些通用的编程IDE,比如MacVim,Emacs,Sublime Text等等。 博主喜欢用TexS 阅读全文
posted @ 2017-01-13 13:11 Grandyang 阅读(11123) 评论(0) 推荐(0)
摘要: Now you are given a string S, which represents a software license key which we would like to format. The string S is composed of alphanumerical charac 阅读全文
posted @ 2017-01-12 14:02 Grandyang 阅读(6624) 评论(0) 推荐(0)
摘要: Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The given inte 阅读全文
posted @ 2017-01-11 23:55 Grandyang 阅读(9096) 评论(1) 推荐(0)
摘要: Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. Given n points on a 2D plane, find the maximum num 阅读全文
posted @ 2017-01-10 14:29 Grandyang 阅读(1150) 评论(0) 推荐(0)
摘要: 在之前的博客QInputDialog 使用方法中展示了利用QInputDialog可以快速通过一行代码来生成一个输入框,来获取用户的输入值,那么如果我们希望获取多个输入值,怎么办呢?那么此时用QInputDialog就没法实现了,我们必须基于QDialog类重新写一个类,可是只是一个简单的多值输入框 阅读全文
posted @ 2017-01-09 08:40 Grandyang 阅读(7026) 评论(0) 推荐(1)
摘要: Design and implement a data structure for Least Frequently Used (LFU) cache. It should support the following operations: get and put. get(key) - Get t 阅读全文
posted @ 2017-01-07 03:47 Grandyang 阅读(22174) 评论(11) 推荐(0)
摘要: 在OpenCV中,有强大的处理相机事件的api,但是貌似没有直接获取相机的最大分辨率的函数,通过属性CV_CAP_PROP_FRAME_HEIGHT和CV_CAP_PROP_FRAME_WIDTH直接获取的貌似只是默认的分辨率640x480,不过我们可以通过手动设置来修改分辨率,使其可以达到自身所支 阅读全文
posted @ 2017-01-06 14:30 Grandyang 阅读(8761) 评论(0) 推荐(0)
摘要: Given an array of strings words (without duplicates), return all the concatenated words in the given list of words. A concatenated word is defined as 阅读全文
posted @ 2017-01-05 23:59 Grandyang 阅读(10029) 评论(5) 推荐(1)
摘要: Write a program to find the node at which the intersection of two singly linked lists begins. Notice If the two linked lists have no intersection at a 阅读全文
posted @ 2017-01-04 11:56 Grandyang 阅读(820) 评论(0) 推荐(0)
摘要: Merge two sorted (ascending) linked lists and return it as a new sorted list. The new sorted list should be made by splicing together the nodes of the 阅读全文
posted @ 2017-01-03 06:09 Grandyang 阅读(765) 评论(0) 推荐(0)
摘要: PLY格式是比较流行的保存点云Point Cloud的格式,可以用MeshLab等软件打开,而VTK是医学图像处理中比较常用的格式,可以使用VTK库和ITK库进行更加复杂的运算处理。我们可以使用ParaView软件对VTK格式文件进行预览和简单处理,ParaView也可以打开PLY格式,但是就没有t 阅读全文
posted @ 2017-01-02 11:06 Grandyang 阅读(2239) 评论(0) 推荐(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 comple 阅读全文
posted @ 2017-01-01 03:09 Grandyang 阅读(623) 评论(0) 推荐(0)
摘要: Given an array of integers, find a contiguous subarray which has the largest sum. Notice The subarray should contain at least one number. Have you met 阅读全文
posted @ 2016-12-31 08:09 Grandyang 阅读(1586) 评论(0) 推荐(0)
摘要: Remember the story of Little Match Girl? By now, you know exactly what matchsticks the little match girl has, please find out a way you can make one s 阅读全文
posted @ 2016-12-30 22:07 Grandyang 阅读(10109) 评论(6) 推荐(1)
摘要: Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tree" Output: "eert" Explanation: 'e' appears twi 阅读全文
posted @ 2016-12-29 03:56 Grandyang 阅读(9920) 评论(4) 推荐(1)
摘要: 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 th 阅读全文
posted @ 2016-12-28 09:33 Grandyang 阅读(17514) 评论(9) 推荐(0)
摘要: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or 阅读全文
posted @ 2016-12-27 06:12 Grandyang 阅读(12472) 评论(13) 推荐(0)
摘要: Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] 阅读全文
posted @ 2016-12-26 14:16 Grandyang 阅读(18695) 评论(3) 推荐(0)
摘要: You are given two linked lists representing two non-negative numbers. The most significant digit comes first and each of their nodes contain a single 阅读全文
posted @ 2016-12-23 23:55 Grandyang 阅读(22473) 评论(0) 推荐(1)
摘要: Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear twi 阅读全文
posted @ 2016-12-22 05:36 Grandyang 阅读(14871) 评论(0) 推荐(0)
摘要: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Now your job is to find the total 阅读全文
posted @ 2016-12-21 16:08 Grandyang 阅读(10474) 评论(2) 推荐(1)
摘要: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calcul 阅读全文
posted @ 2016-12-20 01:05 Grandyang 阅读(22725) 评论(8) 推荐(1)
摘要: Write an algorithm which computes the number of trailing zeros in n factorial. Have you met this question in a real interview? Yes Write an algorithm 阅读全文
posted @ 2016-12-19 23:30 Grandyang 阅读(1249) 评论(0) 推荐(0)
摘要: Given a non-empty string, encode the string such that its encoded length is the shortest. The encoding rule is: k[encoded_string], where the encoded_s 阅读全文
posted @ 2016-12-18 14:12 Grandyang 阅读(13717) 评论(15) 推荐(0)
摘要: Sometimes when you open a VS2010 project, an error window will pop up with the error message "Exceptions has been thrown by the target of an invocatio 阅读全文
posted @ 2016-12-17 05:21 Grandyang 阅读(720) 评论(0) 推荐(0)
摘要: In the computer world, use restricted resource you have to generate maximum benefit is what we always want to pursue. For now, suppose you are a domin 阅读全文
posted @ 2016-12-16 23:53 Grandyang 阅读(13893) 评论(3) 推荐(1)
摘要: In this problem, your job to write a function to check whether a input string is a valid IPv4 address or IPv6 address or neither. IPv4 addresses are c 阅读全文
posted @ 2016-12-15 23:53 Grandyang 阅读(10852) 评论(0) 推荐(1)
摘要: Winter is coming! Your first job during the contest is to design a standard heater with fixed warm radius to warm all the houses. Now, you are given p 阅读全文
posted @ 2016-12-14 23:45 Grandyang 阅读(12867) 评论(8) 推荐(0)
摘要: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. 阅读全文
posted @ 2016-12-12 23:03 Grandyang 阅读(1015) 评论(0) 推荐(0)
摘要: Define S = [s,n] as the string S which consists of n connected strings s. For example, ["abc", 3] ="abcabcabc". On the other hand, we define that stri 阅读全文
posted @ 2016-12-09 14:06 Grandyang 阅读(8168) 评论(5) 推荐(0)
摘要: Given a list of points that form a polygon when joined sequentially, find if this polygon is convex (Convex polygon definition). Note: Example 1: Exam 阅读全文
posted @ 2016-12-08 22:29 Grandyang 阅读(8672) 评论(3) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 45 下一页
Fork me on GitHub