Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2015-04-04 22:22:21
阅读次数:
229
#include#includetypedef struct{ char *mem; char len;}m_table_t;int table_cmp(m_table_t *p1, m_table_t *p2){ int ret; if(p1->len == p2->le...
分类:
其他好文 时间:
2015-04-04 18:14:01
阅读次数:
131
publicbooleanisConnectingToInternet(){ConnectivityManagerconnectivity=(ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);if(connectivity!=null){NetworkInfo[]info=connectivity.getAllNetworkInfo();if(info!=null)for(inti=0;i<info.le..
分类:
其他好文 时间:
2015-04-04 01:24:06
阅读次数:
139
1)超链接访问过后hover样式就不出现解决方法是改变CSS属性的排列顺序:L-V-H-Aa:link{color:red}a:visited{color:green}a:hover{color:blue}a:active{color:orange}2)IE6的双倍边距BUGdiv{float:le...
分类:
其他好文 时间:
2015-04-02 13:17:01
阅读次数:
164
在基于bootstrap css框架的前端项目开发中,如果有grunt build系统,那么工作流是:客制化less,在less中定义自己的CSS,同时可以随意引用bootstrap中预定义好的css类,一旦保存文件,grunt则开始重新构建,生成最后的生产文件。问题是:如何能够在自己的客制le.....
分类:
其他好文 时间:
2015-04-01 23:24:40
阅读次数:
222
smarty比较运算符对照表运算符中文解释eq相等ne、neq不相等gt大于lt小于gte、ge大于等于lte、le小于等于not非mod求模is [not] div by是否能被某数整除is [not] even是否为偶数is...
分类:
其他好文 时间:
2015-04-01 11:02:36
阅读次数:
123
实测可用:sudo arecord --duration=10 --device=plughw:1,0 --format=cd aaa.wavsudo arecord --duration=10 --device=plughw:1,0 --format=S16_LE --rate=44000 --c...
分类:
其他好文 时间:
2015-03-30 22:50:12
阅读次数:
338
题目链接:search-a-2d-matrix
/**
*
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
Integers in each row are sorted from le...
分类:
其他好文 时间:
2015-03-21 14:07:18
阅读次数:
140
No tricks. 1 class Solution { 2 public: 3 int titleToNumber(string s) { 4 int result = 0, len = s.size(); 5 for (int i = 0; i < le...
分类:
其他好文 时间:
2015-03-19 10:05:24
阅读次数:
256
转自:http://www.cnblogs.com/houyulei/archive/2011/12/16/2290229.html因为浮动框不在普通的文档流中,所以它不占据空间。如下面的代码:.news { border:1px solid black;}.news img { float:le....
分类:
Web程序 时间:
2015-03-18 17:36:27
阅读次数:
170