zip file 将多个文件压缩成一个zip文件的函数 * @$files 数组类型 实例array("1.jpg","2.jpg"); * @destination 目标文件的路径 如"c:/androidyue
支持任意行列数据生成excel文件,暂未添加单元格样式和对齐
action="upload_pic" method="post" enctype="multipart/form-data"> 文件:
描述:
VC中提供了API函数进行INI文件的读写操作,但是微软推出的C#编程语言中却没有相应的方法,下面是一个C# ini文件读写类,从网上收集的,很全,就是没有对section的改名功能,高手可以增加一个。
public void ungzip(string path, string decomPath, bool overwrite) { //for overwriting purposes if (File.Exists(decomPath)) { if (overwrite) { File.Delete(decomPath); } else { throw new IOException("Th
(FileNotFoundException e) { System.err.println("配置文件config.properties找不到!"); e.printStackTrace(); } catch
$filepath; //指定上传文件保存的路径 private $allowtype=array('gif', 'jpg', 'png', 'jpeg'); //充许上传文件的类型 private $maxsize=1000000;
JarFile; import javax.swing.ImageIcon; /** * * 功能:读取资源文件类
* 时间:2010-11-24
* 备注:
* * @author
使用前请先安装openpyxl: easy_install openpyxl 通过这个模块可以很方便的导出数据到Excel from openpyxl.workbook import Workbook from openpyxl.writer.excel import ExcelWriter from openpyxl.cell import get_column_letter from open
Text; using System.Windows.Forms; namespace 读取host文件 { public partial class Form1 : Form { public Form1()
大概原理 遍历项目中的所有非排除文件,然后获取 文件修改时间晚于文件上一次修改时间 的文件 然后将这些文件,通过ftp上传到对应的目录 具体代码如下: 因为只是工具,代码很乱,见谅
本类主要功能有: 1.创建文件功能; 2.向文件中写入字节数组; 3.向文件中写入字符串; 4.从文件中读取字节数组; 5.从文件中读取字符串; import java.io.File;
InputStream input = httpConnection.getInputStream(); // 创建随机文件 flist.add(new File(name)); RandomAccessFile oSavedFile
package main import ( "fmt" "go-ssh/ssh" "io" "os" ) const ( user = "user" ip_port = "ip_port" password = "Passwd" ) func main() { PassWd := []ssh.AuthMethod{ssh.Password(password)} Conf := ssh.Client
/** * 默认GB18030 */ public static final String detectCharset(byte[] byteArray){ // 建立InputStream ByteArrayInputStream bais = new ByteArrayInputStream(byteArray); // 默认编码 String utf8 = "UTF-8"; String c
最近在做文件下载这块的东西,研究了一下多线程文件下载这块的知识。这里只说一下原理,具体实现请看代码,已经写了注释了。 主要原理 为了加快下载速度,每个文件固定N个线程来下载,然后每个线程负责下
使用GZIP格式压缩文本以缩减文件大小,于是乎接触到了 GZIPInputStream / GZIPOutputStream 这两个类,还有 ByteArrayOutputStream 这个类。这里写了一个简单的示例代码记录一下
md5_file(name): m = md5() a_file = open(name, 'rb') #使用二进制格式读取文件内容 m.update(a_file.read()) a_file.close() return m
<HTML> <FORM ACTION='cgi-bin/action.py' METHOD='POST' enctype='multipart/form-data'> <input type='hidden' name='user' value='lola'> <input type='hidden' name='action' value='upload'> <BR><I>FILE:</I>