- 博客(10)
- 资源 (2)
- 收藏
- 关注
原创 数据结构基础学习笔记一——尾递归
首先什么是尾递归? 如果一个函数中所有的递归形式调用都出现在函数的末尾,我们称这个递归函数是尾递归的。换句话说,当递归调用是整个函数体中最后执行的语句,且它的函数值不属于表达式的一部分时,这个递归调用就是尾递归。——以上引用《算法精解:c语言描述》那么为什么要用尾递归呢?因为它快!因为它占用内存资源少。更详细的解释是这样:当编译器检测到一个函数调用是尾递归时,它就会覆盖当前的
2014-11-26 15:48:54 388
原创 java 数组容器List用法举例
List list = new ArrayList(); for (intp = 0; p k4+1;p++) {if (T[p + 1] > 0) {inttheaT=T[p+1]-T[p];list.add(theaT);}}int[]a = new int[list.size()]; for(i
2014-11-24 19:06:36 729
转载 给python加log
# -*- coding: utf-8 -*-import loggingimport mathlogger = logging.getLogger()#set loghandlerfile = logging.FileHandler("qqxml.log")logger.addHandler(file)#set formater#formatter = l
2014-11-24 18:46:37 933
原创 简单的神经网络模型java版本
package cn.kelaile.ocr;public class Bpneuralnettest {public staticint innode= 4 ;//输入结点数public staticint hidenode= 10;//隐含结点数public staticint outnode= 1 ;//输出结点数public stat
2014-11-18 19:11:59 732 1
转载 Python正则表达式指南
AstralWindhttp://www.cnblogs.com/huxi/archive/2010/07/04/1771073.html
2014-11-12 11:17:01 357
转载 os.mkdir()和os.path.join()的区别
http://blog.csdn.net/nkfcp114/article/details/7957011 今天碰到一个问题,就是我用os.path.join()连接两个文件名地址的时候,就比如os.path.join("D:\","test.txt")结果是D:\test.txt,并且在我们往里面写东西,然后保存,在这个目录下会生成这个文件,但是如果你不写东西,那么执行这句话之后,在D盘
2014-11-07 18:20:20 538
转载 python的类方法为什么要写一个self参数
http://www.douban.com/group/topic/19376685/这是对前面一个php程序员问python方法为什么要手写一个self的回答,当时那个帖非常的热闹,但是下面没有一个回复讲到要点,等我有空,已经找不到原帖了。 原因有多重。首先是python中几乎所有的东西的一级对象(一级对象的定义:http://en.wikipedia.org
2014-11-07 17:20:22 4176
转载 Python中函数的参数定义和可变参数
转自:http://www.cnblogs.com/tqsummer/archive/2011/01/25/1944416.html
2014-11-07 16:54:51 334
转载 Python中if __name__ == '__main__':作用
转自:http://blog.chinaunix.net/uid-23802873-id-3143524.html分类: Python/Ruby#hello.pydef sayHello():str="hello"print(str);if__name__=="__main__":print ('This is mai
2014-11-07 16:08:38 522
原创 mac 用macports给python装opencv
今天用macports给python装了很多库,比如:scipy,numpy,pil等。。。。
2014-11-04 19:12:47 800
Beyond the C++ Standard Library_ An Introduction to Boost 中文版
2013-07-09
Feature Extraction in Computer Vision and Image Processing
2013-07-09
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人