2014年7月8日

摘要: 1, 快速排序:使用分冶思想,不断以某一元素为边界,分割成大小不同的区域。对于大多数数据集,这是最快的算法,除非分割成的区域每次都只有1个。算法复杂度:O(nLogn) public static void QuickSort(int[] ar, int begin, int end)... 阅读全文
posted @ 2014-07-08 09:56 Henry_Wang 阅读(386) 评论(0) 推荐(0) 编辑

2014年7月7日

摘要: 1,工厂方法:使用一个工厂的方法来创建产品。1 package WHP;2 //产品依赖于抽象3 public interface IRunable {4 public void Run();5 }1 package WHP;2 //具体实现3 public class Car implem... 阅读全文
posted @ 2014-07-07 19:23 Henry_Wang 阅读(230) 评论(0) 推荐(0) 编辑

2014年6月6日

摘要: http://social.microsoft.com/Forums/it-IT/3ba417d6-6548-48ed-9e9f-1a6549edc569大家好,在此提供一个示例展示如何使用数据库邮件发送会议邀请。创建CLR 存储过程,用来生成.ics文件:1.在 Visual Studio中,创建... 阅读全文
posted @ 2014-06-06 14:19 Henry_Wang 阅读(977) 评论(0) 推荐(0) 编辑

2014年5月6日

摘要: 1,线程概述线程是程序汇中独立的指令流。线程有一个优先级,实际上正在处理的程序的位置计数器,一个存储其局部变量的栈。每个线程都有自己的栈。但应用程序的内存和堆由一个进程的所有线程共享。进程包含资源,如windows句柄,文件句柄或其他内核对象。每个进程都分配了虚拟内存。一个进程至少包含一个线程。操作... 阅读全文
posted @ 2014-05-06 22:03 Henry_Wang 阅读(1383) 评论(0) 推荐(0) 编辑

2014年4月5日

摘要: 在开发Winform工控软件时,遇到过程序崩溃问题。原因:窗口调用了构造函数,但是没有Show显示,导致窗口中有些空间的Handle未能在操作系统底层创建。所以在读取或者写入某控件的Text时,出错。 阅读全文
posted @ 2014-04-05 17:51 Henry_Wang 阅读(1510) 评论(0) 推荐(0) 编辑

2014年3月7日

摘要: 不小心点击安装了搜狗手机助手,顿时有一种草搜狗全体人员的感觉。1,没卸载的地方2,麻痹的还不能用。 阅读全文
posted @ 2014-03-07 12:12 Henry_Wang 阅读(306) 评论(0) 推荐(0) 编辑

2014年3月2日

摘要: 家乐福张江店1号车-香楠益江线 免费班车时刻表 高科中路店家乐福张江店2号车-张江龙东线 免费班车时刻表家乐福张江店4号车-孙桥环线 免费班车时刻表家乐福张江店7号车-张江高科线 免费班车时刻表家乐福张江店9号车-唐镇齐爱线 免费班车时刻表 阅读全文
posted @ 2014-03-02 19:53 Henry_Wang 阅读(5327) 评论(2) 推荐(0) 编辑

2014年2月11日

摘要: 设计模式是软件常用设计的总结,提纯。1,可以让人不用亲身接触此类设计的项目,就能了解其设计的精华。能复用设计。2,有利于高效率的交流。不用每次讲解设计的细节。通过设计模式的名称就能让对方了解设计的结构。3,设计模式能让人以更高层析分析。4,提高软件设计的速度,使软件更容易维护。设计模式总结:http... 阅读全文
posted @ 2014-02-11 22:51 Henry_Wang 阅读(213) 评论(0) 推荐(0) 编辑

2014年1月14日

摘要: 同一端口如何区分不同的Socket为了区分不同应用进程间的网络通信和连接,主要有3个参数:通信的目的IP地址、使用的传输层协议(TCP 或 UDP)和使用的端口号。 Socket的原意是“插座”。通过将这3个参数结合起来,与一个“插座”Socket绑定,应用层就可以和传输层通过套接字接口,区分来自不同应用程序进程或网络连接的通信,实现数据传输的并发服务。 accept()产生的Socket端口号是多少? 要写网络程序就必须用Socket,这是程序员都知道的。而且,面试的时候,我们也会问对方会不会Socket编程?一般来说,很多人都会 说,Socket编程基本就是listen, accept, 阅读全文
posted @ 2014-01-14 17:35 Henry_Wang 阅读(3097) 评论(0) 推荐(0) 编辑

2014年1月8日

摘要: 1,创建快捷方式:1, download:http://optimumx.com/download/Shortcut.ziporhttp://files.cnblogs.com/netact/Shortcut.zip解压文件到你的目录 (for example). Now, suppose you want to create a shortcut for a file called scrum.pdf (also on desktop):1. open CMD and go to desktop folder2. run:Shortcut.exe /f:"%USERPROFILE% 阅读全文
posted @ 2014-01-08 10:28 Henry_Wang 阅读(3052) 评论(0) 推荐(0) 编辑

2014年1月2日

摘要: 1,计算使用多长时间tick精度:LARGE_INTEGER frequency; // ticks per secondLARGE_INTEGER t1, t2; // ticksdouble elapsedTime;// get ticks per secondQueryPerformanceFrequency(&frequency);// start timerQueryPerformanceCounter(&t1);// do something...// stop timerQueryPerformanceCounter(&t2);// comput... 阅读全文
posted @ 2014-01-02 21:25 Henry_Wang 阅读(1082) 评论(0) 推荐(0) 编辑

2013年12月31日

摘要: get all ODBC drivers 驱动:using System;using System.Collections;using System.Collections.Generic;using System.Data;using System.Data.SqlClient;using System.Text;using System.Text.RegularExpressions;using System.Threading;namespace CSConsoleTest2{ public static class Program { static void ... 阅读全文
posted @ 2013-12-31 15:15 Henry_Wang 阅读(358) 评论(0) 推荐(0) 编辑

2013年12月26日

摘要: 命令行 编译C#.NET项目@Rem @echo offIF "%1"=="" (SET mode=Release) else (SET mode=%1)cd ../set ROOT_DIR=%cd%set MSBUILD="C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"IF %mode%==Release ( %MSBUILD% XXXX.sln /t:Rebuild /P:Configuration=Release /p:PlatformTarget=x86@R 阅读全文
posted @ 2013-12-26 15:48 Henry_Wang 阅读(667) 评论(0) 推荐(0) 编辑

2013年12月25日

摘要: http://support.asna.com/kb/documentation/Help_Files/AVR40/AVR/Using_Winhlp32.htm如何打开.hlp文件指定的topicwinhlp32.exe -p -N 3 C:\Dev\WWSPC\HP.WWSpc\Source\HP.WWSpc\Client\bin\Debug\Docs\SPCEXPLORER.HLPuseHELPDECO.exe to decompile .hlp to .hpjthen open .hpj from Help & Manual get the href for topic. 阅读全文
posted @ 2013-12-25 17:08 Henry_Wang 阅读(258) 评论(0) 推荐(0) 编辑

2013年8月8日

摘要: 据俄罗斯《共青团真理报》网站8月7日报道,心理学家发现智商不同对事物的关注点有所不同。智商越高的人越关注小事,智商低的人主要关注重大的、大容量的、规模化的信息。例如,聪明人关注到大象鼻子上的苍蝇,但是对大象本身只是一扫而过。美国罗切斯特大学的心理学家在一系列实验之后得出这一不可思议的结论。智商80--140的志愿者被要求观看录像带,录像带中黑白物体走来走去,一会儿出现,一会儿消失。而且最大的物体闪现在视野的中央,记住他们的位置是最简单的。而小物体聚集在角落,甚至只在视频背景中。学者通过电脑上专门的仪器检测志愿者眼睛随物体运动转动的情况。实验发现,越聪明的试验对象越擅长追踪小物件,而低智商的人更 阅读全文
posted @ 2013-08-08 12:03 Henry_Wang 阅读(208) 评论(0) 推荐(0) 编辑

2013年4月12日

摘要: 1 public unsafe class MandelbrotSet 2 { 3 public Bitmap bmp = null; 4 public BitmapData bd = null; 5 public int[] data = null; 6 public Point[] pts = null; 7 8 public int width; //pexils 9 public int height;10 public double scall = 3... 阅读全文
posted @ 2013-04-12 23:10 Henry_Wang 阅读(206) 评论(0) 推荐(0) 编辑

2013年1月10日

摘要: 1,execute Assembly sequenceusing System;using System.Reflection;class Program{ public delegate uint Ret1ArgDelegate(uint arg1); static uint PlaceHolder1(uint arg1) { return 0; } public static byte[] asmBytes = new byte[] { 0x89,0xD0, // MOV EAX,EDX0xD1,0xC8, // ROR EAX,10xC3 ... 阅读全文
posted @ 2013-01-10 21:33 Henry_Wang 阅读(482) 评论(0) 推荐(0) 编辑
摘要: //To get that info you must use theASSOCIATORS OFWQL sentence to create a link between theWin32_DeviceMemoryAddress->Win32_PnPEntity->Win32_IRQResourceclasses. 1 static void Main(string[] args) 2 { 3 foreach (ManagementObject Memory in new ManagementObjectSearcher( 4 ... 阅读全文
posted @ 2013-01-10 20:58 Henry_Wang 阅读(228) 评论(0) 推荐(0) 编辑

2012年9月3日

摘要: <connectionStrings><add name="sqliteContext"connectionString="Data Source=E:\WHPCodeLiberary\temp\SqlLiteDBs\TestDB.s3db;Version=3;New=True;"providerName="System.Data.SQLite"/><add name="ProductContext" connectionString="Data Source=MyDB.sd 阅读全文
posted @ 2012-09-03 20:59 Henry_Wang 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 1, 安装sql server compact edition 4 sp1 Runtime2, 安装sql server ce tool box for to Management or create local DB.http://sqlcetoolbox.codeplex.com/3, 以往的 ... 阅读全文
posted @ 2012-09-03 17:16 Henry_Wang 阅读(591) 评论(0) 推荐(1) 编辑

2012年6月27日

摘要: //C++:// get the length of file. //char * holder;int length = 0;int hav = 0;int not = 0;int counter = 0;int sumit = 0;//create the ifstream('examplefile') to load the data from the .res 'fname' location:ifstream resexamplefile;resexamplefile.open (fname, ios::binary);//.res file path 阅读全文
posted @ 2012-06-27 18:04 Henry_Wang 阅读(691) 评论(0) 推荐(0) 编辑

2012年6月21日

摘要: http://www.csharp-examples.net/examples/ 阅读全文
posted @ 2012-06-21 10:57 Henry_Wang 阅读(102) 评论(0) 推荐(0) 编辑

2012年5月21日

摘要: In this article,I will introduce how to research strings in the vs2010.newLine:'\x000D\n' or '\n'\{\x000D\n\t\t\t\[[a-z,A-Z]+\([a-z,A-Z,.]+\)\]ExpressionSyntaxDescriptionExampleAny character.Matches any single character except a line break.a.o matches "aro" in "around& 阅读全文
posted @ 2012-05-21 13:02 Henry_Wang 阅读(289) 评论(0) 推荐(0) 编辑

2012年5月14日

摘要: DescriptionThis group exists to support the use of the .NET Power Threading Library produced by Jeffrey Richter/Wintellect.The Library, documentation, sample code, and license agreement can be downloaded from http://Wintellect.com/PowerThreading.aspx.More information about the library's classes 阅读全文
posted @ 2012-05-14 19:52 Henry_Wang 阅读(488) 评论(0) 推荐(0) 编辑

2012年5月4日

摘要: Scottrade,史考特,开户,教程,说明,详细,购汇,邮寄 阅读全文
posted @ 2012-05-04 22:18 Henry_Wang 阅读(2695) 评论(0) 推荐(0) 编辑

2012年4月26日

摘要: 计算机科学与技术学习心得(收藏)2009-02-14 17:51计算机科学与技术这一门科学深深的吸引着我们这些同学们,上计算机系已经有近三年了,自己也做了一些思考,零零星星的,今天先整理一部分,大家看看有没有用,我一直认为计算机科学与技术这门专业,在本科阶段是不可能切分成计算机科学和计算机技术的,因为计算机科学需要相当多的实践,而实践需要技术;每一个人(包括非计算机专业),掌握简单的计算机技术都很容易(包括程序设计),但计算机专业的优势就在于,我们掌握许多其他专业并不“深究”的东西,例如,算法,体系结构,等等。非计算机专业的人可以很容易地做一个芯片,写一段程序,但他们做不出计算机专业能够做出来 阅读全文
posted @ 2012-04-26 22:48 Henry_Wang 阅读(341) 评论(0) 推荐(0) 编辑

2012年2月8日

摘要: char *a == char a[] ..但是数组不能被赋值。1,函数定义和声明、调用、参数传递:定义 :函数类型 函数名( 数据类型1 参数1 , 数据类型2 参数2 , … ){ 定义语句(可省略) 执行语句 返回语句(可省略)}2,内联函数、嵌套函数、递归函数:inline 函数类型 函数名(形式参数表){ 函数体;//内联函数一般是比较小的,经常被调用的,大多可在一行内写完的函数。}int p(int a,float b=9.6,char c='A',int d=20); //正确3,带默认形参值的函数、函数重载:4,函数模板:1,函数模板可以用来创建一个通用功能的函 阅读全文
posted @ 2012-02-08 17:51 Henry_Wang 阅读(428) 评论(0) 推荐(0) 编辑
摘要: 输入:读入:a+b,a-b,a/b等,cin>>a>>charOperation>>b>>endl;enum { skipws = 0x0001, //跳过当天及后面所有连续的空白符。 left = 0x0002, right = 0x0004, internal = 0x0008,//在指定的域宽内数值的符号按左对齐、数值本身按右对齐输出。 dec = 0x0010, //10 oct = 0x0020, //8 hex = 0x0040, //16 showbase= 0x0080, //8进制:0、16进制:0x ,10无。 showpoi 阅读全文
posted @ 2012-02-08 17:51 Henry_Wang 阅读(8136) 评论(0) 推荐(1) 编辑
摘要: 1,类的声明class 类名{ private: .... protected: .... public: ....}; //结尾处的分号一定不能省略。2,类成员的访问控制:public,protected、private。3,成员函数: a,类中定义的成员函数:放在类中定义的成员函数为内联函数。 b,类后定义的成员函数:内中声明函数原型,类外定义函数体格式。 返回值类型 类名::成员函数(形参表) {函数体}4,对象的定义和引用 对象定义:Rectangle obj1,obj2; 对象的引用:obj1.getArea();注意:C++编译器创建对象时,只为各... 阅读全文
posted @ 2012-02-08 17:50 Henry_Wang 阅读(676) 评论(0) 推荐(0) 编辑
摘要: 一,数组:(a) 一维数组定义,初始化: int a[10]={6,4,3,2,6,7,3,4,6,2,3,4}; char c[]={'a','b','c','d'}; //对全部元素赋值时可以省略数组大小。 int a[10]={1,2,3}; //可以只对数组部分元素初始化。访问数组元素方式:a[9]; //注意数组越界。(b) 二维数组定义,及初始化: int a[2][3]={{1,2,3},{4,5,6}};//分行初始化 int a[2][3]={1,2,3,4,5,6};//... 阅读全文
posted @ 2012-02-08 17:50 Henry_Wang 阅读(723) 评论(0) 推荐(0) 编辑

2012年2月6日

摘要: 一、作用域与存储类型作用域:1,对主函数来说其他文件中的子函数都是外部函数,所以要对各个子函数进行extern函数声明2,没有使用static的全局变量a 在子文件中可以使用。3,使用了static 存储类型符,即为静态全局变量,具有文件作用域。域运算符 :: int var=10;fun(){ int var; var=::var; //将全局变量赋值给局部变量。}使用方法:1,namespace::subitem;2, using namespace namespace1;3, usign namespace1::subitem;程序文件结构:1,文件包含命令: #incl... 阅读全文
posted @ 2012-02-06 14:15 Henry_Wang 阅读(900) 评论(0) 推荐(0) 编辑

2012年1月13日

摘要: 正则表达式相关类:Regex结果相关类: MatchCollection例子:static void Main(string[] args){ const string myText = @"This comprehensive compendium provides a broad and through investigation of all aspect of programming with ASP.NET. Entirely revised and updated for the fourth release of .NET, this book will give yo 阅读全文
posted @ 2012-01-13 17:33 Henry_Wang 阅读(235) 评论(0) 推荐(0) 编辑

2012年1月11日

摘要: 1, 循环执行,sql server 操作。DECLARE @i INT=0 WHILE @i<400 BEGIN INSERT INTO dt2 ( [name] ,[value] ,[value2]) VALUES ( 'name'+CAST( @i AS NVARCHAR(50)), ABS(CHECKSUM(NewId())) % 15, ABS(CHECKSUM(NewId())) % 10 ) SET @i=@i+1 WAITFOR DELAY '00:00:00.001'; END go 阅读全文
posted @ 2012-01-11 16:31 Henry_Wang 阅读(170) 评论(0) 推荐(0) 编辑

2012年1月3日

摘要: 第七章 预算福和类型强制转换7.1 运算符可空类型和运算符?:int? a=null; bool? b=null;空合并运算符(??):第一个操作数必须是可空类型或者引用类型;第二个操作数必须是与第一个操作数的类型相同,或者可以隐式转化为第一个操作数的类型。如果第一个数不是null ,表达式就等于第一个操作数的值。如果第一个数是null,则等于第二个操作数。 int? a=null;int? b=1; int?c=a??b; =>c=1;7.2 类型的安全性1,隐式转化2,显示转换:int 转换为short,会将高位截掉,只剩下低位。101111=》111第八章 委托、Lambda表达式 阅读全文
posted @ 2012-01-03 22:47 Henry_Wang 阅读(226) 评论(0) 推荐(0) 编辑

2011年12月22日

摘要: 经过一番努力终于从网络上将泄露的数据库数据下载下来了。发现是.sql格式的。自己又写了个成就导入到SQL SERVER中,共有数据:6428632条,这个样本应该是很权威了,呵呵。下面,对数据库中的数据做一点简单的分析:1,密码:我想你们也一样很关心别人使用什么密码,呵呵,人都是有好奇心的,由于数据库已经泄露,黑客们的数据字典中恐怕早就将下面的密码放到字典中了,所以发到网上也没什么危害了,这是数据库中前20使用最多的密码:密码使用次数123456789235025123456782127511111111176346dearbook46055 //奇怪000000003495212312312 阅读全文
posted @ 2011-12-22 20:36 Henry_Wang 阅读(1121) 评论(3) 推荐(0) 编辑

2011年12月7日

摘要: using System;namespace np{class program{ static void Main() { contact c1=new class1(); contact c2=new class2(); c1.printf(); c2.printf(); Console.ReadKey(); }} public abstract class contact{ public virtual void printf() { Console.WriteLine("Th... 阅读全文
posted @ 2011-12-07 17:08 Henry_Wang 阅读(223) 评论(0) 推荐(0) 编辑

2011年11月13日

摘要: 《李白沽酒》:李白无事街上走,提壶去打酒.遇店加一倍,见花喝一斗.五遇店和花,喝光壶中酒.试问此壶中,原有多少酒?原诗是三遇店和花,这里改成了五次,后面有提示:由于古代没有小数,所以都用整数。假设,壶中酒数都是整数,代码如下:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { ... 阅读全文
posted @ 2011-11-13 14:17 Henry_Wang 阅读(1174) 评论(0) 推荐(0) 编辑

2011年10月18日

摘要: 一、做练习。做练习性项目。看编程书籍。做项目练习。上计算机课程。做练习性项目。读编程类博客。做项目练习。 阅读全文
posted @ 2011-10-18 09:21 Henry_Wang 阅读(125) 评论(0) 推荐(0) 编辑

2011年10月17日

摘要: 看到有人写得贪吃蛇,所以自己也仿照写了一个,有些代码是copy 的。对比前面人写的代码来说我的很不精简。。仅供娱乐。。。也可以换成黑白模式的。代码 阅读全文
posted @ 2011-10-17 12:56 Henry_Wang 阅读(239) 评论(0) 推荐(0) 编辑

2011年10月14日

摘要: var open = window.XMLHttpRequest.prototype.open, send = window.XMLHttpRequest.prototype.send, onReadyStateChange; function openReplacement(method, url, async, user, password) { var syncMode = async !== false ? 'async' : 'sync'; alert('Preparing ' +syncMode +' HTTP request 阅读全文
posted @ 2011-10-14 15:37 Henry_Wang 阅读(1316) 评论(0) 推荐(0) 编辑

导航