Skip to content

Instantly share code, notes, and snippets.

View yuelng's full-sized avatar

Yuelong Chen yuelng

  • 中国
View GitHub Profile
@yuelng
yuelng / mysql数据库.md
Last active November 13, 2015 08:45
与数据相关的一些记录

从sql文件导入mysql数据结构。路径为dbstructure/f2e.sql

mysql -u YOURUSERNAME -p --database=f2e < dbstructure/f2e.sql

pip安装mysql-python时报错,需要先安装下面这个包

sudo aptitude install libmysqlclient-dev

@yuelng
yuelng / python错误收集.md
Last active November 13, 2015 11:45
python学习中遇到的一些问题

No module named Image

使用pillow而不是pil

ImportError: The _imagingft C module is not installed

The following worked for me on Ubuntu 14.04.1 64 bit: sudo apt-get install libfreetype6-dev Then, in the virtualenv: pip uninstall pillow pip install --no-cache-dir pillow

func some(a, b int, c string) (val string, err error) {
// stuff
}
select {
case val, err :=<- go some(5,12, "hey"):
// stuff
case val, err :=<- go some(65, 535, "port"):
// stuff
}