2007年9月14日
摘要: using System; public class ShellSorter { public void Sort(int [] list) { int inc; for(inc=1;inc0;inc/=3) { for(int i=inc+1;iinc)&&(list[j-inc-1]>t)) { ... 阅读全文
posted @ 2007-09-14 00:24 夜帝 阅读(197) 评论(0) 推荐(0) 编辑
摘要: using System; public class InsertionSorter { public void Sort(int [] list) { for(int i=1;i0)&&(list[j-1]>t)) { list[j]=list[j-1]; --j; } ... 阅读全文
posted @ 2007-09-14 00:22 夜帝 阅读(164) 评论(0) 推荐(0) 编辑
摘要: using System; public class SelectionSorter { // public enum comp {COMP_LESS,COMP_EQUAL,COMP_GRTR}; private int min; // private int m=0; public void Sort(int [] list) { for(int i=0;i... 阅读全文
posted @ 2007-09-14 00:21 夜帝 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 最近帮人做个关于软件注册的东东,对方一定要防止大量复制和防止注册码通用,所以就想到用机器的硬件信息进行注册码的生成,所以就牵涉到在获取机器硬件信息。。。 在.net环境下(用VC#描述)获取机器的硬件信息,要用到一个类库(System.Management.dll),在解决方案资源管理器中添加System.Management 即可 我们可以将该程序编译成.dll文件,便于以后调用; 在程序... 阅读全文
posted @ 2007-09-14 00:09 夜帝 阅读(254) 评论(0) 推荐(0) 编辑
  2007年9月13日
摘要: using System.Runtime.InteropServices; public class Win32 { public const Int32 AW_HOR_POSITIVE = 0x00000001; // 从左到右打开窗口 public const Int32 AW_HOR_NEGATIVE = 0x00000... 阅读全文
posted @ 2007-09-13 23:58 夜帝 阅读(177) 评论(0) 推荐(0) 编辑