这个日志也是参考了几位网友的经验(例如这篇日志:http://blog.csdn.net/waleking/article/details/7578517)。他们推荐使用Mac
Ports这样的软件来管理和安装所有的安装包。按照这里的教程:http://www.macports.org/install.php,需要首先安装Xcode,如果下载网速不好的话,使用浏览器下载可能需要数个小时。这里建...
分类:
编程语言 时间:
2014-07-22 23:05:34
阅读次数:
354
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
错误信息如下:
File "E:\work\pydev\pythodemo\src\code\string.py", line 1
SyntaxError: Non-ASCII character '\xe5' in file E:\work\pydev\pythodemo\src\code\string.py on line 1, but no encoding declared; see ...
分类:
编程语言 时间:
2014-05-01 22:00:23
阅读次数:
440
看了一些基础的 Python 入门教程后,深深感觉到 Python 的简洁与强大,这是我的第一个 Python Demo。以下是完整代码与运行截图。
代码:
# encoding: utf-8
'''
@author: Techzero
@email: techzero@163.com
@time: 2014-4-30 下午1:31:04
'''
import os
import sys
im...
分类:
编程语言 时间:
2014-04-30 22:18:39
阅读次数:
433
刚开始学习Python时,看资料和别人介绍中提到过,安装Python的包有的用easy_install, setuptools, 有的使用pip,distribute。现在把这些相关的资料整理一下,能更清晰的了解Python的设计,关于这些可以参考http://guide.python-distribute.org/installation.html。...
分类:
编程语言 时间:
2014-04-29 13:42:22
阅读次数:
358
#生成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
为了将各种不同的语言都包含在同一的字符集中,满足国际间的信息交流国际上制定了UNICODE字符集。
通过使用UNICODE字符集可以满足跨语言的文字处理,有效的避免乱码产生。
使用方法:在脚本中增加以下代码行之一
#-*- coding:utf-8 -*-#coding:utf-8
注意:如果是在命令行输出中文,则需要设定编码为cp936,文件格式保存为...
分类:
编程语言 时间:
2014-04-29 13:12:20
阅读次数:
406