上一页 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 阅读(198) 评论(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 阅读(257) 评论(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 阅读(237) 评论(0) 推荐(0)
摘要: 1.PI的求法的数学依据如图,可以看见在边长为1的正方形里面,有一个1/4圆,我们随机在正方形中取点,点在圆内的概率和点在正方形内的概率之比正好为两者的面积之比.这样就有在圆内的点的数目比所有点的数目值应该为0.25*π*1/1=0.25π.只要我们随机取点的数目足够多,根据上述关系求得的π的精确率... 阅读全文
posted @ 2016-01-05 10:10 ZHOU YANG 阅读(706) 评论(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 阅读(2343) 评论(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 阅读(10308) 评论(2) 推荐(1)
摘要: 为什么会有TCP/IP协议在世界上各地,各种各样的电脑运行着各自不同的操作系统为大家服务,这些电脑在表达同一种信息的时候所使用的方法是千差万别。就好像圣经中上帝打乱了各地人的口音,让他们无法合作一样。计算机使用者意识到,计算机只是单兵作战并不会发挥太大的作用。只有把它们联合起来,电脑才会发挥出它最大... 阅读全文
posted @ 2015-12-21 18:41 ZHOU YANG 阅读(1266) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页