A. Theatre Square
B. Spreadsheets
C. Ancient Berland Circus...
分类:
其他好文 时间:
2015-05-13 14:52:43
阅读次数:
124
前言
你被概率性的 OOM 困扰么?有时候,OOM 像幽灵一样,挥之不去,可真想把它揪出来时,又捉之不着。或许,是时候用 LeakCanary 来诊断一下了。它是一个用来检查 Android
下内存泄漏的开源库,这篇文章主要介绍其用法、架构和其背后的实现原理。
Square 有篇文章介绍了开发这个库的原因。他们的一个付款流程里,需要用到用户的签名,他们直接用 Bitmap 来画签名...
分类:
移动开发 时间:
2015-05-13 10:37:10
阅读次数:
346
本文译自:https://corner.squareup.com/2015/05/leak-canary.html(LeakCanary是由Square公司刚刚开源用于查找Android内存泄露的库) java.lang.OutOfMemoryError
at android.graphics.Bitmap.nativeCreate(Bitmap.java:-2)...
分类:
其他好文 时间:
2015-05-11 01:25:25
阅读次数:
219
1 from decimal import getcontext, Decimal 2 3 4 def main(): 5 n = int(raw_input()) 6 p = int(raw_input()) 7 8 getcontext().prec = p+10...
分类:
其他好文 时间:
2015-05-10 20:16:05
阅读次数:
174
SOJ3191 ,Free square,容斥原理,二分,数论。
A positive integer is said to be squarefree if it is divisible by no perfect square larger than 1.
For example, the first few squarefree numbers are {1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, ...}.
Can you tell me the...
分类:
其他好文 时间:
2015-05-10 14:25:13
阅读次数:
98
https://leetcode.com/problems/sqrtx/Implementint sqrt(int x).Compute and return the square root ofx.解题思路:这道题的题意是,算出最接近sqrt(x)的整数,正好等于或者略小于。这里注意的是,不能mi...
分类:
其他好文 时间:
2015-05-09 22:04:13
阅读次数:
175
题目传送门 1 /* 2 题意:问n最少能是几个数的平方和 3 01背包:j*j的土地买不买的问题 4 详细解释:http://www.cnblogs.com/vongang/archive/2011/10/07/2200721.html 5 */ 6 #include 7...
分类:
其他好文 时间:
2015-05-09 16:25:33
阅读次数:
105
今天看了下微博,扔物线分享了个内存检测的工具:内存泄露是 OOM 最常见的原因,但它的侦测需人工排查,往往眼看瞎也未必能找到泄露的内存。Square 新库 LeakCanary 用一种巧妙的思路实现了自动探测内存泄露,这已经帮他们减少了94%的 OOM。 在这篇文中,Square 介绍了这个帅气的库...
分类:
其他好文 时间:
2015-05-09 13:02:48
阅读次数:
181
定义和用法lineCap 属性设置或返回线条末端线帽的样式。注释:"round" 和 "square" 会使线条略微变长。默认值:buttJavaScript 语法:context.lineCap="butt|round|square";属性值值描述butt默认。向线条的每个末端添加平直的边缘。ro...
分类:
其他好文 时间:
2015-05-09 10:06:29
阅读次数:
126
DescriptionThere live square people in a square country. Everything in this country is square also. Thus, the Square Parliament has passed a law about...
分类:
其他好文 时间:
2015-05-08 21:46:59
阅读次数:
155