随笔分类 -  C#

摘要:最新IP数据库 存储优化 查询性能优化 每秒解析上千万 qqzeng-ip-ultimate.dat 3.0版 阅读全文
posted @ 2018-04-13 10:38 曾祥展 阅读(2217) 评论(0) 推荐(0) 编辑
摘要://电脑端 扫码授权登录 public static string AuthUrl = "https://open.weixin.qq.com/connect/qrconnect?appid={0}&redirect_uri={1}&response_type=code&scope=snsapi_l 阅读全文
posted @ 2017-07-04 12:16 曾祥展 阅读(13812) 评论(0) 推荐(2) 编辑
摘要:最新一代文件结构 超高性能解析IP数据库 qqzeng-ip.dat 阅读全文
posted @ 2015-07-31 08:13 曾祥展 阅读(5782) 评论(2) 推荐(4) 编辑
摘要:最新IP地址数据库 来自 qqzeng.com 利用二分逼近法(bisection method) ,每秒500多万, 比较高效! 多语言API解析Dat 导入数据库脚本https://github.com/zengzhan/qqzeng-ip 原来的顺序查找算法 效率比较低 改进版 采用二分逼近  阅读全文
posted @ 2014-05-26 22:15 曾祥展 阅读(11187) 评论(10) 推荐(3) 编辑
摘要:小米(简单版)-登录并验证抢购权限,以及获取真实抢购地址! 并不是复制到浏览器就行了的 还得传递所需要的参数 这里只是前部分 后面的自己发挥了 说明:(抢购前1-2个钟才开放此链接,正式开始时才返回真实地址) console.log([]) json实体类: 抢购: //1.真实地址 返回 mi_d 阅读全文
posted @ 2013-10-22 13:11 曾祥展 阅读(18543) 评论(67) 推荐(13) 编辑
摘要:FluentData,它是一个轻量级框架,关注性能和易用性。 下载地址:FlunenData.Model利用T4模板,【MultipleOutputHelper.ttinclude】批量生成多文件基本语法:1. 初始化:获取MultipleOutputHelper.ttinclude文件模板 在T4模板导入 //导入MultipleOutputHelper.ttinclude文件 路径 //初始化Manager对象 var manager = Manager.Create(Host, GenerationEnvironment); 2.文件块:使用代码标识区分生... 阅读全文
posted @ 2013-08-10 15:11 曾祥展 阅读(8930) 评论(27) 推荐(7) 编辑
摘要:c# 异步更新UI 不阻塞 流畅Task task = Task.Factory.StartNew(() =>{ DoLongRunningWork(); // 耗时运算});Task UITask= task.ContinueWith(() => { this.TextBlock1.Text = "Complete"; //运算后 赋值 }, TaskScheduler.FromCurrentSynchronizationContext());btnStop.Invoke(new Action(delegate() { this.btnStop.Enabled 阅读全文
posted @ 2012-08-23 12:51 曾祥展 阅读(7284) 评论(0) 推荐(0) 编辑
摘要:算法的复杂度就降低为 O(n) ,速度大大提高。需求:前后数据x条不动,中间随机删除N条记录实现: Dictionary<string, int> dictA = GetArrayListFromTxt(this.txtFileNameA.Text);Dictionary<string, int> dictB = GetArrayListFromTxt(this.txtFileNameB.Text);Dictionary<string, int> dictC= new Dictionary<string,int>();StringBuilder 阅读全文
posted @ 2011-10-30 21:46 曾祥展 阅读(1079) 评论(1) 推荐(0) 编辑
摘要:usingSystem.Text;//StringBuilderusingSystem.Xml;//xmlusingSystem.Collections;//SortedListusingSystem.Web.UI;//ClientScriptManagerXmlDocumentdoc=newXmlDocument();stringsURL="http://rainmeter.accu-weath... 阅读全文
posted @ 2010-03-06 10:20 曾祥展 阅读(1774) 评论(1) 推荐(2) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Text; using System.Text.RegularExpressions; namespace WebApplication1 { /// /// 汉字转拼音类 /... 阅读全文
posted @ 2010-02-09 20:24 曾祥展 阅读(2339) 评论(5) 推荐(3) 编辑
摘要:代码:实体类product.cs: 阅读全文
posted @ 2010-02-03 09:22 曾祥展 阅读(1430) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Management;//添加引用 using System.IO; namespace ConsoleApplication1 { class Program { ... 阅读全文
posted @ 2010-01-30 11:14 曾祥展 阅读(13678) 评论(1) 推荐(1) 编辑
摘要:using System; using System.Data; using System.Data.SqlClient; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using Syste... 阅读全文
posted @ 2009-12-31 08:20 曾祥展 阅读(1686) 评论(2) 推荐(1) 编辑
摘要:引用COM:Microsoft Office 11.0 Object Library 引用类: using System; using System.Windows.Forms; using Excel = Microsoft.Office.Interop.Excel; 调用: private void button1_Click(objectsender, EventArgse) { Pict... 阅读全文
posted @ 2009-11-24 10:45 曾祥展 阅读(12264) 评论(6) 推荐(4) 编辑
摘要:添加对using System.Runtime.InteropServices的引用 [ DllImport ( "USER32.DLL" ) ] public static extern int GetSystemMenu(int hwnd, int bRevert); [ DllImport ( "USER32.DLL" ) ] public static extern in... 阅读全文
posted @ 2009-11-03 14:50 曾祥展 阅读(1216) 评论(2) 推荐(0) 编辑
摘要://记得加folderBrowserDialog1openFileDialog1控件usingSystem.Data.SqlClient;//连接数据库公共变量namespaceWindowsApplication1.GoodMenhod{classgetSqlConnection{stringsql="DataSource=win7-pc;database=Kc;uid=sa;pwd=sa";S... 阅读全文
posted @ 2009-09-23 09:59 曾祥展 阅读(663) 评论(1) 推荐(0) 编辑