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
extend()函数是jQuery的基础函数之一,作用是扩展现有的对象说明:$.extend(true,
obj1, obj2)表示以obj2中的属性扩展对象obj1,第一个参数设为true表示深复制。
虽然obj1中原来没有"x"属性,但经过扩展后,obj1不但具有了"x"属性,而且对obj2中的...
分类:
Web程序 时间:
2014-05-04 11:57:04
阅读次数:
417
这是最简单的类型。boolean表达了真值,可以为TRUE或FALSE。Note:布尔类型是
PHP 4 引进的。语法要指定一个布尔值,使用关键字TRUE或FALSE。两个都不区分大小写。通常你用某些运算符返回boolean值,并将其传递给控制流程。
";}//...因为可以使用下面这种简单的方式:...
分类:
Web程序 时间:
2014-05-04 11:52:36
阅读次数:
468
awk 通过判断 Pattern
的值来决定是否执行其后所对应的Actions。这里列出几种常见的Pattern:A.1 BEGIN BEGIN 为 awk 的保留字,是一种特殊的
Pattern。 BEGIN 成立(其值为true)的时机是: "awk 程序一开始执行,尚未读取任何数...
分类:
其他好文 时间:
2014-05-04 11:47:23
阅读次数:
277
有时候我们需要使用ajax提交去提交form的值,这样就需要使用serialize()去获取form的值,但这样获取的值如果有中文,会乱码,原因和解决方法如下:
原因:.serialize()自动调用了encodeURIComponent方法将数据编码了
解决方法:调用decodeURIComponent(XXX,true);将数据解码
如:
var data=$('#addf...
分类:
Web程序 时间:
2014-05-04 00:12:51
阅读次数:
274
首先看下面这个例子
public static void main(String[] args) {
ArrayList al1 = new ArrayList();
al1.add(1);
ArrayList al2 = new ArrayList();
al2.add("hello");
//int型链表和string型链表,结果为true
System.out.p...
分类:
编程语言 时间:
2014-05-03 22:02:53
阅读次数:
376
2dx3.0下JSON解析库官方已经集成好了,我们引用就OK。
JSON文件hello.json内容
{"pets":["dog","cat"],"stuInfo":{"stuAge":"23","stuName":"zhangsan","birthday":"1990-01-12"},"username":"tomsfff","other":[true,30]}
.h头文件...
分类:
Web程序 时间:
2014-05-03 21:34:48
阅读次数:
319
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
$.方法
(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