stringkjid="0001";if(Cache[kjid]==null){S_spacesp=Lib.S_spaceLib.SelectOne(kjid);Cache.Add(kjid,sp,null,DateTime.Now.AddHours(3),TimeSpan.Zero,CacheItemPriority.Normal,null);}S_spacespW=(S_space)Cache[kjid];Cache.Remove(kjid);S_spacespp=Lib.S_spaceLib.Selec..
分类:
系统相关 时间:
2015-03-11 15:00:27
阅读次数:
184
在这篇计算机底层知识拾遗(五)理解块IO层 中讲了块缓存buffer cache块缓存,这篇说说页缓存page cache以及相关的地址空间address_space的要点。
在Linux 2.4内核中块缓存buffer cache和页缓存page cache是并存的,表现的现象是同一份文件的数据,可能即出现在buffer cache中,又出现在页缓存中,这样就造成了物理内存的浪费。Linux ...
分类:
系统相关 时间:
2015-03-11 14:58:59
阅读次数:
263
awk: cmd. line:1: (FILENAME=- FNR=192) fatal: print to "standard output" failed (No space left on device)1045827 awk: cmd. line:1: (FILENAME=- FNR=218...
分类:
其他好文 时间:
2015-03-11 12:34:30
阅读次数:
539
Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra space?A s...
分类:
其他好文 时间:
2015-03-11 12:25:49
阅读次数:
134
Palindrome Number问题:Determine whether an integer is a palindrome. Do this without extra space.思路:常用的进制遍历方法while(num != 0){ remian = num % 进制; ...
分类:
其他好文 时间:
2015-03-11 12:07:14
阅读次数:
148
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:
编程语言 时间:
2015-03-11 10:40:39
阅读次数:
123
Sort a linked list in O(n log n) time using constant space complexity.这题的时间复杂度要求是O(n logn),很容易想到用mergeSort来解。/** * Definition for singly-linked list. ...
分类:
其他好文 时间:
2015-03-09 23:54:04
阅读次数:
212
线上java应用报永久代(PermGen)OOM,遇到永久代OOM那就没啥办法了,只能为永久代扩容。
要做的就是改大PermSize这个参数。发现这个实例的启动参数里并没有PermSize的定义。那么这个实例一定是用的永久代的默认大小。永久代的默认大小是多少呢?百度的一下,JDK1.6的默认大小是82M。果真如此吗?在这个实例执行 stat
-gccapacity pid ,命令结...
分类:
编程语言 时间:
2015-03-09 20:54:43
阅读次数:
178
JSON.stringify(value [, replacer] [, space])
value必需。 要转换的 JavaScript 值(通常为对象或数组)。replacer可选。 用于转换结果的函数或数组。如果 replacer 为函数,则 JSON.stringify 将调用该函数,并传入每个成员的键和值。 使用返回值而不是原始值。 如果此函数返回 undefined,则排除成员。 根...
分类:
Web程序 时间:
2015-03-09 16:22:14
阅读次数:
195