package com.lirl.sprc; public class TestReturn { int a =100; public static void main(String[] args){ TestReturn return1 = new TestReturn(); int b = re ...
分类:
其他好文 时间:
2016-10-11 21:05:14
阅读次数:
98
-(BOOL)regexTel { if ( self == nil || [self length] == 0 ) { return NO; } NSString *regex = @"^((13[0-9])|(14[0-9])|(15[0-9])|(17[6-8])|(1705)|(1709)| ...
分类:
移动开发 时间:
2016-10-11 11:18:12
阅读次数:
151
SHORTchecksum(USHORT*buffer,intsize){unsignedlongcksum=0;while(size>1){cksum+=*buffer++;size-=sizeof(USHORT);}if(size){cksum+=*(UCHAR*)buffer;}cksum=(cksum>>16)+(cksum&0xffff);cksum+=(cksum>>16);return(USHORT)(~cksum);}IP头:4500003189F50..
分类:
其他好文 时间:
2016-10-11 01:08:00
阅读次数:
186
IP首部校验和的计算方法:算法:SHORTchecksum(USHORT*buffer,intsize){unsignedlongcksum=0;while(size>1){cksum+=*buffer++;size-=sizeof(USHORT);}if(size){cksum+=*(UCHAR*)buffer;}cksum=(cksum>>16)+(cksum&0xffff);cksum+=(cksum>>16);return(USHORT)..
分类:
其他好文 时间:
2016-10-11 00:57:07
阅读次数:
161
HTML结构如下 JS代码如下 首先是showPic函数 定义source变量获取a元素的路径,再定义placeholder的元素获取id为placeholder的占位符图片。 if(!document.getElementById("placeholder")) return false;这段代码 ...
分类:
Web程序 时间:
2016-10-10 20:47:28
阅读次数:
145
public transient Record findFirst(String sql, Object paras[]) { List result = find(sql, paras); return result.size() <= 0 ? null : (Record)result.get( ...
分类:
其他好文 时间:
2016-10-10 16:24:38
阅读次数:
205
抽奖算法 参考 Return random `list` item by its `weight` ...
分类:
编程语言 时间:
2016-10-10 14:21:32
阅读次数:
276
Write a function that takes a string as input and reverse only the vowels of a string. Example 1:Given s = "hello", return "holle". Example 2:Given s ...
分类:
其他好文 时间:
2016-10-10 07:43:47
阅读次数:
200
Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: ...
分类:
其他好文 时间:
2016-10-10 07:41:49
阅读次数:
147
今天java学到try,catch,finally以及return的使用,刚开始模糊不清,后来也差不多清楚了,分享给大家,有什么问题谢谢指出。try-catch是java中用来捕获异常的方法,也就是帮我们找到代码中存在的异常,其格式如下:try{代码段1}catch{代码段2}代码段1是一段存在异常的代码,代..
分类:
其他好文 时间:
2016-10-10 02:11:26
阅读次数:
191