二分查找法是针对已经排好序的序列进行查找每次折半查找算法时间复杂度,对于长度为N的序列,每次执行N/2,假设k次结束,最后到第一个N/2^k=0,所以k=logN时间复杂度logNint binarysearch(const int array[], int x, int N) { int l...
分类:
其他好文 时间:
2014-06-27 20:33:28
阅读次数:
178
一、SoapServer 服务器1、__construct作用:创建 SoapServer 对象用法:__construct ( mixed wsdl [, array options] )参数:wsdl 文件地址,options soap_version,encoding,actor,classm...
分类:
Web程序 时间:
2014-06-27 18:50:37
阅读次数:
1217
array( 'header' => '返回的服务器信息', 'name' => 'return_server_info', 'value' => 'str_replace("^", "", $data->return_server...
分类:
其他好文 时间:
2014-06-27 17:58:17
阅读次数:
175
github地址:https://github.com/zmxfree/addressapart比如将浙江省杭州市江干区XX路X号分割成浙江省 杭州市 江干区 XX路X号,方便excel操作。目前支持大部分中国省市区地址信息的分割,可以自行更新地址源信息。主程序代码: array('浙江省' => ...
分类:
Web程序 时间:
2014-06-27 17:33:28
阅读次数:
243
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?2,1,?3,4,?1,2,1,...
分类:
其他好文 时间:
2014-06-26 15:10:47
阅读次数:
168
1.javascript的数组API:
//定义数组
var pageIds = new Array();
pageIds.push('A');
数组长度
pageIds.length;
//shift:删除原数组第一项,并返回删除元素的值;如果数组为空则返回undefined
var a = [1,2,3,4,5];
var b = a.shift(); //a:[2,3,4...
分类:
Web程序 时间:
2014-06-26 14:20:09
阅读次数:
403
Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.Analysis: 这个题简单的版本是判断两个单词是不是anagram,一...
分类:
其他好文 时间:
2014-06-26 12:47:48
阅读次数:
144
=========================================================================================================Setp4:Tomcat与cas服务端进行绑定操作::参考:百度、谷歌、搜搜.....==...
分类:
其他好文 时间:
2014-06-26 12:31:30
阅读次数:
397
$mimes = array( 'hqx' => 'application/mac-binhex40', 'cpt' => 'application/mac-compactpro', 'csv' => array('text/x-comma-separated-values', 'text/comm...
说点关于Yii的 Yii::app()->createUrl 与 CHtml::normalizeUrl 使用的问题
array('product/view'),这里怎么写你有仔细想过么...
分类:
移动开发 时间:
2014-06-26 11:54:48
阅读次数:
244