Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].Not...
分类:
其他好文 时间:
2014-08-07 00:15:17
阅读次数:
187
packagecom.example.ex_templete;importandroid.content.Context;importandroid.graphics.Canvas;importandroid.graphics.Color;importandroid.graphics.Paint;importandroid.graphics.Paint.Style;importandroid.util.AttributeSet;importandroid.util.DisplayMetrics;importa..
分类:
移动开发 时间:
2014-08-06 23:18:03
阅读次数:
481
XMLHttpRequest对象 XHRAjax核心XMLHttpRequest对象:xhr.open("get/post","example.txt",false);xhr.send(null);http://dev.yesky.com/91/2687091.shtmljQuery对Ajax进行了...
分类:
Web程序 时间:
2014-08-06 22:50:02
阅读次数:
228
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", re...
分类:
其他好文 时间:
2014-08-06 22:44:32
阅读次数:
180
qccs定义圆角border-radius:10px;如果想给特定位置定义圆角,如:左上角:border-left-top-radius:10px;右下角色:border-right-bottom-rasius:10px;半透明效果只需要在css中使用rgba(100,100,100,40)这种形式...
分类:
其他好文 时间:
2014-08-06 22:41:52
阅读次数:
247
这个版本的qt在这里有点bug。。设置ApplicationWindow的flags属性为Qt.FramelessWindowHint的确可以使程序无边框,但是同时程序在任务栏的图标也没了。看文档发现ApplicationWindow 是由 QQuickWindow 实现的,QQuickWindow...
分类:
移动开发 时间:
2014-08-06 22:27:42
阅读次数:
899
原文地址:http://infiniteloop.in/blog/quick-python-performance-optimization-part-i/
往往小的改变却能带来大的性能提升,
下面说下python中的几点性能优化。
1.使用timeit模块
2.减少函数的调用次数
3.使用xrange代替range
4.''.join()代替+,+=
5.while 1 代替 wh...
分类:
编程语言 时间:
2014-08-06 19:28:32
阅读次数:
247
介绍
本文主要讨论C++中常见的几种循环遍历操作的语法:基于迭代器、基于Qt库中的foreach关键字、基于C++11新增的for循环语句。
基于迭代器的遍历
在C++容器中经常需要进行遍历操作,在C++11之前一般使用下面这种方式——基于迭代器的遍历:
QList list {"a", "b", "c", "d"};
QList:...
分类:
编程语言 时间:
2014-08-06 19:24:52
阅读次数:
322
Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After re...
分类:
其他好文 时间:
2014-08-06 14:35:41
阅读次数:
177