最近用到读取csv文件,以下是源码,读取csv文件,转化为一个String类型的list对象,其中对中午进行了处理,否则会出现乱码,filepath为csv文件的路径/** *读取csv文件 */ publicstaticList<String>readCsv(Stringfilepath){ List<String>list=newArrayList<Stri..
分类:
编程语言 时间:
2014-12-09 20:00:22
阅读次数:
278
【SQLite】 语法一 . 创建数据库 1. 只需创建数据库,只需创建文件,操作时将连接字符串指向该文件即可 2. 连接字符串 : data source = FilePath; 不能加密所以没有密码二 . 创建表 1. 语法 : CREATE TABLE TableName(str TEX...
分类:
数据库 时间:
2014-12-05 12:09:42
阅读次数:
227
费了好大劲终于搞定了让ZBS支持打开GBK文件了。记录下过程:看源码发现ZBS打开文件时会调用src\editor\commands.lua中的LoadFile函数,代码如下:1 local file_text = FileRead(filePath)2 if file_text then3 ...
分类:
其他好文 时间:
2014-12-04 19:40:18
阅读次数:
146
欢迎大家来吐口水、、今天查了一天NPOI的资料、发现网上的都太高大上了、自己总结了一版不多说、直接上代码public void ExportToExcelTwo(System.Data.DataTable dt, string colTitle, string filePath) { ...
分类:
其他好文 时间:
2014-12-04 19:32:48
阅读次数:
174
1.读写文件第一步创建文件流 语法: FileStream 文件对象=new FileStream(string FilePath, FileMode); FilePath: 文件路径 FileMode: 打开文件的模式,是一个枚举类型 Create: 用于指定的名称新建一个文件,如果...
分类:
其他好文 时间:
2014-12-04 13:46:30
阅读次数:
189
Android客户端主要代码:
public ImageHttp(Context context) {
super(context);
filePath = context.getCacheDir().getAbsolutePath();
}
public void uploadUserImg(Bitmap bitmap,
IHttpSenderCallBa...
分类:
Web程序 时间:
2014-12-03 17:14:52
阅读次数:
150
直接上代码:NSData*data=[[NSStringstringWithFormat:@"%@\n",self.textField.text]dataUsingEncoding:NSUTF8StringEncoding];
NSString*document=[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES)firstObject];
NSString*filePath=[document..
分类:
其他好文 时间:
2014-12-03 14:33:28
阅读次数:
184
判断一个文件是否是图片文件的方法,采用BitmapFactory去decode然后根据返回的Options参数来确定: public static boolean isImageFile(String filePath) { Options options = new Options(); op.....
分类:
移动开发 时间:
2014-12-01 15:47:37
阅读次数:
847
/** ?* 数据库备份与恢复类 ?* @author Administrator ?*/ public class Beifen { /** * 数据库备份 * @param cmd 备份命令 * @param filePath 备份文件保存位置 * @return * @throws IOException */ public ...
分类:
数据库 时间:
2014-11-30 01:01:44
阅读次数:
256
path类string str=@"c:\3000soft\red spider\data\message\老赵.wav";Path.GetFileName(str);\\获取文件名Path.GetFileNameWithoutExtension(str);//获取文件名但是不包括扩展名Path.G...
分类:
其他好文 时间:
2014-11-29 15:45:04
阅读次数:
124