湖边的白杨树

探索是一种乐趣

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 22 下一页

2013年6月23日

摘要: AutoResetEvent允许线程通过发信号互相通信。通常,此通信涉及线程需要独占访问的资源。线程通过调用AutoResetEvent上的WaitOne来等待信号。如果AutoResetEvent处于非终止状态,则该线程阻塞,并等待当前控制资源的线程通过调用Set发出资源可用的信号。调用Set向A... 阅读全文
posted @ 2013-06-23 21:46 fdyang 阅读(659) 评论(0) 推荐(0)

摘要: 获取当前线程IDThread.CurrentThread.ManagedThreadIdAppDomain.GetCurrentThreadId() // Low level.参考:http://kb.cnblogs.com/page/42529/ 阅读全文
posted @ 2013-06-23 21:37 fdyang 阅读(304) 评论(0) 推荐(0)

2013年6月3日

摘要: C#中, Array copy 很方便于保存和复制数据.常用的有两个方法:1. 复制源数组中的前N个数据到目标数组中public static void Copy( Array sourceArray, Array destinationArray, int length)2. 复制源数组中指定起始位置,指定长度的数据到目标数组中的某个指定起始位置中。public static void Copy( Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length)习题: 生 阅读全文
posted @ 2013-06-03 18:23 fdyang 阅读(8975) 评论(0) 推荐(0)

摘要: Caught: System.ArgumentException: Destination array was not long enough. Check destIndex and length and the array's lower bounds. at System.Array.Copy(Array sourceArray Int32 sourceIndex Array destinationArray Int32 destinationIndex Int32 length Boolean reliable) at System.Collections.Generic.Qu 阅读全文
posted @ 2013-06-03 17:47 fdyang 阅读(2624) 评论(0) 推荐(0)

2013年5月30日

摘要: 转载:http://www.codeproject.com/Answers/228635/how-to-convert-32bpp-into-8bpp-bitmap#answer1public static Bitmap ColorToGrayscale(Bitmap bmp){int w = bmp.Width,h = bmp.Height,r, ic, oc, bmpStride, outputStride, bytesPerPixel;PixelFormat pfIn = bmp.PixelFormat;ColorPalette palette;Bitmap output;BitmapD 阅读全文
posted @ 2013-05-30 10:26 fdyang 阅读(3505) 评论(0) 推荐(0)

2013年5月26日

摘要: 转载原文:http://www.cnblogs.com/freeliver54/archive/2007/01/30/634620.htm及时有效的跳转 将有助于提升程序的执行效率---------------------------------------------------------break 语句用于终止最近的封闭循环或它所在的 switch 语句。 控制传递给终止语句后面的语句(如果有的话)。continue 语句将控制权传递给它所在的封闭迭代语句的下一次迭代。goto 语句将程序控制直接传递给标记语句。 goto 的一个通常用法是将控制传递给 特定的 switch-case 标 阅读全文
posted @ 2013-05-26 10:43 fdyang 阅读(262) 评论(0) 推荐(0)

2013年5月23日

摘要: 基本思路:1. 设定阀值,将图像二值化。2. 利用区域生长的方法,找到亮块。(如果亮块较小,丢弃(去噪))3. 取出亮块的中心值,加入到链表或list集合。4. 抹去亮块,重复2~3.参考:图形处理二值化:http://blog.csdn.net/jia20003/article/details/8074627中心位置的定位:http://wenku.baidu.com/view/e1e56cd526fff705cc170ace.html光斑定位:http://wenku.baidu.com/view/84de804f767f5acfa1c7cdcf.html区域生长:http://blog. 阅读全文
posted @ 2013-05-23 16:00 fdyang 阅读(215) 评论(0) 推荐(0)

2013年4月24日

摘要: Differences Between MBR and GPT Disks:MBRdisks are supported (readable) by all Windows operating systems.GPTdisks are only supported (readable) by Windows server 2003 SP1 +, XP 64-bit, Vista, Windows 7, Windows Server 2008.MBRdisks use the standard BIOS partition table.GPTdisks useUEFI.MBRdisks supp 阅读全文
posted @ 2013-04-24 22:03 fdyang 阅读(288) 评论(0) 推荐(0)

2013年4月20日

摘要: Encoding.GetEncoding(936)).Contains(@"这是简体中文")在.NET的世界里,string永远是unicode,所以通过读取TXT文件的每行,然后来判断其内容时,需要进行解码。 foreach (string line in File.ReadAllLines(“D:\\test.txt")) { Console.writeline (" {0}" + line); }具体编码参考MSDN. Encoding类h... 阅读全文
posted @ 2013-04-20 12:26 fdyang 阅读(5015) 评论(0) 推荐(0)

2013年4月17日

摘要: 对策:devenv.exe /SafeMode , 在安全模式下面添加。 阅读全文
posted @ 2013-04-17 14:33 fdyang 阅读(191) 评论(0) 推荐(0)

上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 22 下一页