JAVA 读取txt文件内容 通常,我们可以直接通过文件流来读取txt文件的内容,但有时可能会出现乱码!此时只要设置一下文件字符编码即可。 1 import java.io.BufferedReader; 2 import java.io.File; 3 import java.io.Fi...
分类:
编程语言 时间:
2014-08-24 22:01:03
阅读次数:
253
Given an absolute path for a file (Unix-style), simplify it.For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c"思路:本题使用栈来处理即可。此处我们...
分类:
其他好文 时间:
2014-08-24 20:50:23
阅读次数:
155
The steps:First you need to edit the file in:/etc/hostconfigand remove the lineSince this is a system file I advise you to open it with nano in termin...
分类:
数据库 时间:
2014-08-24 20:45:02
阅读次数:
183
Rsync一、基础知识1、rsync:是传输输工具,类似于scpScp的用法要知道远程主机的密码和账号文件在本地上传到远程Scp[option]sourcefile[[user@]host1:]destions/file文件在远程下载到本地Scp[option][[user@]host1:]destions/filesource/filersync?.afast,versatile,remote(and..
分类:
其他好文 时间:
2014-08-24 19:29:03
阅读次数:
320
HE
/WEB-INF/u_member/Login.jsp
HE
/Login.jsp
配置之后就可以通过Login.jsp直接访问了...
分类:
Web程序 时间:
2014-08-24 16:43:42
阅读次数:
176
Squid学习笔记1、安装前的配置编译安装之前需要校正的参数主要包括File Descriptor和Mbuf Clusters。1、File Descriptor查看文件描述符的限制数目:ulimit –n调整文件描述符的数目需要3步:step 1,编辑系统头文件/usr/include/bits/...
分类:
其他好文 时间:
2014-08-24 15:19:02
阅读次数:
214
在system.webServer 中增加woff 的相应信息即可
分类:
Web程序 时间:
2014-08-24 14:07:42
阅读次数:
469
获取文件属性信息,在终端下可以直接利用ls- l命令,在编程时,用到以下三个函数:
#include
#include
#include
int stat(const char *file_name, struct stat *buf);
函数说明: 通过文件名filename获取文件信息,并保存在buf所指的结构体stat中
返回值: 执行成功则返回0...
分类:
其他好文 时间:
2014-08-24 13:00:22
阅读次数:
233
clearerr(清除文件流的错误旗标)
相关函数 feof
表头文件 #include
定义函数 void clearerr(FILE * stream);
函数说明 clearerr()清除参数stream指定的文件流所使用的错误旗标。
fdopen(将文件描述词转为文件指针)
相关函数 fopen,open,fclose
表头文件 #include
定...
分类:
编程语言 时间:
2014-08-24 12:58:22
阅读次数:
195
思路 每次内部循环需要找到一个单词,将其存入数组。外循环遍历至字符串末尾结束。 代码 /************************************************************************* > File Name: word_split.c > Auth...
分类:
其他好文 时间:
2014-08-24 12:54:32
阅读次数:
159