/*
* 备忘录模式
*/
#include
//保存值
class mySavevalue
{
public:
mySavevalue(string user_name = "",
int life_value = 100,
int magic_point = 100,
int rank_values =...
分类:
其他好文 时间:
2014-07-01 08:49:27
阅读次数:
203
题目:
链接:
题意:
思路:
代码:
#include
#include
#include
using namespace std;
const int N = 30030;
int root[N];
int sum[N],rank[N];//sum[i]表示i下面的积木个数
int q;
int findset(int x)
{
if(x == r...
分类:
其他好文 时间:
2014-07-01 08:12:55
阅读次数:
178
题意:给你两个字符串,求最长公共字串的长度。
by:罗穗骞模板
#include
#include
#include
#include
using namespace std;
#define M 303
#define inf 0x3fffffff
#define maxn 500000
#define ws ww
#define rank RANK
#define F(x)...
分类:
其他好文 时间:
2014-06-28 08:00:24
阅读次数:
190
Transact-SQL提供了4个排名函数: RANK(),DENSE_RANK(),ROW_NUMBER(),NTILE(),下文是对这4个函数进行的解释。...
分类:
数据库 时间:
2014-06-26 08:01:11
阅读次数:
304
prunning,剪枝,顾名思义就是减掉那些不重要的。
从理论上来讲,剪枝达到的效果就是剪枝后的q和剪枝前的 p 最大化相似,有两种算法 entroy-based以及rank-based。
针对model,使用相对熵来刻画D(q||p) 来刻画,保证两个model的熵差别最小,就是entropy-based。如果使用rank(p|q)来描述,保证整个model的rank差别最小...
分类:
其他好文 时间:
2014-06-26 07:24:00
阅读次数:
208
原来使用中的sql2005的全文检索的速度总是不如意,尤其是带rank的。今天搜了一下,原来在freetexttable中还有一个参数top_n_by_rank,是第4个参数。注意还要设置:EXEC sp_configure 'precompute rank', '1'EXEC sp_configu...
分类:
数据库 时间:
2014-06-25 23:42:54
阅读次数:
305
Well , you know. As a college student who want to find a good job after graduating like me , scores are not that important. I just want to have some low scores which can help me graduate successfully...
分类:
其他好文 时间:
2014-06-25 09:59:37
阅读次数:
202
RankBoost的思想比较简单,也是二元Learning to rank的常规思路:通过构造目标分类器,使得pair之间的对象存在相对大小关系。通俗点说,把对象组成一对对的pair,比如一组排序r1>r2>r3>r4,那可以构成pair:(r1,r2)(r1,r3),(r1,r4),(r2,r3)(r3,r4),这样的pair是正值,也就是label是1;而余下的pair如(r2,r1)的值应该...
分类:
其他好文 时间:
2014-06-22 16:48:26
阅读次数:
249
欢迎关注我的新博客地址:http://cuipengfei.me/
在Scala中,名字叫做update的方法是有特殊作用的。
比如:
1
2
3
val scores = new scala.collection.mutable.HashMap[String, Int]
scores("Bob") = 100
val bobsScore =...
分类:
其他好文 时间:
2014-06-22 07:37:52
阅读次数:
282
下标脚本就是对一个东西通过索引,快速取值的一种语法,例如数组的a[0]。这就是一个下标脚本。通过索引0来快速取值。在Swift中,我们可以对类(Class)、结构体(structure)和枚举(enumeration)中自己定义下标脚本的语法
一、常规定义
class Student{
var scores:Int[] = Array(count:5,repeatedValue:0)
...
分类:
其他好文 时间:
2014-06-18 07:09:30
阅读次数:
209