码迷,mamicode.com
首页 >  
搜索关键字:python objects all    ( 160304个结果)
python基础
操作符:// 用作浮点除法(对结果四舍五入)和 ** 表示乘方 eg: 2**5=32python不支持C中的自增和自减操作,eg: ++i 和 i++ 的结果都为 iraw_input()方法程序输入,所返回的值为 字符串 类型,数值须进行强制类型转换 eg:int()print()会默认为每一行...
分类:编程语言   时间:2014-06-05 18:37:25    阅读次数:299
LEETCODE Sort Colors
Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, wh...
分类:其他好文   时间:2014-06-05 17:49:43    阅读次数:304
python版protobuf 安装
1. 下载protobuf源代码(当前最新版本为:2.5.0) #cd /opt #wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz 2. 解压,编译,安装 #tar zx...
分类:编程语言   时间:2014-06-05 17:44:39    阅读次数:4474
poj 3259
题意:一个图中有两种路径 1 无方向权值为政 2 有方向权值为负 问是否存在一个回路其权值为负思路:bellman算法#includeusing namespace std;struct Edge{ int u,v; int w;}e[15000];int all;int dist[15...
分类:其他好文   时间:2014-06-05 17:26:32    阅读次数:186
TaskTracker启动过程源码级分析
TaskTracker也是作为一个单独的JVM来运行的,其main函数就是TaskTracker的入口函数,当运行start-all.sh时,脚本就是通过SSH运行该函数来启动TaskTracker的。 TaskTracker是JobTracker和Task之间的桥梁:一方面,从JobTrac...
分类:其他好文   时间:2014-06-05 17:21:13    阅读次数:288
python--日期操作
import datetimedatetime有几个常用类:date time datetime timedelta1. 今天日期时间(今天时间)>>> import datetime>>> now = datetime.datetime.now()>>> print now2014-06...
分类:编程语言   时间:2014-06-05 16:47:38    阅读次数:299
Python核心编程(第二版) 第六章习题答案
6–1.字符串.string 模块中是否有一种字符串方法或者函数可以帮我鉴定一下一个字符串是否是另一个大字符串的一部分?答:有,string.find(str,beg,end)6–2.字符串标识符.修改例 6-1 的 idcheck.py 脚本,使之可以检测长度为一的标识符,并且可以识别 Pytho...
分类:编程语言   时间:2014-06-05 15:25:41    阅读次数:338
学习资源(二)
最近在微博中发现MOOC上有了Python的教程,出于兴趣就打算简单的听一听了解一下,今天听了第一期的讲座,老师讲的非常形象,大家有兴趣可以去看一看https://class.coursera.org/pythonlearn-002/lecture课程是全英文的,但是有英文字幕,在学习的同时可以学习...
分类:其他好文   时间:2014-06-05 14:35:33    阅读次数:266
Python字符串操作
Python中有关字符串的一些函数
分类:编程语言   时间:2014-06-05 13:17:16    阅读次数:301
Python,ElementTree模块处理XML时注释无法读取和保存的问题
from xml.etree import ElementTreeclass CommentedTreeBuilder ( ElementTree.XMLTreeBuilder ): def __init__ ( self, html = 0, target = None ): ...
分类:编程语言   时间:2014-06-05 13:16:31    阅读次数:261
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!