/**
*$stime开始时间$etime结束时间$table表前缀
*/
publicfunctiongetcalltablename($starttime,$endtime,$tablename){
$startsj=strtotime($starttime);
$endsj=strtotime($endtime);
$daynums=floor(($endsj-$startsj)/86400)+1;
$data=array();
$db=M();
$sql="useaste..
分类:
数据库 时间:
2016-08-26 23:05:11
阅读次数:
226
/**转换时间格式*/functionchangeTimeType($time){if(is_numeric($time)){$value=array("days"=>0,"hours"=>0,"minutes"=>0,"seconds"=>0,);if($time>=86400){$value["days"]=floor($time/86400);$time=($time%86400);}if($time>=3600){$value["hours"]=floo..
分类:
其他好文 时间:
2016-08-26 23:03:51
阅读次数:
231
今天分析了C语言二维数组和指针的基本理解,感觉有点懵。。。代码记录一下,如果有大神临幸发现哪里有误,欢迎指正~~~ 分析如下: 黄色代码部分:输出的地址完全相同,所以二维数组和一维数组的一点区别是: 在二维数组中*array代表的也是数组的首地址,而一维数组中*array代表的是第一个元素的值 红色 ...
分类:
编程语言 时间:
2016-08-26 21:16:53
阅读次数:
218
Java中HashMap是一种用于存储“键”和“值”信息对的数据结构。不同于Array、ArrayList和LinkedLists,它不会维持插入元素的顺序。 因此,在键或值的基础上排序HashMap是一个很难的面试问题,如果你不知道如何解决的话。下面让我们看看如何解决这个问题。 1. HashMa ...
分类:
编程语言 时间:
2016-08-26 21:10:58
阅读次数:
254
一句话解释prototype,为一个对象强加方法。 代码中强行为系统的Array对象添加了removeItem方法。 以后使用数组的时候,导入此js文件,便可以对数组进行移除数据项的操作了。╮(╯▽╰)╭ ...
分类:
Web程序 时间:
2016-08-26 19:57:58
阅读次数:
147
今天在网上参观到一个写法,返回字符串个个字母的个数 得到:Object {a: 5, b: 2, c: 2} reduce我查到是es5新加了array函数,这里不细说,有兴趣自己查; 关键是‘=>’,是我第一次在js中见到;在网上查了查没找到什么资料,自己理解吧,希望有大神指正。 应该就是匿名函数 ...
分类:
Web程序 时间:
2016-08-26 19:56:36
阅读次数:
201
题目: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transac ...
分类:
其他好文 时间:
2016-08-26 18:30:54
阅读次数:
121
string[] array = { "A","B","C","D","H"}; var index=array.ToList().IndexOf("D"); 使用IndexOf()方法,返回数组元素在数组中的索引。 index=3; ...
分类:
编程语言 时间:
2016-08-26 15:31:35
阅读次数:
165
JavaScript创建对象 JavaScript 有Date、Array、String等这样的内置对象,功能强大使用简单,人见人爱,但在处理一些复杂的逻辑的时候,内置对象就很无力了,往往需要开发者自定义对象。 对象是什么 从JavaScript定义上讲对象是无序属性的集合,其属性可以包含基本值、对 ...
分类:
Web程序 时间:
2016-08-26 15:23:18
阅读次数:
140
Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, return ...
分类:
编程语言 时间:
2016-08-26 15:23:04
阅读次数:
182