知行合一

享受过程 漠视结果

导航

上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页

2013年1月31日 #

钩子示例

摘要: using System;using System.Collections.Generic;using System.Text;using System.Runtime.InteropServices;using System.Reflection;using System.IO;using System.Windows.Forms;namespace WindowsApplication1{ public delegate IntPtr HookProc(int code, IntPtr wparam, IntPtr lparam); public enum HookType /... 阅读全文

posted @ 2013-01-31 10:37 项羽 阅读(197) 评论(0) 推荐(0) 编辑

tcp断开过程

摘要: Client 消息 Server close() ------ FIN -------> FIN_WAIT1 CLOSE_WAIT <----- ACK ------- FIN_WAIT2 close() <------ FIN ------ TIME_WAIT LAST_ACK ------ ACK -------> CLOSED CLOSED 阅读全文

posted @ 2013-01-31 10:31 项羽 阅读(161) 评论(0) 推荐(0) 编辑

2013年1月30日 #

JavaDemo

摘要: import java.awt.Button;import java.awt.Color;import java.awt.FlowLayout;import java.awt.Frame;import java.awt.Panel;import java.awt.event.WindowAdapter;import java.awt.event.WindowEvent;public class HelloForm extends Frame { public HelloForm() { setTitle("Java Demo"); setSize(600, 4... 阅读全文

posted @ 2013-01-30 11:08 项羽 阅读(397) 评论(0) 推荐(0) 编辑

Base64

摘要: private string Encode(string str) { byte[] buffer = Encoding.Default.GetBytes(str); byte b1, b2, b3, c1, c2, c3, c4; string mes = string.Empty; int count = buffer.Length / 3; int resst = buffer.Length % 3; for (int i = ... 阅读全文

posted @ 2013-01-30 11:02 项羽 阅读(271) 评论(0) 推荐(0) 编辑

2013年1月21日 #

安装卸载服务

摘要: @echo 安装WindowService@Set Path=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;@Set svn_dir=%cd%installutil E:\地域連携\AreaConnection\BIN\debug\Necsoft.Medical.Area.Svc.exe@echo 成功!@echo 卸载WindowService@Set Path=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;@Set svn_dir=%cd%installutil E:\地域連携\AreaConnec 阅读全文

posted @ 2013-01-21 10:00 项羽 阅读(160) 评论(0) 推荐(0) 编辑

2012年12月28日 #

tcptrans

摘要: using System;using System.Collections.Generic;using System.Text;using System.Net;using System.Net.Sockets;using System.Threading;namespace FuckTrans{ public class SocketServer { private Dictionary<int, Socket> _clientList = new Dictionary<int, Socket>(); public delegate void Serv... 阅读全文

posted @ 2012-12-28 18:00 项羽 阅读(351) 评论(0) 推荐(0) 编辑

2012年12月26日 #

文件复制

摘要: FileStream fr = new FileStream(textBox1.Text, FileMode.Open, FileAccess.Read); FileInfo fi = new FileInfo(openFileDialog1.FileName); FileStream fw = new FileStream("f:\\"+fi.Name , FileMode.Create, FileAccess.Write); if (fr.CanRead) { ... 阅读全文

posted @ 2012-12-26 14:48 项羽 阅读(184) 评论(0) 推荐(0) 编辑

2012年9月7日 #

生成不重复的随机数数组,算法优化

摘要: privatevoidForm1_Load(objectsender,EventArgse){stringresult="";System.Diagnostics.Stopwatchwatch=newSystem.Diagnostics.Stopwatch();watch.Start();List<int>list=newList<int>();Randomrandom=newRandom();while(list.Count<100){intt=random.Next(0,100);if(!list.Contains(t)){list.Add 阅读全文

posted @ 2012-09-07 18:21 项羽 阅读(278) 评论(0) 推荐(0) 编辑

2012年7月26日 #

数据库连接字符串大全

摘要: http://www.connectionstrings.com/ 阅读全文

posted @ 2012-07-26 16:59 项羽 阅读(158) 评论(0) 推荐(0) 编辑

2012年7月5日 #

DataGridView 合并同一列中值相同的相邻单元格 合并单元格

摘要: ///<summary>///合并同一列中值相同的相邻单元格///</summary>///<paramname="dgv">DataGridView</param>///<paramname="columnIndexList">要合并的列的索引列表</param>///<paramname="e">当前单元格的属性访问器</param>privatevoidMergeCellInOneColumn(DataGridViewdgv,List 阅读全文

posted @ 2012-07-05 16:26 项羽 阅读(3738) 评论(1) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页