摘要:
来看看微软的答案:reference to MSDN:The number of threads a process can create is limited by the available virtual memory. By default, every thread has one megabyte of stack space. Therefore, you can create at most 2028 threads. If you reduce the default stack size, you can create more threads.如果采用默认值(线程的堆栈是 阅读全文
摘要:
最近公司有位仁兄写了一个监控IIS的软件,里面提到一个连接数, 此连接数主要是收集WMI信息,把代码写一下: // 取到IIS的各个站点 System.Management.ManagementClass mc = new System.Management.ManagementClass("Win32_PerfFormattedData_W3SVC_WebService");// 每个站点foreach (System.Management.ManagementObject obj in mc.GetInstances()){// 这里就是每个站点当前的连接数 Convert.ToInt64 阅读全文
摘要:
代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--百钱百鸡意思是说:去菜市场买鸡,大鸡3元一只,小鸡1元三只,求怎么才能用100元刚好买100只鸡,要求用任意程序实现!求达人代码inty=100/3;for(inti=1;iy;i++){inta=100-3*i;if(a*3+i==100){Console.WriteLine("大:"+i+"金额"+i*3+"小:"+3*a+"金额"+a);Console.ReadLine();}}使用lin 阅读全文
摘要:
代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--给你两个提示:1)客户端检查:因为页面刷新window内置对象是会被销毁并且重建的,利用这个原理我们可以写出类似的代码:<divid="test"><scripttype="text... 阅读全文
摘要:
下载地方:http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx使用:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.Code... 阅读全文
摘要:
代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///<summary>//////</summary>///<typeparamname="T"></typeparam>///<paramna... 阅读全文
摘要:
主线程如何知道其它的线程已经完成用Event,子线程结束,触发Event。主线程等待Event被触发,这样事件被触发的时候,表明子线程已经运行结束。 补充一下:用ManualResetEvent或者AutoResetEvent,配合 WaitHandle.WaitOne 或者WaitHandle.WaitAll 方法实现,具体可以参考下MSDN Library科学计数法相加allMoney += ... 阅读全文
摘要:
代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--常用的分页AspNetPager.dllURL重写URLRewriter.dlljson相关方法Newtonsoft.Json.DLL上传带百分比进度条eWebapp.Upload.dll持久化框架N... 阅读全文
摘要:
代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--namespaceProgram{publicclassPackage{publicdouble[]goods=newdouble[]{1,1.1,2,3,4};///<summary>/... 阅读全文
摘要:
#region AES加密 private byte[] AESEncrypt(byte[] data, string key) { MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); byte[] buffer = md5.ComputeHash(Encoding.Default.GetBytes(key)); byte[... 阅读全文