摘要:
修改/etc/mysql/my.cnfOn MySQL 5.5 I have in my.cnf[mysqld] init_connect='SET collation_connection = utf8_unicode_ci' init_connect='SET NAMES utf8' chara... 阅读全文
摘要:
近日发现原来查询Yahoo排名的一支python程式不能正常运行了,Debug后发现一个提示:WARNING:Some characters could not be decoded, and were replaced with REPLACEMENT CHARACTER.查了Stackoverflow发现因为对方启用了Gzip压缩.使我们抓下来的页面内容需经过gzip.GzipFile方法解出来才能用.判断是否gzip的方法,只要:1 page = urllib2.urlopen(req)2 print page.info().get('Content-Encoding') 阅读全文
摘要:
I gave a presentation to another team at Microsoft yesterday on ASP.NET MVC and the Razor view engine and someone asked if there was a reference for the Razor syntax.It turns out, there is a prettygood guide about Razoravailable, but it’s focused on covering the basics of web programming using Razor 阅读全文