自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 linux 常用命令

显示文件指定行数   sed -n "开始行,结束行p" 文件名eg: sed -n "10,20p" test.txt

2017-06-30 16:02:49 230

原创 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关注的人

提示
确定要删除当前文章?
取消 删除