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
服务器端: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
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
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
#!/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
标准库:一些最爱
fileinput
重要的函数
函数
描述
input([files[,inplace[,backup]])
便于遍历多个输入流中的行
filename()
返回当前文件的名称
lineno()
返回当前(累计)的名称
filelineno()
...
分类:
编程语言 时间:
2014-06-27 10:33:27
阅读次数:
366