上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: 转换后将内码显示出来?STRCONV(STRCONV('我',5),15)?STRCONV(STRCONV('1162',16),6) 阅读全文
posted @ 2012-12-16 16:59 wahgon 阅读(522) 评论(0) 推荐(0) 编辑
摘要: windows字符映射表的搜索功能开始我还以为是输入一个字符,就可以搜索到该字符的unicode码,但是无论怎样都搜都搜不出来,最后找了资料和试验,终于找到这个搜索的实际用途,它是将下图中1输到2中去搜索,但比例中文,它的1都归为"中日韩象形文字",如果要搜索一个汉字的话,这个搜索功能根本就起不到任何作用. 阅读全文
posted @ 2012-12-16 13:10 wahgon 阅读(446) 评论(0) 推荐(0) 编辑
摘要: 插入排序,由第二位开始,一个个往前适当的位置(比左边大,比右边小)插入using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication7{ class Class5 { //插入排序,由第二位开始,一个个往前适当的位置(比左边大,比右边小)插入 static void Main(string[] args) { int[] ary = { 32, 432, 5, 3... 阅读全文
posted @ 2012-11-29 23:25 wahgon 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 看MSDN时,关键看这句话System.Drawing Namespace命名空间这句话,从这句话开始入手就行了.TheGraphicsclass provides methods for drawing to the display device.Classes such asRectangleandPointencapsulate GDI+ primitives.ThePenclass is used to draw lines and curves, while classes derived from the abstract classBrushare used to fill th 阅读全文
posted @ 2012-11-25 16:29 wahgon 阅读(276) 评论(0) 推荐(0) 编辑
摘要: C#获取Excel各类信息的方法http://hi.baidu.com/it_program/item/66459ae9e7cd08395a7cfb33Cell1Type: System.ObjectThe name of the range in A1-style notation in the language of the application.It can include the range operator (a colon), the intersection operator (a space), or the union operator (a comma).It can a 阅读全文
posted @ 2012-11-21 22:18 wahgon 阅读(475) 评论(0) 推荐(0) 编辑
摘要: 对于文件,数据库,网络等非.NET资源,要显式地释放资源,MSDN有个例子using System;using System.ComponentModel;// The following example demonstrates how to create// a resource class that implements the IDisposable interface// and the IDisposable.Dispose method.public class DisposeExample{ // A base class that implements IDisposa... 阅读全文
posted @ 2012-11-20 22:17 wahgon 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 通常情况下我们执行数据库操作时都会将SqlConnection实例先打开,用完之后就将它关闭.但万一我忘记关闭了,会造成什么后果.讲后果之前,我们先来说下SqlConnection是怎样和数据库建立连接的,当首次open时,数据库会对发来的连接串进行一系列验证,这个过程会花费比较长的时间,然后为它分配一个连接池,当下次再用这个串时,这连串的验证就可以跳过了,所以耗很短的时间就完成了open.但问题来了,如果再次连接时,它发现这个串对应的连接池没有关闭,则会重新分配一个连接池,当然也会进行那一系列验证,现在还会造成SQL进程不断增加.如下图,所以我们在open完之后一定要记录关闭. 阅读全文
posted @ 2012-11-20 00:49 wahgon 阅读(534) 评论(0) 推荐(0) 编辑
摘要: 以下代码可以对比FileStream 和BufferedStream的性能,但一定要注意BufferedStream初始时第二个参数一定要比第一个参数的流的大小要大,不然内存缓存就可能用不上static void Main(string[] args) { Random rd = new Random(); byte[] bb=new byte[1024]; rd.NextBytes(bb); FileStream fs = new FileStream(@"C:\Users\jim\Desk... 阅读全文
posted @ 2012-11-18 23:14 wahgon 阅读(239) 评论(0) 推荐(0) 编辑
摘要: unicode 统一的一种编码,它包括ucs-2,ucs-4ucs 通用字符集ucs-2 两个字节编码,是常见的unicode编码ucs-4 四个字节编码window 文本的unicode是little endian 低位开头对于英文来说,直接用unicode来储存是非常浪费空间和不利于传输,所以就出现了UTF-8,UTF-8是unicode和一种实现方式,只是它的储存方式有所不同,它每个字节都有个头标记,如0XXX XXXX开头就表示一个字节为一个unicode编码,110X XXXX 10XX XXXX两个字节为一个unicode编码,UTF-16多出的部分是ucs-2还是ucs-4??1 阅读全文
posted @ 2012-11-16 21:17 wahgon 阅读(302) 评论(0) 推荐(0) 编辑
摘要: <form action="HTMLPage2.htm?param4=param4" method="post"> <input type="hidden" name="param1" value="param1"> <input type="hidden" name="param2" value="param2"> <input type="text" name=" 阅读全文
posted @ 2012-11-14 22:09 wahgon 阅读(278) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 下一页