摘要:
function getIndex(arr,num){ var len = arr.length, st = 0, end = len-1 while(st<=end){ var mid = Math.floor((st+end)/2) if(num==arr[mid]){ return mid } 阅读全文
摘要:
先是没有加入请求超时的情况: var http = require('http'); var url = require('url'); function get(addr) { return new Promise(function(resolve, reject) { var url_obj = 阅读全文