这题思路:一开始有n盏灯,且全部为关闭状态,都记为 0 就是 The initial condition : 0 0 0 0 0 …然后之后进行i操作就是对这些灯以是否能被i整除,进行改变状态,如将 0 改为 1 或 将 1 改为 0正如提醒里的After the first operation :...
分类:
其他好文 时间:
2014-07-19 21:00:51
阅读次数:
198
描述、源码、示例
version 1:普通操作版本
version 2: 泛化操作版本
1.accumulate
描述:计算 init 和 [first, last) 内所有元素的总和
源码:
//version 1
template
T accumulate(InputIterator first, InputIterator last, T init) {
for ( ; first != last; ++first)
ini...
分类:
其他好文 时间:
2014-07-18 22:16:32
阅读次数:
283
Implement strStr().
Returns a pointer to the first occurrence of needle in haystack, or null if
needle is not part of haystack.
解题思路:
strstr()函数隶属标准库string.h头文件,其内部的实现是O(n^2)的时间复...
分类:
其他好文 时间:
2014-07-18 21:25:18
阅读次数:
328
1:创建工程。值得的注意的是选Empty Application。2:创建两个UIViewController的两个子类first 和second。3 添加你的应用所要用到的图片和声音等文件在appdelegat.m中写入,记得加入相应的头文件 // 第一个页面,第一个视图控制器 first *.....
分类:
其他好文 时间:
2014-07-18 21:15:37
阅读次数:
257
I went through the EE445M and found it’s interesting since the goal of this class is to build a working RTOS. The first lec note mentioned how to make...
分类:
其他好文 时间:
2014-07-18 16:27:54
阅读次数:
175
neutron-openvswitch-agent代码分析neutron.plugins.openvswitch.agent.ovs_neutron_agent:main# init ovs first by agent_config:# setup plugin_rpc, state_rpc, m...
分类:
其他好文 时间:
2014-07-18 00:28:37
阅读次数:
434
In one embodiment, a method includes sending to a mobile client computing device a first notification through a real-time push service, the first noti...
分类:
其他好文 时间:
2014-07-17 22:06:41
阅读次数:
603
描述:该问题出现在校对BT种子数据的时候遇到的bug,原因是使用linq查找元素的时候B是A的一个子集, B在A中一定存在,这种情况下就不会抛出异常情况,反之B的一部分不属于A就会异常应为B中的一个元素在A中查找是没有找到,此时使用First()就会有bug用FirstOrDefault或者Find...
分类:
其他好文 时间:
2014-07-17 14:11:25
阅读次数:
359
First Step:下载VirtualBox-4.1.18-78361-Win
下载地址:http://download.csdn.net/download/tianhuimin/4485395
Second Step:下载CentOS镜像文件
下载地址:http://dl.vmall.com/c05apqd0mk
Oracle VMVirtualBox 4.2...
分类:
系统相关 时间:
2014-07-17 10:34:37
阅读次数:
302
动态存储类
StrVec Class Design
StrVec Class Definition
class StrVec
{
public:
//构造函数
StrVec():elements(nullptr), first_free(nullptr), cap(nullptr){}
//用initializer_list初始化参数列表
StrVe...
分类:
其他好文 时间:
2014-07-17 10:22:21
阅读次数:
286