上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页
摘要: Given an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the sum of ... 阅读全文
posted @ 2016-01-08 20:32 ZHOU YANG 阅读(196) 评论(0) 推荐(0)
摘要: Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen... 阅读全文
posted @ 2016-01-08 20:29 ZHOU YANG 阅读(255) 评论(0) 推荐(0)
摘要: Given an array of strings, group anagrams together.For example, given:["eat", "tea", "tan", "ate", "nat", "bat"],Return:[ ["ate", "eat","tea"], ["na... 阅读全文
posted @ 2016-01-08 19:47 ZHOU YANG 阅读(236) 评论(0) 推荐(0)
摘要: 事出有因,学校每天12:00之后断网,断网之后怎么办?难道直接睡了?我不甘心。 幸好学校还是留有余地,在断网之后,还是能够上ipv6的,只是现阶段互联网对ipv6支持很不理想,怎么办?刚刚发现,学校对ipv6的校外访问在12:00之后也会断开,不过幸好没有断开和实验室的连接,下述方法继续适用。1... 阅读全文
posted @ 2016-01-08 01:05 ZHOU YANG 阅读(16209) 评论(0) 推荐(0)
摘要: 1.PI的求法的数学依据如图,可以看见在边长为1的正方形里面,有一个1/4圆,我们随机在正方形中取点,点在圆内的概率和点在正方形内的概率之比正好为两者的面积之比.这样就有在圆内的点的数目比所有点的数目值应该为0.25*π*1/1=0.25π.只要我们随机取点的数目足够多,根据上述关系求得的π的精确率... 阅读全文
posted @ 2016-01-05 10:10 ZHOU YANG 阅读(703) 评论(0) 推荐(0)
摘要: 启动controlleripcontroller -- ip = ipaddress设置ssh免登陆因为需要分发文件,采用ssh通信,所以需要配置ssh免登陆分发配置文件scp controller.host:.ipython/profile_default/security/ipcontroller-engine.json ./使用配置文件开启engine ipengine --p... 阅读全文
posted @ 2015-12-29 23:16 ZHOU YANG 阅读(726) 评论(0) 推荐(0)
摘要: ipyparallel 之中,可以利用多个engine同时运行一个任务来加快处理的速度。在ipyparallel之中,集群被抽象为view,包括direct_view和balanced_view。其中,direct_view是所有的engine的抽象,当然也可以自行指定由哪些engine构成,而... 阅读全文
posted @ 2015-12-29 17:18 ZHOU YANG 阅读(2342) 评论(0) 推荐(0)
摘要: Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjace... 阅读全文
posted @ 2015-12-23 23:51 ZHOU YANG 阅读(224) 评论(0) 推荐(0)
摘要: So easy! Only one step. 注册时选择 License server ,填 http://idea.lanyus.com 对于Clion等同样适用。 阅读全文
posted @ 2015-12-23 11:31 ZHOU YANG 阅读(278) 评论(0) 推荐(0)
摘要: 这个实例中有一个KafkaSpout,一个KafkaBolt,一个自定义Bolt QueryBolt。数据流程是KafkaSpout从topic为recommend的消息队列中取出String类型的消息,发送给QueryBolt。QueryBolt不做任何处理,直接转发给KafkaBolt,... 阅读全文
posted @ 2015-12-22 15:59 ZHOU YANG 阅读(10305) 评论(2) 推荐(1)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页