类似于其他高级程序语言,Shell中case语句的作用也是作为多项选择使用,语法如下:
[plain]
case word in
pattern1)
Statement(s) to be execute if pattern1 matchs
;;
pattern2)
Statement(s) to b...
分类:
其他好文 时间:
2014-06-11 07:09:18
阅读次数:
212
循环结构 : while循环 do...while循环(几乎不用)
for循环(使用最多)特点:在给定的条件成立时,反复执行某程序段,直到条件不成立为止。给定的条件为循环条件,反复执行的程序段位循环体。一、while循环while(条件表达式){
循环语句;}#import int mai...
分类:
移动开发 时间:
2014-06-10 21:36:59
阅读次数:
346
一、循环语句
1. for循环
1) for -in 循环,对于数据范围,序列,集合等中的每一个元素,都执行一次
for a
in
0...5{}
//循环迭代,从a=0到a=5,执行{}里的代码
注意:a只循环中存在,也就是出了{}a就不存在了
或者遍历数组
...
分类:
其他好文 时间:
2014-06-10 15:28:39
阅读次数:
255
变量赋值变量的赋值有五种:使用read命令,直接赋值,使用命令行参数,使用命令行的输出结果,从文件读取。1
先说一下从read命令吧:(主要是在需要交互时使用)Read命令是系统内置命令,语法格式为:read 变量1
变量2当Shell脚本执行到read命令时,将暂停脚本的执行并等待键盘的输入...
分类:
其他好文 时间:
2014-06-10 13:04:32
阅读次数:
209
Given a string s consists of upper/lower-case alphabets and empty space characters '
', return the length of last word in the string.
If the last word does not exist, return 0.
Note: A word is...
分类:
其他好文 时间:
2014-06-10 10:52:03
阅读次数:
180
戳我去解题Given an array of strings, return all
groups of strings that are anagrams.Note: All inputs will be in
lower-case.Anagram(回文构词法)是指打乱字母顺序从而得到新的单词回文...
分类:
其他好文 时间:
2014-06-10 08:44:13
阅读次数:
275
You are climbing a stair case. It takesnsteps
to reach to the top.Each time you can either climb 1 or 2 steps. In how many
distinct ways can you climb...
分类:
其他好文 时间:
2014-06-10 08:41:34
阅读次数:
206
问题:
You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
分析:
该问题是符合斐波那契数列的,具体...
分类:
其他好文 时间:
2014-06-10 08:19:31
阅读次数:
194
题目
You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
方法
从后往前求解...
分类:
其他好文 时间:
2014-06-10 07:38:21
阅读次数:
171
首先介绍一下Power Designer:它是Sybase公司的CASE工具集,使用它可以方便地对管理信息系统进行分析设计,它几乎包括了数据库设计全过程。利用Power Designer可以制作数据流程图、概念数据模型、物理数据模型,还可以为数据仓库制作结构模型,对团队设计模型进行控制。它可以与许多流行的软件开发工具如PowerBuilder、Delphi、VB等相配合缩短开发时间以及使系统设计更...
分类:
数据库 时间:
2014-06-10 06:07:35
阅读次数:
367