Date.prototype.format = function(format){ var o = { "M+" : this.getMonth()+1, //month "d+" : this.getDate(), //day "h+" : this.getHours(), ...
分类:
编程语言 时间:
2014-07-10 12:23:43
阅读次数:
195
An apple a day keeps the doctor away. 一天一苹果,不用请医生。活学活用:appleas like as an apple to an oyster 毫无相同之处The rotten apple injures its neighbours. [谚]一只烂, 烂一...
分类:
移动开发 时间:
2014-07-10 12:17:24
阅读次数:
285
1、用PHP打印出前一天的时间格式是2006-5-10 22:21:21 解:echo date(‘Y-n-d H:i:s’, strtotime(‘-1 day’)); 原因: format 字符说明返回值例子a小写的上午和下午值am 或 pmA大写的上午和下午值AM 或 PMd月份中的第几...
分类:
Web程序 时间:
2014-07-10 11:32:10
阅读次数:
347
题目来源:《The C programming language》中的习题P92练习5-8:一个日期转换的问题,把某月某日这种日期表示形式转换为某年中第几天的表示形式,反之亦然。例如,3月1日是非闰年的第60天,是闰年的第61天。在这里,我们定义下列两个函数以进行日期转换:函数day_of_year...
分类:
编程语言 时间:
2014-07-07 19:11:44
阅读次数:
222
Functions and Closures 函数和封闭性(闭包)Functions 函数的使用Swift中的函数定义和OC中有明显的差别了,使用func定义函数,在括号里定义參数和类型,用 -> 定义返回值类型func greet(name: String, day: String) -> Str...
分类:
其他好文 时间:
2014-06-29 19:26:28
阅读次数:
209
DescriptionFor the daily milking, Farmer John'sNcows (1 ≤N≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game o...
分类:
其他好文 时间:
2014-06-28 09:32:17
阅读次数:
200
一、sqlserver日期时间函数SqlServer中的日期与时间函数1.当前系统日期、时间selectgetdate()2.dateadd在向指定日期加上一段时间的基础上,返回新的datetime值例如:向日期加上2天selectdateadd(day,2,'2004-10-15')--返回:20...
分类:
数据库 时间:
2014-06-27 13:19:02
阅读次数:
247
在4.2.2版本上调用系统的DatePickerDialog,发现点击确定时系统调用onDateSet()两次,需要过滤其中的一次。
Calendar mCalendar = Calendar.getInstance();
mCalendar.add(Calendar.DAY_OF_YEAR, 1);
final DatePickerDialog dateDialog = new D...
分类:
移动开发 时间:
2014-06-26 11:30:26
阅读次数:
233
oc是c的超集,从c扩展而来,具备面向对象的特性,比如类,消息,单继承。c的部分:数据类型:short,int,long,float,double,char,pointer,struct常用方法:readline()atoi()sizeof()malloc()oc的部分:receiver:classNameOrObjectselector:method消息的传递通过[recei..
分类:
移动开发 时间:
2014-06-26 06:39:56
阅读次数:
305
NSString:它的实例可以包含任意的Unicode字符eg:NSString*name=@"jethro";//@"..."是一种oc简化写法
分类:
移动开发 时间:
2014-06-26 06:10:39
阅读次数:
241