类似于其他高级程序语言,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
1. 文件权限简介
linux文件权限有9个,三组表示,owner, group, others,每组又包含r,w, x三种状态。
2. 根据数字修改权限
r, w, x三种权限通过数字来代表:
r: 4
w: 2
x: 1
每组的权限为上面三个相加。
比如权限为; [-rwxrwx---]...
分类:
系统相关 时间:
2014-06-11 06:30:33
阅读次数:
381
如果你指定了\n为sqoop导入的换行符,mysql的某个string字段的值如果包含了\n, 则会导致sqoop导入多出一行记录。有一个选项--hive-drop-import-delimsDrops \n, \r, and \01 from string fields when importing to Hive.这样\n \r 和\01都被自动删除,不会捣乱了。...
分类:
其他好文 时间:
2014-06-11 06:05:59
阅读次数:
310
1. linux用户和用户组
linux是多用户操作系统,为了控制文件的权限,将文件和目录的权限分为下面三种角色:
User: 文件所有者,
Group: 用户组,
Others: 其他人。
2. linux文件属性...
分类:
系统相关 时间:
2014-06-11 06:03:58
阅读次数:
346
1. linux下修改文件用户组
chgrp: change group的简写,修改文件所属的用户组。
linux下修改文件所有者
chown :change owner的简写, 修改文件的所有者。...
分类:
系统相关 时间:
2014-06-11 00:51:47
阅读次数:
336
戳我去解题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
我手动配置hibernate4.3.4,测试的时候出现:
Caused by: org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set
我是按照官方文档配置的,但是官方文档的代码好像有点问题
这是官方文档里面的那个工具类的部分代码:return new Confi...
分类:
系统相关 时间:
2014-06-10 07:26:34
阅读次数:
371