2012年5月3日
摘要: Now that you’ve learned some basics about programs, let’s look more closely at how to design a program. When you sit down to write a program, generally you have some sort of problem that you’d like to solve, or situation that you’d like to simulate. New programmers often have trouble figuring out ho 阅读全文
posted @ 2012-05-03 16:59 足球王子 阅读(294) 评论(0) 推荐(0)
摘要: 1,response.ContentType为空的问题出错代码:HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uriLink); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uriLink); request.Method = "GET"; request.Timeout = 2000; response = request.GetResponse(); stream = response.GetResponseStream(); 阅读全文
posted @ 2012-05-03 15:06 足球王子 阅读(300) 评论(0) 推荐(0)
  2012年5月2日
摘要: GDI+中发生一般性错误注:第一次写博客,把自己遇到的问题和收集的资料记录在博客上。在开发.NET应用中,使用 System.Drawing.Image.Save 方法而导致“GDI+ 中发生一般性错误”的发生,通常有以下三种原因:1. 相应的帐户没有写权限。解决方法:赋予 NETWORK SERVICE 帐户以写权限。2. 指定的物理路径不存在。解决方法:在调用 Save 方法之前,先判断目录是否存在,若不存在,则创建。if (!Directory.Exists(dirpath))Directory.CreateDirectory(dirpath);3. 保存的文件已存在并因某种原因被锁定。 阅读全文
posted @ 2012-05-02 14:18 足球王子 阅读(1553) 评论(0) 推荐(0)
  2012年4月27日
摘要: [转]Smart Thread Pool 介绍 www.diybl.com 时间 : 2010-11-23 作者:网络 编辑:fnw 点击: 164 [ 评论 ]--顾名思义,智能线程池.一定比自带的线程池有过人之处.不然也没有必要再搞个出来了.可创建线程池实例。 可动态调整线程池工作线程数量。 WorkItem 可以返回信息。 未执行 WorkItem 可被取消。 WorkItem 执行时可使用调用者上下文。 调用者可等待多个或全部 WorkItem 执行结束。 WorkItem 允许拥有一个执行结束时被执行的 PostExecute 回调委托。 可以向 WorkItem 传递一个状态对象, 阅读全文
posted @ 2012-04-27 10:34 足球王子 阅读(382) 评论(0) 推荐(0)