随笔分类 - c#
摘要://ExchangeService版本为2007SP1 ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2); //参数是用户名,密码,域 service.Credentials = new W...
阅读全文
摘要:asp.net url rewrite
阅读全文
摘要:Could not load file or assembly 'System.Data.SQLite' or one of its dependencies 解决办法
阅读全文
摘要:使用ASP.NET Web API构造基于restful风格web services,IHttpActionResult是一个很好的http结果返回接口。 然而发现在vs2012开发环境中,System.Web.Http包I中不含有HttpActionResult,这时需更新ASP.NET Web API。ASP.NET Web API是NuGet项目来管理更新,微软不提供安装包。所以使用NuGet更新包,具体步骤如下:1. 打开NuGet,打开方法 工具->库程序包管理器->程序包管理器控制台,如下图所示:2. 输入如下命令Install-Package Microsoft.As
阅读全文
摘要:distributed caching for .net applicationsfast, scalable distributed caching with meaningful performance metrics for your managers and a simple api for your development team.http://www.getdache.net
阅读全文
摘要:出现这个问题主要有以下几个原因:1, 服务器维护;2, 程序出现异常;3, Application Pool 未启动;4, 程序里面调用的其他web service或者wcf 程序异常,或者这些web service 的application pool 未启动。
阅读全文
摘要:温习一下C#基础 class A { public A() { Console.WriteLine("A"); } public virtual void Do() { Console.WriteLine("A Do"); } } class B:A { public B() { Console.WriteLine("B"); } public override void Do() { Conso...
阅读全文
摘要:js 传递参数为 中文, 程序读取中文后为乱码, 解决此问题是需要将该中文进行编码,使用 encodeURI(). 或者通过程序进行相应的编码处理。
阅读全文
摘要:题目是这样的, 数组是无序的, 可能没有重复的数,但最多只可能有一个重复的数,要求用最快的方法找到是否有重复的数。乍一想,挺难的,但是其实非常的简单。解决办法:数组a[N],1至N-1这N-1个数存放在a[N]中,其中某个数重复一次。写一个函数,找出被重复的数字。时间复杂度必须为o(N)函数原型:int do_dup(int a[],int N)××××...
阅读全文
摘要:看上去似乎任何已知的算法都无法做到,如果谁做到了,那么所有的排序方法:QuickSort,ShellSort,HeapSort,BubbleSort等等等等,都可以扔掉了,还要这些算法干吗阿,呵呵。不过实际上,在数字范围有限制的情况下,是有一个这样的算法的,只需要用一个数组记录每个数字出现次数就可以了。假定你的数字范围在0到65535范围之内,定义一个数组count[65536](这个空间是常量,...
阅读全文
摘要:Previously, in MSMQ, WCF and IIS: Getting them to play nice: In Part 1, we built a client and IIS-hosted service application and got them communicating over MSMQ using WCF's NetMsmqBinding. In Part 2,...
阅读全文
摘要:Welcome back! In Part 1 of this tale, we'd successfully configured a WCF client and an IIS-hosted service to communicate via MSMQ on the same machine. But we're only half done. As you may recall, our ...
阅读全文
摘要:A few weeks ago I posted an article describing how my current team built a publish/subscribe message bus using WCF and MSMQ. At that time we had only deployed the application in a single-server test e...
阅读全文
摘要:In recent years there has been a lot of talk about event-driven architecture as a technique to build more scalable and maintainable systems. I've found this to be a very interesting pattern that makes...
阅读全文
摘要:usingSystem;usingSystem.Data;usingEBiz.Security.API;usingSystem.IO;usingSystem.Reflection;usingSystem.Text;usingSystem.Text.RegularExpressions;usingSystem.Xml;usingSystem.Xml.Serialization;usingSystem...
阅读全文
摘要:(一)public class A { public virtual string Fun() { return "A"; } } public class B : A { public override string Fun() { return "B"; } } public class C : B { public new string Fun() { return "C"; } }prot...
阅读全文
摘要:/// /// 两个从小到大排序好的int数组,合并后也返回一个从小到大排序好的数组, /// 包含两个数组中全部的元素 /// /// /// /// public static int[] MergeArray(int[] a, int[] b) { ...
阅读全文