MVVM 模式是一个很久之前的技术了,最近因为一个项目的原因,需要使用 WPF 技术,所以,重新翻出来从前的一段程序,重温一下当年的技术。MVVM 模式MVVM 实际上涉及三个部分,Model, View 和 ViewModel ,三者的关系如下图所示。在三部分的关系中,视图显示的内容和操作完全依赖...
分类:
其他好文 时间:
2014-06-15 15:15:47
阅读次数:
569
问题1:View层如何向Controller的Action传递Model数据?在View中,可以使用Form表单进行模型数据的提交,同样的,我们需要关联提交数据的类型,则需要在View中使用@model + 数据类型不同的是,此时Model属性为null,而且Model是一个只读属性,我们不能使用它...
分类:
其他好文 时间:
2014-06-15 13:10:18
阅读次数:
275
Paper:ImageNet Classification with Deep Convolutional Neual NetworkAchievements:The model addressed by Alex etl.achieved top-1 and top-5 test error ra...
分类:
Web程序 时间:
2014-06-15 12:22:10
阅读次数:
320
首先,MVC和三层架构,是不一样的。 三层架构中,DAL(数据访问层)、BLL(业务逻辑层)、WEB层各司其职,意在职责分离。 MVC是 Model-View-Controller,严格说这三个加起来以后才是三层架构中的WEB层,也就是说,MVC把三层架构中的WEB层再度进行了分化,分成了控制器.....
分类:
Web程序 时间:
2014-06-15 11:10:22
阅读次数:
296
首先,我们在Model层中添加一个Person类。 namespace MVCTest.Models{ public class Person { public string IdCard { get; set; } public string Name { get; set; } public s...
分类:
其他好文 时间:
2014-06-15 10:44:24
阅读次数:
687
在看Js视频的时候就感觉Dom这东西太神奇了。在这个注重用户体验的Web设计时代里,Dom是至关重要的。它的易用性强,并且遍历简单,支持XPath。它既然这么强大那么就来简单的介绍Dom这个东东。
一、DOM是什么?
DOM即:文档对象模型(DocumentObject Model),DOM就是一个编程接口,是针对HTML文档、XML等文档的一套API。就类似于JDBC是针对数据库的一...
分类:
其他好文 时间:
2014-06-14 14:58:44
阅读次数:
227
数组的恒等 === 在文档中是这么说的:
Check whether two arrays or subarrays share the same storage and elements by comparing them with the identity operators (=== and !==).
数组的恒等 === 判断即判断两个数组所指向的元素存储区是否相同。
但 XCode 6 测试下来,结果大为迥异:var a = [1, 2, 3]; a === a 其结果却为 false,...
分类:
其他好文 时间:
2014-06-14 11:39:39
阅读次数:
280
//在外面加一圈非0,再广搜
#include
#include
using std::queue;
int t, w, h, arr[962][1442];
int mov[][2] = {-1, 0, 0, 1, 1, 0, 0, -1};
queue Q;
bool check(int x, int y){
if(x h + 1 || y > w + 1)
return 0;...
分类:
其他好文 时间:
2014-06-14 10:06:32
阅读次数:
276
Key-value coding (KVC) 和 key-value observing (KVO) 是两种能让我们驾驭 Objective-C 动态特性并简化代码的机制。在这篇文章里,我们将接触一些如何利用这些特性的例子。观察 model 对象的变化在 Cocoa 的模型-视图-控制器 (Mode...
分类:
其他好文 时间:
2014-06-14 09:48:58
阅读次数:
354
Mantle makes
it easy to write a simple model layer for your Cocoa or Cocoa Touch application. Mantle
can still be a convenient translation layer between the API and your managed model objects.
...
分类:
其他好文 时间:
2014-06-14 09:27:26
阅读次数:
463