Fly
Believe Me I Can Fly , I Am Singing In The Sky
摘要: 要求:使用html5中file控件实现多文件上传,如实传图片显示图片。并且添加进度显示上传进度html+一般处理程序。<!DOCTYPE html ><html > <head> <title>图片上传</title> <script src="jquery-1.4.1.js" type="text/javascript"></script> <script type="text/javascript"> function fileSele 阅读全文
posted @ 2012-12-17 17:45 梁彦伟 阅读(3790) 评论(0) 推荐(1)
摘要: 正则表达式 命名空间:using System.Text.RegularExpressions; 常用的类: Regex MatchCollection Match Group GroupCollection 常用的方法: Regex.IsMatch(); 返回值bool Regex.Match(); 返回值Match Regex.Matches(); 返回值MatchCollection ... 阅读全文
posted @ 2012-07-06 23:07 梁彦伟 阅读(415) 评论(1) 推荐(0)
摘要: 获得当前路径的方法:1Directory.GetCurrentDirectory(); //注意:====不推荐使用=== 此方法确实能过的文件的路径。但是肯能会被改动。 例: string path = Directory.GetCurrentDirectory(); Console.WriteLine(path); Console.ReadKey(); //结果:"D:\lianxi\作业\深考与浅考\bin\Debug" Directory.SetCurrentDirectory(@"R:\"); string path = D... 阅读全文
posted @ 2012-07-04 23:05 梁彦伟 阅读(207) 评论(0) 推荐(0)
摘要: 二进制序列化: 序列化就是将对象从内存中移到硬盘(使用FileStream)或者向网络(使用NetWorkStream)中传送。可认为是格式化数据。 1 使用时先添加命名空间: using System.Runtime.Serialization.Formatters.Binary; 2 BinaryFormatter bf = new BinaryFormatter(); 实例化 3 使用 [Serializable] 标记,将它添加到要序列化的对象上; 例1:[Serializable] class Person { public int Num; public st... 阅读全文
posted @ 2012-07-03 23:06 梁彦伟 阅读(342) 评论(0) 推荐(0)
摘要: 文件操作常用相对类:File // 操作文件,静态类。FileInfo //文件类,用来描述一个文件对象,(获取指定目录下的所有文件,返回一个数组) Directory //操作目录(文件夹),静态类。DirectoryInfo //文件夹的一个“类”,用来描述一个文件夹(目录)对象。返回一个DirectoryInfo数组,其用法与Directory相似。Path // 对文件路径的操作。Stream // 文件流,抽象类 FileStream // 文件流 MemoryStream//内存流 NetWorkStream//网络流 StreamReader ... 阅读全文
posted @ 2012-07-02 23:58 梁彦伟 阅读(635) 评论(0) 推荐(0)