码迷,mamicode.com
首页 >  
搜索关键字:length    ( 19575个结果
两个集合遍历查找不重复
int[] tab1 = new int[]{2009,2010,2013};int[] tab2 = new int[]{2009,2010,2009,2010,2014};//这里首先遍历表2for(int i=0; i<tab2.length; ++i) {//取出表2中的数据int elem...
分类:其他好文   时间:2014-06-07 10:37:47    阅读次数:150
jquery点击弹框外层关闭弹框
$(document).bind("click",function(e){ if($( e.target ).closest(".game-container").length == 0){ alert(111); $(".game-container").hide();//game-contain...
分类:Web程序   时间:2014-06-06 18:23:38    阅读次数:287
常用类库
string类:不可变特性,可以看成是一个字符数组length 长度属性ISNullOrEmpty() 静态方法,判断是否为null或空Join() 静态方法 联结合并字符串Format() 静态 格式化字符串IndexOf() 用来查找某个字符或字符串,在给定字符串中的下标,如果没有找到则返回-....
分类:其他好文   时间:2014-06-06 15:00:50    阅读次数:185
自定义网络消息
#define MSG_HEAD_LEN 4//消息头部结构typedef struct tagMsg { //消息类型 u16 type; //消息体长度 u16 length;}TMsg;void receive(SOCKET s){ char buffer[1024*28]; //CServM...
分类:其他好文   时间:2014-06-06 11:25:33    阅读次数:243
LeetCode:Remove Duplicates from Sorted Array && Remove Element
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for...
分类:其他好文   时间:2014-06-06 06:53:19    阅读次数:347
JS获取字符串实际长度
JS中文字符长度和其它字符长度计算方法一样,但某些情况下我们需要获取中文字符串的实际长度,代码如下:function strLength(str){ var realLength = 0, len = str.length, charCode = -1; for (var i = 0; i = 0 ...
分类:Web程序   时间:2014-06-05 19:15:57    阅读次数:232
工作细节-----死循环
废话不多直接说,在while中比较容易走进死循环的误区,代码如下 int k = 0; int index = 0; while (k < dataArr.Length) { ...
分类:其他好文   时间:2014-06-05 18:57:49    阅读次数:203
js字符串长度计算(一个汉字==两个字符)和字符串截取
js字符串长度计算(一个汉字==两个字符)和字符串截取String.prototype.realLength = function() { return this.replace(/[^\x00-\xff]/g, "**").length; // [^\x00-\xff] - 匹配非双字节的字...
分类:Web程序   时间:2014-06-05 18:57:13    阅读次数:287
asp.net 文件上传出错:Maximum request length exceeded 解决方法
分类:Web程序   时间:2014-06-05 18:29:04    阅读次数:226
JS中的一些不常用的知识点。
1:delete关键字:只能删除对象的属性2:typeof 返回的是字符串(当然是对象的类型)3:分组选择符:如var a=(2,3,4);//结果是44:函数.length ;是指函数形参的集合5:函数.arguments ;//是指函数实参的集合。JS中的数据类型:字符串、数字、布尔、对象、n....
分类:Web程序   时间:2014-06-05 16:41:38    阅读次数:223
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!