DTO即数据传输对象。之前不明白有些框架中为什么要专门定义DTO来绑定表现层中的数据,为什么不能直接用实体模型呢,有了DTO同时还要维护DTO与Model之间的映射关系,多麻烦。其实不然,原因主要有:1、表现层与应用层之间是通过数据传输对象(DTO)进行交互的,数据传输对象是没有行为的POCO对象,...
分类:
其他好文 时间:
2014-06-18 15:10:58
阅读次数:
223
Topic Model的分类和设计原则http://blog.csdn.net/xianlingmao/article/details/7065318topic model的介绍性文章已经很多,在此仅做粗略介绍,本文假设读者已经较为熟悉Topic Medel。Topic Model (LDA)认为一...
分类:
其他好文 时间:
2014-06-18 13:39:47
阅读次数:
252
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
其他好文 时间:
2014-06-18 13:29:31
阅读次数:
214
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an...
分类:
其他好文 时间:
2014-06-18 12:32:58
阅读次数:
169
列表是SharePoint核心的工艺品。服务器端对象模型是与列表交互的方法之一。你可以在服务器上创建不同类型的应用程序,与服务器对象模型交互。比如WinForm或WPF/Web parts,甚至是Event Receiver。...
分类:
其他好文 时间:
2014-06-17 22:57:51
阅读次数:
291
二分算法求最值,掌握了算法的本质和模板,主要就是答案验证过程,验证过程经常使用贪心算法。关键是根据题目要求设立命题check(x)。验证答案mid:Check(mid):是否成立?求满足条件Check(mid)的最小值:–if check(mid) then r:=mid else l:=mid+1...
分类:
其他好文 时间:
2014-06-17 21:19:25
阅读次数:
170
Model类 public class MenuModel { public int Id { get; set; } public string Title { get; set; } public string Url { get; set; } public string Icon {...
分类:
其他好文 时间:
2014-06-17 19:41:06
阅读次数:
212
模型是CModel或其子类的实例。模型用于保持数据以及与其相关的业务逻辑。模型是单独的数据对象。它可以是数据表中的一行,或者一个用户输入的表单。 数据对象的每个字段对应模型中的一个属性。每个属性有一个标签(label), 并且可以通过一系列规则进行验证。Yii 实现了两种类型的模型:表单模型和 Ac...
分类:
其他好文 时间:
2014-06-17 15:13:46
阅读次数:
177
今天遇到一个问题,在使用jquery的$.post()方法时,没有办法返回布尔值。function check_exist() { var email = $('#email').val().Trim(); url = "/Acco...
分类:
Web程序 时间:
2014-06-17 14:53:51
阅读次数:
868
string[] imgname; MODEL.Strategy modelMenu = bllMenu.GetModel(int.Parse(strId)); imgname = getPicUrl.getPicUrls(modelMenu...
分类:
其他好文 时间:
2014-06-17 14:12:17
阅读次数:
182