摘要: /// <summary> /// 基于LRU算法的连接检测 /// </summary> public class LRUDetect:IDisposable { /// <summary> /// 构建检测器 /// </summary> /// <param name="timeout">超时时间以毫秒为单位</param> public LRUDetect(int timeout) { mTimeout = timeout; ... 阅读全文
posted @ 2013-05-01 09:58 牛德彪 阅读(270) 评论(0) 推荐(0)
摘要: /// <summary> /// Copyright © henryfan 2012 /// Email: henryfan@msn.com /// HomePage: http://www.ikende.com /// CreateTime: 2012/10/27 21:56:05 /// </summary> public class SecondCounter:IDisposable { interface ICounter { void Proce... 阅读全文
posted @ 2013-05-01 09:57 牛德彪 阅读(227) 评论(0) 推荐(0)
摘要: [ThreadStatic] static char[] mTempChars; protected static char[] GetTempData() { if (mTempChars == null) mTempChars = new char[1024 * 64]; return mTempChars; } public static string Replace(string value, string oldData, string ... 阅读全文
posted @ 2013-05-01 09:56 牛德彪 阅读(481) 评论(0) 推荐(0)
摘要: 最近在制定一个网络文件交互的协议,协议制订上采用了HTTP协议的方式,因此需对协议数据进行一个分割处理;虽然使用String的Split方法可以达到目的,但通过返编译查看其代码后发现实现相对复杂性能上也不太理想;因此自己实现一个简单的字符分割处理类,在实现后和String的Sqlit方法进行了一个简单的对比,发现性能要比Sqlit高所以分享出来.测试情况分割处理的内容Cache-Control:public, max-age=0Content-Encoding:gzipContent-Length:9480Content-Type:text/html; charset=utf-8Date:W. 阅读全文
posted @ 2013-05-01 09:55 牛德彪 阅读(308) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Forms;using System.Windows;namespace IKende.Windows{ public class ThreadUIInvoke { public delegate void EventUIInvoke(); public delegate void EventUIInvoke<T>(T t); pub... 阅读全文
posted @ 2013-05-01 09:54 牛德彪 阅读(193) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Text; namespace WindowsFormsApplication1{ using System; using System.Drawing; using System.Runtime.InteropServices; using Microsoft.Win32; using System.Reflection; using System.Collections.Generic; namespace BlackFox.Wi... 阅读全文
posted @ 2013-05-01 09:53 牛德彪 阅读(1056) 评论(1) 推荐(1)
摘要: 一、命令结构描述1.中心发送命令结构*XX,YYYYYYYYYY,CMD,HHMMSS,PARA1,PARA2,…#* 命令头XX 制造商名称,两位固定ASCII字符, 分隔符YYYYYYYYYY车载机序列号CMD 命令号HHMMSS 命令时间:时/分/秒PARA 命令参数# 结束符命令字符中的英文字母一律使用大写,且不能插入空格。2.车载机返回信息结构一般信息:*XX,YYYYYYYYYY,V1,HHMMSS,S,latitude,D,longitude,G,speed,direction,DDMMYY,vehicle_status#定位信息:*XX,YYYYYYYYYY,V2,HHMMSS 阅读全文
posted @ 2013-04-08 13:23 牛德彪 阅读(3471) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Text;using System.Collections;namespace VirtualGPS{ public class GPS { private System.Windows.Forms.Timer timer; //定时器, 模拟GPS时发送,周期间隔1S private System.IO.Ports.SerialPort serialPort; //串口 private ArrayList buf = ... 阅读全文
posted @ 2013-04-08 13:21 牛德彪 阅读(599) 评论(0) 推荐(0)
摘要: 最近因为要用到directx写一下车载的界面,于是就去Microsoft下载了DirectX SDK。但是装了n次都是到最后了报出Error Code s1023, 如图: 阅读全文
posted @ 2011-12-11 01:04 牛德彪 阅读(2558) 评论(0) 推荐(2)
摘要: $GPGGA,213035.000,3447.5084,N,11339.3580,E,1,07,1.6,97.9,M,-18.0,M,,0000*43 $GPGLL,3447.5084,N,11339.3580,E,213035.000,A*38 $GPGSA,A,3,16,30,13,31,23,06,03,,,,,,2.8,1.6,2.3*3E $GPRMC,213035.000,A,3447.5084,N,11339.3580,E,0.22,341.45,141111,,*0D $GPVTG,341.45,T,,M,0.22,N,0.4,K*63 阅读全文
posted @ 2011-12-06 21:39 牛德彪 阅读(597) 评论(0) 推荐(0)