垂直居中: 先height再ling-height,都设成一样高设置外边距:
margin-top,margin-left,margin-right,margin-bottomdiv背景单张铺满设置: width: 30px;
height: 30px; line-height: 30px;...
分类:
Web程序 时间:
2014-05-08 14:38:55
阅读次数:
474
Found the solution myself in the end. The problem
was not with theLinearLayout,but with theScrollView(seems weird, considering the
fact that theScroll...
分类:
移动开发 时间:
2014-05-08 13:42:02
阅读次数:
321
我們需要用yum進行linux的更新或者軟件的安裝時,會發現速度比較慢,這時我們應該修改下mirror。vim
/etc/yum.repos.d/CentOS-Base.repo
(提示:有些系統中CentOS-Base.repo.save,其實是一樣的,只不過要在修改後把".save"去掉,因為只...
分类:
其他好文 时间:
2014-05-08 12:28:37
阅读次数:
319
[root@localhost~]#iptables-F#清除默认表filter中所有链的规则
[root@localhost~]#iptables-X#清除自定义链的规则
[root@localhost~]#iptables-L-nv--line-numbers#编号显示链规则
[root@localhost~]#iptables-N#新建一条自定义的链
[root@localhost~]#iptables-AINPUT-ieth0#..
分类:
其他好文 时间:
2014-05-07 22:32:21
阅读次数:
466
Network Working Group S. BradnerRequest for
Comments: 2119 Harvard UniversityBCP: 1...
分类:
其他好文 时间:
2014-05-07 21:26:24
阅读次数:
379
Given n points on a 2D plane, find the maximum
number of points that lie on the same straight line. 解题想法:
其实判断一个直线上最好的方法是判断斜率。如果在同一直线上,那么直线上一点与其他点的斜率相...
分类:
其他好文 时间:
2014-05-07 21:13:02
阅读次数:
323
if(navigator.userAgent.indexOf("MSIE")>0){return"MSIE";}if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){return"Firefox";}if(isSafari=navigator....
分类:
Web程序 时间:
2014-05-07 17:03:46
阅读次数:
288
变形了的最近点对,关键在于计算距离的时候,如果同类点的话,直接判定为无穷大即可。
其他闲话:
(1)因为一些原因,被迫暂时用回C++.
(2)好久没刷题,忘记了数组一开始要开最大,多次new和delete,导致超时。
(3) 感觉算法导论的最近点对没有考虑到有多个点都在一条vertical line上的情形。
#include
#include
#include
#include...
分类:
其他好文 时间:
2014-05-07 11:29:11
阅读次数:
334
procedure TForm1.N11DrawItem(Sender: TObject;
ACanvas: TCanvas; ARect: TRect; Selected: Boolean);beginIf (Selected)
ThenbeginACanvas.Font.Color := clW...
分类:
其他好文 时间:
2014-05-07 10:52:51
阅读次数:
283