定义 迭代器模式(Iterator
Pattern)提供一种方法访问一个容器对象中各个元素,而又不需暴露该对象内部细节。 迭代器模式通用类图 Iterator抽象迭代器
抽象迭代器负责定义访问和遍历元素的接口,而且基本上是有固定的3个方法:First()获取第一个元素,Next()访问下一个元素,I...
分类:
其他好文 时间:
2014-06-09 20:55:24
阅读次数:
316
原题地址:https://oj.leetcode.com/problems/first-missing-positive/题意:Given
an unsorted integer array, find the first missing positive integer.For
example,G...
分类:
编程语言 时间:
2014-06-09 17:44:43
阅读次数:
980
You know as a beginner to learn WCF, the first
thing is to make a simplest WCF service work like a classic "Hello World"
console application. Now I wi...
Description:Given an array of non-negative
integers, you are initially positioned at the first index of the array.Each
element in the array represents...
分类:
其他好文 时间:
2014-06-09 00:15:33
阅读次数:
193
两者在中文中都有分类的意思,具体区别我查了半天还是有点迷糊,有一个比较简单的说法1.
categorize 的含义是分成不同的小组,一般有按照功能分类的含义 Lindsay, like his films, is hard to
categorize. Her first novel defie.....
分类:
其他好文 时间:
2014-06-08 23:53:00
阅读次数:
382
I:基础绑定的实现1.在前面的两篇基础文章(路由及控制器&视图)当中,还没对QueryString的绑定进行介绍,因为我觉得它更适合放在这一章节中去介绍.我们在用WebForm去开发的时候,有时候会利用到QueryString去做一些功能如:http://localhost/First/QueryS...
分类:
Web程序 时间:
2014-06-08 19:27:12
阅读次数:
306
1) { string after = field.Substring(1); result =
first + after; } return result; ...
分类:
其他好文 时间:
2014-06-08 19:19:20
阅读次数:
347
【题目】
Given numRows, generate the first numRows of Pascal's triangle.
For example, given numRows = 5,
Return
[
[1],
[1,1],
[1,2,1],
[1,3,3,1],
[1,4,6,4,1]
]
【题意】
给定整数numRows, 要求生成杨辉三角的前numRows行
【思路】
杨辉三角有以下特点:
1. 第n行有n个元素
...
分类:
其他好文 时间:
2014-06-08 09:17:06
阅读次数:
196
Head First设计模式中介绍策略模式时以Duck类作为例子,其中用flyBehavior和quackBehavior两个接口引用变量代表鸭子飞行和鸭子叫这两种行为,通过改变flyBehavior和quackBehavior来满足不同的Duck子类的不同行为,这样带来的好处就是可以在运行时改变Duck子类的行为。下面是我用C++改写的代码。...
分类:
编程语言 时间:
2014-06-08 09:13:14
阅读次数:
243
mov esi, this ; vector u movups xmm0, [esi] ; first
vector in xmm0 movaps xmm2, xmm0 ...
分类:
其他好文 时间:
2014-06-07 22:51:23
阅读次数:
278