这个代码写了两天,从没思路到有思路,还好最终搞定了~不过这个进程数必须为2^n个。
先贴一个运行截图:
-module(exe4).
-export([start/5]).start(F,X1,X2,Num,Cores)
->spawn(fun()->parent_proces(F,X1,X2,Num,Cores) end),
io:format("").parent_proce...
分类:
其他好文 时间:
2015-04-14 00:47:01
阅读次数:
232
Frank is a portfolio manager of a closed-end fund for Advanced Commercial Markets (ACM ). Fund collects money (cash) from individual investors for a certain period of time and invests cash into variou...
分类:
其他好文 时间:
2015-04-13 23:05:36
阅读次数:
363
sum是对内容的数量进行相加,count 对表行数 对象进行统计在使用 case 时,如select subject,count(case when score>80 then score else null end) 优,count(case when score59 then score...
分类:
数据库 时间:
2015-04-13 22:40:29
阅读次数:
176
1.《CSS 与 HTML5 响应式图片-前端技术- 云路科技》云路科技 :http://www.iyunlu.com/view/Front-end/70.html2.Web开发者和设计师必须要知道的 iOS 8 十个变化 :http://t.cn/RhlNQCT?u=2046399973&m=37...
分类:
其他好文 时间:
2015-04-13 20:35:07
阅读次数:
154
1、查看Web服务器(Nginx?Apache)的并发请求数及其TCP连接状态: netstat -n | awk ‘/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}‘ 或者: netstat -n | awk ‘/^tcp/ {++state[$NF]} END {for(key in st...
分类:
数据库 时间:
2015-04-13 19:12:16
阅读次数:
165
(1)当需要重复使用的测试情况,可以用shared_examples("describe") do end提出来,在需要使用的地方可以使用it_behaves_like "describe"复用,代码写在controller_spec.rb文件中 ? ? (2)可以将大量重复使用...
分类:
其他好文 时间:
2015-04-13 19:08:12
阅读次数:
150
题意:给你一张长W,宽H 的纸,问你能不能者成给定的大小, 每一次折纸只能折成整数大小。解题思路:递推+枚举 枚举给定大小的长和宽,然后套进 W,H中求最小值 , 折纸策略最优是每次折半。解题代码: 1 // BEGIN CUT HERE 2 /* 3 4 */ 5 // END CU...
分类:
其他好文 时间:
2015-04-13 18:51:01
阅读次数:
172
指数分布族 首先需要提及下指数分布族,它是指一系列的分布,只要其概率密度函数可以写成下面这样的形式:\(\begin{aligned} p(y;\eta)=b(y)exp(\eta^TT(y)-a(\eta))\end{aligned}\) 一般的很多分布(如高斯分布,泊松分布,二项式分布,伽马.....
分类:
其他好文 时间:
2015-04-13 18:40:56
阅读次数:
152
题意:给你一个网格图 ,每个网格中是W,B,两种颜色和 ? 表示未知,相同颜色的网格不能相邻,问你能否满足条件解题思路:W和B的位置 和 (i+j) 的奇偶有关。解题代码: 1 // BEGIN CUT HERE 2 /* 3 4 */ 5 // END CUT HERE 6 #lin...
分类:
其他好文 时间:
2015-04-13 18:17:33
阅读次数:
172
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2015-04-13 18:14:54
阅读次数:
111