//第一种GetLength=function(str){varrealLength=0;for(vari=0;i=0&&charCode<=128)realLength+=1;elserealLength+=2;}returnrealLength;}//第二种(采取将255意外的字符替换成"aa"...
分类:
Web程序 时间:
2015-06-17 13:17:03
阅读次数:
219
1、Arguments是一个类似数组的实参队列,译文论据,论点,姑且译作参数(实参);2、Arguments与形参保持不同的存储空间,只有当形参被赋值之后才会3、传说在严格模式下函数内自调,arguments.callee失效了function TomG(a,b,c) { console.log(....
分类:
其他好文 时间:
2015-06-17 13:16:14
阅读次数:
110
看到一篇关于javascript单例的文章http://blog.crazycoder.cc/post/13对javascript new运算有些思考:情况1:function test1(){ return {name:'test1'};};new test1的结果:{name:'test1'}....
分类:
编程语言 时间:
2015-06-17 11:17:33
阅读次数:
110
/** * 获取上一个月 * * @date 格式为yyyy-mm-dd的日期,如:2014-01-25 */ function getPreMonth(date) { var arr = dat...
分类:
Web程序 时间:
2015-06-17 11:09:06
阅读次数:
210
1、reduce函数用法: $(function(){ // arrowMouseOver(); Array.prototype.reduce=null; //将内置reduce函数设置为null var eleResult=document.getElementById("re...
分类:
编程语言 时间:
2015-06-17 11:07:06
阅读次数:
153
globalMsg = {“Missing semicolon.” : “缺少分号.”,“Use the function form of \”use strict\”.” : “使用标准化定义function.”,“Unexpected space after ‘-’.” : “在’-'后面不应出...
分类:
Web程序 时间:
2015-06-17 11:00:36
阅读次数:
235
MyHtml.html
a{display: block;width: 20;height: 20;ba}
(function($){
$.fn.greenify = function(options){
var settings = $.extend(
{color:"green",
backgrou...
分类:
Web程序 时间:
2015-06-17 09:40:56
阅读次数:
171
Oracle_db.class.phplink=$this->connect(); if(!$this->link){ echo "连接失败"; exit; } } public function connect(){ return oci_connect('demo','demo',...
分类:
Web程序 时间:
2015-06-17 08:15:08
阅读次数:
152
host = $host; $this->name = $name; $this->pass = $pass; $this->table = $table; $this->ut = $ut; $this->connect(); } //建立连接数据库的函数 function...
分类:
数据库 时间:
2015-06-17 00:23:02
阅读次数:
169
http://www.geeksforgeeks.org/extern-c-in-c/C++函数重载(function overloading),但是C++编译器是如何区分不同的函数的呢?----是通过在函数名是加些信息来区不同的函数,即所谓的Name Mangling。C++标准并没有对name ...
分类:
编程语言 时间:
2015-06-16 22:55:45
阅读次数:
204