下面说说split函数的用法
def break_words(stuff):
"""This function will break up words for us."""
words = stuff.split(' ')#split('.',1) use '.' split one time
return words
def sort_words(wo...
分类:
编程语言 时间:
2014-06-08 18:19:21
阅读次数:
336
Find the contiguous subarray within an array (containing at least one number) which has the largest sum....
分类:
其他好文 时间:
2014-06-08 15:54:08
阅读次数:
258
一、自定义视图类继承View或者View的子类
All of the view classes defined in the Android framework extend View.
Your custom view can also extend Viewdirectly,
or you can save time by extending one of the exist...
分类:
移动开发 时间:
2014-06-08 10:11:27
阅读次数:
342
要说Node.js的历史,就不得不说说V8历史。在此之前我们先一句话描述一下什么是Node.js:Node.js是一个基于Google Chrome V8
Javascript引擎之上的平台,用以创建轻量级、快速、可扩展、事件驱动和非阻塞I/O的应用。现在我们来说说Node.js的源头——V8 ja...
分类:
Web程序 时间:
2014-06-08 01:35:08
阅读次数:
265
首先,去http://nodejs.org
下载安装。我下的版本是0.10.28。安装很简单,下一步下一步就哦了。我的安装目录是C:\Program Files\nodejs。这时使用node -v
命令查看下安装的版本一、helloworld在Node.js安装目录中新建一个文件hello.js,...
分类:
Web程序 时间:
2014-06-08 01:26:58
阅读次数:
244
Single NumberGiven an array of integers, every
element appearstwiceexcept for one. Find that single one.Note:Your algorithm
should have a linear runti...
分类:
其他好文 时间:
2014-06-07 23:44:39
阅读次数:
302
最近需要在node下连接mongo,尝试了很多方法,本文简要总结一下选择Driver首先,基本上有4个常见的driver供选择1.官方的是node-mongo-native2.基于node-mongo-native,封装的mongoose,是一个ODM小框架3.kiss小组同样基于node-mong...
分类:
其他好文 时间:
2014-06-07 21:03:54
阅读次数:
320
前面讲过Node的动作(Action),cocos2d-x中,提供了一个ActionManger,用于管理Action的一些动作,比如停止,暂停等;一、停止所有动作实际上,Node节点已经有了一些简单的动作的管理,比如停止Node实例上的所有动作;
node->stopAllActions()...
分类:
其他好文 时间:
2014-06-07 20:56:33
阅读次数:
356
Given a non-negative number represented as an
array of digits, plus one to the number.The digits are stored such that the most
significant digit is at...
分类:
其他好文 时间:
2014-06-07 16:56:28
阅读次数:
188
Given a linked list, remove thenthnode from the
end of list and return its head.For example, Given linked list:
1->2->3->4->5, and n = 2. After re...
分类:
其他好文 时间:
2014-06-07 16:54:26
阅读次数:
221