在2011年的WWDC中,苹果提到90%的crash是由于内存管理引起的,ARC(Automatic Reference Counting)就是苹果给出的解决方案。启用ARC后,开发者不需要担心内存管理,编译器会为你处理这一切(注意ARC是编译器特性,而不是iOS运行时特性,更不是其他语言中的垃圾收...
分类:
其他好文 时间:
2015-07-20 16:05:22
阅读次数:
173
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1396
//根据每增加一条边所增加的正三角和倒三角的个数构造方程
#include
#include
__int64 dp[510];
int main()
{
int n;
memset(dp,0,sizeof(dp));
dp[1]=1;
for(int i=2;i<=500;i+...
分类:
其他好文 时间:
2015-07-20 11:04:12
阅读次数:
126
简述:排序算法,参见http://www.cplusplus.com/reference/algorithm/?kw=algorithm待解决问题:各种排序算法的实现/*template void sort (RandomAccessIterator first, RandomAccessItera...
分类:
编程语言 时间:
2015-07-20 01:08:14
阅读次数:
200
one recursive approach to solve hdu 1016, list all permutations, solve N-Queens puzzle.
reference: the video of stanford cs106b lecture 10 by Julie Zelenski https://www.youtube.com/watch?v=NdF1QDTRkck...
分类:
移动开发 时间:
2015-07-19 18:07:58
阅读次数:
176
C#是类型安全的开发语言,它的数据类型分为值类型(ValueType)和引用类型(Reference Type)两种。 一、值类型(Value Type)字 符:char U+0000-U+ffff 16位Unicode字符(其实字符也是一种整型)整 型:sbyte、byte、short、...
分类:
Web程序 时间:
2015-07-19 17:42:11
阅读次数:
169
075 Sort Colors这道题最偷懒的方法当时是 counting sort. 但是显然这道题不是考这个, 而且那样需要扫描2便。 真正的解法是 one scan, 设置一头一尾 加上 Current一共三个指针进行 swapclass Solution: # @param {integ...
分类:
其他好文 时间:
2015-07-19 14:53:44
阅读次数:
75
题目如下:
The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N. For example, given N being 12, there a...
分类:
其他好文 时间:
2015-07-19 13:28:24
阅读次数:
131
It is possible to write five as a sum in exactly six different ways:
4 + 1
3 + 2
3 + 1 + 1
2 + 2 + 1
2 + 1 + 1 + 1
1 + 1 + 1 + 1 + 1
How many different ways can one hundred be written as a su...
分类:
其他好文 时间:
2015-07-18 18:41:52
阅读次数:
94
git clone时,出现这个错误.
remote: Counting objects: 4592517, done.
remote: Compressing objects: 100% (1140430/1140430), done.
error: RPC failed; result=56, HTTP code = 2008.82 MiB | 4.72 MiB/s
f...
分类:
其他好文 时间:
2015-07-18 18:38:55
阅读次数:
118
PendingIntent,待确定的意图,等待的意图官网链接:http://developer.android.com/reference/android/app/PendingIntent.html官网关于该类的继承关系,PendingIntent继承自Object。因为该类为final,所以没有...
分类:
移动开发 时间:
2015-07-18 15:24:42
阅读次数:
168