码迷,mamicode.com
首页 >  
搜索关键字:read    ( 19693个结果
python读写文件
Python读写文件1.open使用open打开文件后一定要记得调用文件对象的close()方法。比如可以用try/finally语句来确保最后能关闭文件。file_object = open('thefile.txt')try: all_the_text = file_object.read( )...
分类:编程语言   时间:2014-09-23 19:51:55    阅读次数:315
python2 urllib 笔记
python2 urllib 笔记import urllibbase='http://httpbin.org/'ip=base+'ip'r=urllib.urlopen(ip)print r.geturl()print r.read()#getget=base+"get"parms=urllib.u...
分类:编程语言   时间:2014-09-23 19:38:25    阅读次数:225
RQNOJ 前100题 -练手
1.http://www.rqnoj.cn/problem/1program mingming;var a:array [1..1000] of integer; i,j,k,n:longint;begin fillchar(a,0,sizeof(a)); k:=0; read(n)...
分类:其他好文   时间:2014-09-23 17:31:54    阅读次数:192
如何得出一段时间内日志中的错误种类以及次数
#!/usr/bin/pythonimportreimportosimportsysimportpycurldefbuffer_line(monitor_log):buf=open("/data0/webinternal_monitor/%s"%monitor_log).read()bytes=os.popen(‘wc-c/data0/logs/%s‘%monitor_log).read().split("")[0]ifint(bytes)<int(buf):return0else:returnint(..
分类:其他好文   时间:2014-09-23 17:31:15    阅读次数:234
获取assets编码问题
public String read(String fileName) { String reultString = ""; try { InputStream in = getResources().getAssets().open(fileName); int available =...
分类:其他好文   时间:2014-09-23 14:55:05    阅读次数:191
CentOS 编译配置 apache
Centos-7.x86_64下。编译时可能提示:checking for APR... noconfigure: error: APR not found. Please read the documentation.checking for APR-util... noconfigure: er...
分类:其他好文   时间:2014-09-23 14:20:34    阅读次数:158
几个系统调用分析 glibc中的malloc调用和共享内存原理
本文主要分析内存以及I/O相关的系统调用和库函数的实现原理,根据原理给出在使用过程中需要注意的问题和优化的侧重点,本文涉及到的系统调用包括readahead,pread/pwrite,read/write,mmap,readv/writev,sendfile,fsync/fdatasync/msync,shmget,malloc。        本文先简单介绍应用程序对内存的使用以及I/O系统对...
分类:其他好文   时间:2014-09-23 12:55:44    阅读次数:380
Reading and writing
A text file is a sequence of characters stored on a permanent medium like a hard drive, flash memory, or CD-ROM. To read a file, you can use open to c...
分类:其他好文   时间:2014-09-23 02:45:53    阅读次数:267
How to Read, Write XLSX File in Java - Apach POI Example---reference
No matter how Microsoft is doing in comparison with Google, Microsoft Office is still the most used application in software world. Other alternatives ...
分类:编程语言   时间:2014-09-22 20:04:23    阅读次数:337
数据库高分笔记02:隔离级别
在SQL标准中定义了四种隔离级别,每一种级别都规定了一个事务中所做的修改,哪些是在事务内和事务间可见的,哪些是不可见的。较低级别的隔离通常可以执行更高的并发,系统的开销也更低。未提交读(Read uncommitted):在未提交读级别,事务中的修改,即使没有提交,对其他事务也都是可见的。事务可以读...
分类:数据库   时间:2014-09-22 17:11:32    阅读次数:218
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!