在JDK中使用SimpleDateFormat的时候都会遇到线程安全的问题,在JDK文档中也说明了该类是线程非安全的,建议对于每个线程都创建一个SimpleDateFormat对象。如下面一个Case中,多个线程去调用SimpleDateFormat中得parse方法:@Test
publ...
分类:
编程语言 时间:
2014-05-01 05:00:34
阅读次数:
308
Sliding Window
Time Limit: 12000MS
Memory Limit: 65536K
Total Submissions: 36147
Accepted: 10700
Case Time Limit: 5000MS
Description
An array of size n ≤ 106 i...
Problem Description
给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度.
回文就是正反读都是一样的字符串,如aba, abba等
Input
输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c...y,z组成的字符串S
两组case之间由空行隔开(该空行不用处理)
字符串长度len
Ou...
分类:
其他好文 时间:
2014-04-29 13:37:21
阅读次数:
311
#全角转半角
#ljl
use Encode;
sub CheckSBC
{
my ($name)=@_;
my @character;
my $tmpname=$name;
my $headname;
my $k=0;
for($ii=1; $ii 0)
{
my $he...
分类:
其他好文 时间:
2014-04-29 13:36:21
阅读次数:
366
#生成excel
#ljl
use Spreadsheet::WriteExcel;
my %us;
while(($key, $value) = each %us){
print "$key|$value\n";
}
# 创建一个新的EXCEL文件
my $workbook = Spreadsheet::WriteExcel->new('poi_count_top15....
分类:
其他好文 时间:
2014-04-29 13:33:21
阅读次数:
327
参考博客:http://blog.kuoe0.tw/posts/2014/01/31/install-gnu-gcc-on-os-x-and-use-the-header-bits-stdcplusplus-h-and-policy-based-data-structure
做CF看见别人用这个函数,然后就能直接用vector,set,string那些函数了,摸不着头脑,感觉特神奇就百度了一下,...
分类:
编程语言 时间:
2014-04-29 13:32:22
阅读次数:
433
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
...
分类:
其他好文 时间:
2014-04-29 13:28:21
阅读次数:
398
Problem Description
In the Wide Web World, Which web server was popular in web site? Apache, nginx, lighttpd? Baidu.com use Apache, and many web sites like 163.com use nginx. Why? Its configuration i...
分类:
其他好文 时间:
2014-04-29 13:24:20
阅读次数:
355
The blonde Angela has a new whim: internet chats. Of course, as any blonde, she writes her messages using the upper case. You are the moderator of Angela's favorite chat and you're fed up with her upp...
分类:
其他好文 时间:
2014-04-29 13:17:21
阅读次数:
293
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
...
分类:
其他好文 时间:
2014-04-29 13:13:21
阅读次数:
309