Python 对Twitter tweet的元素 (Word, Screen Name, Hash Tag)的词汇多样性分析...
分类:
编程语言 时间:
2014-07-03 18:48:39
阅读次数:
222
题目要求第n个丑数,所以对于中间结果不需要保存。
def Humble(index):
curHum = 1
M2 = 2; M3 = 3; M5 = 5
while index > 1:
curHum = min(min(M2, M3), M5)
while M2 <= curHum:
M2 *= 2
while M3 <= curHum:
M3 *= 3
w...
分类:
其他好文 时间:
2014-07-03 17:29:40
阅读次数:
214
??
方法一:
[root@vmrac1 ~]# su - grid
[grid@vmrac1 ~]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 3 09:36:27 2014
Copyright (c) 1982, 2011, Oracle. All rights res...
分类:
数据库 时间:
2014-07-03 17:24:25
阅读次数:
238
def sumS(s):
if s 1:
if cursum < s:
last += 1
cursum += last
else:
if cursum == s:
re.append((...
分类:
其他好文 时间:
2014-07-03 16:42:24
阅读次数:
190
def q32(n, len):
if n < 0:
return 0
elif n 0:
if n >= 1 and n < 10:
total += 1
return total
p1 = n % (10**(len - 1))
h = n / (10**(len - 1))
...
分类:
编程语言 时间:
2014-07-03 16:04:12
阅读次数:
288
书里面关于分类的判断有些麻烦,通过某一位为0为1来对数组元素进行分类。假如第3位为1,那么也就是元素x & 8 等于或不等于0,所以没必要非的用第几位去判断。
def once(array):
reOR = 0
for x in array:
reOR ^= x
bit1 = firstBit1(reOR)
first = 0
second = 0
for x in a...
分类:
其他好文 时间:
2014-07-03 13:54:06
阅读次数:
182
1.yum install lrzsz wget git2.安装gitosis:gitosis为Git用户权限管理系统,通过管理服务端的/home/git/.ssh/authorized_key文件来执行对用户权限的管理,是一个python模块包#yum install python python-...
分类:
其他好文 时间:
2014-07-03 12:41:36
阅读次数:
324
You are given a string,S, and a list of words,L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenati...
分类:
其他好文 时间:
2014-07-03 12:32:26
阅读次数:
133
#-*-coding:utf-8-*-#====================#File:python#Author:python#Date:2014#====================__author__='Administrator'#第6章unicode#unicode支持超过9000...
分类:
编程语言 时间:
2014-07-03 12:23:00
阅读次数:
378