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')