04 2012 档案
摘要:在 stream流 和 byte[] 中查找(搜索)指定字符串这里注重看的是两个 Search 的扩展方法,一个是 stream类型的扩展,另一个是 byte[] 类型的扩展,如果大家有更好的“算法”,请给回复,我们一起优化!-- 常用扩展代码,需要这部分代码的支持!using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Drawing;namespace Ims.Bll{ /// <summary> /// stre
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Drawing;namespace Ims.Bll{ /// <summary> /// stream 、 string 、byte[] 间的转换扩展方法类 /// </summary> public static class StreamExtend { #region Stream 扩展 /// <summary> /// Stream
阅读全文
摘要:字符串string和内存流MemoryStream及比特数组byte[]互转比较定义string变量为str,内存流变量为ms,比特数组为bt1.字符串转比特数组(1)byte[] bt=System.Text.Encoding.Default.GetBytes("字符串");(2)byte[] bt=Convert.FromBase64String("字符串");2.字符串转流(1)MemoryStream ms=new MemoryStream(System.Text.Encoding.Default.GetBytes("字符串"
阅读全文
摘要:方法很简单,不过有时候我们进入了思维定势中出不来了,导致想不到解决方案!一般说打开页面我们首先想到的就是 window.open 这个方法,或者是 通过 jquery.ajax 方法但是他们不能进行“大数据量”的 post 提交说说下面的方式,就是在页面中嵌入一个 form 标签(注意:这个标签不能和其他的 from 嵌套否则...,你懂的!)这个标签设置为不可见 style="display:none;" ,如果要打开提交页面 target 属性是关键,就是设置为"_blank"即在新页面打开。1.页面<form><input typ
阅读全文

浙公网安备 33010602011771号