图片放大的思路: 第一、可以通过Matrix对象来变换图像,在选择的时候放大,在失去焦点的时候,缩小到原来的大小。double scale = 1.2;int width = bm.getWidth();int height = bm.getHeight();Log.i("size:", wi...
分类:
移动开发 时间:
2014-07-09 16:35:13
阅读次数:
234
原因:没有配置resolv.conf
解决方法:
到/etc目录下配置resolv.conf加入nameserver IP,如:
nameserver 8.8.8.8
nameserver 8.8.4.4
search localdomain
保存再次运行上面命令就可以。
关键一点 serach那一行要在nameserver的后面...
分类:
其他好文 时间:
2014-07-09 13:13:24
阅读次数:
137
Write an algorithm such that if an element in an MxN matrix is 0, its entire row and column is set to 0.
分类:
其他好文 时间:
2014-07-08 22:17:29
阅读次数:
193
Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do th...
分类:
其他好文 时间:
2014-07-08 22:06:25
阅读次数:
222
原题: ZOJ 3674http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3674题意不难理解,很容易想到用暴力,但是无从下手,不知道怎么实现。后来看了网上的代码,直接用vector和map暴力,用到了set_intersect...
分类:
其他好文 时间:
2014-07-08 22:04:57
阅读次数:
239
str_replace
(PHP 4, PHP 5)
str_replace — Replace all occurrences of the search string with the replacement string
Description
mixed str_replace ( mixed $search , mixed $replace , mixed $...
分类:
Web程序 时间:
2014-07-08 17:09:58
阅读次数:
302
这要是碰上现场赛我得被搞死 从RE到TLE到WA已疯。。
这题建图没有那么直接,通过给出的不等式关系一时想不到怎么建图
所以要对题目给的条件一定程度化简,将不等式两边取对数化简得到Sa-Sb
要注意w取double类型
其次,这题卡时间,根据经验加剪枝:
1、出队次数>sqrt(n)则判断有负环
2、统计总的入队次数,>2n则判断有负环
一般情况下不用这个,因为不严谨
...
分类:
其他好文 时间:
2014-07-08 17:02:17
阅读次数:
220
Unique Binary Search Trees
My Submissions
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?
For example,
Given n = 3, there are a total of 5 uniqu...
分类:
其他好文 时间:
2014-07-08 14:18:39
阅读次数:
159
function GetParam(name) { var match = new RegExp(name + "=*([^&]+)*", "i").exec(location.search); if (match...
分类:
其他好文 时间:
2014-07-08 11:27:15
阅读次数:
181
1、正则表达式是什么,有什么作用。GlobalsearchREgularexpressionandPrintouttheline.正则表达式:正则表达式引擎正则表达式:是一类字符所书写的模式,其中许多字符不表示其字面意义,而是表达控制或通配等功能,文本搜索工具,根据用户指定的文本模式(搜索条件)对目标文件..
分类:
其他好文 时间:
2014-07-08 10:16:38
阅读次数:
232