需要 gson-2.7.jar 包 输出结果 ...
分类:
编程语言 时间:
2017-01-19 12:07:36
阅读次数:
134
215. Kth Largest Element in an Array 4 C++ Solutions using Partition, Max-Heap, priority_queue and multiset respectively Well, this problem has a naiv ...
分类:
编程语言 时间:
2017-01-19 08:46:05
阅读次数:
212
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 transaction ...
分类:
其他好文 时间:
2017-01-19 04:42:41
阅读次数:
179
ECMAScript语言的标准是由Netscape、Sun、微软、Borland等公司基于JavaScript和JScript锤炼、定义出来的。
ECMAScript可以为不同种类的宿主环境提供核心的脚本编程能力。ECMAScript仅仅是一个描述,定义了脚本语言的所有属性、方法和对象。 ...
分类:
其他好文 时间:
2017-01-19 03:44:06
阅读次数:
278
A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the ... ...
分类:
编程语言 时间:
2017-01-19 02:51:14
阅读次数:
249
观察者模式, 一直在用,却不知道什么是观察者模式。看到一篇文章,关于观察者模式的,说白了就是一个对象(被观察者)持有一堆对象(观察者)的引用,这些引用都放在一个列表中,当被观察者的状态改变时,就调用引用(观察者)的 update() 方法,让所有的观察者知道被观察者的状态改变了,然后自己也跟着变化。 ...
分类:
其他好文 时间:
2017-01-19 01:58:57
阅读次数:
287
我们如何遍历数组中的元素?20年前JavaScript刚萌生时,你可能这样实现数组遍历: 自ES5正式发布后,你可以使用内建的forEach方法来遍历数组: 对比jQuery中的$.each方法: $.each([], function(index, value, array) { // ... } ...
分类:
编程语言 时间:
2017-01-19 00:50:02
阅读次数:
220
泛型:1.泛型类 class A<T>{ }2.在创建实例时,需要为其类型变量赋值3.泛型方法 class A<T>{ public T fun1(){} public void fun2(T t){} //以上两个都不是泛型方法,他们是泛型类里面的一个方法 //发现方法要求需要在方法上有泛型的定义 ...
分类:
编程语言 时间:
2017-01-19 00:39:24
阅读次数:
263
Problem Description The Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess. Now he gets into fe... ...
分类:
其他好文 时间:
2017-01-18 15:03:55
阅读次数:
289
array.forEach(callback[, thisObject]); 下面是参数的详细信息: 1、 callback : 函数测试数组的每个元素。 2、thisObject : 对象作为该执行回调时使用. forEach是ECMA5中Array新方法中最基本的一个,就是遍历,循环。 Arra ...
分类:
其他好文 时间:
2017-01-18 11:55:30
阅读次数:
207