原题地址:https://oj.leetcode.com/problems/plus-one/题意:Given
a non-negative number represented as an array of digits, plus one to the
number.The digits are...
分类:
编程语言 时间:
2014-06-11 11:25:27
阅读次数:
304
原来这么长时间没写了,今天阅读《集体智慧编程》的时候,发现了python的一个功能,列表推导式。留个存[ 表达式 for 变量 in 列表] 或者[表达式
for 变量 in 列表 if 条件]例如:ll=[1,2,3,4,5,6,7,8,9,0]print (v*10 for v in ll if...
分类:
编程语言 时间:
2014-06-11 11:23:16
阅读次数:
330
1, 安装nodejs安装python。2,安装node-gyp:sudo npm
install -g
node-gyp3,写代码:新建一个目录,创建hello.cc文件,然后创建binding.gyp文件:hello.cc#include#includeusingnamespace
v8;Han...
分类:
编程语言 时间:
2014-06-11 11:10:24
阅读次数:
380
Jenkins的job->build 支持Ant,maven,windows
batch和Shell,
但是我们知道python,perl,ruby等脚本其实也是shell脚本,所以这里的Shell可以扩展为python,perl,ruby等。例如:
下面执行windows batch 和pytho...
分类:
编程语言 时间:
2014-06-11 10:03:49
阅读次数:
296
原题地址:https://oj.leetcode.com/problems/rotate-image/题意:You
are given annxn2D matrix representing an image.Rotate the image by 90 degrees
(clockwise).Fo...
分类:
编程语言 时间:
2014-06-11 09:43:59
阅读次数:
1264
学习了元祖,写了小程序。#encoding = utf-8 a =
("success","false","what")print "first"print a #print all stringprint "\n"print
"second"print a[:] #pirnt all string...
分类:
编程语言 时间:
2014-06-11 09:07:45
阅读次数:
322
原题地址:https://oj.leetcode.com/problems/powx-n/题意:Implement
pow(x,n).解题思路:求幂函数的实现。使用递归,类似于二分的思路,解法来自Mark Allen Weiss的《数据结构与算法分析》。代码:class
Solution: #...
分类:
编程语言 时间:
2014-06-11 08:59:33
阅读次数:
317
原题地址:https://oj.leetcode.com/problems/edit-distance/题意:Given
two wordsword1andword2, find the minimum number of steps required to
convertword1toword2....
分类:
编程语言 时间:
2014-06-11 08:58:49
阅读次数:
293
2008 年 11 月 27 日PyDev for Eclipse 是一个功能强大且易用的
Eclipse Python IDE 插件。本文将向读者介绍 PyDev 开源项目及其安装配置方法,并在此基础上详细介绍如何利用 PyDev 插件把
Eclipse 变为功能强大且易用的 Python IDE...
分类:
编程语言 时间:
2014-06-11 08:12:49
阅读次数:
435
因學校習作需要而研究Python使用教材:Python3.4.1 Official
Documentation - The Python Standard LibraryChapter 1Basic Information of
Python1) Nature of Python: a high-l...
分类:
编程语言 时间:
2014-06-11 07:58:49
阅读次数:
218