2016-09-23
mysql 表中字段
kind
,为字符串,可能会有一个或多个值(多个值用,
分开,形如App,Web
), 查找包含某些字符的记录:
select * from notification where find_in_set('App', kind)
2016-09-26
导出数据库文件:
mysqldump -u root -p db_name > test_db.sql
导出某个表的数据:mysqldump -u wcnc -p test_db users> test_users.sql
2016-10-10
前几天升级了mac,显示导致vim 的 YouCompleteMe 崩溃,升级了XCode
今天装依赖的时候又 报Failed building wheel for pylibmc
搜索了一下,找到解决办法:http://stackoverflow.com/questions/30631299/error-when-installing-mysql-python-with-pip-install-in-osx-virtualenv, 需要重新安装 developer tools
2016-11-08
Using the decimal module from the standard library, you can retain the original precision and avoid floating point rounding issues:
>>> from decimal import Decimal
>>> Decimal('4.20') % 1
>>> Decimal('0.20')