#coding=utf-8import threadingfrom time import ctime,sleepdef music(func): for i in range(2): print "I was listening to %s. %s" %(func,ctime(...
分类:
编程语言 时间:
2015-06-08 14:58:16
阅读次数:
108
shell脚本(二)#find查找文件,以可根据时间、名称、uid、gid、权限、大小等条件查找#-amin-10:10分钟之内访问过的文件或目录;+10:10分钟之前访问过的文件或目录.时间单位为分钟。#查找10分钟之前30分钟之内访问过的文件或目录find/home-amin+10-a-amin-30#-atime-2:48小时内..
分类:
系统相关 时间:
2015-06-06 23:44:13
阅读次数:
189
linkaddsave.php (保存php页面) 1 prepare('insert into hnsc_link(ltype,title,url,flag,atime) values(?,?,?,?,?)'); 7 $stmt->bind_param('ssssi',$ty,$title...
分类:
其他好文 时间:
2015-05-29 23:05:58
阅读次数:
179
linux的touch命令不常用,一般在使用make的时候可能会用到,用来修改文件时间戳,或者新建一个不存在的文件。1.命令格式:touch[选项]...文件...2.命令参数:-a或--time=atime或--time=access或--time=use 只更改存取时间。-c或--no-crea...
分类:
其他好文 时间:
2015-05-21 22:12:32
阅读次数:
132
2298: [HAOI2011]problem aTime Limit:10 SecMemory Limit:256 MBSubmit:714Solved:314[Submit][Status][Discuss]Description一次考试共有n个人参加,第i个人说:“有ai个人分数比我高,bi个...
分类:
其他好文 时间:
2015-05-19 12:16:40
阅读次数:
150
不要再语句前面使用逗号。
// bad
var story = [
once
, upon
, aTime
];
// good
var story = [
once,
upon,
aTime
];
不要有多余逗号:这会在IE6、IE7和IE9的怪异模式中导致一些问题;同时,在ES3的一些实现中,多余的逗号会增加数组的长度。在ES5中已经澄清(source)
// bad
var ...
分类:
编程语言 时间:
2015-05-19 10:38:13
阅读次数:
132
touch【功能说明】:linux的touch命令不常用,一般在使用make的时候可能会用到,用来修改文件时间戳,或者新建一个不存在的文件。touch命令参数可更改文档或目录的日期时间,包括存取时间和更改时间。【语法格式】:touch[选项]...文件...【选项参数】:-a或--time=atime或--ti..
分类:
系统相关 时间:
2015-05-18 13:08:12
阅读次数:
165
从time模块的帮助文档中,发现相关的函数主要有如下:time()--returncurrenttimeinsecondssincetheEpochasafloat
clock()--returnCPUtimesinceprocessstartasafloat
sleep()--delayforanumberofsecondsgivenasafloat
gmtime()--convertsecondssinceEpochtoUTCtuple
localtime()-..
分类:
编程语言 时间:
2015-05-18 01:15:41
阅读次数:
237
#!/usr/bin/python
#coding=utf-8
importthread
fromtimeimportsleep,ctime
loops=[3,5]
#测试函数
defloop(nloop,nsec,lock):
print‘startloop‘,nloop,‘at‘,ctime()
sleep(nsec)
print‘loop‘,nloop,‘doneat‘,ctime()
lock.release()
‘‘‘
defmain()
print‘startat‘.ctime()
#lo..
分类:
编程语言 时间:
2015-05-14 20:46:23
阅读次数:
129
/*
*copyright(c) 2015,烟台大学计算机学院
*All rights reserved。
*文件名称:第九周(运算符重载时间类)
*作者:王忠
*完成日期:2015.5.13
*版本号:v1.0
*
*问题描述:实现Time类中的运算符重载。定义对时间对象的自增和自减一目运算符
//一目运算符的重载
CTime operator++(int);//后置++,...
分类:
其他好文 时间:
2015-05-13 10:37:45
阅读次数:
113