#include//#include//#include#includeusing namespace std;/*这道题,直接采用multiset来做,就太简单了,没啥好说的,就是全导进去,然后count下就OK了,因为在set中查找都O(1)所以呢是线性的算法复杂度*/int singleNum...
分类:
其他好文 时间:
2015-04-17 17:51:20
阅读次数:
176
今天我们在内存管理初级的基础上,详细研究一下内存管理的实现过程, 我还是啰嗦一下,即使这个很枯燥,但是绝对值得让你花上一天的时间好好来理解这里面的猫腻.一、前言 对于大多数从C++或者JAVA转过来学习Object-C(以下简称OC)的人来说,OC这门语言看起来非常奇怪,用起来也有点麻烦。 OC没有...
分类:
其他好文 时间:
2015-04-17 17:51:37
阅读次数:
166
题目:Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the long...
分类:
其他好文 时间:
2015-04-17 17:52:17
阅读次数:
118
题目:打印出100 - 999 之间所有的"水仙花数",所谓"水仙花数"是指一个三位数,其各位数字立方和等于该数本身。例如: 153是一个"水仙花数",因为153=1的三次方+5的三次方+3的三次方。程序分析:利用for循环控制100-999个数,每个数分解出个位,十位,百位。#include .....
分类:
其他好文 时间:
2015-04-17 17:50:44
阅读次数:
107
题目:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not poss...
分类:
其他好文 时间:
2015-04-17 17:52:02
阅读次数:
108
挺简单的问题,唉,当时不明白 numChildren 与 index的关系 原来添加在显示容器的显示对象都是按照 0,1,2...numChildren的序号排列的private var count:int = 0; /**传入stage即可获得舞台上所有显示对象数目*...
分类:
其他好文 时间:
2015-04-17 17:50:58
阅读次数:
108
Bootstrap排版Bootstrap 使用 Helvetica Neue、 Helvetica、 Arial 和 sans-serif 作为其默认的字体栈。使用 Bootstrap 的排版特性,您可以创建标题、段落、列表及其他内联元素。标题Bootstrap 中定义了所有的 HTML 标题(h1...
分类:
其他好文 时间:
2015-04-17 17:50:20
阅读次数:
201
查阅文档:http://wenda.wecenter.com/question/1893http://www.zhidiu.com/article/1012http://wenda.wecenter.com/question/14010http://wenda.wecenter.com/articl...
分类:
其他好文 时间:
2015-04-17 17:50:09
阅读次数:
144
以1阶或2阶上一个n阶楼梯。百度之,斐波那契数列,即每个数是其前两个数的和。知道上面这个规律,答案就非常非常简单了。【my code】int climbStairs(int n) { if(n==1) return 1; if(n==2) return 2; ...
分类:
其他好文 时间:
2015-04-17 17:49:54
阅读次数:
121
Sha_binary = crypto:hash(sha, "14292520241963008744cef58c7e0a284d06a2fcef5a61f4bee4").Hex_string = > || > >.string:to_lower(binary_to_list(Hex_string)...
分类:
其他好文 时间:
2015-04-17 17:48:02
阅读次数:
162
Multiline ComboBox - jQuery EasyUI Demo Multiline ComboBox This example shows how to create a multiline ComboBox. ...
分类:
其他好文 时间:
2015-04-17 17:45:36
阅读次数:
130
WGS-84:是国际标准,GPS坐标(GoogleEarth使用、或者GPS模块)GCJ-02:中国坐标偏移标准,GoogleMap、高德、腾讯使用BD-09:百度坐标偏移标准,BaiduMap使用//WGS-84toGCJ-02GPS.gcj_encrypt();//GCJ-02toWGS-84粗...
分类:
其他好文 时间:
2015-04-17 17:44:46
阅读次数:
166
By default, if we click on the x button on the titlebar, theQtGui.QWidgetis closed. Sometimes we want to modify this default behaviour. For example, i...
分类:
其他好文 时间:
2015-04-17 17:45:54
阅读次数:
134
无标题文档 会员名: 5-25个字符,一个汉字为两个字符,推荐使用中文会员名 ...
分类:
其他好文 时间:
2015-04-17 17:44:22
阅读次数:
94
声明 静态类和非静态类1.非静态类中:既可以定义静态字段、静态属性、静态方法,也可以定义非静态(实例成员)字段、非静态(实例成员)属性、非静态(实例成员)方法、 1 using System; 2 using System.Collections.Generic; 3 using System.Li...
分类:
其他好文 时间:
2015-04-17 17:43:43
阅读次数:
133
题目:输入两个正整数m和n,求其最大公约数和最小公倍数。程序分析:利用辗除法求最大公约数;最大公倍数等于m * n / Gcd(m,n)。#include using namespace std;int main(){ int n, m; int k,r = 1; cout > n >> m;...
分类:
其他好文 时间:
2015-04-17 17:43:00
阅读次数:
105
ActiveMQ安装与配置1、环境:Windows XPapache-activemq-5.2.0-bin.zip2、安装解压缩到apache-activemq-5.2.0-bin.zip到一个目录,比如C:\apache-activemq-5.2.03、配置配置就在C:\apache-active...
分类:
其他好文 时间:
2015-04-17 17:45:18
阅读次数:
123