//判断页面加载完毕document.onreadystatechange = function () { if (document.readyState == "complete") { //code... }}//判断是否全为手机String.prototype.isM...
分类:
编程语言 时间:
2014-06-18 15:12:51
阅读次数:
273
Python中使用MySQL的方法具体可见:http://www.w3cschool.cc/python/python-mysql.html需要注意的是编码问题:要在多个地方设置为UTF8,具体可见:http://drizzlewalk.blog.51cto.com/2203401/448874同时...
分类:
数据库 时间:
2014-06-18 15:02:28
阅读次数:
245
使用urllib2模块构造http post数据结构,提交有文件的表单(multipart/form-data),本示例提交的post表单带有两个参数及一张图片,代码如下:#buld post body data boundary = '----------%s' % hex(int(...
分类:
编程语言 时间:
2014-06-18 14:55:59
阅读次数:
283
argv是在脚本内部使用,旨在接受命令传参比如,一个脚本argv.py,代码里面有,sys.argv[1],,sys.argv[2],那么运行这个脚本时,必须在后面跟两个参数,用空格隔开,如:python argv.py hello world 示例如下:首先编辑脚本 argv.py#coding:...
分类:
其他好文 时间:
2014-06-18 14:35:13
阅读次数:
191
转载自:http://hi.baidu.com/????_xu/blog/item/5b9650c513bd3f049d163d8b.htmlpython的set和其他语言类似, 是一个 基本功能包括关系测试和消除重复元素. 集合对象还支持union(联合),intersection(交), dif...
分类:
编程语言 时间:
2014-06-18 14:30:05
阅读次数:
243
1、reportlab:由很多部分组成且允许用户使用多种方法创建输出,地址:下载ReportLabhttps://pypi.python.org/simple/reportlab/http://www.reportlab.com/software/opensource/rl-toolkit/down...
分类:
编程语言 时间:
2014-06-18 14:22:27
阅读次数:
313
需求:(1)可伸缩、扩大、缩小(2)可自定义工具栏(依赖工具栏控件),工具栏可定义位置(3)可加装远程数据实现图例客户代码 function addMoreTools() { var toolbar = panel.panel("getToolbar"); ...
分类:
其他好文 时间:
2014-06-17 14:18:18
阅读次数:
264
1.The GetCurrentDirectory function retrieves the current directory for the current processDWORD GetCurrentDirectory( DWORD nBufferLength, // size of d...
分类:
其他好文 时间:
2014-06-17 13:44:58
阅读次数:
206
ajaxfileupload,jquery的一个异步上传插件,使用此插件你可以不用建立form,他会自动生成表单,且自动设置好enctype="multipart/form-data"属性,使用这个插件的前提就是要先引入jquery的包语法:function fileLoad(){ $.ajaxF....
分类:
其他好文 时间:
2014-06-17 12:57:39
阅读次数:
373
//构造函数function Fn(name) { this.name = name; //属性,存放不同的东西}Fn.prototype.showName = function(){ //构造函数.prototype.方法,存放相同的东西,在内存中存放一份 alert(th...
分类:
其他好文 时间:
2014-06-17 12:54:21
阅读次数:
318