<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">博客园_LanceZhang's Tech Blog_分类_08. Common Lib</title><id>http://feed.cnblogs.com/blog/u/28707/category/184718/rss</id><updated>2012-05-29T21:29:22Z</updated><generator>feed.cnblogs.com</generator><link rel="alternate" type="text/html" href="http://www.cnblogs.com/blodfox777/category/184718.html"/><link rel="self" type="application/atom+xml" href="http://feed.cnblogs.com/blog/u/28707/category/184718/rss"/><entry><id>http://www.cnblogs.com/blodfox777/archive/2010/12/06/1897697.html</id><title type="text">移除txt文本中不必要的换行符</title><summary type="text">前一阵子看到刘慈欣老师的《三体3》出版了，很是兴奋，就从网上找到了《三体2》的txt，准备重温一下（不买纸质书，为了环保，家里书太多太重，表鄙视偶）。打开一看，发现都出版了几年了，怎么网上连个像样的盗版都没有，明显是从扫描版pdf上使用文字识别ocr工具抓下来的文字，正确率倒还挺好，但有很多不必要的换行符，让人看起来非常吃力（如图）于是，就花时间自己写了个小工具，来实现不必要换行符的剔除。试了试，效果很不错源码下载：/Files/blodfox777/LineBreak.rar程序下载：/Files/blodfox777/换行移除.rar</summary><published>2010-12-06T06:02:00Z</published><updated>2010-12-06T06:02:00Z</updated><author><name>LanceZhang</name><uri>http://www.cnblogs.com/blodfox777/</uri></author><link rel="alternate" href="http://www.cnblogs.com/blodfox777/archive/2010/12/06/1897697.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/blodfox777/archive/2010/12/06/1897697.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/blodfox777/archive/2010/10/27/sqlserver-row-counts-each-table.html</id><title type="text">SQL Server 中统计各用户表记录条数 的两种方法</title><summary type="text">最近做数据监控遇到这么个查询需求，就从系统存储过程[sys].[sp_tables]中征用了遍历用户表的代码，组织一下，配合以MSSQL 中的表变量，写了如下代码：方法一：[代码]这里使用表变量而非临时表，是因为大多数数据库中表的数量不会太多，使得临时表（或表变量）中的记录条数不会很多。如此一来，借以表变量，将数据暂时存放放在内存中要比存放在tempDB中更加高效。基本思路为：1.从系统视图SYS...</summary><published>2010-10-27T06:11:00Z</published><updated>2010-10-27T06:11:00Z</updated><author><name>LanceZhang</name><uri>http://www.cnblogs.com/blodfox777/</uri></author><link rel="alternate" href="http://www.cnblogs.com/blodfox777/archive/2010/10/27/sqlserver-row-counts-each-table.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/blodfox777/archive/2010/10/27/sqlserver-row-counts-each-table.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/blodfox777/archive/2010/07/13/aspnet-pv-counter.html</id><title type="text">一个简单的PV统计例子，演示如何利用内存缓冲高并发环境下的计数</title><summary type="text">在cnblogs博问中回答问题http://space.cnblogs.com/q/15717/，特做了个小例子，希望能够帮助新手朋友们扩宽思路Default.aspxCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--&gt;&lt;%@PageLanguage="C#"AutoEventWireup="true"CodeFile="Default.aspx.cs"Inherits="_Default"%&gt;&lt;!DOCTYPEhtmlPUBLIC"-//W3C//D</summary><published>2010-07-13T09:40:00Z</published><updated>2010-07-13T09:40:00Z</updated><author><name>LanceZhang</name><uri>http://www.cnblogs.com/blodfox777/</uri></author><link rel="alternate" href="http://www.cnblogs.com/blodfox777/archive/2010/07/13/aspnet-pv-counter.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/blodfox777/archive/2010/07/13/aspnet-pv-counter.html"/><content type="html"/></entry><entry><id>http://www.cnblogs.com/blodfox777/archive/2010/01/13/CodeTimer.html</id><title type="text">方法性能比较的好帮手：CodeTimer的扩展应用</title><summary type="text">在09年的.NET技术大会上Jeffery Richard展示的性能测试代码中，功能强大的CodeTimer引起了大家的注意，园子里的老赵就自己写了一个，最近在老赵原有的代码上加上了一个Time方法的重载，以适用于非Console应用程序中快速的性能比较，比如Winform、Web、UnitTest、WindowsService等。</summary><published>2010-01-13T04:03:00Z</published><updated>2010-01-13T04:03:00Z</updated><author><name>LanceZhang</name><uri>http://www.cnblogs.com/blodfox777/</uri></author><link rel="alternate" href="http://www.cnblogs.com/blodfox777/archive/2010/01/13/CodeTimer.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/blodfox777/archive/2010/01/13/CodeTimer.html"/><content type="text">在09年的.NET技术大会上Jeffery Richard展示的性能测试代码中，功能强大的CodeTimer引起了大家的注意，园子里的老赵就自己写了一个，最近在老赵原有的代码上加上了一个Time方法的重载，以适用于非Console应用程序中快速的性能比较，比如Winform、Web、UnitTest、WindowsService等。</content></entry><entry><id>http://www.cnblogs.com/blodfox777/archive/2009/10/23/NET_3DES.html</id><title type="text">简单的C#.NET 字符串加解密程序</title><summary type="text">可用于链接字符串加密/解密，加密算法使用3DES，key经过MD5哈希过，强度能满足一般需要，代码简洁，可以直接拿来使用，希望能帮助需要的朋友。</summary><published>2009-10-23T05:20:00Z</published><updated>2009-10-23T05:20:00Z</updated><author><name>LanceZhang</name><uri>http://www.cnblogs.com/blodfox777/</uri></author><link rel="alternate" href="http://www.cnblogs.com/blodfox777/archive/2009/10/23/NET_3DES.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/blodfox777/archive/2009/10/23/NET_3DES.html"/><content type="text">可用于链接字符串加密/解密，加密算法使用3DES，key经过MD5哈希过，强度能满足一般需要，代码简洁，可以直接拿来使用，希望能帮助需要的朋友。</content></entry><entry><id>http://www.cnblogs.com/blodfox777/archive/2009/04/08/1431487.html</id><title type="text">分享一个简单的日志记录静态类</title><summary type="text">LanceZhang.Common.Log静态类作用：日志记录适用情景：一般日志记录，以及Windows Service、Web Service等部署后难以调试的应用程序。主要输出：文件系统IO方法：1. Output(string)用于普通日志记录，记录的信息将在程序目录下根据日期建立文本文件“log_20090408.txt”并在该文本文件中追加要输出的普通日志信息：2.OutputError(string)用于错误日志输出，与Output方法类似，不但输出日志信息，还输出当前的文件名、行、列号以及当前执行的方法名，以便进行分析。如：[代码]输出：代码：[代码]</summary><published>2009-04-08T02:23:00Z</published><updated>2009-04-08T02:23:00Z</updated><author><name>LanceZhang</name><uri>http://www.cnblogs.com/blodfox777/</uri></author><link rel="alternate" href="http://www.cnblogs.com/blodfox777/archive/2009/04/08/1431487.html"/><link rel="alternate" type="text/html" href="http://www.cnblogs.com/blodfox777/archive/2009/04/08/1431487.html"/><content type="text">LanceZhang.Common.Log静态类作用：日志记录适用情景：一般日志记录，以及Windows Service、Web Service等部署后难以调试的应用程序。主要输出：文件系统IO方法：1. Output(string)用于普通日志记录，记录的信息将在程序目录下根据日期建立文本文件“log_20090408.txt”并在该文本文件中追加要输出的普通日志信息：2.OutputError(string)用于错误日志输出，与Output方法类似，不但输出日志信息，还输出当前的文件名、行、列号以及当前执行的方法名，以便进行分析。如：[代码]输出：代码：[代码]</content></entry></feed>
