1.os模块2.os.path 模块3.实例1. os模块
对文件系统的访问大多通过python的os模块实现,其中os 模块负责大部分的文件系统操作,包括删除/重命名文件,遍历目录树,管理文件访问权限等。
2.os.path 模块,os.path完成一些针对路径名的操作,包括管理和操作文件路径名中...
分类:
编程语言 时间:
2014-06-10 12:38:22
阅读次数:
488
1.Object对象 原型对象
原型是对象的一个属性,也就是prototype属性,每个对象都有这个内部属性,而且他本身也是一个对象。123456运行结果: 添加原型对象属性:10
添加对象属性:20原型链123Object.prototype.a = 3.14;alert("Object...
分类:
编程语言 时间:
2014-06-10 11:56:50
阅读次数:
270
首先是入口方法/*tmpl:模板文本 c:用户自定义配置
def:定义编译时执行的数据*/doT.template = function(tmpl, c, def) {}然后进入第一局代码c = c ||
doT.templateSettings;doT.templateSettings包含的代.....
分类:
Web程序 时间:
2014-06-10 10:37:13
阅读次数:
244
题目描述:
Write a function to find the longest common prefix string amongst an
array of strings.
很简单的一道题目,但是我写了两个不一样的版本,运行时间确实数倍之差。。贴代码如下:
版本1:
{CSDN:CODE:384511}
这个版本的运行时间为 44 ms...
分类:
其他好文 时间:
2014-06-10 08:18:58
阅读次数:
291
手机游戏目前是弱联网居多,http登录是常用功能。我们现在就来实现。
在启动时候,自动请求http.function MainScene:ctor()
local url = "http://localhost/request.php"
local request = network.createHTTPRequest(onRequestFinished, url, "P...
分类:
Web程序 时间:
2014-06-10 07:20:02
阅读次数:
446
Json编码,在python里就是一句话:
json.dumps(user_data)
但是Erlang没有自带的Json模块,只能自己造轮子:
先下载mochijson2:
https://github.com/mochi/mochiweb/blob/master/src/mochijson2.erl
用erlc编译
然后,上代码:
get_json_data() ->
...
分类:
Web程序 时间:
2014-06-10 06:46:21
阅读次数:
309
system.js MongoDB存储javascript函数的地方
与python配合用...
分类:
数据库 时间:
2014-06-10 06:45:42
阅读次数:
260
新手听课笔记 python中用mysqldb模块操作mysql数据库的基本应用...
分类:
数据库 时间:
2014-06-10 06:32:57
阅读次数:
202
问题描述:
A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabeti...
分类:
其他好文 时间:
2014-06-10 06:13:21
阅读次数:
299
问题描述:
The Fibonacci sequence is defined by the recurrence relation:
Fn = Fn1 + Fn2,
where F1 = 1 and F2 = 1.
Hence the first 12 terms will be:
F1 = 1
F2 = 1
F3 = 2
F4 = 3
F5 = 5
F6 = 8
...
分类:
其他好文 时间:
2014-06-10 06:10:06
阅读次数:
307