代码改变世界

jquery navi

2013-08-22 23:50 by yezhi, 507 阅读, 0 推荐, 收藏, 编辑
摘要:/// /****************************************************** 我的活动左则菜单 edit by yezhi ******************************************************/YDW.SideNavi = (function () { var instance; function constructor() { return { accordion: function () { var $sb = $('#... 阅读全文

Fun with dynamicobject dynamic and the settings table

2013-06-16 23:53 by yezhi, 241 阅读, 0 推荐, 收藏, 编辑
摘要:What came beforeIn myprevious postI discussed ways of making the settings table using Generics to have typed access to our properties. This required us to still pass in the name of our property as a string to a method.User user = db.Users.First();if(user.Setting<bool>("IsAdministrator&quo 阅读全文

Mvc htmlhelper that generates a menu from a controller

2013-06-16 23:39 by yezhi, 359 阅读, 0 推荐, 收藏, 编辑
摘要:Simple menu system that grabs a list of actions from a single controller and creates an unordered list of links. To accomplish this I’ve created an attribute that will be applied to the action methods we want to see in the menupublicclassMenuItemAttribute:Attribute{publicintIndex{get;set;}publicMenu 阅读全文

Creating a settings table that can handle almost any type of value

2013-06-16 23:25 by yezhi, 197 阅读, 0 推荐, 收藏, 编辑
摘要:Update:Updated article here.Today I wanted to be able to have a table store any type of value as a way to store some settings for an application. The table needed to be able to store basically a name/value pair.I designed the object using a code-first approachInitial IdeapublicclassSetting{[Key]publ 阅读全文

Asp.net mvc 3 file uploads using the fileapi

2013-06-16 23:14 by yezhi, 401 阅读, 0 推荐, 收藏, 编辑
摘要:Asp.net mvc 3 file uploads using the fileapiI was recently given the task of adding upload progress bars to some internal applications. A quick search of the internet yieldedSwfUpload. Which worked…but not in the way that I wanted. So I went the route of using the newFileApi. It didn’t function the 阅读全文

ASP.NET MVC AJAX

2013-06-05 23:05 by yezhi, 195 阅读, 0 推荐, 收藏, 编辑
摘要:$(function () { $('form').submit(function () { if ($(this).valid()) { $.ajax({ url: this.action, type: this.method, data: $(this).serialize(), success: function (result) { $('#result').html(result); ... 阅读全文

ASP.NET MVC and the Managed Extensibility Framework (MEF)

2013-02-03 22:12 by yezhi, 576 阅读, 0 推荐, 收藏, 编辑
摘要:http://blog.maartenballiauw.be/post/2009/04/21/ASPNET-MVC-and-the-Managed-Extensibility-Framework-(MEF).aspxPosted bymaartenbaon Tuesday, April 21, 2009 3:38 PMMicrosoft’s Managed Extensibility Framework (MEF) is a .NET library (released onCodePlex) that enables greater re-use of application compone 阅读全文

[转]Creating an ASP.NET MVC OutputCache ActionFilterAttribute

2013-01-31 23:41 by yezhi, 237 阅读, 0 推荐, 收藏, 编辑
摘要:http://blog.maartenballiauw.be/post/2008/06/Creating-an-ASPNET-MVC-OutputCache-ActionFilterAttribute.aspxPosted bymaartenbaon Thursday, June 26, 2008 9:13 PMIn every web application, there are situations where you want to cache the HTML output of a specific page for a certain amount of time, because 阅读全文

LINQ统计

2013-01-29 22:00 by yezhi, 251 阅读, 0 推荐, 收藏, 编辑
摘要:var _hardwarePerf = (from _stats in _statsList where _time>=DateTime.Parse("2012-04-04 00:00:00") &&_time<=DateTime.Parse("2012-04-04 11:00:00") select new { Latency = _stats.latency, ... 阅读全文

转《软件架构师应该知道的97件事》

2013-01-26 20:54 by yezhi, 436 阅读, 0 推荐, 收藏, 编辑
摘要:http://dearymz.blog.163.com/blog/static/20565742012102894917257/正文之前软件架构师是既要精通开发技术和软件平台,又要熟悉客户的业务。优秀的软件架构师应该同时掌握业务知识和技术能力1. 客户需求重于个人简历作为工程师,我们常常要向客户推荐技术、手段,甚至方法论来解决问题。但有时我们心里不是想寻求解决问题的最佳方案,而是希望借此丰富自己的简历。这样做很可能得不偿失积累一批满意的客户,选择切合实际的技术解决他们的难题,让他们乐于推荐你,才是最好的履历。信誉远胜过时髦的编程技巧和流行的范式。掌握最新的技术趋势,与时俱进固然重要,但不能让客 阅读全文