3 30 1000 false Test false 100 null false 60 3 60
15 100 3 root password select id from test where id=1 300 false true root false
con_test 30000 30 .....
分类:
其他好文 时间:
2014-05-06 00:31:10
阅读次数:
258
ismember 判断A中的元素在B中有没有出现 LIA = ismember(A,B)
for arrays A and B returns an array of the samesize as A containing true where
the elements of A are i...
分类:
其他好文 时间:
2014-05-05 22:25:11
阅读次数:
317
代码:
#include
#include
#include
#include
using namespace std;
const int maxn=10003;
const int inf=0x7fffffff;
int num[maxn];
int n;
int main()
{
while(scanf("%d",&n)!=EOF&&n)...
分类:
其他好文 时间:
2014-05-04 12:39:16
阅读次数:
331
有时候我们需要使用ajax提交去提交form的值,这样就需要使用serialize()去获取form的值,但这样获取的值如果有中文,会乱码,原因和解决方法如下:
原因:.serialize()自动调用了encodeURIComponent方法将数据编码了
解决方法:调用decodeURIComponent(XXX,true);将数据解码
如:
var data=$('#addf...
分类:
Web程序 时间:
2014-05-04 00:12:51
阅读次数:
274
1 while 等循环语句1 break 和 continue的去别2
将短的循环写在外面,长的写在里面;3 循环嵌套尽量短2 voidvoid *p,为空指针类型,可以指向任何的类型若函数不接受参数,应写明 void,3
return1234567891011121314#include int ...
分类:
其他好文 时间:
2014-05-03 23:17:33
阅读次数:
368
题意:给定背包体积与物品的体积与价值 求正好放完的最小价值#includeusing
namespace std;int min(int a,int b){ if(a>t; while(t--) {
cin>>m1>>m2; m=m2-m1; ...
分类:
其他好文 时间:
2014-05-03 22:37:20
阅读次数:
437
list1 = [ 4, 7, 7, 3, 3, 3, 2, 1 ]
list2 = [ 5, 4, 3, 3, 2, 2, 2, 1, 1, 1 ]
def havel_hakimi_algo( degree_list ):
degree_list.sort( reverse = True )
print degree_list
for degr...
分类:
编程语言 时间:
2014-05-03 17:13:49
阅读次数:
426
题目:经典dp题目,求出最大相邻子序列的和。
方法:给出两种方法,一种dp,一种直接暴力(数据量小的时候可以考虑)。
代码1:
#include
#include
using namespace std;
int main()
{
int n;
int t=1;
cin>>n;
int s[100010];
while(t<=n)
{
...
分类:
其他好文 时间:
2014-05-03 17:02:34
阅读次数:
324
$.方法
(1)$.merge(first, second)
合并两个数组或类数组,将第二个数组添加到第一个数组的末尾
(2)$.grep(elems, callback, invert)
使用callback对elems进行过滤,如果invert设置为true.则返回保留callback返回值为false的元素数组,如果invert设置为false则返回c...
分类:
Web程序 时间:
2014-05-03 16:37:05
阅读次数:
333
.cpp
layout->setBackGroundImageScale9Enabled(true);
layout->setBackGroundImage("green_edit.png");
layout->setPosition(Point(0,0));
addChild(layout);
...
分类:
其他好文 时间:
2014-05-03 16:30:56
阅读次数:
322