码迷,mamicode.com
首页 >  
搜索关键字:file python3    ( 63124个结果)
PHP 文件写入或追加数据
PHP file_put_contents() 函数是一次性向文件写入字符串或追加字符串内容的最合适选择。file_put_contents()file_put_contents() 函数用于把字符串写入文件,成功返回写入到文件内数据的字节数,失败则返回 FALSE。语法:int file_put_...
分类:Web程序   时间:2014-07-16 18:22:36    阅读次数:256
Tornado/Python 学习笔记(二)
部分ssrpc.py代码分析 -- 服务端: 1 #!/usr/bin/python3 2 3 from xmlrpc.client import Fault, dumps, loads 4 import sys 5 from socketserver import ForkingMixIn 6 ....
分类:编程语言   时间:2014-07-16 18:14:43    阅读次数:296
批量修改文件名java
package test0715;import java.io.File;public class FileRename {public static void main(String[] args) { File file=new File("f:/java/test"); String dirP...
分类:编程语言   时间:2014-07-16 17:58:15    阅读次数:186
Leetcode Simplify Path
Given an absolute path for a file (Unix-style), simplify it.For example,path="/home/", =>"/home"path="/a/./b/../../c/", =>"/c"Corner Cases:Did you con...
分类:其他好文   时间:2014-07-16 17:54:16    阅读次数:156
php基础知识总结(2)文件操作file
一、路径1、dirname -- 返回路径中的目录部分 $path = "/etc/passwd"; $file = dirname($path); // "/etc"2、basename -- 返回路径中的文件名部分 $path = "/home/httpd/html/index.php"; $f...
分类:Web程序   时间:2014-07-16 17:47:43    阅读次数:241
PHP的mod_rewrite重写模块将.php后缀换成.html
mod_rewrite的魔力 简单举例:创建三个文件,分别命名为 test.html,test.php和.htaccess test.html 输入: This is the HTML file. test.php输入: This is the php file. .htaccess输入: RewriteEngine on RewriteRule ^/?test\.html$ test.php [L]...
分类:Web程序   时间:2014-07-16 17:30:20    阅读次数:220
使用aspectjweaver时报“agent library failed to init: instrument”“Error opening zip file or JAR manifest m
这个只是个小经验,我至今不知道为什么。今天在Ant的build.xml中增加Kieker的监控时,好几次都碰到这个问题,感觉很莫名其妙: 一般报错类似于这个: Error occurred during initialization of VM agent library failed to init: instrument Error opening zip file o...
分类:Web程序   时间:2014-07-16 17:19:11    阅读次数:718
java读写文件(可当工具类保存。解决乱码)
//读文件 public static String ReadFile(String path) { File file = new File(path); BufferedReader reader = null; String laststr = ""; try { reader = new BufferedReader(new FileReader(file)); String tempSt...
分类:编程语言   时间:2014-07-16 17:15:53    阅读次数:318
GCC实现多文件编译,静态库,动态库
#mf:mult file #liba: liaxxx.a #libso:libxxx.so run:main         ./main mfo:add.c main.c         gcc -c add.c main.c mfe:mfo         gcc -o main add.o main.o libo:add.c         gcc -c add.c...
分类:其他好文   时间:2014-07-16 17:11:20    阅读次数:165
java反射小例子
package reflect; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.Properties;...
分类:编程语言   时间:2014-07-16 10:43:59    阅读次数:169
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!