最近要在页面上加一个时间段的选择控件,便上网搜寻一番,但找到的答案大都没有考虑时间段跨年的情况,所以做了些修改本周的开始和结束日期```javascript//当前日期var
now = new Date();//今天是一周的第几天var nowDayForWeek = now.getDay(...
分类:
编程语言 时间:
2014-05-16 03:27:59
阅读次数:
798
//创建当前日期 NSDate *date = [NSDate date]; //创建日期格式类
NSDateFormatter *dateFormat = [[NSDateFormatter alloc]init]; //设置日期格式
[dateFormat ...
分类:
其他好文 时间:
2014-05-16 01:13:12
阅读次数:
325
1、PIL包推荐Pillow。2、源码:#encoding=utf-8
#author:walker
#date:2014-05-15
#function:更改图片尺寸大小
importos
importos.path
fromPILimportImage
‘‘‘
filein:输入图片
fileout:输出图片
width:输出图片宽度
height:输出图片高度
type:输出图片类型(png,gif,jpeg.....
分类:
编程语言 时间:
2014-05-15 19:07:57
阅读次数:
266
#!/bin/bash
#function:cutnginxlogfilesshell
#cp/usr/local/nginx/logs/access.log/usr/local/nginx/logs/access.log.bak
log_cut_path="/var/log/nginx"
log_files_path="/usr/local/nginx/logs/"
log_files_dir=${log_cut_path}$(date-d"yesterday"+"%Y")/$(date-d"yesterd..
分类:
其他好文 时间:
2014-05-15 18:49:50
阅读次数:
244
opCookie:function(){ var setCookie= function
(name,value) { var Days = 30; var exp = new Date(); exp.setTime(exp.getTime() +
D...
分类:
Web程序 时间:
2014-05-15 17:38:12
阅读次数:
406
http://subclipse.tigris.org/update_1.8.x
分类:
系统相关 时间:
2014-05-15 11:47:53
阅读次数:
359
void GregorianDay(struct rtc_time * tm){ int
leapsToDate; int lastYear; int day; int MonthOffset[] = {
0,31,59,90,120,151,181,212,243,273,304,334 }; l...
分类:
其他好文 时间:
2014-05-15 11:38:36
阅读次数:
488
当月的数据select * from MOPICK where
dateDiff(m,getdate(),START_DATE)=0
分类:
数据库 时间:
2014-05-15 11:37:10
阅读次数:
562
初学者一枚,代码都是模仿网上的。亲测可用~运行脚本的前提是本机安装了httplib2模块#!/usr/bin/python
importos
importre
importstring
importurllib
#author:reed
#date:2014-05-14
defGetWebPictures():
url=raw_input(‘pleaseinputthewebsiteyouwanttodownload:‘)
imgconte..
分类:
编程语言 时间:
2014-05-15 09:03:42
阅读次数:
385
An problem about date
时间限制:2000 ms | 内存限制:65535 KB
难度:2
描述
acm的iphxer经常忘记某天是星期几,但是他记那天的具体日期,他希望你能写个程序帮帮他。
输入每行有三个整数 year,month,day,日期在1600年1月1日到9600年1月1日之间;
输出输出对应的星期,用一个整...
分类:
其他好文 时间:
2014-05-15 00:19:14
阅读次数:
380