代码改变世界

windows 10 iis 8 注册asp.net 4.5

2016-11-07 14:51 by 张小驴同学, 2238 阅读, 0 推荐, 收藏, 编辑
摘要:http://stackoverflow.com/questions/32716434/register-net-4-5-iis-10-windows-10 I had the same issues which I have since fixed in VS 2015, my situation 阅读全文

使用 ng-repeat-start、ng-repeat-end

2016-06-13 17:21 by 张小驴同学, 525 阅读, 0 推荐, 收藏, 编辑
摘要:使用ng-repeat时,ng-repeat所在的标签会被循环生成,例如: 生成的代码是这样的: 显然不是我想要的效果,我不想要这么多的dl标签。这时用 ng-repeat-start、ng-repeat-end 可以解决: 生成的代码是这样的: ng-repeat-start、ng-repeat- 阅读全文

1、2、3、4 转换成 A、B、C、D

2016-06-02 11:32 by 张小驴同学, 492 阅读, 0 推荐, 收藏, 编辑
摘要:输出: 阅读全文

Submit form on pressing Enter with AngularJS

2016-05-24 10:59 by 张小驴同学, 298 阅读, 0 推荐, 收藏, 编辑
摘要:原文地址:http://stackoverflow.com/questions/15417125/submit-form-on-pressing-enter-with-angularjs 方案1: If you want to call function without form you can u 阅读全文

AngularJs 使用ng-repeat 时,去除重复项

2015-12-31 15:42 by 张小驴同学, 5469 阅读, 0 推荐, 收藏, 编辑
摘要:原文地址app.filter('unique', function() { return function(collection, keyname) { var output = [], keys = []; angular.forEach(collect... 阅读全文

返回json对象给IE8的兼容性问题

2015-10-16 10:36 by 张小驴同学, 964 阅读, 0 推荐, 收藏, 编辑
摘要:程序在用IE8浏览时会有兼容性问题。1,返回json对象给IE8时,会把json对象下载下来。2,IE8的编码格式跟其他浏览器不一样,导致中文显示成乱码。解决办法:1,设置返回的类型为text/html2,转json字符串的时候,编码格式设置为 Encoding.Defaultif (isIe8){... 阅读全文

DevExpress WinForm GridControl 实现拖动多行到TreeView

2015-04-23 17:18 by 张小驴同学, 1158 阅读, 0 推荐, 收藏, 编辑
摘要:参考文章:Drag-and-drop of multiple selected grid rows如果列表有使用行内编辑功能,需要将列表的 OptionsBehavior.EditorShowMode 属性设置为 MouseUp 或者 Click private GridH... 阅读全文

委托返回类型的协变性

2014-08-18 08:43 by 张小驴同学, 245 阅读, 0 推荐, 收藏, 编辑
摘要:class Program { static void Main(string[] args) { StreamFactory factory = GenerateSampleData;//(3) using (S... 阅读全文

委托参数的逆变性

2014-08-13 16:16 by 张小驴同学, 411 阅读, 0 推荐, 收藏, 编辑
摘要:读了深入理解C#书中的 5.3.1 委托参数的逆变性,记录一下。先看一段代码:public Form1(){ InitializeComponent(); Button button1 = new Button {Text = "Click me 1", Location = new P... 阅读全文

单例采用双锁定技术

2014-07-10 10:43 by 张小驴同学, 257 阅读, 0 推荐, 收藏, 编辑
摘要:摘抄自《改善C#程序的157个建议》 —— 建议105:使用私有构造函数强化单例。 关于单例的一个著名的技术就是“双锁定”技术。采用双锁定技术后,单例的线程安全版本为: public sealed class Singleton { private static Singl... 阅读全文