转: 多线程环境下调用 HttpWebRequest 并发连接限制
摘要:原文在:http://www.cnblogs.com/eaglet/archive/2012/05/18/2507179.html.net 的 HttpWebRequest 或者 WebClient 在多线程情况下存在并发连接限制,这个限制在桌面操作系统如 windows xp , windows 7 下默认是2,在服务器操作系统上默认为10. 如果不修改这个并发连接限制,那么客户端同时可以建立的 http 连接数就只有2个或10个。对于一些诸如浏览器或网络蜘蛛的应用,2个或10个并发数量实在太少,大大影响应用的性能。之所以有这个并发连接限制,是因为 http 1.0 和 http 1.1 标
阅读全文
SqlServer动态in
摘要:declare @s varchar(500)set @s='13030,12581'exec('select * from novel where novelid in ('+@s+')')C#中SqlCommand cmd=con.CreateCommand();cmd.CommandText="exec('select * from novel where novelid in ('+@s+')')";cmd.Parameters.Add("@s","'
阅读全文
超简单的自定义GroupBy方式
摘要:来源:http://www.cnblogs.com/yiyanxiyin/archive/2008/06/26/1230524.html--测试表createtableTest(F1varchar(10),F2varchar(10))--插入数据insertintoTestselect'jack'F1,'book1'F2unionselect'jack'F1,'book2'F2unionselect'jack'F1,'book3'F2unionselect'Mary'F1,'
阅读全文
别用Timer+Windows 服务来实现一个定时任务
摘要:http://weblogs.asp.net/jgalloway/archive/2005/10/24/428303.aspx正常的方案应该是Windows计划任务,不光是这个作者这么说,sogou和google都这么干的。
阅读全文