方法一:function getExt($url){ $urlinfo = parse_url($url); $file = basename($urlinfo['path']); if(strpos($file,'.') !== false) { $ext = explode('....
分类:
Web程序 时间:
2014-07-01 19:09:47
阅读次数:
1274
RAW raw是默认的格式,格式简单,容易转换为其他的格式。需要文件系统的支持才能支持sparse file 创建image # qemu-img create -f raw flat.img 10GFormatting 'flat.img', fmt=raw size=10737418240 如果...
分类:
其他好文 时间:
2014-07-01 18:07:59
阅读次数:
386
Since I use Sublime ,I want to write aencoding convent program .Here isthe knowage what i need .InputStreamReader:This class is the brage from bytetyp...
分类:
其他好文 时间:
2014-07-01 13:57:23
阅读次数:
214
/**
* 水仙花数
* */
public class Daffodil {
public static void main(String[] args) {
int max = 9999 ;
int min = 10 ;
for(int x=min;x<max;x++){
String temp = String.valueOf( x ) ;
int ...
分类:
其他好文 时间:
2014-07-01 11:27:48
阅读次数:
201
//这里实现 某个文件下的所有图片,并列出来!
header("Content-type:text/html;charset=utf8");
$handle=opendir('.');
echo "目录 handle: $handle\n";
echo "档案:\n";
while ($file = readdir($handle)) {
if(@eregi("[_\.0-...
分类:
Web程序 时间:
2014-07-01 11:19:52
阅读次数:
233
最近有个项目要用solr,solr是基于lucene的,今天在测试indexwriter时遇到了lock的问题:测试代码:importjava.io.File;
importjava.io.IOException;
importorg.apache.lucene.analysis.Analyzer;
importorg.apache.lucene.analysis.standard.StandardAnalyzer;
importorg.apac..
分类:
其他好文 时间:
2014-07-01 09:40:53
阅读次数:
295
#include
#include
int main( void )
{
char sFileName[128];
int iRet = 0;
memset(sFileName, 0, sizeof(sFileName));
sprintf(sFileName, "test.txt");
printf("R_OK[%d...
分类:
数据库 时间:
2014-07-01 07:41:30
阅读次数:
302
编译 windows上编译lua源码
cl /MD /O2 /W3 /c /DLUA_BUILD_AS_DLL *.c
del *.o
ren lua.obj lua.o
ren luac.obj luac.o
ren print.obj print.o
link /DLL /IMPLIB:lua5.1.lib /OUT:lua5.1.dll *.obj
link /OUT:lua.ex...
分类:
其他好文 时间:
2014-07-01 07:21:11
阅读次数:
199
俗话说“工欲善其事必先利其器”,没错,对于运维更是如此,每天都需要用终端远程管理服务器,这个终端就是运维的器,废话少说:
mac native Terminal已经很好用,虽然有些不足,直到发现iterm2。。。
以下仅列举iterm2完胜terminal的、让你心动的features:
1、support zmodem(for simply transfer file b...
分类:
其他好文 时间:
2014-07-01 06:55:46
阅读次数:
314
Ø 读取文件的时间
#!/bin/bash
for file in `ls /root`
do
stat $file>1.txt
sed -n "7p" 1.txt>2.txt
usetime= awk -F ":" '{print $2}' 2.txt
echo "time="$file $usetime
done
Ø 读取文件的每行while...
分类:
其他好文 时间:
2014-07-01 06:49:51
阅读次数:
204