数组定义的两个方法:
法一:将一个变量放进数组里,变量的值作为数组的内容
dir=($(ls .))
法二:一一列出变量值:
array=(red green blue yellow magenta)
array=(
oldboy
zhangyue
zhangyang
)
如何取数组中的一个值:
${array[i]}
如何表示数组长度:
len=${#array[*]}...
分类:
编程语言 时间:
2015-02-28 16:36:38
阅读次数:
142
<!doctype>
<html>
<head>
<title>圣杯布局</title>
<style>
body,div{margin:0;padding:0;}
.main{
background:red;
width:100%;
float:left;
}
.left{
background:yellow;
width:300px;
float:left;
margin-left:-300px;
}
.right{
back..
分类:
其他好文 时间:
2015-02-25 23:53:16
阅读次数:
253
Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:
The spa...
分类:
其他好文 时间:
2015-02-25 21:11:01
阅读次数:
177
[user]
name=***
email=***@***.***
[core]
editor=vim
[color]
status=auto
branch=auto
diff=auto
ui=true
pager=true
[color"branch"]
current=yellowreverse
local=yellow
remote=green
[color"diff"]
meta=yellowbold
frag=magentabold
old=redbold
new=greenbold
[color"..
分类:
其他好文 时间:
2015-02-14 01:18:56
阅读次数:
356
public enum Color{ //定义枚举并赋值 RED("红色", 1), Blue("蓝色", 2), Yellow("黄色", 3); private String colorName; private int colorCode; ...
分类:
编程语言 时间:
2015-02-11 18:13:42
阅读次数:
194
YUM是Yellow dog Updater, Modified的缩写,是由Duke University所发起的计划,目的就是为了解决RPM的依赖关系的问题,方便使用者进行软件的安装、升级等等工作。在此在特别说明的是,YUM只是为了解决RPM的依赖关系的问题,而不是一种其它的软件安装模式。而在redhat系统中未经授权是无法使用yum的,这里就介绍一种利用redhat光盘搭建本地yum服务器的方法。...
分类:
其他好文 时间:
2015-02-06 09:38:44
阅读次数:
126
yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器。基於RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软体包,无须繁琐地一次次下载、安装。yum提供了查找、安装、删除某一个、一组甚至全部软件包的命令,而且命令简洁而又好记。
yum的命令...
分类:
系统相关 时间:
2015-02-05 18:33:30
阅读次数:
223
一、使用for循环语句
1)for语句的结构
for变量名in取值列表
do
命令序列
done
执行流程:
首先将列表中的第1个取值赋给变量,并执行do……done循环体中的命令序列;然后将列表中的第2个取值赋给变量,并执行循环体中的命令序列……依次类推,直到列表中的所有取值都用完,最..
分类:
系统相关 时间:
2015-02-03 17:33:27
阅读次数:
202
一:例子
{CSDN:CODE:595033}
输出结果:
Hachi
true
yellow
二:分析
Animal a = new Dog("Hachi","yellow");
栈空间中创建引用a,指向堆中new出来的子对象Dog("Hachi","yellow");
a的实质就是一只Dog,a instanceof Dog返回True
但是...
分类:
编程语言 时间:
2015-02-01 19:14:50
阅读次数:
215
#head{width:200px; height: 200px; border: 1px solid #000; ?background: -moz-linear-gradient(top,red,yellow); ?background:-webkit-linear-gradient(top,red,yellow); ?background: -ms-linear-gradient...
分类:
其他好文 时间:
2015-01-30 17:54:39
阅读次数:
95