http://jc-dreaming.iteye.com/blog/754690/***判断对象是否为空*Check whether string s is empty.*/function isEmpty(s){return ((s == undefined || s == null || s =...
分类:
Web程序 时间:
2014-11-04 12:33:48
阅读次数:
150
数组的定义:var 北京十号线 = ["国家图书馆","巴沟"]北京十号线.count //或者数组的长度if 北京十号线.isEmpty { println(" 数组是空的");}向数组中加入数值,北京十号线.append("农业展览馆");北京十号线 += ["太阳宫","三元桥"...
分类:
编程语言 时间:
2014-11-03 23:58:47
阅读次数:
407
public abstract class Stack { public abstract boolean isEmpty(); public abstract boolean isFull(); public abstract T top(); public abstrac...
分类:
编程语言 时间:
2014-11-03 19:12:43
阅读次数:
207
public?List<DatasetColumn>?queryDatasetColumns(String?datasetId)?{
if(StringUtil.isEmpty(datasetId))?{
return?new?ArrayList<DatasetColumn>();
}
DatasetDefine?dataSet?=?this.fi...
分类:
数据库 时间:
2014-10-31 12:14:46
阅读次数:
190
经常判断一个String字符串是否为空,闲来无聊,测试了一下经常用到的几种方法。...
分类:
移动开发 时间:
2014-10-21 17:51:14
阅读次数:
206
1. public static boolean isEmpty(String str) 判断某字符串是否为空,为空的标准是 str==null 或 str.length()==0 下面是 StringUtils 判断是否为空的示例: StringUtils.isEmpty(null) =...
分类:
其他好文 时间:
2014-10-20 19:23:26
阅读次数:
191
对于一个UI界面中,当判断用户是否输入用户名或密码时,我们常用TextUtils.isEmpty()方法来判断;但有时也可以用这个equals()方法,都可以来判断EditText中是否为空,但有时很纠结,不知道这两种方法中哪个比较好?为什么?
后来在百度上找到了答案。
仔细读官方的API:Returns..
分类:
其他好文 时间:
2014-10-19 01:36:14
阅读次数:
166
1删除左右两端的空格//删除左右两端的空格function trim(str) { return str.replace(/(^\s*)|(\s*$)/g, "");}2 判断是否为空//判断是否为空function isEmpty(s) { return ((s == undefin...
分类:
Web程序 时间:
2014-10-15 18:33:21
阅读次数:
131
remotepath != null 与 !TextUtils.isEmpty(remotepath) 的区别
!TextUtils.isEmpty(remotepath) 与 remotepath != null &&remotepath.length > 0 一样
或者初始化 remotepath = null,这时只判断 remotepath != n...
分类:
其他好文 时间:
2014-10-11 15:06:35
阅读次数:
143
1.binary heap的实现
BinaryHeap.h
#ifndef BINARYHEAP_H
#define BINARYHEAP_H
class BinaryHeap
{
public:
BinaryHeap(int N);
bool isEmpty();
void exchange(int i,int j);
...
分类:
其他好文 时间:
2014-10-08 16:22:45
阅读次数:
260