Given an input string, reverse the string word by word.For example,Given s = " the sky is blue ",return "blue is sky the".click to show clarification....
分类:
其他好文 时间:
2014-07-16 20:27:53
阅读次数:
134
# --*-- coding:utf-8 --*--import mathimport itertoolsdef Mean(t): """均值""" return float(sum(t)) / len(t)def E(x, p): """ 离散性随即变量的数学期望(也称为均...
分类:
其他好文 时间:
2014-07-16 20:18:01
阅读次数:
220
通用的文件夹或文件删除方法,直接调用此方法,即可实现删除文件夹或文件,包括文件夹下的所有文件Java代码/***根据路径删除指定的目录或文件,无论存在与否*@paramsPath要删除的目录或文件*@return删除成功返回true,否则返回false。*/publicbooleanDeleteFo...
分类:
编程语言 时间:
2014-07-16 20:07:39
阅读次数:
194
function isPositiveNum(s) { //是否为正整数 var re = /^[0-9]*[1-9][0-9]*$/; return re.test(s) } ...
分类:
Web程序 时间:
2014-07-16 20:04:26
阅读次数:
201
public static Bitmap getComponseBitmap(Bitmap src, Bitmap src2){ if(src == null || src2 == null) return null; int width = src.getWidth(); int h...
分类:
其他好文 时间:
2014-07-16 19:49:20
阅读次数:
167
JS判断是不是IE浏览器(IE6-IE11) function isIE() { //ie? if (!!window.ActiveXObject || "ActiveXObject" in window) return true; else r...
分类:
其他好文 时间:
2014-07-16 19:43:15
阅读次数:
161
参考:http://blog.jobbole.com/55327/http://blog.jobbole.com/56300/http://blog.jobbole.com/56761/1. 在交互式命令行中执行命令的内部过程当你敲下return键的时候,python完成了以下四步:词法分析、句法分...
分类:
编程语言 时间:
2014-07-13 11:55:50
阅读次数:
221
获取某个栏目下的列表: {pc:content action="lists" catid="15" num="10" order="id DESC" return="info"} {loop $info $v} {$v['title']}{date('m-d',$v['inputt...
分类:
Web程序 时间:
2014-07-13 10:45:13
阅读次数:
253
Given an index k, return the kth row of the Pascal's triangle.
For example, given k = 3,
Return [1,3,3,1].
Note:
Could you optimize your algorithm to use only O(k) extra space?
原题链接:https:/...
分类:
其他好文 时间:
2014-07-12 20:43:11
阅读次数:
213
#include #include #include #define maxn 1220double x[maxn],y[maxn],d;bool vis[maxn];int p[maxn];int n;double dist(int i,int j){ return fabs( (x[i]-...
分类:
Web程序 时间:
2014-07-12 14:36:39
阅读次数:
224