代码改变世界

随笔档案-2013年07月

C#实现的协同过滤算法

2013-07-03 11:01 by 黑眼圈Mars, 1177 阅读, 收藏,
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace SlopeOne{ public class Rating { public float Value { get; set; } public int Freq { get; set; } public float AverageValue { get { return Value / Freq; } } } public class RatingDifferenceCollection : Dictionary 阅读全文

C#演化过程--各个版本新增加特性

2013-07-02 13:27 by 黑眼圈Mars, 164 阅读, 收藏,
摘要: 阅读全文

ASP.net mvc中的路由映射系统

2013-07-02 09:11 by 黑眼圈Mars, 277 阅读, 收藏,
摘要: 首先,用户通过Web浏览器向服务器发送一条url请求,这里请求的url不再是xxx.aspx格式,而是http://HostName/ControllerName/ActionName/Parameters的 样子。这个请求被ASP.NET MVC的路由映射系统截获。(路由映射可以在Global.asax中配置,我们一会再说)路由映射系统按照映射规则,解析出控制器名 ControllerName,Action名ActionName和各个参数Parameters,然后,找寻Controllers目录下的 ControllerNameController.cs这个控制器类,默认情况下,系统总是找寻 阅读全文