码迷,mamicode.com
首页 >  
搜索关键字:last    ( 7540个结果
Perl
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
mysql 主从同步 Last_SQL_Error
参考文章:http://kerry.blog.51cto.com/172631/277414/http://hancang2010.blog.163.com/blog/static/18246026120107602018998/同步过程中,发现一个触发器语句有误,导致后续的同步语句没有进行.解决方...
分类:数据库   时间:2014-07-22 22:35:35    阅读次数:256
LeetCode_41trap [Trapping Rain Water]
#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
Codeforces 229D
一 题意描述:有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
LeetCode_39combinationSum2 [Combination Sum II]
#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
STL 源码剖析 算法 stl_algo.h -- partial_sort / partial_sort_copy
partial_sort / partial_sort_copy ----------------------------------------------------------------------------------------------------------------------------------------- 描述:本算法接受一个 middle 迭代器(位于序列[first, last) 之列),然后重新安排[first, last), 使序列中的 middle - firs...
分类:其他好文   时间:2014-07-20 23:37:44    阅读次数:293
STL 源码剖析 算法 stl_algo.h -- nth_element
nth_element ------------------------------------------------------------------------------ 描述:重新排序,使得[nth,last)内没有任何一个元素小于[first,nth)内的元素, 但对于[first,nth)和[nth,last)两个子区间内的元素次序则无任何保证。 思路: 1.以 median-of-3-partition 将整个序列分割为更小的左、右子序列 2.如果 nth 迭代器落于左序列,就再对左子...
分类:其他好文   时间:2014-07-20 23:20:34    阅读次数:279
STL 源码剖析 算法 stl_algo.h -- random_shuffle
random_shuffle -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 描述:将[first,last)的元素次序随机重排。 思路: 必须是 RandomAccessIterator 1.遍历区间 2.产生[...
分类:其他好文   时间:2014-07-20 23:12:29    阅读次数:231
STL 源码剖析 算法 stl_algo.h -- pre_permutation
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 中使用yum出现的“UnicodeDecodeError: 'ascii' codec”问题解决方法
问题 新装了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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!