码迷,mamicode.com
首页 >  
搜索关键字:python3 encode typeerr    ( 15487个结果
将参数从PHP传递到JavaScript中
php: //自定义数组参数 $newarr = array('a1' => 'a1', 'a2' => 'a2', 'a3' => 'a3'); $config = CJavaScript::encode($newarr); Yii::app()->clientScript->registerScript('customConfig', "var customConfig = " . $...
分类:编程语言   时间:2014-12-15 19:04:32    阅读次数:161
python3.4连接mysql数据库的方法
python3.4连接mysql数据库的方法发布时间:2014-08-04编辑:www.jbxue.com本文介绍了python3.4连接mysql数据库的方法,在python3.4中不能用mysqldb连接mysql,可以使用pymysql完成连接mysql数据库,需要的朋友参考下。在python...
分类:数据库   时间:2014-12-15 18:52:01    阅读次数:245
python3操作mysql教程
一、下载\安装\配置1. python3Python3下载网址:http://www.python.org/getit/当前最新版本是python3.2,下载地址是http://www.python.org/ftp/python/3.2.3/python-3.2.3.msi安装过程就不用说了,默认安...
分类:数据库   时间:2014-12-15 18:40:06    阅读次数:189
Base64编码解码
#region Base64编码解码 /// /// Base64加密 /// /// 加密采用的编码方式 /// 待加密的明文 /// public static string EncodeBase64(Encoding encode, string source) ...
分类:其他好文   时间:2014-12-15 16:54:31    阅读次数:166
'ascii' codec can't encode characters in position 0-8: ordinal not in range(128)的解决办法
使用的python2.7,运行的时候出现了'ascii' codec can't encode characters in position 0-8: ordinal not in range(128)错误,通过搜索一些文章了解到是因为python系统使用的默认编码为ascii编码,但是代码运行中的...
分类:Web程序   时间:2014-12-13 23:17:49    阅读次数:197
修改sublime text2 默认指向的python 版本
安装的sublime text2默认指向的系统预装的python2.7修改链接到安装的python3.4在工具栏点击Preferences,打开Browse Packages。在打开的文件夹中找到Python,并打开这个文件夹。找到文件Python.sublime-build,并打开。1 {2 "c...
分类:编程语言   时间:2014-12-13 17:42:59    阅读次数:230
PHP 小坑 mark(PHP json_encode 二维数组)
PHP?json_encode 二维数组 eg: array( 3 => array( ‘a‘ => 1, ‘b‘ => 2, ), ); json_encode后 期望:数组类型 [{"a":"1","b":"2"}] 实际:对象类型 {"3": .....省略}...
分类:编程语言   时间:2014-12-12 20:58:17    阅读次数:184
php 返回json对象
服务器端使用php+ajax调用返回json对象。 php <?php $result?=?array(‘Status‘?=>?false,?‘Message‘?=>?‘sss‘); $jsonstring?=?json_encode($result); header(‘Content-Type:?application/json‘);?//前...
分类:Web程序   时间:2014-12-12 13:31:10    阅读次数:196
java 判断字符串什么编码类型
public static String getEncoding(String str) { String encode = "GB2312"; try { if (str.equals(new String(st...
分类:编程语言   时间:2014-12-11 18:57:15    阅读次数:230
python进行base64编解码
[转]直接上代码import base64fin = open(r"D:\2.zip", "rb")fout = open(r"D:\2.x.txt", "w")base64.encode(fin, fout)fin.close()fout.close()fin = open(r"D:\2.x.tx...
分类:编程语言   时间:2014-12-11 15:46:02    阅读次数:212
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!