列表:定义:一组有序的数据;function List() { this.listSize = 0; this.pos = 0; this.dataStore = []; this.find = find; .........................}方法:append:...
分类:
Web程序 时间:
2014-10-13 11:33:19
阅读次数:
244
这个Utils用了第三方库DBUtils,我经过又一层了简单封装,自认为还是挺简洁的,只实现了增删改查
import MySQLdb,functools
from DBUtils.PooledDB import PooledDB
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
sys.path.append('../'...
分类:
数据库 时间:
2014-10-12 15:00:51
阅读次数:
755
html javascript var dat = new FormData() dat.append(‘prefix‘, $(‘:input[name=prefix]‘).val()) dat.append(‘file‘, $(‘:input[name=upfile]‘)[0].files[0]) var req = $.ajax({ url: $(‘#upload‘).attr(‘act...
分类:
Web程序 时间:
2014-10-11 14:31:15
阅读次数:
152
(6)EngineVM操作流程a、配置网络IP:192.168.14.77
NETMASK:255.255.252.0
GATEWAY:192.168.14.1b、配置域名解析192.168.14.67node.test
192.168.14.77engine.testc、执行命令,部署engine#engine-setup--config-append=/root/ovirt-engine-answers--offline#(调用answer..
分类:
移动开发 时间:
2014-10-10 01:54:54
阅读次数:
2330
知识点速记:重用代码的方法:脚本包含require()、include(); 全局配置文件php.ini(auto_prepend_file/auto_append_file); 目录配置文件.htaccess(auto_prepend_file/auto_append_file)命名规范:函数名不...
分类:
其他好文 时间:
2014-10-09 22:14:37
阅读次数:
153
在目前版本的 Redis 中, SDS_MAX_PREALLOC 的值为 1024 * 1024 ,
也就是说, 当大小小于 1MB 的字符串执行追加操作时,sdsMakeRoomFor 就为它们分配多于所需大小一倍的空间;
当字符串的大小大于 1MB , 那么 sdsMakeRoomFor 就为它们额外多分配 1MB 的空间。
执行过 APPEND 命令的字符串会带有额外的预分配空...
分类:
其他好文 时间:
2014-10-09 19:21:37
阅读次数:
223
boolisSub(stringstr0,stringstr1){if(str0.length()!=str1.length())returnfalse;str0=str0.append(str0);if(str0.find(str1)==string::npos)returnfalse;elser...
分类:
其他好文 时间:
2014-10-09 15:01:58
阅读次数:
127
用来处理系统中的文件内容什么情况下需要处理文件?§读取配置文件§读取数据信息§分析处理日志文件§存入数据到文件打开文件打开文件方式一:open('filename', ['mode'])打开文件方式二:file ('filename',['mode'])mode: a : append w: w.....
分类:
其他好文 时间:
2014-10-07 20:17:33
阅读次数:
191
T1 >>> 创建一个新的selectvar $newSelect = $(""); // 注意转义\T2 >>> 创建一个新的option var $option = $("1");T3 >>> 将option添加进数组 options方式一:$newSelect.append($option.....
分类:
Web程序 时间:
2014-10-05 00:08:27
阅读次数:
229
importcopya=[1,2,3,4,[‘a‘,‘b‘]]#原始对象b=a#赋值,传对象的引用c=copy.copy(a)#对象拷贝,浅拷贝d=copy.deepcopy(a)#对象拷贝,深拷贝a.append(5)#修改对象aprinta[1,2,3,4,[‘a‘,‘b‘],5]>>>printb[1,2,3,4,[‘a‘,‘b‘],5]>>>printc[1,2,3,4,[‘a‘,‘b‘]]>&..
分类:
编程语言 时间:
2014-10-01 00:13:40
阅读次数:
294