Linux
shell脚本中shift的用法说明
shift命令用于对参数的移动(左移)。
示例1:依次读取输入的参数并打印参数个数:
run.sh:
#!/bin/bash
while [ $# != 0 ];do
echo "第一个参数为:$1,参数个数为:$#"
shift
done
输入如下命令运行:run.sh a b c d e...
分类:
系统相关 时间:
2014-05-01 22:06:54
阅读次数:
475
问题现象:
在Maven中使用Jetty运行web项目有时会抛出如下异常:java.lang.ArrayIndexOutOfBoundsException: 48188
问题原因:
默认Jetty会解析程序中的注解信息,需要取消对注解信息。
解决方法:
在web.xml中web-app标签中添加属性metadata-complete="true"。...
分类:
Web程序 时间:
2014-05-01 22:01:39
阅读次数:
393
常见的输出语句echo()可以一次输出多个值,多个值之间用逗号分隔。echo是语言结构(language
construct),而并不是真正的函数,因此不能作为表达式的一部分使用。print()函数print()打印一个值(它的参数),如果字符串成功显示则返回true,否则返回false。print...
分类:
其他好文 时间:
2014-05-01 21:40:50
阅读次数:
355
版本不对的原因。具体在10.5.9下修改此参数即可解决问题。LoadFunction()
has an ACritical parameter. It is set to True by default, but can be set to
False for individual function...
分类:
系统相关 时间:
2014-05-01 20:14:57
阅读次数:
594
encodingFilter
org.springframework.web.filter.CharacterEncodingFilter
encoding
UTF-8
forceEncoding
true
...
分类:
编程语言 时间:
2014-04-29 13:43:21
阅读次数:
329
在项目中有时需要验证用户是否以post方式提交。下面是验证源码:
public boolean checkMethod(String method) {
if (request.getMethod().equalsIgnoreCase(method)) {
return true;
}
else {
...
分类:
Web程序 时间:
2014-04-29 13:34:20
阅读次数:
350
#生成excel
#ljl
use Spreadsheet::WriteExcel;
my %us;
while(($key, $value) = each %us){
print "$key|$value\n";
}
# 创建一个新的EXCEL文件
my $workbook = Spreadsheet::WriteExcel->new('poi_count_top15....
分类:
其他好文 时间:
2014-04-29 13:33:21
阅读次数:
327
Problem:
You are trying to setup a mirroring on a Database called xxxDB(SQL server 2012).
You are getting this error while trying to setup mirroring.
“Neither the partner nor the witness server ins...
分类:
数据库 时间:
2014-04-29 13:33:20
阅读次数:
444
使用函数操作链表
1:计算链表中结点的个数:定义一个Length_list()函数用于计算链表中结点的个数
函数代码:
//计算链表中结点的个数
void Length_list(PNODE pHead)
{
PNODE p = pHead->pNext;
int len = 0;
while(NULL != p)
{
len++;
p = p->pNext;
...
分类:
其他好文 时间:
2014-04-29 13:28:21
阅读次数:
302
FAILED: Error in metadata: java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException org.apache.hadoop.hive.hbase.HBaseSerDe: columns has 3 elements while hbase.columns.mapping has 4 elements (counting the key if implic...
分类:
其他好文 时间:
2014-04-29 13:17:21
阅读次数:
387