I'm using Xcode on OSX to develop command line C applications. I would also like to use Instruments to profile and find memory leaks.However, I couldn...
分类:
移动开发 时间:
2015-07-12 14:15:24
阅读次数:
160
学习Flex&Bison目标, 读懂SQLite中SQL解析部分代码Flex&Bison简介Flex做词法分析Bison做语法分析第一个Flex程序, wc.fl, 单词计数程序%{int chars = 0;int words = 0;int lines = 0;%}%%[a-zA-Z]+ { w...
分类:
其他好文 时间:
2015-07-11 08:59:05
阅读次数:
122
1 class Solution { 2 public: 3 int lengthOfLongestSubstring(string s) { 4 int len = s.length(), m = 0, l = 0, p[256] = { 0 }; 5 f...
分类:
编程语言 时间:
2015-07-10 02:11:53
阅读次数:
139
题目:
Given n non-negative integers a1, a2,
..., an, where each represents a point at coordinate (i, ai). n vertical
lines are drawn such that the two endpoints of line i is at (i, ai) and (i,
...
分类:
编程语言 时间:
2015-07-09 11:23:30
阅读次数:
111
Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ...
分类:
其他好文 时间:
2015-07-07 18:46:02
阅读次数:
72
+ (CGFloat)labelHeight:(UILabel *)label lines:(NSInteger)lines{ NSRange range = NSMakeRange(0, label.attributedText.length); NSDictionary *dic = [la.....
分类:
移动开发 时间:
2015-07-07 18:27:38
阅读次数:
120
这道题非常巧妙,其中的思想很重要。。 题目要求删除一个连续子序列,将剩下的序列拼接起来之后问最长连续递增子序列的长度。
最长子序列的一个常见优化就是用一个数组保存到该点为止的连续子序列长度,但是对于本题来说这样的优化显然还是不够的因为n很大,二重循环还是会超时。所以我们可以只枚举一个量,但是另一个量怎么找呢, 答案是构造一个二元组,a和g,使这两个元素都严格递增。这样我们在枚举一个i时只要二分找...
分类:
其他好文 时间:
2015-07-03 14:11:52
阅读次数:
103
Purpose:display certain line or lines from a text file, such as :
Display the 1000th1000th line from file message.log
or
Display the lines between 1000 and 1020 from file message.log...
分类:
系统相关 时间:
2015-07-03 12:24:52
阅读次数:
183
#from 《Python 2.7.9 documentation》Use 4-space indentation, and no tabs.#使用4空格缩进,不要使用tab缩进Wrap lines so that they don’t exceed 79 characters.拆行确保每行不超过7...
分类:
编程语言 时间:
2015-07-02 22:16:39
阅读次数:
154
译者地址:【翻】Android Design Support Library 的 代码实验——几行代码,让你的 APP 变得花俏
原文:Codelab for Android Design Support Library used in I/O Rewind Bangkok session—-Make your app fancy with few lines of code
原...
分类:
移动开发 时间:
2015-07-01 23:43:20
阅读次数:
368