function idcard_verify_number($idcard_base){if (strlen($idcard_base) != 17){return false;}$factor = array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, ...
分类:
Web程序 时间:
2014-08-27 12:49:07
阅读次数:
190
hdu 2710 Max Factor(找最大素数)...
分类:
其他好文 时间:
2014-08-21 00:18:23
阅读次数:
201
#include
#include
#include
#include
using namespace std;
typedef __int64 LL;
const int Times = 20;
LL factor[100], l;
LL gcd(LL a, LL b)
{
return b ? gcd(b, a%b):a;
}
LL add_mod(LL a, LL b, LL n)...
分类:
其他好文 时间:
2014-08-19 20:57:05
阅读次数:
254
UVa 129 Krypton Factor注意输出格式,比较坑爹。每次要进行处理去掉容易的串,统计困难串的个数。#include#include#include#include#include#include#include#include#include#define INF 100000000...
分类:
其他好文 时间:
2014-08-18 21:56:12
阅读次数:
371
1. If a method c++an be static, declare it static. Speed improvement is by a factor of 4. 如果一个方法可静态化,就对它做静态声明。速率可提升至4倍。 2. echo is faster than pr...
分类:
Web程序 时间:
2014-08-16 15:01:30
阅读次数:
280
网易公开课,第14课 notes,10 之前谈到的factor analysis,用EM算法找到潜在的因子变量,以达到降维的目的 这里介绍的是另外一种降维的方法,Principal Components Analysis (PCA), 比Factor Analysis更为直接,计算也简单些 主成分分...
分类:
其他好文 时间:
2014-08-13 17:52:06
阅读次数:
288
工厂方法模式FactoryMethod工厂方法模式的实现把具体产品的创建推迟到子类中,从而解决了简单工厂模式难以扩展的问题。把简单工厂类分解为抽象基类和若干个具体类如下代码: //抽象的工厂方法“总部”类FactoryMethod public abstract class Factor...
分类:
其他好文 时间:
2014-08-11 20:48:12
阅读次数:
167
Max Factor
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3693 Accepted Submission(s): 1181
Problem Description
To improve the or...
分类:
其他好文 时间:
2014-08-11 17:52:32
阅读次数:
245
我的数据库很容易死锁,我后来发现是聚集索引引起的,我的索引填充因子是90,后来我把聚集索引去掉,问题就解决了,但是我不明白聚集索引为什么会引起死锁??你的填充因子设置得不对 聚集索引代表了表中记录的存储顺序,所以每次数据的变化,都可能导致表中的数据按照聚集索引重新调整顺序 而填充因子设置为9...
分类:
其他好文 时间:
2014-08-11 17:25:32
阅读次数:
142
经典状态压缩dp#include #include #include #include #define min(x,y) (x>y?y:x)using namespace std;int factor[30],all,n,a[105],b[105][1f[i-1][p0]+abs(a[i]-j)) ...
分类:
其他好文 时间:
2014-08-02 15:16:53
阅读次数:
198