最近在学习javascript的原型,发现了__proto__与prototype,学问很大,于是研究了一下。
首先解释一下什么是原型?
原型是一个对象,其他对象可以通过它实现属性继承。
对象又是什么呢?
在javascript中,一个对象就是任何无序键值对的集合,如果它不是一个主数据类型(undefined,null,boolean,number,string),那它就是一个对象。...
分类:
其他好文 时间:
2014-05-10 10:13:54
阅读次数:
361
public boolean checkMatchFNOrFI(String[] strArray,String value){
boolean flag = false;
for(String s : strArray){
if(!s.equals("")){
String temp = s.replaceAll("\\?", "\\\\w").replaceAll("\\...
分类:
数据库 时间:
2014-05-08 10:46:16
阅读次数:
380
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
1: java里面的 boolean值 只有 false
true。这跟其他语言不同。2:java使用unicode字符集。理论上所有的字符都对应一个唯一的编码。所以 char
c=‘中’;这样的表述是正常的。3:有时候出现乱码的原因。比如打开记事本存进去的是 汉字,再次打开记事本,显示的是乱码。说...
分类:
移动开发 时间:
2014-05-07 12:59:11
阅读次数:
406
@Override public View getChildView(final int
groupPosition, final int childPosition, boolean isLastChild, View convertVi...
分类:
移动开发 时间:
2014-05-07 11:02:33
阅读次数:
422
procedure TForm1.N11DrawItem(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; Selected: Boolean);beginIf (Selected)
ThenbeginACanvas.Font.Color := clW...
分类:
其他好文 时间:
2014-05-07 10:52:51
阅读次数:
283
1、java提供了8中数据结构1、byte -----有符号--------1个字节2、int------有符号----------4个字节3、long------有符号--------8个字节4、char------有符号---------2个字节5、float-----有符号-------4个字节6、double-----有符号-----8个字节7、boolean-----只能取值true、f...
分类:
编程语言 时间:
2014-05-07 05:08:36
阅读次数:
313
一,带函数Pred 1, all(Pred, List) ->
boolean()如果List中的每个元素作为Pred函数的参数执行,结果都返回true,那么all函数返回true,
否则返回false例子:lists:all(fun(E) -> true end,[1,2,3,4]).结果true...
分类:
其他好文 时间:
2014-05-07 01:59:17
阅读次数:
552
PopupWindow是Android上自定义弹出窗口,使用起来很方便。PopupWindow的构造函数为public
PopupWindow(View contentView, int width, int height, boolean
focusable)contentView为要显示的vie...
分类:
移动开发 时间:
2014-05-07 00:05:17
阅读次数:
509
public class IsInteger {
private IsInteger(){};
public static boolean isInteger(String value) {
try {
Integer.parseInt(value);
return true;
} catch (N...
分类:
其他好文 时间:
2014-05-06 23:27:37
阅读次数:
348