在使用Qt时,在各.cpp源文件编译时出现了许多multiple definition of XXX的错误。搜寻了网上一些资料,解决了multiple definition of 的方法。...
分类:
其他好文 时间:
2015-03-05 01:44:39
阅读次数:
168
题目Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.代码/**
* Definition for binary tree
* p...
分类:
其他好文 时间:
2015-03-04 17:08:21
阅读次数:
118
Problem Description
Recall the definition of the Fibonacci numbers:
f1 := 1
f2 := 2
fn := fn-1 + fn-2 (n >= 3)
Given two numbers a and b, calculate how many Fibonacci numbers are in the ...
分类:
其他好文 时间:
2015-03-04 16:56:45
阅读次数:
126
1.定义介绍
(1).XML定义
扩展标记语言 (Extensible Markup Language, XML) ,用于标记电子文件使其具有结构性的标记语言,可以用来标记数据、定义数据类型,是一种允许用户对自己的标记语言进行定义的源语言。 XML使用DTD(document type definition)文档类型定义来组织数据;格式统一,跨平台和语言,早已成为业界公认的标准。
XML...
分类:
移动开发 时间:
2015-03-03 15:10:47
阅读次数:
221
虽然从技术或者架构角度看,云计算比较单一,但是在实际情况下,为了适应用户不同的需求,它会演变为不同的模式。在NIST(National Institue of Standards and Technology,美国国家标准技术研究院)的名为“The NIST Definition of Cloud Computing"的关于云计算概念的文档中,定义了云的四种模式,分别是:公有云、私...
分类:
其他好文 时间:
2015-03-02 22:30:18
阅读次数:
270
AIDL即 Android Interface Definition Language。原因:On Android, one process cannot normally access thememory of another process.
也就是说AIDL用于android进程间通信,下面就记录一下第一个aidl的demo。
官方文档也给出了基本的使用方法,如下图:
...
分类:
移动开发 时间:
2015-02-28 16:27:47
阅读次数:
201
Given n points
on a 2D plane, find the maximum number of points that lie on the same straight line.
以某个点为基点,求得与其他的点的斜率并记录在map,注意两点
1.斜率可能为无穷
2.如果遍历到的点与基点在相同位置则所有斜率的点都要加上1
/**
* Definition f...
分类:
其他好文 时间:
2015-02-27 21:34:46
阅读次数:
227
Given a connected undirected graph, tell if its minimum spanning tree is unique.
Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a subgraph of G, say T = (V', E'), with the following properties:
1...
分类:
其他好文 时间:
2015-02-23 15:33:46
阅读次数:
257
Brackets
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 3571
Accepted: 1847
Description
We give the following inductive definition of a “regular brack...
分类:
其他好文 时间:
2015-02-21 09:45:11
阅读次数:
126
1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(int x) : val(x), ne...
分类:
编程语言 时间:
2015-02-18 14:04:12
阅读次数:
148