var xmlHttp; uName() //用户名失去焦点时 {
if(all.uname.=="") { all.l1.innerHTML="不能为空!"; setTimeout("close(1)",1500);
return; } else { ...
分类:
其他好文 时间:
2014-05-08 14:23:43
阅读次数:
330
Java中对Map(HashMap,TreeMap,Hashtable等)的排序时间
首先简单说一下他们之间的区别: HashMap: 最常用的Map,它根据键的HashCode
值存储数据,根据键可以直接获取它的值,具有很快的访问速度。HashMap最多只允许一条记录的键为Null(多条会覆盖);...
分类:
编程语言 时间:
2014-05-08 13:44:25
阅读次数:
333
c# 获取字符串中的数字 /// /// 获取字符串中的数字 /// /// 字符串 /// 数字
例子1: public static decimal GetNumber(string str) { decimal result = 0; if (str
!= null && str != str...
分类:
其他好文 时间:
2014-05-08 13:32:21
阅读次数:
347
1:默认初始化如果对类中的变量不进行初始化,系统则会初始化变量为对应的值 比如int = 0,
bool = fase String = null;2:手动初始化变量private int age = 23;3:初始化块{ id = 201245; age
= 23;}4:构...
分类:
编程语言 时间:
2014-05-08 12:57:43
阅读次数:
361
if(navigator.userAgent.indexOf("MSIE")>0){return"MSIE";}if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){return"Firefox";}if(isSafari=navigator....
分类:
Web程序 时间:
2014-05-07 17:03:46
阅读次数:
288
RCP Editor 修改状态,Editor被修改后,在关闭Editor时提示用户保存的实现步骤。
1、Editor中声明
private boolean dirty;
2、重写isDirty
@Override
public boolean isDirty() {
return dirty;
}
3、设置方法
public void setDirty(boolea...
分类:
其他好文 时间:
2014-05-07 15:48:38
阅读次数:
242
std::string GetFilePath() { char
exepath[MAX_PATH];std::string strdir,tmpdir;memset(exepath,0,MAX_PATH);
GetModuleFileName(NULL,exepath,MAX_PATH); tmp...
分类:
其他好文 时间:
2014-05-07 14:59:14
阅读次数:
240
BOOL
首先编写程序:
#import
BOOL areIntDifferent(int ver1 , int ver2){
if(ver1 == ver2){
return (NO);
}else{
return (YES);
}
}
NSString* boolSt...
分类:
其他好文 时间:
2014-05-07 12:53:43
阅读次数:
263
第七章编程练习答案
7.1编写一个程序,用户不停输入两数,直到有0出现为止,计算调和平均数
//7.1编写一个程序,用户不停输入两数,直到有0出现为止,计算调和平均数
#include
using namespace std;
double average (unsigned x, unsigned y)
{
return (2.0 * x * y / (x + y));
}
i...
分类:
编程语言 时间:
2014-05-07 12:03:52
阅读次数:
727
inline static UIColor* getColorFromHex(NSString *hexColor)
{
if (hexColor == nil) {
return nil;
}
unsigned int red, green, blue;
NSRange range;
range.length = 2;
...
分类:
移动开发 时间:
2014-05-07 11:48:26
阅读次数:
327