上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 30 下一页
摘要: 未经处理的异常: System.TypeInitializationException: “Win32Project1PINVOKE”的 类型初始值设定项引发异常。 ---> System.TypeInitializationException: “SWIGExcept ionHelper”的类型初始值设定项引发异常。 ---> System.BadImageFormatExcep... 阅读全文
posted @ 2013-08-03 11:38 张保维 阅读(1927) 评论(0) 推荐(0) 编辑
摘要: 其中要点, Stpe1,浏览器在Iframe中加载一个异域的页面,这个页面返回 ,这时候,取 iframe.contentwindow.name是拒绝访问的。 Step2,在Iframe中加载一个本域中的任意页面,此时,iframe.contentwindow.name 就可以访问了, DEMO: 下面是不修饰的代码, 1: 阅读全文
posted @ 2013-07-16 14:18 张保维 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 用于测试在是否使用Lazy 的情况下,服务器负载,及服务提供情况对比。 服务器环境: 在此机器上安装了1 Hyper-V ,分配走1G内存,同时在本地上安装 SQLServer , 在未做优化前的参数 优化后对比 首页 使用Appliction Lazy 后 未使用 第二页 使用LAZY ... 阅读全文
posted @ 2013-07-06 17:49 张保维 阅读(196) 评论(0) 推荐(0) 编辑
摘要: namespace LayzyLoadTest{ [TestClass] public class UnitTest1 { private IKernel InitKernel() { Ninject.IKernel kernel = new Ninject.StandardKernel(new LazyBinding()); ... 阅读全文
posted @ 2013-07-05 14:15 张保维 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 这这里先声明一下,引用了一个 (http://www.edcourtenay.co.uk/musings-of-an-idiot/2012/11/23/lazy-binding-with-ninject) 的方法。 Ninject 在 完成 Bind 以后,会根据Scope 存于列表中。 例如: Bind().To().InXXXXScope(). 这里A 只是与IA建立了一个映射... 阅读全文
posted @ 2013-07-05 13:50 张保维 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 实际上这个有多种解决方法,加自定义Attribute,或Named(),但这些方式有一些侵入性,Named,要引用Ninject, 自定义Attribute,还要还要再写几行代码吗,所以使用下面的方法, public class All { private readonly II _a; private readonly II ... 阅读全文
posted @ 2013-07-05 13:03 张保维 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 使用 WebMatrix.WebData.WebSecurity.CreateUserAndAccount(model.UserName, model.Password, new ... 阅读全文
posted @ 2013-07-02 17:42 张保维 阅读(445) 评论(0) 推荐(0) 编辑
摘要: http://www.codeproject.com/Articles/11505/NGif-Animated-GIF-Encoder-for-NET 这个项目可以将gif 分解为多个png,也可以将png合成为一个gif 动画, 另两个可以借鉴的项目, ImageResizer.Plugins.AnimatedGifs; ImageResizer.Plugins.P... 阅读全文
posted @ 2013-06-09 15:12 张保维 阅读(265) 评论(0) 推荐(0) 编辑
摘要: private static int Getcount(bool distinct, DateTime[] timeList, DateTime end, TimeSpan ts) { var datemark = end; int count = 0; for (int i = 0; i < timeList.Le... 阅读全文
posted @ 2013-05-29 10:56 张保维 阅读(159) 评论(0) 推荐(0) 编辑
摘要: from:http://msdn.microsoft.com/zh-cn/library/vstudio/az24scfc.aspx 阅读全文
posted @ 2013-05-17 12:26 张保维 阅读(123) 评论(0) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 30 下一页