会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
2016年7月8日
C# 判断txt文件编码格式
摘要: /// /// 获取文件的编码格式 /// public class EncodingType { /// /// 给定文件的路径,读取文件的二进制数据,判断文件的编码类型 /// /// 文件路径 /// 文件的编码类型 public s...
阅读全文
posted @ 2016-07-08 11:33 来了啊老弟
阅读(4480)
评论(0)
推荐(1)
2016年4月24日
C# 利用DotRas 操作adsl
摘要: 开源项目地址:http://dotras.codeplex.com/ 使用这个可以方便的操作ADSL拨号、断开。有详细的开发文档,需要的可以自己去看。。
阅读全文
posted @ 2016-04-24 20:21 来了啊老弟
阅读(4343)
评论(1)
推荐(0)
2016年2月23日
QQ gtk,bkn算法
摘要: public long GetGTK(string sKey) { int hash = 5381; for (int i = 0, len = sKey.Length; i < len; ++i) { hash += (hash << 5) + (int)sKey[i]; } return (ha
阅读全文
posted @ 2016-02-23 16:54 来了啊老弟
阅读(2130)
评论(0)
推荐(0)
2016年2月19日
对GET/POST请求返回cookie中的键值对进行重新组合
摘要: get/post请求返回的cookie中并不是所有的键值对我们都需要,我们只需要提取我们需要的进行重新组合就可以了。 如下图是一个GET请求返回的cookie 我需要提取其中的 uin,skey等相关键值对。 以下函数可以完成我们的需求 public string GetCookieByName(L
阅读全文
posted @ 2016-02-19 19:59 来了啊老弟
阅读(944)
评论(0)
推荐(0)
2014年11月25日
C# WebService发布 未能创建类型 问题
摘要: 将Bin目录放到网站根目录就好了。。。
阅读全文
posted @ 2014-11-25 19:51 来了啊老弟
阅读(711)
评论(0)
推荐(0)
2014年11月23日
C# 获取网络时间
摘要: 网上时间接口很多,但是源码里根本看不到常规的DateTime类型的时间。全是时间戳形式的时间。 这里提供一个接口: http://www.hko.gov.hk/cgi-bin/gts/time5a.pr?a=1 取时间戳的前10位,转化成DateTime类型就可以了。前10位精确到秒。
阅读全文
posted @ 2014-11-23 21:36 来了啊老弟
阅读(14519)
评论(1)
推荐(0)
2014年4月25日
User Agent 收集
摘要: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.11 TaoBrowser/2.0 Safari/536.11Mozilla/5.0 (Windows NT 6.1...
阅读全文
posted @ 2014-04-25 23:47 来了啊老弟
阅读(1338)
评论(0)
推荐(0)
2013年7月21日
C# 汉字Unicode编码转汉字
摘要: \u9a8c\u8bc1\u5931\u8d25\uff0c\u8bf7\u6309\u7167\u5408\u89c4\u7684\u65b9\u5f0f\u8fdb\u884c\u63d0\u4ea4这样的就是汉字的unicode编码了。。转换函数: public static string unicodetogb(string text) { System.Text.RegularExpressions.MatchCollection mc = System.Text.RegularExpressions.Regex.Matches(te...
阅读全文
posted @ 2013-07-21 22:24 来了啊老弟
阅读(1499)
评论(0)
推荐(0)
2013年5月14日
C#生成随机汉字
摘要: using System;using System.Text;namespace ConsoleApplication{ class ChineseCode { public static void Main() { //获取GB2312编码页(表) Encoding gb = Encoding.GetEncoding("gb2312"); //调用函数产生4个随机中文汉字编码 object[] bytes = CreateRegionCode(4); ...
阅读全文
posted @ 2013-05-14 02:46 来了啊老弟
阅读(592)
评论(0)
推荐(0)
上一页
1
2
3
公告
点击右上角即可分享