Circular primesp = (lambda n,s=set():{'2'}|{str(i) for i in range(3,n,2) if ([j for j in range(i*3,n,i*2) if s.add(j)] or i not in s)})(int(1e6))print...
分类:
其他好文 时间:
2015-01-09 06:58:19
阅读次数:
172
The problem:Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(...
分类:
其他好文 时间:
2015-01-09 06:54:36
阅读次数:
132
复习 一、选择题 1.计算机算法指的是???????。 A.计算方法?????B.?排序方法????????C.?解决问题的步骤序列??????D.?调度方法 2.?下面关于算法说法正确的是(????) A.算法最...
分类:
其他好文 时间:
2015-01-09 01:55:51
阅读次数:
329
https://oj.leetcode.com/problems/clone-graph/http://blog.csdn.net/linhuanmars/article/details/22715747/**
*Definitionforundirectedgraph.
*classUndirectedGraphNode{
*intlabel;
*List<UndirectedGraphNode>neighbors;
*UndirectedGraphNode(intx){label=x;neig..
分类:
其他好文 时间:
2015-01-09 01:53:41
阅读次数:
170
https://oj.leetcode.com/problems/gas-station/http://blog.csdn.net/linhuanmars/article/details/22706553publicclassSolution{
publicintcanCompleteCircuit(int[]gas,int[]cost){
intlen=gas.length;
//Costifrunallstations
intallcost=0;
//Startpoint
intstart=0;
..
分类:
其他好文 时间:
2015-01-09 01:54:44
阅读次数:
161
https://oj.leetcode.com/problems/word-break-ii/http://blog.csdn.net/linhuanmars/article/details/22452163publicclassSolution{
publicList<String>wordBreak(Strings,Set<String>dict)
{
//SolutionA:
//returnwordBreak_NP(s,dict);
//SolutionB:
return..
分类:
其他好文 时间:
2015-01-09 01:52:58
阅读次数:
160
fromdjango.shortcutsimportrender_to_response
fromdjangoimportforms
fromdjango.httpimportHttpResponse
classUserForm(forms.Form):
name=forms.CharField()
defregister(req):
ifreq.method==‘POST‘:
form_object=UserForm(req.POST)
ifform_object.is_valid():
printfo..
分类:
其他好文 时间:
2015-01-09 01:52:51
阅读次数:
156
又有一段时间没有写东西了,今天给大家带来的是基于通讯簿策略来为不同租户分配相对应的通讯簿,包括脱机地址列表等。首先,我们需要安装通讯簿策略路由传输助理,可以通过ExchangeManagementShell来完成:Install-TransportAgent-Name"ABPRoutingAgent"-TransportAgentFactory..
分类:
其他好文 时间:
2015-01-09 01:53:30
阅读次数:
200
https://oj.leetcode.com/problems/linked-list-cycle/http://blog.csdn.net/linhuanmars/article/details/21200601/**
*Definitionforsingly-linkedlist.
*classListNode{
*intval;
*ListNodenext;
*ListNode(intx){
*val=x;
*next=null;
*}
*}
*/
publicclassSolution{
publi..
分类:
其他好文 时间:
2015-01-09 01:52:33
阅读次数:
155
https://oj.leetcode.com/problems/linked-list-cycle-ii/http://blog.csdn.net/linhuanmars/article/details/21260943/**
*Definitionforsingly-linkedlist.
*classListNode{
*intval;
*ListNodenext;
*ListNode(intx){
*val=x;
*next=null;
*}
*}
*/
publicclassSolution{
pu..
分类:
其他好文 时间:
2015-01-09 01:51:33
阅读次数:
173
https://oj.leetcode.com/problems/reorder-list/http://blog.csdn.net/linhuanmars/article/details/21503215/**
*Definitionforsingly-linkedlist.
*classListNode{
*intval;
*ListNodenext;
*ListNode(intx){
*val=x;
*next=null;
*}
*}
*/
publicclassSolution{
publicvoid..
分类:
其他好文 时间:
2015-01-09 01:51:44
阅读次数:
175
https://oj.leetcode.com/problems/binary-tree-preorder-traversal/http://blog.csdn.net/linhuanmars/article/details/21428647/**
*Definitionforbinarytree
*publicclassTreeNode{
*intval;
*TreeNodeleft;
*TreeNoderight;
*TreeNode(intx){val=x;}
*}
*/
publicclassSolu..
分类:
其他好文 时间:
2015-01-09 01:52:30
阅读次数:
274
https://oj.leetcode.com/problems/insertion-sort-list/http://blog.csdn.net/linhuanmars/article/details/21144553/**
*Definitionforsingly-linkedlist.
*publicclassListNode{
*intval;
*ListNodenext;
*ListNode(intx){
*val=x;
*next=null;
*}
*}
*/
publicclassSolutio..
分类:
其他好文 时间:
2015-01-09 01:50:04
阅读次数:
172
安装虚拟机啊,使用公司给定的centos6.0的iso镜像,该镜像经过裁剪,而且工作中要使用mercurial(hg)版本控制工具,所以需要yuminstallmercurial。刚开始安装完该系统,yuminstallmercurial提示不能解析域名,应该是网络连接不上,选择桥接方式,然后在/etc/sysconfig/network..
分类:
其他好文 时间:
2015-01-09 01:51:11
阅读次数:
257
看了文章的标题,是不是好像一个技术人员在写一篇反对产品经理的檄文?不是,因为我也是无比龟毛的***座啊,我这人不但对工作、对生活都很***座,做技术做产品也一样,经常把各种极致挂在嘴边。但是近几个月针对一款新产品我们这支内部创业团队深入到市尝产品、研发的交叉工作..
分类:
其他好文 时间:
2015-01-09 01:47:36
阅读次数:
142
icinga安装配置一、icinga介绍:ICINGA项目是由MichaelLuebben、HendrikBacker和JoergLinge等人发起的,他们都是现有的Nagios项目社区委员会的成员,他们承诺,新的开源项目将完全兼容以前的Nagios应用程序及扩展功能。在新项目的网站上,他们是如此定义ICINGA的,这将是一个介..
分类:
其他好文 时间:
2015-01-09 01:48:32
阅读次数:
411
解决"你己使用临时配置文件登录"的问题
在使用Windows操作系统的时候,有时候由于系统配置或者某方面的原因,会造成配置文件丢失或损坏,而系统使用临时配置文件登录的问题,主要提示如图1所示。
图1使用临时配置文件登录
在出现此类问题时,在"系统属性→高级→(用户配..
分类:
其他好文 时间:
2015-01-09 01:48:54
阅读次数:
187