自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(33)
  • 资源 (5)
  • 收藏
  • 关注

原创 基于事件的异步Socket(TCP连接方式)

//TcpService.csusing System;using System.IO;using System.Text;using System.Net;using System.Diagnostics;using System.Net.Sockets;using System.Collections.Generic;using System.Runtime.InteropServices

2006-09-25 13:10:00 7508 1

转载 APM

using System;using System.Collections.Generic;using System.Text;using System.Threading;namespace ConsoleTest{    //Figure 2 AsyncResultNoResult 类    internal class AsyncResultNoResult : IAsyncResult

2008-04-02 16:12:00 672

原创 VS2008 常用快捷建

编辑快捷键Ctrl+B,T    切换书签开关Ctrl+B,N    移动到下一书签Ctrl+B,P    移动到上一书签Ctrl+B,C    清除全部标签 Ctrl+I      渐进式搜索Ctrl+Shift+I反向渐进式搜索F12         转到定义Alt+F12     查找符号(列出所有查找结果)Ctrl+F      查找Ctrl+H      替换Ctrl+Shift+F

2008-03-19 21:22:00 3603 2

原创 C# 大数相乘

参照  http://blog.csdn.net/qw_study/archive/2006/10/22/1345087.aspx的改了下..速度提高了近40倍..using System;using System.Text;namespace BigNumberCalculator{    public class OP    {        public static strin

2008-03-19 13:41:00 1394

转载 开源WinMD5中的MTQueue类

using System; using System.Collections; using System.Threading; using System.Collections.Generic; namespace WinMD5 { public abstract class QueueItemBase { } /** A Thread safe wrapper * for the Queue c

2008-02-22 16:53:00 836 2

转载 序列化,反序列化时低序位非打印 ASCII 字符的问题

最近碰到一个问题,我的一个把数据库中记录的信息暴露出来的Web Service调用时候出问题了。报下面的错误信息:System.InvalidOperationException was unhandled  Message="XML 文档(1, 823)中有错误。"  Source="System.Xml"    Message="“”(十六进制值 0x0E)是无效的字符。 行 1,位置 8

2008-01-14 22:51:00 622

原创 利用WellKnown激活模式模拟客户端激活模式

//客户端激活模式接口  public interface IClientActivator    {        T CreateInstance();        T CreateInstance(params object[] args);    }// 客户端激活模式抽象类   public abstract class ClientActivator : MarshalB

2007-12-15 16:08:00 709

原创 自定义配置文件

[Serializable()]public struct GlobalSettings{//}  XmlSerializer ser= new XmlSerializer(typeof(GlobalSettings));TextWriter wr = new StreamWriter("data.xml");ser.Serialize(wr,myGlobalSet

2007-06-02 13:14:00 840

原创 2005单元测试文件头

//#define mUnit// 以下代码由 Microsoft Visual Studio 2005 生成。// 测试所有者应该检查每个测试的有效性。using System;using System.Text;using System.Collections.Generic;using zDit.Common.Chinese;using System.IO;#if mUnitusing

2007-03-29 15:04:00 719

原创 序列化及反序列化

加上[Serializable]特性  /**//// /// 序列化/// /// 要序列化的对象public static byte[] Serialize(object data)...{    BinaryFormatter formatter = new BinaryFormatter();    MemoryStream rems = new MemoryStream();    

2006-11-09 17:21:00 994

原创 只充许运行一个应用程序实例

using System;using System.Collections.Generic;using System.Windows.Forms;using System.Reflection;using System.Threading;using System.Diagnostics;using System.Runtime.InteropServices;namespace AutoUp

2006-11-08 15:15:00 1062

翻译 http多线程下载

 using System;using System.IO;using System.Net;using System.Text;using System.Security;using System.Threading;using System.Collections.Specialized;using System.Diagnostics;using System.Data;namesp

2006-11-06 17:18:00 1514

原创 如何使用中文密码

 设置方法..在修改密码时,将中文字符粘贴到密码框即可..... 登录时的输入方法:先下载"中英文字符编码查询"软件:http://www.skycn.com/soft/22871.html运行软件编码类型选 GBK 内码 ,进制选十六进制输入汉字即可看到编码...再把编码转化为10进制..此10进制即为汉字的GBK内码...照以上方法输入即可..如密码为:中国 查询后为

2006-11-03 14:15:00 1917 1

原创 得到DataGridView的选中行

            DataTable dt = new DataTable();            dt.Columns.AddRange(new DataColumn[]...{                new DataColumn("ID",Type.GetType("System.Int32")),                 new DataColumn("Name

2006-10-15 11:20:00 2640

原创 一个加密与解密的实例

using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.IO;using System.Security.Cryptography;namespace 文件加密.

2006-10-10 13:24:00 1407

原创 SQL连接基础类

/**//**//**//********************************************************************* * App.config 文件内容                                         * *******************************************************

2006-10-09 10:08:00 889

原创 无限级分类

         /**////         /// 添加到节点        ///         ///         ///         public ListTreeNode> GetTreeNode(DataTable dt)        ...{            int count = dt.Rows.Count;            int[] owne

2006-10-06 13:35:00 926

原创 点对点聊天程序

using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Net;using System.Net.Sockets;using System.IO;using Sy

2006-10-04 10:40:00 1882

原创 获取计算机信息

   //获取计算机名称   this.label1.Text=SystemInformation.ComputerName;   //获取用户名   this.label2.Text=SystemInformation.UserName;   //获取用户工作域名称   this.label3.Text=SystemInformation.UserDomainName;   //获取显示器分辨率

2006-09-15 18:11:00 1042

原创 调用API函数读写INI

 using System;using System.Collections.Generic;using System.Text;using System.Runtime.InteropServices;namespace Config...{    class PrivateProfile    ...{        /**////         /// 添加GetPrivatePr

2006-09-15 17:54:00 1013

转载 从.NET平台调用Win32 API

小序        Win32 API可以直接控制Microsoft Windows的核心,因为API(Application Programming Interface)本来就是微软留给我们直接控制Windows的接口。想玩儿吗?呵呵,太难了。        C#使用非常简单,写程序就像打拱猪,Sorry  -_-! ,搭积木一样简单。想玩儿吗?呵呵,没办法直接控制Windows的核心。    

2006-08-09 14:27:00 1559

原创 关键字切词

  public Dictionarystring, int> Match(int wordMaxLen, int areaCode, string text)        ...{            text = Regex.Replace(text, searchReg, "

2006-08-04 13:29:00 1125

转载 海量分词研究版C#接口

 using System;using System.Collections.Generic;using System.Runtime.InteropServices;using System.Text;namespace LanSplit...{    /**////     /// 海量分词研究版C#接口    ///     public class HL    ...{      

2006-08-04 13:24:00 2973 1

翻译 设置系统时间

 [StructLayout(LayoutKind.Sequential)]    public class SystemTime    {        public ushort year;        public ushort month;        public ushort dayofweek;        public ushort day;        public us

2006-08-04 13:22:00 810

转载 半角与全角、简繁体中文互相转化

  /*********************************************************************************************         * Microsoft.VisualBasic 命名空间 Strings 模块 StrConv 函数就具有大写/小写、全角/半角、         * 中文简体/繁体等转换功能,* 字符串转

2006-07-27 09:09:00 2193

原创 多线程传输文件辅助类

基类 using System;using System.Collections.Generic;using System.Text;using System.IO;namespace SocketServer...{    public delegate void FileEvent(FileBase f);    public class FileBase    ...{     

2006-07-14 17:18:00 1302 1

原创 异步SOcket传输类(待完善)

 #define DUBEGusing System;using System.IO;using System.Text;using System.Net;using System.Threading;using System.Net.Sockets;using System.Collections.Generic;using System.Runtime.Serialization.Fo

2006-07-02 22:43:00 1456

原创 异步TCP连接服务器端

TcpTranslate 为传输辅助类,此外代码不全.待续.....using System;using System.IO;using System.Text;using System.Net;using System.Net.Sockets;using System.Collections.Generic;namespace SocketServer...{    /**////   

2006-06-22 16:21:00 1832

转载 跨线程调用Windows窗体控件

delegate void SetTextCallback(string text);  private void SetText(string text)        {            // InvokeRequired required compares the thread ID of the            // calling thread to the thread I

2006-06-19 17:49:00 3938 2

转载 用C#实现汉字转化为拼音

 using System;using System.Collections.Generic;using System.Text;using System.Text.RegularExpressions;namespace SplitWord...{    /**//// 用C#实现汉字转化为拼音     /// 实现的原理就是先将汉字转化成为内码,然后通过内码和拼音的对照来查找。    

2006-06-19 13:15:00 1898 1

原创 文本框中只充许输入数字

文本框中只充许输入数字      Button的KeyPress事件 private void Button_KeyPress(object sender, KeyPressEventArgs e){    char[] charNum ={ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ,/u0008,/u000D}; 

2006-06-19 10:57:00 1461 1

转载 常用正则表达式

匹配中文字符的正则表达式: [/u4e00-/u9fa5]   //new Regex("^[/u4e00-/u9fa5]$");匹配双字节字符(包括汉字在内):[^/x00-/xff]应用:计算字符串的长度(一个双字节字符长度计2,ASCII字符计1)String.prototype.len=function(){return this.replace([^/x00-/xff]/g,

2006-06-17 14:21:00 700

原创 SQL如何删除重复的数据行

SQL如何删除重复的数据行- -delete from table where id in ( select max(id) from table group by name having count(*)>1)--删除重复记录中ID最大的一条(如果有2条以上的重复记录则需多次执行)如果table数据完全一样,可以先将数据导入到一个临时表内或delete from table wher

2006-06-08 10:54:00 2763 1

读取纯真IP数据库的公用组件(C#)

这是一个读取纯真IP数据库的公用组件接口,通过luma的《纯真IP数据库格式详解》了解了纯真IP数据库数据格式,并且基于网络上的一个IPLocation.dll源码的基础改编而来。

2009-05-19

mobile 自动校时软件源码

mobile 自动校时软件源码 C#实现.于香港天文台同步.

2008-11-20

C# 实现的九宫格样式

C# 实现的九宫格样式控件的源代码. 采用重绘方式.

2008-11-20

支持多线程,断点续传的HTTP下载类

支持多线程,断点续传的HTTP下载类.. 使用VS2008开发.完整C#源码带示例

2008-08-26

C#实现的简单聊天程序

使用异步Socket实现的简单聊天程序.....

2008-01-09

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除