上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 29 下一页
摘要: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl 阅读全文
posted @ 2015-11-15 12:02 eversliver 阅读(296) 评论(0) 推荐(0) 编辑
摘要: Given nums = [-2, 0, 3, -5, 2, -1]sumRange(0, 2) -> 1sumRange(2, 5) -> -1sumRange(0, 5) -> -3Note:You may assume that the array does not change.There ... 阅读全文
posted @ 2015-11-15 11:13 eversliver 阅读(338) 评论(0) 推荐(0) 编辑
摘要: After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This t... 阅读全文
posted @ 2015-11-15 10:02 eversliver 阅读(259) 评论(0) 推荐(0) 编辑
摘要: A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message conta... 阅读全文
posted @ 2015-11-14 17:18 eversliver 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 这种问题往往是由于QT4的程序转换到QT5所导致的,在.pro文件中加上一句greaterThan(QT_MAJOR_VERSION, 4): QT += widgets就可以解决问题 阅读全文
posted @ 2015-11-13 22:02 eversliver 阅读(3329) 评论(0) 推荐(0) 编辑
摘要: 一般出现这种情况都是自定义的类型进行型号槽连接的时候出现的,使用假设自定义的类型是MyClass使用qRegisterMetaType("MyClass");注册之后就可以正常的进行信号和槽连接 阅读全文
posted @ 2015-11-13 15:22 eversliver 阅读(11213) 评论(0) 推荐(0) 编辑
摘要: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston... 阅读全文
posted @ 2015-11-11 22:49 eversliver 阅读(231) 评论(0) 推荐(0) 编辑
摘要: How would you print just the 10th line of a file?For example, assume thatfile.txthas the following content:Line 1Line 2Line 3Line 4Line 5Line 6Line 7L... 阅读全文
posted @ 2015-11-11 22:18 eversliver 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 既然涉及到多线程问题,那么锁自然是免不了了的,下面是用锁加上以前的一个模板版本的单线程内存池实现的一个多线程内存池:首先给出前面一个模板单线程内存池的地址 点这里:下面是多线程版本的内存池: 1 template 2 class MTMemoryPool{ 3 public: 4 inlin... 阅读全文
posted @ 2015-11-11 19:32 eversliver 阅读(1725) 评论(0) 推荐(0) 编辑
摘要: 这是在使用QT的时候看到的。这种情况往往是结构体或者是class最后少加了一个分好,加上即可,这个bug找了我好久,mark一下。 阅读全文
posted @ 2015-11-11 16:47 eversliver 阅读(1384) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 29 下一页