1.格式 case 值 in val1) #模式1 command ... ;; val2) #模式2 command ... ;; val3) #模式3 command ... ;; *) #如果没有匹配上面模式的话,匹配这个 command ... ;; esac 例子: echo "输入 1 ...
分类:
其他好文 时间:
2020-06-16 23:51:11
阅读次数:
95
按照指定顺序排序 使用场景:需要查询捆号为10,23,9...的数据,查询结果也是按照输入的顺序排列 sql: select * from store where xh in (10,23,9) order by case xh when 10 then 1 when 23 then 2 when ...
分类:
数据库 时间:
2020-06-16 20:43:29
阅读次数:
69
执行过程: 程序执行到switch处,首先将括号中变量或者表达式的值计算出来,然后拿着这个值依次跟每个case后面所带的值进行匹配,一旦匹配成功,则执行该case所带的代码,执行完成后,遇到break。 跳出switch-case结构。如果,跟每个case所带的值都不匹配。就看当前这个switch- ...
case用法 case 值 in 模式1) command1 command2 command3 ;; 模式2) command1 command2 command3 ;; *) command1 command2 command3 ;; esac 值可以为变量或常数 注意 模式1) 模式2) *) ...
分类:
系统相关 时间:
2020-06-16 15:23:40
阅读次数:
68
Repeated DNA Sequences (M) 题目 All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying D ...
分类:
其他好文 时间:
2020-06-16 10:26:45
阅读次数:
64
if then/else 分支 # “[]”是调用test命令的一种形式 #文件操作 # [ -e file ] :判断文件是否存在 # [ -d dir ] :判断目录dir是否存在 # [ -b file ] :判断块设备是否存在 # [ -c file ] :判断字符设备是否存在 # [ –s ...
分类:
系统相关 时间:
2020-06-16 01:25:20
阅读次数:
80
题目描述 求1+2+3+...+n,要求不能使用乘除法、for、while、if、else、switch、case等关键字及条件判断语句(A?B:C)。 运用&& n-- 到最后条件前面为0之后就不会计算后面的 class Solution { public: int Sum_Solution(in ...
分类:
其他好文 时间:
2020-06-15 20:43:17
阅读次数:
50
if单选择结构 if{ //如果布尔表达式为true将执行的语句 } 如果是false将跳过语句 if双选择结构 语法 if(布尔表达式){ //如果布尔表达式的值为ture }else{ //如果布尔表达式的值为false } else后面没有布尔表达式 if多选择结构 if(布尔表达式1){ / ...
分类:
编程语言 时间:
2020-06-14 23:51:00
阅读次数:
91
启动系统,按ESC键,进入GRUB页面,进入到命令行 1. Start up your computer and when you see the Grub screen, do the following: 2. In the Grub menu press the ‘e’ key to edit ...
分类:
编程语言 时间:
2020-06-14 23:42:03
阅读次数:
239
一、出现的场景 依赖的sharding-jdbc-core的版本从 <version>4.0.0</version>升级到<version>4.1.1</version>,导致项目启动特别慢 <dependency> <groupId>org.apache.shardingsphere</group ...
分类:
Web程序 时间:
2020-06-14 15:13:08
阅读次数:
454