1.mkdir /var/swapchmod 700 /var/swap(可以不用设置)2.dd if=/dev/zero of=/var/swap/file bs=1024 count=65536 (dd可以创建固定大小的文件) /dev/zero (尾设备):向文件中添加0 /dev/nul.....
# dd if=/dev/zero of=/tmp/myswap bs=1M count=4096# mkswap /tmp/myswap# swapon /tmp/myswap# vim /etc/fstab/tmp/myswap swap swap defaults 0 0 (开机时启动此swa...
分类:
其他好文 时间:
2015-09-11 14:21:34
阅读次数:
135
Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen...
分类:
其他好文 时间:
2015-09-10 16:01:05
阅读次数:
164
增加12G的Swap内存命令如下:dd if=/dev/zero of=/swap/tmpswap bs=1M count=12000chmod 600 tmpswap#这步是对划出来的硬盘进行格式化/sbin/mkswap /swap/tmpswap#启动swap空间/sbin/swapon /s...
分类:
其他好文 时间:
2015-09-10 09:38:31
阅读次数:
181
使用Android Studio 出现该问题:"com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files...
分类:
移动开发 时间:
2015-09-09 16:27:20
阅读次数:
285
日志中会有一些信息:dmesg | grep -i tainted具体代码可以通过proc看到:cat /proc/sys/kernel/tainted数字的意义:tainted:Non-zero if the kernel has been tainted. Numeric values, whi...
分类:
系统相关 时间:
2015-09-09 09:48:00
阅读次数:
260
数组1 数组字面量2 长度3 删除4 列举5 混淆的地方6 方法7 维度数组1 数组字面量var empty = [];var numbers = [ 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eigh...
分类:
编程语言 时间:
2015-09-08 12:01:14
阅读次数:
263
Task descriptionA non-empty zero-indexed array A consisting of N integers is given. A pair of integers (P, Q), such that 0 ≤ P avg && left < right - ....
分类:
其他好文 时间:
2015-09-06 22:52:26
阅读次数:
395
Problem:Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more of the preceding ele...
分类:
其他好文 时间:
2015-09-05 12:25:23
阅读次数:
148
/*ID: modengd1PROG: zerosumLANG: C++*/#include #include #include using namespace std;int op[10];void output(int limit){ cout<<1; for(int i=0;i<l...
分类:
其他好文 时间:
2015-09-04 19:54:30
阅读次数:
228