上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页
摘要: Satisfice Inc."Epistemology for the rest of us"Boost Your Testing Super PowersSecret Tools to Add to Your Utility Beltby James BachThis first appeared on www.StickyMinds.com as a column featureWhen I was three, my favorite cartoon was The Fantastic Four. When my mom discovered this, she ch 阅读全文
posted @ 2011-12-03 12:55 SophiaTang 阅读(145) 评论(0) 推荐(0) 编辑
摘要: etc/my.ini[client]#password = your_passwordport = 3306socket = /var/lib/mysql/mysql.sockdefault-character-set=utf8# The MySQL server[mysqld]port = 3306socket = /var/lib/mysql/mysql.sockskip-lockingkey_buffer_size = 384Mmax_allowed_packet = 1Mtable_open_cache = 512sort_buffer_size = 2Mread_buffer_siz 阅读全文
posted @ 2011-12-02 21:59 SophiaTang 阅读(398) 评论(0) 推荐(0) 编辑
摘要: 9.1.5.Configuring the Character Set and Collation for ApplicationsFor applications that store data using the default MySQL character set and collation (latin1, latin1_swedish_ci), no special configuration should be needed. If applications require data storage using a different character set or colla 阅读全文
posted @ 2011-12-02 21:56 SophiaTang 阅读(242) 评论(0) 推荐(0) 编辑
摘要: MySQL算法工作 utf8_unicode_ci校对规则仅部分支持Unicode校对规则算法。一些字符还是不能支持。并且,不能完全支持组合的记号。utf8_general_ci是一个遗留的 校对规则,不支持扩展。它仅能够在字符之间进行逐个比较。这意味着utf8_general_ci校对规则进行的比较速度很快,但是与使用 utf8_unicode_ci的校对规则相比,比较正确性较差)。 对于一种语言仅当使用utf8_unicode_ci排序做的不好时,才执行与具体语言相关的utf8字符集校对规则。例如,对于德语和法语,utf8_unicode_ci工作的很好,因此不再需要为这两种语言创建特殊的 阅读全文
posted @ 2011-12-02 21:55 SophiaTang 阅读(373) 评论(0) 推荐(0) 编辑
摘要: 首先要搞清楚,字符串在Python内部的表示是unicode编码,因此,在做编码转换时,通常需要以unicode作为中间编码,即先将其他编码的字符串解码(decode)成unicode,再从unicode编码(encode)成另一种编码。decode的作用是将其他编码的字符串转换成unicode编码,如str1.decode('gb2312'),表示将gb2312编码的字符串转换成unicode编码。encode的作用是将unicode编码转换成其他编码的字符串,如str2.encode('gb2312'),表示将unicode编码的字符串转换成gb2312编码 阅读全文
posted @ 2011-12-02 21:49 SophiaTang 阅读(238) 评论(0) 推荐(0) 编辑
摘要: django是一个不错的WEB开源框架。今天测试,发现有些页面中文乱码,肯定是编码哪儿出了问题。django配置要修改settings. 阅读全文
posted @ 2011-12-02 21:47 SophiaTang 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 在django admin界面添加汉字内容时发现如下错误:?<SPAN style="FONT-SIZE: 14px">Warning at /admin/flatpages/flatpage/add/Incorrect string value: '\xE5\x93\x88\xE5\x93\x88...' for column 'content' at row 1Request Method: POST Request URL: http://127.0.0.1:8000/admin/flatpages/flatpage/add 阅读全文
posted @ 2011-12-02 21:46 SophiaTang 阅读(1125) 评论(1) 推荐(0) 编辑
摘要: 今天在为数据库中的某两个字段设置unique索引的时候,出现了Specified key was too long; max key length is 1000 bytes错误,经过查询才知道,是Mysql的字段设置的太长了,于是我把这两个字段的长度改了一下就好了。建立索引时,数据库计算key的长度是累加所有Index用到的字段的char长度后再按下面比例乘起来不能超过限定的key长度1000:latin1 = 1 byte = 1 characteruft8 = 3 byte = 1 charactergbk = 2 byte = 1 character举例能看得更明白些,以GBK为例:C 阅读全文
posted @ 2011-12-02 21:44 SophiaTang 阅读(562) 评论(0) 推荐(0) 编辑
摘要: The Secret Name of List Comprehensions (Python recipe) by Chris PerkinsActiveState Code (http://code.activestate.com/recipes/204297/)▲5▼Sometimes you want to have a list comprehension refer to itself, but you can't because it isn't bound to a name until after it is fully constructed. However 阅读全文
posted @ 2011-12-02 14:03 SophiaTang 阅读(215) 评论(0) 推荐(0) 编辑
摘要: Seth Godin 在他的网志上写到 ,有一次一个茱莉亚音乐学院的小提琴手问他,与其「鼯鼠五技而穷」,是不是应该要把她的小提琴技巧再更精进。 他有感而发:我想这位乐手大概永远都不会变成全世界「最好」的提琴手,这样说应该是非常正确的,因为事实是你根本不可能成为全世界「唯一且最棒」的小提琴家。 全世界大概有5000,甚至是10000 个人的小提琴技巧棒到无法被一般听众辨识的程度,他们的不同大概只有几个专业的交响乐评可以分辨。追求技巧上的卓越,其实是一种逃避的行为 。 你逃避面对市场,因为你假装还在「精进」你的技术。 你在躲避真正辛苦的部分、躲避艺术的真谛、躲避和听众建立真正的连结,然后骗自己成功 阅读全文
posted @ 2011-11-25 18:26 SophiaTang 阅读(198) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页