Daily Archives: 九月 3rd, 2007

当df -h卡住看哪个目录mount出问题

当df -h卡住看哪个目录mount出问题
执行mount 你会发现列出目录顺序和df  -h一样,然后看df -h卡在哪个目录,在mount列出的目录里找到相应目录,这个目录的下一个目录就是有问题的目录。

ps auxef能显示占用率和层次

ps auxef能显示占用率和层次

red hat查看内存和swap和硬盘和cpu信息的命令

red hat查看内存和swap信息的命令
1、查看内存大小的命令:
# grep MemTotal /proc/meminfo
2、查看SWAP大小的命令:
# grep SwapTotal /proc/meminfo
3、查看RAM和SWAP可用空间命令:
# free
4、查看/tmp大小的命令:
# df -k /tmp
5、查看硬盘空间的命令:
# df -k
6、查看计算机CPU情况的命令:
# grep “model name” /proc/cpuinfo

连连看封装算法

http://cuirunxing.googlepages.com/
连连看封装算法
LLKan封装的算法
public class LLKan
{
private int[,] lianLianKan;
private int mylength,myheight;
private int circletime;
public LLKan(int length,int height)
{
mylength=length+2;
myheight=height+2;
this.lianLianKan=new int[mylength,myheight];
for(int x=0;x<mylength;x++)
{
this.lianLianKan[x,0]=100;
this.lianLianKan[x,myheight-1]=100;
}
for(int y=0;y<myheight;y++)
{
this.lianLianKan[0,y]=100;
this.lianLianKan[mylength-1,y]=100;
}
}
public void Assignment(int x,int y,int myvalue)
{
this.lianLianKan[x,y]=myvalue;
}
public bool JudgeRoute(int startx,int starty,int endx,int endy)
{
//两次点击的是同一个图片的话,路径错误。
if(endx==startx&&endy==starty)
{
return false;
}
//两次点击的图片类型不同的话,路径错误。
if(lianLianKan[endx,endy]!=lianLianKan[startx,starty])
{
return false;
}
this.circletime=0;
if(this.RightLeft(startx,starty,endx,endy))
{
this.lianLianKan[startx,starty]=100;
this.lianLianKan[endx,endy]=100;
return true;
}
this.circletime=0;
if(this.UpDown(startx,starty,endx,endy))
{
this.lianLianKan[startx,starty]=100;
this.lianLianKan[endx,endy]=100;
return true;
}
return false;
}
private bool RightLeft(int x,int y,int endx,int endy)
{
this.circletime++;
//路径转折了3次以上,此路经寻找失败
if(circletime>3)
{
this.circletime–;
return false;
}
for(int hx=x-1;hx>=0;hx–)
{
//目标点在起始点水平向左的方向
if(hx==endx&&y==endy)
{
return true;
}
//从起始点开始水平向左的路不通
if(lianLianKan[hx,y]!=100)
break;
//寻找上下方向的路。
if(this.UpDown(hx,y,endx,endy))
{
return true;
}
}
for(int hx=x+1;hx<this.mylength;hx++)
{
//目标点在起始点水平向右的方向
if(hx==endx&&y==endy)
{
return true;
}
//从起始点开始水平向右的路不通
if(lianLianKan[hx,y]!=100)
break;
//寻找上下方向的路。
if(this.UpDown(hx,y,endx,endy))
{
return true;
}
}
this.circletime–;
return false;
}
private bool UpDown(int x,int y,int endx,int endy)
{
this.circletime++;
//路径转折了3次以上,此路经寻找失败
if(circletime>3)
{
this.circletime–;
return false;
}
for(int hy=y-1;hy>=0;hy–)
{
//目标点在起始点垂直向上的方向
if(x==endx&&hy==endy)
{
return true;
}
//从起始点开始垂直向上的路不通
if(lianLianKan[x,hy]!=100)
break;
//寻找左右方向的路。
if(this.RightLeft(x,hy,endx,endy))
{
return true;
}
}
for(int [...]

Excel的记录左边有加减号,可以展开收缩若干记录,请教怎么做的

2006/5/17
Excel的记录左边有加减号,可以展开收缩若干记录,请教怎么做的
数据-组及分级显示-
对数据进行分类汇总时,也自动生成的。