上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 65 下一页
摘要: 有一个基于MIT License协议开源的PHP文件可以很方便地检测用户到底是用手机(Mobile)还是电脑(PC)访问网站。下载地址为:http://code.google.com/p/php-mobile-detect/Description Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment. Mob.. 阅读全文
posted @ 2012-08-06 11:12 94cool 阅读(651) 评论(0) 推荐(0)
摘要: from:http://www.cnblogs.com/keyindex/archive/2010/12/15/1901875.html最近想写一个网络服务器端的程序,想看看在大量客户端数下程序的运行情况。于是对.net 的Socket编程进行了一些研究,发现.net 3.5 里SocketAsyncEventArgs 是基于IOCP实现。MSDN上有相关的示例,但它是基于TCP协议的,而我想要的是基于UDP协议的。网上很难找到基于UDP协议的SocketAsyncEventArgs示例(UDP需要用IOCP吗?),于是决定自己写一个基于UDP协议的SocketAsyncEventArgs示例 阅读全文
posted @ 2012-07-16 20:48 94cool 阅读(1130) 评论(0) 推荐(1)
摘要: static void Main(string[] args) { float xo = 39.909209536859834f;//圆点x float yo = 116.3225715637207f;//圆点y float x1 = 39.960026f;//圆边上一点坐标x float y1 = 116.38882f;//圆边上一点坐标y Matrix rotation = new Matrix(); rotation.RotateAt(60, new System.Drawing.PointF(xo, yo));//60为... 阅读全文
posted @ 2012-07-16 15:10 94cool 阅读(1607) 评论(0) 推荐(0)
摘要: public class IMGInfo{public DateTime Time;public byte Channel;public int Size;}public class IMGIndex{public DateTime Time; public byte channel; public long start; public int len;}IMGIndex[] result=new IMGIndex[10];IMGIndex 2 IMGInfo:var res = (from n in result select new IMGInfo { Channel = n.channe 阅读全文
posted @ 2012-06-29 09:26 94cool 阅读(386) 评论(0) 推荐(0)
摘要: from:http://blog.csdn.net/tge7618291/article/details/7599902<<Unicode与UTF-8互转(C语言实现)>>Tags: encoding,c1. 基础1.1 ASCII码我们知道, 在计算机内部, 所有的信息最终都表示为一个二进制的字符串. 每一个二进制位(bit)有0和1两种状态, 因此八个二进制位就可以组合出 256种状态, 这被称为一个字节(byte). 也就是说, 一个字节一共可以用来表示256种不同的状态, 每一个状态对应一个符号, 就是256个符号, 从 0000000到11111111.上个世 阅读全文
posted @ 2012-06-20 08:54 94cool 阅读(9009) 评论(1) 推荐(0)
摘要: 用户认证HttpWebRequest可以实现的啊最简单的方法,就是把用户名和密码放入url中比如:http://username:password@www.abc.com/复杂的办法可以在请求的header里面添加Authorization。格式为:Basic + base64(username:password)如: public static string SendDataByGET(string Url, string postDataStr, ref CookieContainer cookie) { try { string url = Url + (postDataStr == & 阅读全文
posted @ 2012-06-11 18:43 94cool 阅读(829) 评论(2) 推荐(0)
摘要: from:http://www.cnblogs.com/daxingxing/archive/2011/09/01/2161916.html所需软件下载地址如下(均为有效资源链接,速度都比较可以):vs2005:http://221.224.22.210/downloadsawyer/VS.Net2005简体中文版.rarwinxpddk:http://210.21.117.86/down/ocx/winxpddk.zipDDKWizard:http://ddkwizard.assarbad.net/downloads/ddkwizard_setup.exehttp://ddkwizard.a 阅读全文
posted @ 2012-06-10 17:34 94cool 阅读(1034) 评论(0) 推荐(0)
摘要: string connectionStr = "Data Source=Data.sdf;;Temp File Max Size = 1024;Max Database Size=1024";SqlCeConnection connection=new SqlCeConnection(connectionStr);解决方法:加上“;Max Database Size=1024” 阅读全文
posted @ 2012-06-10 14:09 94cool 阅读(2868) 评论(0) 推荐(0)
摘要: 让Dictionary key 支持自定义对象,则对象必须继承IEquatable,重写GetHashCode、Equalsclass Foo : IEquatable<Foo> { public string Name { get; set;} public int FooID {get; set;} public override int GetHashCode() { return Name.GetHashCode()+FooID.GetHashCode(); } public override bool Equals(object obj) { return Eq... 阅读全文
posted @ 2012-06-04 19:58 94cool 阅读(255) 评论(0) 推荐(0)
摘要: from:http://www.cnblogs.com/psunny/archive/2010/04/17/1714427.html源代码地址:http://files.cnblogs.com/psunny/SafetyNetMobileHttpService.rar我在使用Windows Mobile向http://www.google.com/loc/json请求基站信息时,发现第一次发送基站信息能够获取到一个经纬度,第二次却失败,直接导致异常退出应用程序。由于基站信息只能在真机上才能获取,无法进行调试,我就以一个中间web页面来向手机发送位置信息,再者拼接Json和解析的Json都放在w 阅读全文
posted @ 2012-05-22 09:25 94cool 阅读(546) 评论(0) 推荐(0)
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 65 下一页