今日做开发的时候发现的这个问题发现无论怎样配置都不能使用Kaminari 的Per 这个功能,分页大小也固定在了30最开始还以为是Ransack 这个Gem 影响的,上网搜了很久发现没有最后仔细检查,原来是Gemfile 里面包含了will_pagination 把它删除之后,一切恢复正常
分类:
其他好文 时间:
2014-09-03 06:12:06
阅读次数:
187
简单的矩阵构造题,参看我前几篇的谈到的矩阵的构造法。#include #include #include #include using namespace std;int Mod;struct Matrax { int m[15][15];};Matrax a,per;int ats[15],an[...
分类:
其他好文 时间:
2014-09-02 17:24:34
阅读次数:
208
呃,离散数学课上直接就有这样的题#include #include #include using namespace std;const int Mod=1000;struct Matrax { int m[25][25];};Matrax a,per;int n,m;void initial(){...
分类:
其他好文 时间:
2014-09-02 14:03:14
阅读次数:
206
#include #include #include #include using namespace std; int n,M=9973;struct Matrax { int m[15][15];}; Matrax a,per; void initial(){ int i,j; ...
分类:
其他好文 时间:
2014-08-30 23:03:20
阅读次数:
236
水题,结果MOD 10000#include #include using namespace std;int n=2,M=10000;struct Matrax { int m[35][35];}; Matrax a,per; void initial(){ int i,j; f...
分类:
其他好文 时间:
2014-08-30 21:41:50
阅读次数:
268
今天捣鼓了下怎么用python来处理json文件。只能说json太强大,python太牛逼。1.json文件的格式。我处理的json文件的格式,是那种contains json per line,所以没办法一次性导入,所以网上找到的方法不适用,后来在stackoverflow上找到了这个(http:...
分类:
编程语言 时间:
2014-08-30 17:46:19
阅读次数:
220
树形DP。。。
B. Appleman and Tree
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Appleman has a ...
分类:
移动开发 时间:
2014-08-30 15:11:29
阅读次数:
246
每次只把短的部分往长的部分折叠,直接用树状数组爆搞就可以了。
每次长度都缩小一些暴力的复杂度不是太高,启发式暴力????
C. Appleman and a Sheet of Paper
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standa...
分类:
移动开发 时间:
2014-08-30 15:11:21
阅读次数:
275
total_rows == 0 OR $this->per_page == 0) { return ''; } // Calculate the total number of pages $num_pages = ceil($this->total_rows / ...
分类:
其他好文 时间:
2014-08-28 18:03:15
阅读次数:
354
产品每次发布,都需要打很多渠道的包。之前用per脚本打包,后来添加了自定义空间属性后,就不能打了。Ant脚本打包又嫌麻烦,引用的工程太多。最后想到一个办法就是反编译。原理:每个渠道的包只有AndroidManifest.xml文件中渠道的ID不一样。所以反编译APK后,修改AndroidManife...
分类:
移动开发 时间:
2014-08-28 17:58:55
阅读次数:
254