以下结果与书中描述略有出入,因为书中没有给出代码示例,因此只能认为本人的结果与书中描述的现象大致相似;主要的函数:查找函数(同时伸展): 1 ETree *findNode(ETree *&root,const int &data) 2 { 3 ETree *tmp; 4 E...
分类:
其他好文 时间:
2014-12-18 14:54:06
阅读次数:
297
#include
#include
int main()
{
int this_sum, max_sum, old_first, old_last, new_first;
int n,i, tmp, flag = 1;
int first = 1;
int *data;
scanf("%d", &n);
this_sum= max_sum = old_first = new_...
分类:
其他好文 时间:
2014-12-18 00:18:16
阅读次数:
194
测试方式:Stopwatch sw = new Stopwatch();sw.Start();string tmp = "";StringBuilder sb = new StringBuilder();for (int i = 0; i < 10000; i++){ //tmp += "|"...
分类:
其他好文 时间:
2014-12-17 22:28:33
阅读次数:
231
一、系统环境总结:二、安装yum源:1、安装磁盘yum源:一、安装xfs文件系统:1、配置yum源:(光盘)vi /etc/yum.repos.d/yum.repo[Server]name=serverbaseurl=file:///tmp/cddir/Server/enabled=1gpgchec...
分类:
数据库 时间:
2014-12-17 20:16:21
阅读次数:
266
1、当前状态
2、在172.10.2.172(node2)再添加一个mon(mon.node2)
ssh node2
vim /etc/ceph/ceph.conf 添加mon.node2的相关配置
ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.cl...
分类:
其他好文 时间:
2014-12-17 18:33:10
阅读次数:
536
原理: 在函数或子过程的内部,直接或者间接地调用自己的算法。举例: 已知数组 a=[1,[2,[3,[4,'null']]]],算法实现数组 b=[4,[3,[2,[1,'null']]]],代码如下: var tmp = [], a = [1,[2,[3,[4,"null"]]]];func...
分类:
编程语言 时间:
2014-12-17 16:00:45
阅读次数:
172
#include
#include
using namespace std;
void InsertionSort(int a[],int N)
{
int j,p,tmp;
for(p=1;p0 && a[j-1]>tmp;j--)
{
a[j]=a[j-1];
}
a[j]...
分类:
编程语言 时间:
2014-12-17 01:37:09
阅读次数:
172
USE IS21_xxx;if object_id('tempdb..#tmp') is not null drop table #tmpcreate table #tmp (cntr nvarchar(10),ip nvarchar(50))insert into #tmpVALUES('1049...
分类:
数据库 时间:
2014-12-17 00:05:08
阅读次数:
278
[语法]: cd [目录]
[说明]:本命令用于改变当前的工作目录,无参数时使用环境变量$HOME 作为其参数,$HOME 一般为注册时进入的路径。
[例子]:
cd 回到注册进入时的目录
cd /tmp 进入 /tmp 目录
cd ../ 进入上级目录...
分类:
其他好文 时间:
2014-12-16 19:13:46
阅读次数:
194
[语法]: mkdir [-m 模式] [-p] 目录名
[说明]: 本命令用于建立目录,目录的存取模式由掩码(umask)决定,要求对其父目录具有写权限,目录的UID和GID为实际UID和GID
-m 按指定存取模式建立目录
-p 建立目录时建立其所有不存在的父目录
[例子]:
mkdir tmp 在当前目录下建立子目录 tmp
mkdir -m...
分类:
其他好文 时间:
2014-12-16 19:10:56
阅读次数:
315