String.prototype.format = String.prototype.f =
function () { var s = this, i = arguments.length; while (i--) { s =
s.replace(new R...
分类:
编程语言 时间:
2014-05-26 10:49:23
阅读次数:
356
javascript中的replace只会替换第一个匹配如果要全部替换的话只能重写方法实现replaceAll记录一下String.prototype.replaceAll
= function (s1, s2) { return this.replace(new RegExp(s1,"gm"),s...
分类:
编程语言 时间:
2014-05-26 10:49:03
阅读次数:
326
Function对象对象中的函数(方法)当一个函数被保存为对象的一个属性时,我们称它为一个方法,当一个方法被调用时,this被绑定到该对象。方法可以使用this访问自己所属的对象;return一个函数纵使会返回一个值。如果没有指定返回值,则返回
undefined。如果函数调用时在前面加上了 new...
分类:
Web程序 时间:
2014-05-26 10:23:51
阅读次数:
203
Hello every body, cheapnikeairtrainers.co.uk
are doing Spring Promotion! A hug number of Cheap Air Max trainers high quality
trainers with cheap price...
分类:
其他好文 时间:
2014-05-26 10:19:28
阅读次数:
253
You have an empty repositoryTo get started you will
need to run these commands in your terminal.New to Git? Learn the basic Git
commandsConfigure Git ...
分类:
其他好文 时间:
2014-05-26 09:57:01
阅读次数:
254
1.
sealed——“断子绝孙” 密封类不能被继承。密封方法可以重写基类中的方法,但其本身不能在任何派生类中进一步重写。当应用于方法或属性时,sealed修饰符必须始终与override一起使用。即:密封类不会有子类,所以是“断子绝孙”。2.
new——“你是你的,我是我的” new关键字用于显式...
分类:
其他好文 时间:
2014-05-26 09:39:31
阅读次数:
245
通过Google大神,在国外网站,找到相应的解决办法!还是Google比较权威呀。Go to
Help, "Install New Software..."Click on "Available Sofware
Sites"Searchhttp://download.eclipse.org/rele...
分类:
系统相关 时间:
2014-05-26 09:14:20
阅读次数:
258
父类引用指向子类对象从对象的内存角度来理解试试.假设现在有一个父类Father,它里面的变量需要占用1M内存.有一个它的子类Son,它里面的变量需要占用0.5M内存.现在通过代码来看看内存的分配情况:Father
f = new Father();//系统将分配1M内存.Son s = new So...
分类:
其他好文 时间:
2014-05-26 09:13:37
阅读次数:
180
* 全角转半角的 转换函数* @return String*/public static final
String full2HalfChange(String QJstr){StringBuffer outStrBuf = new
StringBuffer("");String Tstr = ""...
分类:
编程语言 时间:
2014-05-26 09:10:31
阅读次数:
316
自己写了正向反向的冒泡排序,还用了静态和NEW方法实现。import
java.util.Arrays;public class HelloJava { public static void main(String[] args)
{ // TODO Auto-generated...
分类:
编程语言 时间:
2014-05-26 09:05:27
阅读次数:
321