requirejs初探参考资料官网:http://requirejs.org中文译文:http://makingmobile.org/docs/tools/requirejs-api-zhreuqirejs、backbone的配置例子(function(){
require.config({ ...
分类:
Web程序 时间:
2014-05-14 03:34:11
阅读次数:
350
原题地址:http://oj.leetcode.com/problems/binary-tree-level-order-traversal/题意:二叉树的层序遍历的实现。解题思路:二叉树的层序遍历可以用bfs或者dfs来实现。这里使用的dfs实现,代码比较简洁。实际上,二叉树的先序遍历就是dfs实...
分类:
编程语言 时间:
2014-05-14 03:25:59
阅读次数:
428
原题地址:http://oj.leetcode.com/problems/binary-tree-level-order-traversal-ii/题意:Given
a binary tree, return thebottom-up level ordertraversal of its node...
分类:
编程语言 时间:
2014-05-12 22:03:27
阅读次数:
581
原题地址:http://oj.leetcode.com/problems/binary-tree-zigzag-level-order-traversal/题意:Given
a binary tree, return thezigzag level ordertraversal of its nod...
分类:
编程语言 时间:
2014-05-12 22:02:26
阅读次数:
480
原题地址:http://oj.leetcode.com/problems/minimum-depth-of-binary-tree/题意:Given
a binary tree, find its minimum depth.The minimum depth is the number of no...
分类:
编程语言 时间:
2014-05-12 21:55:15
阅读次数:
348
转载自http://blog.kgzx.net/index.php/archives/40/因为类库兼容性的关系,写实际项目时都是用 Python
2,但自己试验性的写点小东西还是喜欢用 Python 3在这记录一下在 windows 下让这两个版本共存的配置步骤在官网下载两个版本的 exe 文件并...
分类:
编程语言 时间:
2014-05-12 21:48:04
阅读次数:
354
原题地址:http://oj.leetcode.com/problems/convert-sorted-array-to-binary-search-tree/题意:将一个排序好的数组转换为一颗二叉查找树,这颗二叉查找树要求是平衡的。解题思路:由于要求二叉查找树是平衡的。所以我们可以选在数组的中间那...
分类:
编程语言 时间:
2014-05-12 21:44:57
阅读次数:
379
在c++中,有2种class data
member:static和nostatic,以及3钟class member
function:static,nostatic和virtual。已知下面这个class Point声明:class Point{public:
Point(float xv...
分类:
编程语言 时间:
2014-05-12 21:43:54
阅读次数:
370
Flask默认使用的是Jinja2的模板引擎,下面将会介绍下Flask提供给模板的一些方法。#-*-coding:utf-8-*-
#导入一些函数
fromflaskimportFlask
fromflaskimportrender_template,g
#创建一个app
app=Flask(__name__)
#创建一个装饰器
@app.route("/")
@app.route("/index")
defindex..
分类:
其他好文 时间:
2014-05-11 19:25:12
阅读次数:
443
庄稼人不是专职python开发的道友,虽然与python相识已多年,可惜相识不相知,只是偶尔借助pydev写一些简单的小工具。
多年来,一直困惑于这样一个问题:同样的工程,同样的代码,使用pydev可以运行任意一个python脚本,而使用命令行运行却不行?命令行下(或者双击执行)总是提示“ImportError: No module named xxx”?pydev究竟做了什么魔术呢?
长...
分类:
编程语言 时间:
2014-05-11 18:37:41
阅读次数:
843