上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 24 下一页
摘要: 在一个数组中找到主要的元素,也就是出现次数大于数组长度一半的元素。容易想到的方式就是计数,出现次数最多的就是majority element,其次就是排序,中间的就是majority element。但是还有两种更有意思的实现方式时间效率O(n),空间效率O(1):1、Moore voting al... 阅读全文
posted @ 2015-02-14 23:32 丶Blank 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 写了个抓取appstore的,要抓取大量的app,本来是用httpclient,但是效果不理想,于是直接调用wget下载,但是由于标准输出、错误输出的原因会导致卡住,另外wget也会莫名的卡住。所以我采用:一、独立线程读取输出信息;二、自己实现doWaitFor方法来代替api提供的waitFor(... 阅读全文
posted @ 2015-01-28 17:27 丶Blank 阅读(1937) 评论(0) 推荐(0) 编辑
摘要: Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",return["255.2... 阅读全文
posted @ 2014-09-24 17:57 丶Blank 阅读(257) 评论(0) 推荐(0) 编辑
摘要: GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]... 阅读全文
posted @ 2014-09-24 16:06 丶Blank 阅读(151) 评论(0) 推荐(0) 编辑
摘要: PermutationsGiven a collection of numbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3],[1,3,2],[2,1,3]... 阅读全文
posted @ 2014-09-24 01:04 丶Blank 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 基于bootstrap的选择器http://silviomoreto.github.io/bootstrap-select/ Android: 使用class="selectpicker" 设置选择器。基于bootstrap的分页插件,支持bootstr... 阅读全文
posted @ 2014-09-18 10:16 丶Blank 阅读(2010) 评论(0) 推荐(0) 编辑
摘要: SVN项目库错误Unsupported FS format svn: Expected FS format between '1' and '4'; found format '6'从这里找到解决方案 http://stackoverflow.com/a/18382077原因是用 >=1.8版本的S... 阅读全文
posted @ 2014-08-13 16:00 丶Blank 阅读(6909) 评论(0) 推荐(0) 编辑
摘要: 中文输入使用ibus-pinyin。在ibus-pinyin里使用搜狗词库# wget http://hslinuxextra.googlecode.com/files/sougou-phrases-full.7z# 7za x sougou-phrases-full.7z# cp ibus/and... 阅读全文
posted @ 2014-05-30 15:16 丶Blank 阅读(453) 评论(0) 推荐(0) 编辑
摘要: 首先,要检查一下网络适配器的型号。[root@localhost sam]# lspci -nn | grep -i net03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Ex... 阅读全文
posted @ 2014-05-30 13:15 丶Blank 阅读(2207) 评论(0) 推荐(0) 编辑
摘要: rpm -e `rpm -qa |grep openoffice` `rpm -qa |grep ooobasis` 这样算是比较彻底的 阅读全文
posted @ 2014-05-30 12:48 丶Blank 阅读(35479) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 24 下一页