由于在默认的情况下digitalocean的VPS没有设置swap分区,用df -h命令查看的话,整个VPS上只有一个20G的分区。用free命令查看的话,swap分区的大小是0,增加swap分区的命令如下dd if=/dev/zero of=/.SWAP bs=1M count=1024mks.....
分类:
其他好文 时间:
2014-11-24 23:59:13
阅读次数:
767
回调函数基本的javascript代码:function findNodes(func){ //创建一个空的数组 var nodes = []; //得到要用的东西 var htmlNodes = document.getElementsByClassName('findLi'); //把...
分类:
其他好文 时间:
2014-11-24 23:55:44
阅读次数:
232
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/ 9 20
...
分类:
其他好文 时间:
2014-11-24 22:33:13
阅读次数:
272
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).
For example:
Given binary ...
分类:
其他好文 时间:
2014-11-24 22:31:45
阅读次数:
196
Clone GraphClone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are l...
分类:
其他好文 时间:
2014-11-24 20:35:18
阅读次数:
243
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first
two lists.
#include
#include
typedef struct ListNode {
...
分类:
其他好文 时间:
2014-11-24 15:24:26
阅读次数:
183
TreeDescriptionYou are given a tree withNnodes. The tree’s nodes are numbered 1 throughNand its edges are numbered 1 throughN? 1. Each edge is associa...
分类:
其他好文 时间:
2014-11-24 14:56:46
阅读次数:
152
应用服务器一般都支持热部署或者热加载(Hot Deployment或者Hot Swap),即更新代码保存时把新编译类替换旧的类,后面的程序就执行新类中的代码。这也是由各种应用服务器的独有的类加载器层次实现的。那如何在我们的程序中也实现这种热加载功能呢? 即要在不重启JVM虚拟机的情况下,换个类,J....
分类:
编程语言 时间:
2014-11-24 13:27:11
阅读次数:
406
1 #include 2 int h[101]; 3 int n; 4 void swap(int x,int y)//交换 5 { 6 int t=h[x]; 7 h[x]=h[y]; 8 h[y]=t; 9 }10 void siftdown(int i)//调整一次1...
分类:
编程语言 时间:
2014-11-24 13:27:00
阅读次数:
129
介绍 /dev/shm/是一个使用就是tmpfs文件系统的设备,其实就是一个特殊的文件系统。redhat中默认大小为物理内存的一半,使用时不用mkfs格式化。 tmpfs是Linux/Unix系统上的一种基于内存的虚拟文件系统。tmpfs可以使用您的内存或swap分区来存储文件(即它的存储空间在vi...
分类:
系统相关 时间:
2014-11-24 11:44:12
阅读次数:
311