my $line; my $content; open (FN,"D:\\PerlDemo\\parse.xml") or die "not found $!"; while($line=){ next if $. < 5; last if $. >10; $content.=$line; } close(FN); print "$content \n"; my $K=; my @R =qw...
分类:
其他好文 时间:
2014-07-22 22:37:53
阅读次数:
225
参考文章:http://kerry.blog.51cto.com/172631/277414/http://hancang2010.blog.163.com/blog/static/18246026120107602018998/同步过程中,发现一个触发器语句有误,导致后续的同步语句没有进行.解决方...
分类:
数据库 时间:
2014-07-22 22:35:35
阅读次数:
256
#pragma warning(disable:4996)
#include <cstdio>
#include <tchar.h>
#include <Windows.h>
/*
submit time : 3
1.Time Limit Exceeded
Last executed input: []
2.Cant‘s remember
request :
G...
分类:
移动开发 时间:
2014-07-21 23:30:21
阅读次数:
443
一 题意描述:有n(1=last[j]}三 源码展示: 1 #include 2 int dp[5010],sum[5010],last[5010]; 3 int main() 4 { 5 int n; 6 scanf("%d",&n); 7 memset(sum,0,si...
分类:
其他好文 时间:
2014-07-21 14:30:46
阅读次数:
206
#pragma warning(disable:4996)
#include <Windows.h>
#include <tchar.h>
#include <cstdio>
#include <vector>
using namespace std;
/*
submit time : 3
1. Runtime Error
Last executed input: [5,3]...
分类:
其他好文 时间:
2014-07-21 13:26:03
阅读次数:
250
partial_sort / partial_sort_copy
-----------------------------------------------------------------------------------------------------------------------------------------
描述:本算法接受一个 middle 迭代器(位于序列[first, last) 之列),然后重新安排[first, last),
使序列中的 middle - firs...
分类:
其他好文 时间:
2014-07-20 23:37:44
阅读次数:
293
nth_element
------------------------------------------------------------------------------
描述:重新排序,使得[nth,last)内没有任何一个元素小于[first,nth)内的元素,
但对于[first,nth)和[nth,last)两个子区间内的元素次序则无任何保证。
思路:
1.以 median-of-3-partition 将整个序列分割为更小的左、右子序列
2.如果 nth 迭代器落于左序列,就再对左子...
分类:
其他好文 时间:
2014-07-20 23:20:34
阅读次数:
279
random_shuffle
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
描述:将[first,last)的元素次序随机重排。
思路:
必须是 RandomAccessIterator
1.遍历区间
2.产生[...
分类:
其他好文 时间:
2014-07-20 23:12:29
阅读次数:
231
pre_permutation
----------------------------------------------------------------
描述: 取得 [first, last) 所标示之序列的前一个排列组合。如果没有,返回 false,有,返回true
思路:
从后往前
1.找两个相邻元素,令左端的元素为*i,右端的元素为*ii,且满足 *i > *ii
2.找出第一个小于 *i 的元素,令其为 *j,将*i,*j元素对调
3.将ii右端的所有元素颠倒
template <cl...
分类:
其他好文 时间:
2014-07-20 23:07:55
阅读次数:
286
问题
新装了CentOS 6.5系统,打算使用yum安装程序是出现了如下错误:
Loading mirror speeds from cached hostfile
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in
yummain.user_main(sys.argv[1:], exit_c...
分类:
其他好文 时间:
2014-07-20 22:46:33
阅读次数:
381