- 博客(8)
- 收藏
- 关注
原创 Kickstart Practice Round 2017 Problem C. Sherlock and Parentheses
public static void main(String[] args) { Scanner in = new Scanner(System.in); int T = in.nextInt(); for (int t = 0; t < T; t++) { int l = in.nextInt();
2017-06-28 15:55:42 343
原创 Kickstart Practice Round 2017 Problem B. Vote
static double[][] out = new double[2001][2001]; public static double help(int a, int b) { if (out[a][b] != -1) { return out[a][b]; } double re = 0; if
2017-06-28 15:01:56 340
原创 Kickstart Practice Round 2017 Problem A. Country Leader
public static void main(String[] args) { Scanner in = new Scanner(System.in); int T = Integer.parseInt(in.nextLine()); for (int t = 0; t < T; t++) { int N = Integer.parseInt(in.nextLine());
2017-06-28 09:48:01 240
原创 python multiprocessing多进程实例
import multiprocessingWORKNUM = 3class Worker(multiprocessing.Process): def __init__(self, queue): super(Worker, self).__init__() self.q = queue def run(self): w...
2017-06-26 16:23:27 891
原创 hadoop put 强制覆盖文件
若hdfs上已经存在文件,要强制覆盖,用 -f 命令如:hadoop fs -put -f file.name /home/test/
2017-06-06 20:15:01 44200
原创 linux 时间戳转小时
hour=(time/3600+8)%24如:time=1495256025 (2017/5/20 12:53:45)hour=(time/3600+8)%24=12
2017-06-04 19:41:29 603
转载 Python中threading的join和setDaemon的区别及用法[例子]
Python多线程编程时,经常会用到join()和setDaemon()方法,今天特地研究了一下两者的区别。1、join ()方法:主线程A中,创建了子线程B,并且在主线程A中调用了B.join(),那么,主线程A会在调用的地方等待,直到子线程B完成操作后,才可以接着往下执行,那么在调用这个线程时可以使用被调用线程的join方法。原型:join([timeout
2017-06-02 18:46:17 297
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人