php带csv格式的数据要用到fgetcsv()函数。用这下面的语句$hd=fopen('test.csv','r');
$buf=fgetcsv($hd,1000,',');打开一个test.csv格式的文件,文件中的内容以","号分开。
取出的第一行代表自动含义,比如 id,messaget,time等等。
从第二行开始表示具体的数据,比如1,消息,12:00。
if($buf[1]...
分类:
Web程序 时间:
2014-04-30 22:16:38
阅读次数:
385
encodingFilter
org.springframework.web.filter.CharacterEncodingFilter
encoding
UTF-8
forceEncoding
true
...
分类:
编程语言 时间:
2014-04-29 13:43:21
阅读次数:
329
<?php
$filename="胡主席好.pdf";
if(!file_exists($filename))
{
echo "不存在此文件";
return;
}
$fp=fopen($filename,"r");
$file_size=filesize($filename);
//配置头文件
/...
分类:
Web程序 时间:
2014-04-29 13:42:20
阅读次数:
356
Vagrant进阶:搭建简易Python,PHP开发环境...
分类:
编程语言 时间:
2014-04-29 13:34:21
阅读次数:
332
在项目中有时需要验证用户是否以post方式提交。下面是验证源码:
public boolean checkMethod(String method) {
if (request.getMethod().equalsIgnoreCase(method)) {
return true;
}
else {
...
分类:
Web程序 时间:
2014-04-29 13:34:20
阅读次数:
350
本文出自:http://blog.csdn.net/svitter
原题地址:http://acm.hdu.edu.cn/showproblem.php?pid=3790
另外写文章之前偷懒一下,发现一个很好的入门python教程!:http://woodpecker.org.cn/abyteofpython_cn/chinese/
题意:在最短路径的前提下,添加了一个最短路径中权值最小的要...
分类:
其他好文 时间:
2014-04-29 13:32:22
阅读次数:
285
题目链接:http://acm.fzu.edu.cn/problem.php?pid=2173
思路:
类似于传递闭包的性质
用矩阵mp[i][j] 表示i点到j点 走1次的最短路
--------------
若我们用 mp[i][j] 表示从i点到j点 走了k次的最短路距离
那么我们要通过 矩阵mp 得到 矩阵 ret[u][v] 表示 u->v 走了2*k次的最短路
就...
分类:
其他好文 时间:
2014-04-29 13:24:20
阅读次数:
386
链接:http://soj.me/show_problem.php?pid=1007
Description
Mo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and write the message (letter...
分类:
其他好文 时间:
2014-04-29 13:23:21
阅读次数:
293
我们都知道在Web开发中,都需要服务器,比如Java Web开发的Tomcat,WebLogic,WebSphere,现在来看利
用Tornado Web Server框架如何写一个简易的Python服务器。
一般来说只需要实现get和post方法就可以了。以上次使用redis数据库的例子说明,数据库插入代码如下:
import redis
import datetime
clas...
分类:
其他好文 时间:
2014-04-29 13:17:20
阅读次数:
397
JS 对某图片的等比缩放
代码
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
最新javascript自动按比例显示图片,按比例压缩图片显示
function AutoResizeImage(maxWidth,max...
分类:
数据库 时间:
2014-04-29 13:14:22
阅读次数:
440