上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页
摘要: 在Centos系统中安装 pip install MySQL-python 提示: _mysql.c:29:20: error: Python.h: No such file or directory_mysql.c:40:26: error: structmember.h: No such fil 阅读全文
posted @ 2017-05-17 10:07 泽锦 阅读(3447) 评论(0) 推荐(0) 编辑
摘要: import jsona = {u'content': {u'address_detail': {u'province': u'\u5409\u6797\u7701', u'city': u'\u957f\u6625\u5e02', u'street_number': u'', u'district 阅读全文
posted @ 2017-05-16 15:51 泽锦 阅读(7462) 评论(0) 推荐(1) 编辑
摘要: 位置:File->settings->Editor->File and Code Templates->Python Script添加以下代码:#!/usr/bin/env python# -*- coding: utf-8 -*-# @Time : ${DATE} ${TIME}# @Author 阅读全文
posted @ 2017-05-15 15:34 泽锦 阅读(4643) 评论(0) 推荐(0) 编辑
摘要: import sys print sys._getframe().f_lineno ----------------------------------------------------------------------------------------------------------------------------------------... 阅读全文
posted @ 2017-05-14 14:27 泽锦 阅读(9307) 评论(0) 推荐(0) 编辑
摘要: 关于数据库的ACID特性已经有很多的介绍,这里再重新归纳总结一下: A(atomicity)原子性: 即事务要么全部做完,要么全部不做,不会出现只做一部分的情形,如A给B转帐,不会出现A的钱少了,B的钱却没有增加的情况 C(consistency)一致性: 指的是事务从一个状态到另一个状态是一致的, 阅读全文
posted @ 2017-05-09 11:49 泽锦 阅读(2501) 评论(0) 推荐(0) 编辑
摘要: 逢年过节,想坐个高铁票,都得上12306去买票,但用过的都会发现,它会把临近站点的也筛出来了。但有时我们压根就不会考虑买到临近站点的。 另一方面,在购票高峰期,有可能你要的出发站到目的站都没有票了,这时一般我们会往前面的站买票,或者往后面的站买票,这个你就得一次次查前后都有什么站,再一步步复制去搜索 阅读全文
posted @ 2017-05-06 16:46 泽锦 阅读(508) 评论(1) 推荐(0) 编辑
摘要: json.dumps() 是将一个Python数据结构转换为一个JSON编码的字符串 json.loads() 是将一个JSON编码的字符串转换为一个Python数据结构 如下: >>> import json >>> a={'name':'xiaoming'} >>> json.dumps(a) 阅读全文
posted @ 2017-05-06 12:05 泽锦 阅读(12420) 评论(0) 推荐(0) 编辑
摘要: 在使用python中,我们都有可能遇到如下的错误: UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128) 一般的解决方法都是在文件开头处加多如下语句就可 阅读全文
posted @ 2017-05-05 17:29 泽锦 阅读(453) 评论(0) 推荐(0) 编辑
摘要: Linux安装python: yum install zlib -yyum install zlib-devel -y yum install readline-devel -y yum install openssl -y yum install openssl-devel -y yum inst 阅读全文
posted @ 2017-05-03 18:42 泽锦 阅读(2283) 评论(0) 推荐(0) 编辑
摘要: 第一步: 在全局设置中打开此中间件: MIDDLEWARE_CLASSES = [ ... 'django.middleware.csrf.CsrfViewMiddleware', ... ] 第二步: 在提交表单中添加{% csrf_token %}: <form id='input_form' 阅读全文
posted @ 2017-05-03 11:05 泽锦 阅读(363) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页