Problem Description:
Given a collection of intervals, merge all overlapping intervals.
For example,
Given [1,3],[2,6],[8,10],[15,18],
return [1,6],[8,10],[15,18].
分析:按照要求将区间合并,首先将按照按起点排序,然后...
分类:
其他好文 时间:
2014-08-07 19:05:00
阅读次数:
193
Reverse a linked list from position m to n. Do it in-place and in one-pass.
For example:
Given 1->2->3->4->5->NULL, m =
2 and n = 4,
return 1->4->3->2->5->NULL.
Note:
Given m, n satisfy t...
分类:
其他好文 时间:
2014-08-07 19:02:50
阅读次数:
251
最近遇到一个奇怪的问题,在新安装的Qt 5.3.1 OpenGL 2010 版本后,每次打开qtcreator之后都会出现一个错误提醒,如下图:
最初认为是显卡驱动没有包含OpenGL2.0 或者更高版本,但是使用小工具测试以后发现,驱动没有问题。由此判断:此提示信息并不准确。
然后重装了一下qt5.3.1 ,发现在装到大约97%的时候,出现了qmake.exe被占用的...
分类:
其他好文 时间:
2014-08-07 19:02:41
阅读次数:
1198
今天在网上看到一篇文章写关于Android实现3D旋转(http://www.ibm.com/developerworks/cn/opensource/os-cn-android-anmt2/index.html?ca=drs-),出于好奇就写了一个,运行效果如下:下面我们就开始一步步完成这个效果吧。实现水平滑动package com.example.rotation3dview;
import...
分类:
移动开发 时间:
2014-08-07 18:56:50
阅读次数:
368
Longest Consecutive SequenceGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4...
分类:
其他好文 时间:
2014-08-07 18:13:20
阅读次数:
171
父对象重新定义自己继承自QObject的函数bool eventFilter(QObject* watched, QEvent* event)。
子控件安装父对象的eventFilter:
例如,
QTableView * itsView = new QTableView;
itsView->viewport()->installEventFilter(this);...
分类:
其他好文 时间:
2014-08-07 15:55:40
阅读次数:
224
最近在搞Qt的网络通信和音乐播放的应用,做完每一个部分都会上传上来。下面的这段代码中实现了访问百度主页,返回的信息可以再输出窗查看,代码中注释的部分是上传文件用的。QNetworkAccessManager是Qt4.4里才引入的类,qt4,.4之前一般都是使用QHttp实现。...
分类:
数据库 时间:
2014-08-07 15:55:30
阅读次数:
850
F1?????????????????????????查看帮助 F2?????????????????????????跳转到函数定义(和Ctrl+鼠标左键一样的效果) Shift+F2????????????????...
分类:
其他好文 时间:
2014-08-07 13:32:30
阅读次数:
273
题目:Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example,Given:s1 = "aabcc",s2 = "dbbca",When s3 = "aadbbcbcac", r....
分类:
编程语言 时间:
2014-08-07 03:05:38
阅读次数:
291
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.For example, Given n = 3, your program should return all...
分类:
其他好文 时间:
2014-08-07 00:16:36
阅读次数:
276