码迷,mamicode.com
首页 >  
搜索关键字:filename    ( 7326个结果
matlab中使用正弦波合成方波(带动画)
x=0:0.1:6*pi; for step=1:2:100 s=0; for i=1:2:step s = s+1/i*sin(i*x); end plot(s);set(figure(1),'visible','off'); filename=[num2str(step, '%04d'),'.p...
分类:其他好文   时间:2014-07-10 13:49:02    阅读次数:922
文件流
try { //从指定文件中引入程序的 输入流 FileInputStream fins = new FileInputStream(fileName); //缓存空间 byte[] cache = new byte[fins.available()]; //文件...
分类:其他好文   时间:2014-07-10 10:08:30    阅读次数:233
Django下载文件
服务器端:f = open(filename)data = f.read()f.close()response = HttpResponse(data,mimetype='application/octet-stream') response['Content-Disposition'] = 'at...
分类:其他好文   时间:2014-07-10 00:40:41    阅读次数:204
XML读写
private string fileName = HttpContext.Current.Server.MapPath("~/Student.xml"); protected void Page_Load(object sender, EventArgs e) { if (!I...
分类:其他好文   时间:2014-07-07 23:30:32    阅读次数:260
[转] linux source命令
source命令用法:source FileName作用:在当前bash环境下读取并执行FileName中的命令。注:该命令通常用命令“.”来替代。如:source .bash_rc 与 . .bash_rc 是等效的。source命令(从 C Shell 而来)是bash shell的内置命令。点...
分类:系统相关   时间:2014-07-07 22:15:15    阅读次数:293
文件处理
#include "my_file.h" //将文件内容拷贝到指定文件 int mycopy(const char *filename) {  ifstream infile(filename, ios::binary);  ofstream outfile("TRACE.txt", ios::binary);    if (!infile.is_open() || !outfile...
分类:其他好文   时间:2014-06-28 08:46:56    阅读次数:199
遍历目录中所有文件并统计信息
遍历目录中所有文件,并且统计文件类型。#!/bin/bash #filename:filestat.sh #set-x if[$#-ne1]; then echo$0basepath; echo fi path=$1 declare-Astatarray; whilereadline; do ftype=`file-b"$line"` letstatarray["$ftype"]++; done<<(find$path-typef-print) ech..
分类:其他好文   时间:2014-06-28 00:16:08    阅读次数:224
getrrdinfo.py
#!/usr/bin/env python# coding=gbkimport sysimport osimport timeif __name__== '__main__': filename = sys.argv[1] nowtime = int(time.time()) st...
分类:其他好文   时间:2014-06-27 13:28:10    阅读次数:148
设计模式之单例模式
1 /////////////////////////////////////////////////////////////////////////////// 2 // 3 // FileName : singleton.h 4 // Version : 0.10 5...
分类:其他好文   时间:2014-06-27 11:29:51    阅读次数:227
python基础教程_学习笔记15:标准库:一些最爱——fileinput
标准库:一些最爱 fileinput 重要的函数 函数 描述 input([files[,inplace[,backup]]) 便于遍历多个输入流中的行 filename() 返回当前文件的名称 lineno() 返回当前(累计)的名称 filelineno() ...
分类:编程语言   时间:2014-06-27 10:33:27    阅读次数:366
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!