#include #include #define max(a, b) (((a) >
(b)) ? (a) : (b))void GetMaxCost(int **data, int **result, int n){ int i,
j; for(j = 1; j = 1; i--) { for....
分类:
其他好文 时间:
2014-05-16 03:17:40
阅读次数:
195
import java.util.ArrayList;
import java.util.List;
class Test8Queens3 {
public static StringBuffer result = new StringBuffer();
public static List list = new ArrayList();
public static int...
分类:
其他好文 时间:
2014-05-16 02:53:39
阅读次数:
332
UserDao userDao = new UserDao();User u =
userDao.login(user); // 调用登录方法。result = new HashMap();if(u !=
null){ result.put("result", true); ServletActi....
分类:
其他好文 时间:
2014-05-16 00:15:00
阅读次数:
331
本文用讲一下指定分布的随机抽样方法:MC(Monte Carlo), MC(Markov Chain), MCMC(Markov Chain Monte Carlo)的基本原理,并用R语言实现了几个例子:
1. Markov Chain (马尔科夫链)
2. Random Walk(随机游走)
3. MCMC具体方法:
3.1 M-H法
3.2 Gibbs采样
PS:本篇blog为ese机器学习短期班参考资料(20140516课程)。...
分类:
其他好文 时间:
2014-05-15 23:58:14
阅读次数:
536
这个漏洞是2014年2月4日被发现的, 因为该组件试用范围非常广, 所以该漏洞的影响也非常巨大。通过特制的包含畸形header的http请求,可以导致使用该组件的应用程序进入无线循环从而耗尽CPU等资源并最终崩溃。
最近因为在修补struts1的可操纵classLoader的漏洞(struts2也有该漏洞, 不在本文讨论范围), 所以我就在我建立的struts1的项目上直接做测试。 怎么创建...
分类:
其他好文 时间:
2014-05-15 20:11:19
阅读次数:
240
可以使用document.getElementByName()方法根据元素的name属性来获得元素。定义name属性的元素包括button、fieldset、input、keygen、output.select、textarea、form、iframe、object、map、meta、param。
getElementByName()获取的是具有相同name属性及值的集合,返回值类型是NodeL...
分类:
其他好文 时间:
2014-05-15 19:53:10
阅读次数:
255
注:本文仅限技术研究,探讨,测试使用
2014年4月29日爆出的struts的可操纵classLoader的漏洞, 横跨struts1和struts2的所有版本。 影响面和问题的严重性几乎可以和heartbleed相媲美。 struts2要严重一些,对于struts1,只是说在特定条件下可执行特殊操作。
因为项目中用的是struts1,所以主要精力集中在struts1上。既然要修复漏洞...
分类:
其他好文 时间:
2014-05-15 19:52:36
阅读次数:
289
Struts2+JQuery+JSON实现异步交互,包括从后台获得单个值、对象、List和Map数据并从前台的表达中获取值把值进行序列化通过JQuery的$.ajax({})传到后台和后台的对象进行绑定。第一步:在MyEclipse中创建JavaWeb工厂并把Struts2和
json的jar包添加...
分类:
Web程序 时间:
2014-05-15 18:06:07
阅读次数:
498
send($data)`. The sent data will then* be the
result of the `yield` expression. Thus it can be received using a code like*
`$data = yield;`.*/ /* What...
分类:
其他好文 时间:
2014-05-15 17:46:37
阅读次数:
311
以下采用struts2+jquery+json模拟一个案例。当点击提交按钮时会把输入的数据提交到后台,然后从后台获取数据在客户端显示。效果如下:接下来为struts2+jquery+json集成步骤:1、新建一个web工程,导入struts2+jquery+json所需jar,如下图目录结构图2、创...
分类:
Web程序 时间:
2014-05-15 17:45:59
阅读次数:
478