月度归档:2007年05月

张阳北区

回到兴化,在兴化的家住在"张阳南区",没两条就认识这几个字了。今天爷爷带着笑笑在楼下转啊转,笑笑突然问:"这块怎么是张阳北区啊,宝宝住在张阳南区呢。"原来笑笑看到楼上的标识不对了。爷爷只好和她解释,有条马路隔着,这边是南区,那边是北区….

各种TimeStamp

关于各种Timestamps的区别和比较:

UNIX timestamp: seconds since midnight, January 1, 1970 UTC. It is a 32-bit number.
Win32 FILETIME values count 100-nanosecond intervals since January 1, 1600 UTC. It is a 64-bit number.
CLR System.DateTime values count 100-nanosecond intervals since January 1, 1 UTC. It is a 64-bit number. These aren’t used much yet.
The DOS date/time format is a bitmask (YYYYYYYM MMMDDDDD hhhhhmmm mmmsssss) The year is stored as an offset from 1980. Seconds are stored in two-second increments. These values are recorded in local time.
The OLE automation date (DATE) format is a floating point value, counting days since midnight 30 December 1899. Hours and minutes are represented as fractional days.
The C runtime time_t value is the same as a UNIX timestamp, __time64_t is same except using 64-bit number

* time_t: 19:14:07, January 18, 2038, UTC.
* __time64_t: 23:59:59, December 31, 3000, UTC.

struct tm {
int tm_sec; /* seconds after the minute – [0,59] */
int tm_min; /* minutes after the hour – [0,59] */
int tm_hour; /* hours since midnight – [0,23] */
int tm_mday; /* day of the month – [1,31] */
int tm_mon; /* months since January – [0,11] */
int tm_year; /* years since 1900 */
int tm_wday; /* days since Sunday – [0,6] */
int tm_yday; /* days since January 1 – [0,365] */
int tm_isdst; /* daylight savings time flag */
};

typedef struct _SYSTEMTIME {
WORD wYear; /* no offset */
WORD wMonth; /* January is 1 */
WORD wDayOfWeek; /* Sunday is 0, Monday is 1, and so on.*/
WORD wDay; /* 1-31 */
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;

CTime 构造函数可以接受:

__time64_t(time_t),
{DosDate, DosTime},
SYSTEMTIME,
FILETIME,
{nYear: 1970-3000, nMonth: 1-12, nDay: 1-31, nHour, nMin, nSec}.
struct tm* GetGmtTm(struct tm* ptm = NULL) const;
struct tm* GetLocalTm(struct tm* ptm = NULL) const;
BOOL GetAsSystemTime(SYSTEMTIME& timeDest) const;
time_t GetTime() const;
int GetYear() const;
int GetMonth() const; // month of year (1 = Jan)
int GetDay() const; // day of month
int GetHour() const;
int GetMinute() const;
int GetSecond() const;
int GetDayOfWeek() const; // 1=Sun, 2=Mon, …, 7=Sat

COleDateTime 构造函数可以接收:

VARIANT,
DATE,
time_t,
SYSTEMTIME,
FILETIME,
{nYear: 100-9999, month: 0-12(from 1), day: 0-31 (from 1), hour: 0-23, minute: 0-59, second 0-59}
BOOL GetAsSystemTime(SYSTEMTIME& sysTime) const;
int GetYear() const;
int GetMonth() const; // month of year (1 = Jan)
int GetDay() const; // day of month (0-31)
int GetHour() const; // hour in day (0-23)
int GetMinute() const; // minute in hour (0-59)
int GetSecond() const; // second in minute (0-59)
int GetDayOfWeek() const; // 1=Sun, 2=Mon, …, 7=Sat
int GetDayOfYear() const; // days since start of year, Jan 1 = 1

http://www.codeproject.com/datetime/datetimedisc.asp

http://blogs.msdn.com/oldnewthing/archive/2003/09/05/54806.aspx

背混了2

又有两首诗背混了,"三峡束长江,欲令江流改,谁知盘中餐,粒粒皆辛苦"… 后面两句应该是"谁知破夔门,东流成大海",

我没有钱

笑笑玩菜罩,自己蜷起来躺在里面,挺好玩的。更好玩的是,爷爷说她:"这么弄都弄坏了,要赔的",笑笑一本正经地说:"我没有钱"。

还有一天,爸爸在工作,笑笑来捣乱。爸爸说:"爸爸要工作啊,不工作就没钱,没钱就没法给笑笑买玩具,买好吃的,对不对?笑笑长大了也要工作,也要挣钱的",笑笑接口说:"笑笑挣钱给爷爷买新衣服。"后来一问爷爷,才知道,有一天笑笑看到爷爷衣服上有个洞,指着问爷爷:"这是什么呀",爷爷就和她解释,然后说:"等笑笑长大了挣钱给爷爷买新衣服",于是笑笑就记住了…

笑笑已经承诺有钱以后要买好多东西了,除了要买衣服给爷爷,要买沙发给奶奶,买吃的给爸爸…

心中有兔

有天笑笑在翻爸爸妈妈的碟片,突然冒出一句"心中有兔",爸爸一看,其实是黎明刘若英的《心中有鬼》。

"兔"认识的比较早,有次认电话上的字,看到"免提",说"兔提"。