DOS命令sqlite3 中文乱码解决

在dos中使用sqlite3进行操作,由于dos窗口默认的是GBK编码,而sqlite通常为UTF-8,因此会出现sqlite中的中文字符在dos窗口中显示的是乱码的问题。

打开dos窗口,输入chcp 65001然后回车;注:65001即为UTF-8格式,936是GBK;

对着dos窗口的标题右键,在弹出来的窗口中选择属性,在弹出的窗口中将字体更改为:Lucida Console

 

Anconda 安装psycopg2

环境:Ubuntu 12.04,  Anaconda-1.9.2-Linux-x86_64

首先安装binstar

conda install binstar

然后使用binstar搜索psycopg2的网上安装路径

binstar search -t conda psycopg2
Run ‘binstar show <USER/PACKAGE>’ to get more details:
Packages:
Name | Access | Package Types | Summary
————————- | ———— | ————— | ——————–
auto/psycopg2database | published | conda | http://jimmyg.org/work/code/psycopg2databa se/index.html
bencpeters/psycopg2 | public | conda | Python-PostgreSQL Database Adapter
chuongdo/psycopg2 | public | conda | Python-PostgreSQL Database Adapter
dan_blanchard/psycopg2 | public | conda | http://initd.org/psycopg/
davidbgonzalez/psycopg2 | public | conda | None
deric/psycopg2 | public | conda | None
jonrowland/psycopg2 | public | conda | None
kevincal/psycopg2 | published | conda |
topper/psycopg2-windows | public | conda | PostgreSQL adapter for the Python programm ing language
trent/psycopg2 | public | conda | None
Found 10 packages

可知其中一个路径为bencpeters/psycopg2

安装如下:

 conda install -c https://conda.binstar.org/bencpeters psycopg2
Fetching package metadata: .Error: unknown host: http://repo.continuum.io/pkgs/pro/linux-64/
.Error: unknown host: http://repo.continuum.io/pkgs/free/linux-64/
.
Solving package specifications: .
Package plan for installation in environment /home/jerry/anaconda:

The following packages will be downloaded:

package | build
—————————|—————–
psycopg2-2.5.3 | py27_0 393 KB

The following packages will be linked:

package | build
—————————|—————–
psycopg2-2.5.3 | py27_0 hard-link

Proceed ([y]/n)? y

Fetching packages …
psycopg2-2.5.3-py27_0.tar.bz2 28% |#######################

Thunderbird 安装importexporttool

环境:windows 7,  Thunderbird 31.3.0

由于需要使用邮件的内容来做NLP,因此需要导出并预处理。对于Thunderbird,需要安装importexporttool。

本地安装:

从https://addons.mozilla.org/zh-cn/thunderbird/addon/importexporttools/下载这个工具,然后到点击Thunderbird中的“附加组件”进入“附加组件管理器”,右上角有一个齿轮按钮。单击出现”从文件安装附加组件(I)…”,安装即可。

使用Thunderbird就出“以 mbox/eml格式导入或导出”的选项

 

VirtualBox UUID already exists

今天创建virtualbox文件时,发现报错如下:

UUID {00c11b02-c807-443d-b10d-dfffe0ae1b96} already exists.

Result Code: E_INVALIDARG (0x80070057)
Component: VirtualBox
Interface: IVirtualBox {c28be65f-1a8f-43b4-81f1-eb60cb516e66}

 

需要重新reset UUID, 办法如下:

c:\Program Files\Oracle\VirtualBox>vboxmanage internalcommands sethduuid “D:\program\virtualbox\ubuntu14\Ubuntu-14.vdi”