A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the...
分类:
其他好文 时间:
2015-01-28 14:22:47
阅读次数:
172
安装了最新的ATD 18之后,新加的Lint Warnings插件会给我们检测出许多xml布局中不当的地方,例如:
Use a layout_height of 0dip instead of fill_parent for better performance
什么意思呢?举个简单的例子:
这是一个垂直布局,上下的线性布局各占高度50.0dp,中间的的TextView设...
分类:
其他好文 时间:
2015-01-28 13:09:50
阅读次数:
1974
#loginbg{position:absolute;height:200px;width:400px;margin:-100px 0px 0px -200px;top: 50%;left: 50%;}
分类:
其他好文 时间:
2015-01-28 12:58:30
阅读次数:
94
原题地址最朴素的想法就是,枚举容器的左边界和右边界,总能找到解,不过时间复杂度是O(n^2)的。改进I:从左向右枚举左边界,在此基础上从右向左枚举右边界,一旦右边界高度>=左边界高度就可以停止枚举了,因为继续枚举下去找到的矩形肯定面积更小。比如下图,左边界在位置0,高度为height[0]=3,那么...
分类:
其他好文 时间:
2015-01-28 12:53:58
阅读次数:
131
我们先来看一个最普通的父层自适应子层高度的例子(通常来讲,布局时父层都是不设置高度的)
.f{ width:200px; border:1px solid #000; padding: 25px; margin: 50px auto;}
.z{ width:200px; height:200px; background:#000}
运行结果是这样的如下图所示...
分类:
其他好文 时间:
2015-01-27 23:36:41
阅读次数:
407
主布局
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="ma...
分类:
移动开发 时间:
2015-01-27 23:32:26
阅读次数:
211
/* * Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which th.....
分类:
其他好文 时间:
2015-01-27 23:16:02
阅读次数:
206
最近突然让我切图,很多东西都忘了,得记下来1这种可以用a标签的A:hover来实现.head .headbox .banner li a{ width:auto; height:30px; color:#0856c1; display:block; }.head .headbox .banner l...
分类:
其他好文 时间:
2015-01-27 19:55:28
阅读次数:
154
Given a binary tree, determine if it is height-balanced.
For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe...
分类:
其他好文 时间:
2015-01-27 18:29:32
阅读次数:
168
java web应用开发过程中,有些用户操作需要以弹出框形式展示,今天对以往项目开发中的弹出框实现原理仔细分析了一下,使用CSS的z-index属性,可以实现简单的弹出框效果。具体原理:
.mask{ z-index:900; position:fixed!important;
position:absolute; left:0px; top:0px; width:100%; height:1...
分类:
Web程序 时间:
2015-01-27 16:22:46
阅读次数:
502