过程式析构:测试案例:test.cpp#include using namespace
std;class Test{public: Test(int dt=0){data=dt;} ~Test(){coutusing namespace
std;class Test{public: Test...
分类:
编程语言 时间:
2014-05-09 03:52:15
阅读次数:
374
一 :
创建自定义的值提供器(IValueProvider接口定义了值提供器)==目的==>把"自己的数据源"添加到绑定过程中.
自定义值提供器就需要实现IValueProvider接口. namespace System.Web.Mvc{ /// /// Defines the
methods t...
分类:
其他好文 时间:
2014-05-09 03:51:50
阅读次数:
403
using System;using System.Collections.Generic;using
System.Linq;using System.Text;using System.Net.Mail;namespace MailGet{ public
class Utility ...
分类:
其他好文 时间:
2014-05-09 03:30:26
阅读次数:
269
题目链接题意 : 求n的n次方的个位数是多少。思路 :
自己写一下看一下规律,会发现0,1,5,6的个位数怎么乘都是原来这个数,剩下的数也还是有规律。 1 #include 2 #include 3 #include
4 5 using namespace std ; 6 7 int a[...
分类:
Web程序 时间:
2014-05-09 03:13:46
阅读次数:
341
#include#include#include#includeusing namespace
std;const int M=1000;int main(){ string china; int
a[M]={-1},b[M]={-1},i,indexa,indexb,len,m; ...
分类:
其他好文 时间:
2014-05-08 23:27:02
阅读次数:
540
#include using namespace std;void CountSort(int*
a,int k,int n){ int s = 1; for(int i=0;i=0;i--){ tmp1 = a[i]; tmp2 = a[i] % s;
...
分类:
其他好文 时间:
2014-05-08 22:42:33
阅读次数:
382
题目链接:点击打开链接
题意:
给定一个字符串str 求字符串str的
循环节个数为 1-len 个的
最长子串长度
思路:套用kmp的性质
#include
#include
#include
using namespace std;
#define n 1300
void getnext(char str[n],int next[n]){
int m=strlen(str);...
分类:
其他好文 时间:
2014-05-08 17:12:53
阅读次数:
330
题目:
链接:http://acm.hdu.edu.cn/showproblem.php?pid=1686
题意:
输入t,是测试组数。每组测试,依次输入 字符串s1和s2。求出s2中s1的个数,可以有重叠。
思路:
KMP算法。
代码:
#include
#include
#include
using namespace std;
char s1[1001...
分类:
其他好文 时间:
2014-05-08 15:55:31
阅读次数:
285
Ruby Txt 转为 CSV 通用的工具
require 'csv'
namespace :sys_file_conver do
desc "把txt数据导入到csv中"
task :txt_to_csv => :environment do
amount = 100
head_hash = {
'对账文件名称' =>[12]...
分类:
其他好文 时间:
2014-05-08 15:53:08
阅读次数:
276
/** 01背包,recursive* 05.08/2014*/#include #include
#include #define MAXN 30000using namespace std;int N,W;int w[MAXN],v[MAXN];int
solve(int i, int tw)....
分类:
其他好文 时间:
2014-05-08 14:54:25
阅读次数:
271