码迷,mamicode.com
首页 >  
搜索关键字:python function    ( 188437个结果
编译安装shibboleth-sp遇到的问题
In file included from mod_shib_20.cpp:68: mod_shib.cpp:118: warning: deprecated conversion from string constant to 'char*' mod_shib.cpp: In member function 'virtual const char* ShibTargetApache::get...
分类:其他好文   时间:2014-05-07 06:04:50    阅读次数:363
笨方法学python(6)加分题--列表与字典的区别
这篇对应的是习题39 字典, 可爱的字典 #encoding:utf-8 #列表与字典的区别 #列表 thing = ['name',1,'age','AD','sex'] print thing[1] #print thing['name'] #会报错,列表只能通过整数去访问:TypeError: list indices must be integers, not str stuff...
分类:编程语言   时间:2014-05-07 06:00:20    阅读次数:365
【Leetcode】Two Sum
[Question] Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to t...
分类:其他好文   时间:2014-05-07 05:37:44    阅读次数:278
Javascript的一些小知识点
小弟五一回家去了,本想好好的享受下五一假期,谁知悲剧的人生不需要解释。好不容易过五关斩十将,跨千山趟万水,回到家里。吃着老妈做的好菜,第二天就莫名其妙的急性肠炎,这肚子闹腾的。NND,气死哥了,早知道就不回家了。好了,废话不多说,进入主题。 ================ 关于clientHeight、offsetHeight、scrollHeight window.screen.avai...
分类:编程语言   时间:2014-05-07 04:19:56    阅读次数:379
python中的字符串处理
1.字符串转换 s.lower()   转为小写 s.upper()  转为大写 s.swapcase()   大写转为小写,小写转为大写 s.capitalize()  首字母大写 转换为int类型  string.atoi(s)   或者int(s) 转换为float类型  string.atof(s)  或者float(s) 转换为long类型   string.atol(s)...
分类:编程语言   时间:2014-05-07 04:09:36    阅读次数:433
【机器学习算法-python实现】svm支持向量机(3)—核函数
(转载请注明出处:http://blog.csdn.net/buptgshengod) 1.背景知识     前面我们提到的数据集都是线性可分的,这样我们可以用SMO等方法找到支持向量的集合。然而当我们遇到线性不可分的数据集时候,是不是svm就不起作用了呢?这里用到了一种方法叫做核函数,它将低维度的数据转换成高纬度的从而实现线性可分。      可能有的人不明白为什么低维度的数据集转换成高...
分类:编程语言   时间:2014-05-07 03:39:44    阅读次数:455
Python快速学习09: 函数的参数
前言   系列文章:[传送门]   继续干起来!!   正文     我们已经接触过函数,函数是可以被引用的(访问或者以其他变量作为其别名),也作为参数传入函数,以及作为列表和字典等等容器对象的元素(function)的参数(arguments)传递。       传递函数       形式参数             位置参数         默认参数      ...
分类:编程语言   时间:2014-05-07 03:31:03    阅读次数:369
js:深入继承
/**  * js实现继承:  * 1.基于原型链的方式  * 2.基于伪造的方式  * 3.基于组合的方式  */ 一、基于原型链的方式 function Parent(){   this.pv = "parent";  } Parent.prototype.showParentValue = function(){   console.log(this.pv);  }...
分类:Web程序   时间:2014-05-06 18:49:35    阅读次数:387
[简明python教程]学习笔记2014-05-05
今天学习了python的输入输出、异常处理和python标准库1.文件通过创建一个file类的对象去处理文件,方法有read、readline、write、close等[root@reed0505]#catusing_file.py #!/usr/bin/python #filename:using_file.py poem=‘‘‘Programingisfun whentheworkisdone usePython!..
分类:编程语言   时间:2014-05-06 17:05:03    阅读次数:448
python学习笔记
将文件的每行读取到字典中文件每行内容格式为:cui:123456789f=open(‘user.txt‘) d=f.readlines() f.close() mydict={} foriind: user=i.split(‘:‘)[0] info=i.split(‘:‘)[1].rstrip() mydict[user]=info
分类:编程语言   时间:2014-05-06 16:40:26    阅读次数:362
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!