只记录一些我认为比较必要,容易出错的地方。(不断更新中) 内存:分为四段,代码段code segment,数据段data segment,栈stack, 堆heap。记住如下图 数据类型: 1.java整形常量默认为int类型,当使用long类型时,因此需要添加“l”或“L”,...
分类:
编程语言 时间:
2014-08-18 00:03:53
阅读次数:
229
三、内存监测工具DDMS-->Heap无论怎么小心,想完全避免badcode是不可能的,此时就需要一些工具来帮助我们检查代码中是否存在会造成内存泄漏的地方。Androidtools中的DDMS就带有一个很不错的内存监测工具Heap(这里我使用eclipse的ADT插件,并以真机为例,在模拟器中的情况...
分类:
移动开发 时间:
2014-08-18 00:01:14
阅读次数:
334
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:
其他好文 时间:
2014-08-17 21:08:02
阅读次数:
339
堆 & 栈的区别一 英文名称堆和栈是C/C++编程中经常遇到的两个基本概念。先看一下它们的英文表示:堆――heap栈――stack二 从数据结构和系统两个层次理解在具体的C/C++编程框架中,这两个概念并不是并行的。深入到汇编级进行研究就会发现,栈是机器系统提供的数据结构,而堆是由C/C++函数库提...
分类:
其他好文 时间:
2014-08-17 14:18:32
阅读次数:
240
GeoServer WMS地图请求内存限制问题
1.Rendering request would use 71833KB, whilst the maximum memory allowed is 65536KB
2.java.lang.NegativeArraySizeException null
3.java.lang.OutOfMemoryError: Java heap space Java heap space...
分类:
其他好文 时间:
2014-08-16 19:51:11
阅读次数:
236
Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe...
分类:
其他好文 时间:
2014-08-16 13:42:40
阅读次数:
200
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements fro...
分类:
其他好文 时间:
2014-08-16 11:12:43
阅读次数:
317
/* * remove space, tab and enter(new line) of file * usage : ./rmspace newFile */#includeint main(){ int c,i=0; while((c=getchar())!=EOF) { if...
分类:
其他好文 时间:
2014-08-16 09:37:50
阅读次数:
181
过去已无法改变,未来又难以琢磨,我们只能把握当下[问题描述]Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space ...
分类:
其他好文 时间:
2014-08-15 21:02:49
阅读次数:
165
Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n)
space is pretty s...
分类:
其他好文 时间:
2014-08-15 19:39:39
阅读次数:
222