二分查找法是针对已经排好序的序列进行查找每次折半查找算法时间复杂度,对于长度为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
目前正在专修CSS这一块,现在对内联元素和块元素进行深入的学习一下: 内联元素(inline element)一般都是基于语义级(semantic)的基本元素。内联元素只能容纳文本或者其他内联元素,常见内联元素"a"。 块元素(block element)和内联元素(inline eleme...
分类:
其他好文 时间:
2014-06-27 20:00:34
阅读次数:
213
一、SoapServer 服务器1、__construct作用:创建 SoapServer 对象用法:__construct ( mixed wsdl [, array options] )参数:wsdl 文件地址,options soap_version,encoding,actor,classm...
分类:
Web程序 时间:
2014-06-27 18:50:37
阅读次数:
1217
今天重写 -(id) initwithId:(NSInteger *)word_id word:(NSString *)word detail:(NSString *)detail方法时不注意将init后面的第一个字母写成了小写,在这个方法里面又调用父类的初始化方法(self = [super in...
分类:
移动开发 时间:
2014-06-26 15:17:17
阅读次数:
638
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
$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
SDK和ADT为22.6.2版本
工程为4.4.2
今天在写Android代码的时候,往工程中加入了几张图片,然后在代码中使用R.drawable调用时,一直报错 cannot be resolved or is not a field
然后我查看了gen目录下的R.java文件,发现里面已经有我加入的图片资源ID了,觉得很奇怪,一般是无法生成R.java文件的时候才会出现这种现象啊
在网...
分类:
移动开发 时间:
2014-06-26 11:34:21
阅读次数:
246