Given an unsorted integer array, find the first
missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1]
return 2.Your algorithm sho...
分类:
其他好文 时间:
2014-05-16 02:58:54
阅读次数:
249
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero....
分类:
其他好文 时间:
2014-05-16 01:34:36
阅读次数:
293
获取GUITextureGameObject _obj =
GameObject.Find("Tex1");GUITexture _tex =
_obj.GetComponent();加载图片字节流//读取文件到byte数组byte[] bytes =
System.IO.File.ReadAllB...
分类:
其他好文 时间:
2014-05-16 01:07:48
阅读次数:
242
开始在这里记录在jd的点滴成长~~~3月20日入职,距离今天两个月还差5天,不过这段时间完成的东西还真不少,学习了很多的linux命令和Axure产品设计,比如:awk神器、sed、sort、head、tail、find、xargs、grep等等,收获很大~~~其中到今天为止已经完成了一个功能非常强...
分类:
其他好文 时间:
2014-05-16 01:03:10
阅读次数:
314
查看端口是否启动: netstat -tunpl |grep :3218查看服务是否启动:
pstree |grep squid查看文件夹下有多少目录和文件: tree
分类:
系统相关 时间:
2014-05-16 00:42:54
阅读次数:
431
在8.04.4环境下(其实我觉得跟环境无关,是我语句有问题):$dpkg-l|grep-ipythoniilibapache2-mod-python3.3.1-2build1Apache2modulethatembedsPythonwithinthiimoinmoin-common1.5.8-5.1ubuntu2.5PythoncloneofWikiWiki-commondataiipython2.5.2-0ubuntu1Aninteractivehigh-l..
分类:
数据库 时间:
2014-05-15 19:17:41
阅读次数:
677
FreeBSD删除文件缓存,在负载方面FreeBSD比CentOS好很多很多。#!/bin/sh
if[!-s/tmp/dir.dat];then
find/home/www/web/cache-typed>/tmp/dir.dat
fi
mkdir/var/tmpdir
DIRS=`cat/tmp/dir.dat`
foriin$DIRS
do
load=$(top-n1|awk-F‘[.]+‘‘/averages/{print$6}‘)
#rsync--delet..
分类:
其他好文 时间:
2014-05-15 18:51:06
阅读次数:
314
1、gem安装出现下面错误
root@ubuntu:/home/git/gitlab# sudo gem install bundler --no-ri --no-rdoc
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from https...
分类:
其他好文 时间:
2014-05-15 18:19:48
阅读次数:
304
有各种不同的策略来定位页面中的元素。你可以使用最合适定位方式用于你的用例。Selenium提供了以下方法来定位页面中的元素:find_element_by_idfind_element_by_namefind_element_by_xpathfind_element_by_link_textfi.....
分类:
编程语言 时间:
2014-05-15 17:28:48
阅读次数:
430
最近一直被solr的搜索困扰,搜索汉字时不能搜索出自己想要的内容,经过研究和查询发现,问题出在没有完全匹配上,主要还是对solr使用不太熟练。解决方法:以前UserRealname:某某家长,这样搜索出使用问题的,改为UserRealname:"某某家长"
外面加上双引号,必须是双引号。就OK了。
分类:
其他好文 时间:
2014-05-15 17:11:34
阅读次数:
260