1.隐藏 & 显示Finder的文件
defaults write com.apple.finder AppleShowAllFiles -bool false
最后面的false代表不显示隐藏文件,true表示显示隐藏文件...
分类:
其他好文 时间:
2015-02-02 23:22:35
阅读次数:
379
题目链接:https://oj.leetcode.com/problems/binary-tree-preorder-traversal/
题目:
Given a binary tree, return the preorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
...
分类:
其他好文 时间:
2015-02-02 23:21:43
阅读次数:
327
题目链接:https://oj.leetcode.com/problems/binary-tree-inorder-traversal/
题目:
Given a binary tree, return the inorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
...
分类:
其他好文 时间:
2015-02-02 23:21:23
阅读次数:
294
12096 The SetStack Computer
Background from Wikipedia: Set theory is a branch ofmathematics created principally by the German mathe-matician Georg
Cantor at the end of the 19th century.
Initially ...
分类:
其他好文 时间:
2015-02-02 23:20:26
阅读次数:
519
For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the cows. To keep things simple, he will take a contiguous range of cows from the...
分类:
其他好文 时间:
2015-02-02 23:19:29
阅读次数:
254
题目链接:https://oj.leetcode.com/problems/binary-tree-postorder-traversal/
题目:
Given a binary tree, return the postorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
...
分类:
其他好文 时间:
2015-02-02 23:22:05
阅读次数:
312
从今天到研究生新生刚入学算起,差不多也有半年的时光了。回想半年的研究生生活,感觉一切都是那么新鲜,好奇。记得刚开始入学的时候,自己很多地方都不适应:上课的氛围,实验室室友的相处,学习的习惯等等。特别要说的是,自己的心态没调整好,结果很多时候都是浑浑噩噩的,一切都是那么的无助!等到过了一学期才慢慢开始适应起来,无论是老师上课的速度/教学方法,亦或者是自己的学习动力,都比刚开始要强上很多!回想这半年,...
分类:
其他好文 时间:
2015-02-02 23:19:21
阅读次数:
353
Sumdiv
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 15033
Accepted: 3706
Description
Consider two natural numbers A and B. Let S be the sum of all nat...
分类:
其他好文 时间:
2015-02-02 23:21:21
阅读次数:
307
How Many Tables
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)
Total Submission(s) : 14 Accepted Submission(s) : 12
Font: Times New Roman | Verdana | Georgia
...
分类:
其他好文 时间:
2015-02-02 23:18:44
阅读次数:
251
/*
按升序输出两个串所有的最长公共子序列
首先求出最长公共子序列,然后处理处两个数组,f1['a'~'z'][j]表示该字母在第一个串的前j个字母中出现的最大下标,
f2['a'~'z'][j]表示该字母在第二个串的前j个字母中出现的最大下标。现在我们已经知道了最长公共子序列的长度,
我们从最后一位开始枚举每一位放什么字母,用dfs来实现,并用前面处理出来的数组进行可行性剪枝。
由于最后答案的串...
分类:
其他好文 时间:
2015-02-02 23:20:28
阅读次数:
170
在编辑模式下,tableView有自带的删除多个cell的方法。 这种效果自定义写也可以,但是我这里用的是系统的。
先上效果图。核心代码:
_tableView.allowsMultipleSelectionDuringEditing =
YES;
至于全选删除和选择一部分删除就不上具体代码了。
如果想要点击cell后的颜色,代码如下:
...
分类:
其他好文 时间:
2015-02-02 23:18:30
阅读次数:
222
1.FFmpeg build for android random architectures with example jni
https://github.com/appunite/AndroidFFmpeg
2.ijkplayer - Android/iOS 基于FFMPEG库的播放器
http://git.oschina.net/bbcallen/ijkplayer
git下载...
分类:
其他好文 时间:
2015-02-02 23:18:45
阅读次数:
290
Fence Repair
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 28417
Accepted: 9229
Description
Farmer John wants to repair a small length of the fence aroun...
分类:
其他好文 时间:
2015-02-02 23:17:42
阅读次数:
226
首先我们可以确定的是,对于val值小于0的节点都变成0. 假设一个集合内2个房间都能任意到达,那么我就可以吧集合内的所有点的价值都取到,并且可以达到任一点。实际上集合内的每个点是相同的,这样的集合就是一个强连通分量。 那么我们就可以用tarjin算法进行强连通缩点, 最后形成一个dag的图。在dag的图上面进行dp。可以先用拓扑排序后dp。或者建反响边记忆化搜索 。
VIEW CDDE
...
分类:
其他好文 时间:
2015-02-02 23:18:54
阅读次数:
196
这个写原创不知道会不会被人打,要想获取手机硬件的型号+ (NSString *)platform
{
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname("hw.machine", machine, &siz...
分类:
其他好文 时间:
2015-02-02 23:17:38
阅读次数:
280
??
1、高阶函数的介绍
高阶函数的英文名称是Higher Order Function,它们是以函数为参数的函数。主要用于映射(mapping)、过滤(filtering)、归档(folding)和排序(sorting)表。高阶函数让程序更具模块性,让函数更加通用。
函数sort具有2个参数,一个是需要排序的表,另一个是定序(Ordering)函数。下面展示了按...
分类:
其他好文 时间:
2015-02-02 23:17:53
阅读次数:
440
Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /SourceCache/UIKit/UIKit-3318.16.21/UITableView.m有时候用storyboard做uitableview会遇到这种bug,首先呢,你要检查下,自己写得cellide与storyboard里的cell的c...
分类:
其他好文 时间:
2015-02-02 23:16:51
阅读次数:
313