最近在看一个特别古老的美剧《X档案》,特别小的时候断断续续看过一些,记得好像是在中央八电视剧频道演过。在Wiki上这个剧被定义为science fiction horror drama television series,听起来好像挺奇怪的,科幻恐怖剧。看了看还真是挺恐怖的,不知道小时候看这个是不是被吓得够呛。虽然这个剧有点年头了,1993-2002年在FOX电视台播出,但是现在再看剧情和拍摄手法依旧很吸引人,而且正是由于拍摄久远,导致画面很模糊,给这部电视剧添加了一种莫名的神秘感,模模糊糊的画面好像有意遮挡了一些真相,更符合这部剧的风格。
最近出游比较多,五一假期之前的周末随公司去云蒙山爬山,假期去了无锡和苏州,张大夫在南京研究各种花花草草,让人不得不好好热爱了一把生活。其实说起出游,真正让我开始感觉到应该多去走走、体验不一样的生活,是去波兰的克拉科夫Krakow参加2013年的International Conference on Advanced Video and Signal based Surveillance,也是从那个时候开始让我觉得一个人出游的乐趣。在克拉科夫逛了很多地方,感受了当地丰富多彩的文化。因为是自己一个人,所以逛的很惬意,全程都是徒步,累了就在街边的露天餐馆歇一歇,其实就好像咱们国内的大排档,只不过对咱们来说少了烧烤的油烟,多了点小资的味道,喝点汤吃点面包,恢复恢复体力。本想回来好好记录一下这三天在克拉科夫的见闻,一犯懒一晃一年半过去了,记忆也都模糊了,不过能想起来的肯定都是精髓了。
/* mkstemp extracted from libc/sysdeps/posix/tempname.c. Copyright (C) 1991-1999, 2000, 2001, 2006 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. */
/* Generate a temporary file name based on TMPL. TMPL must match the rules for mk[s]temp (i.e. end in "XXXXXX"). The name constructed does not exist at the time of the call to mkstemp. TMPL is overwritten with the result. */ intmkstemp(char *tmpl) { int len; char *XXXXXX; staticunsignedlonglong value; unsignedlonglong random_time_bits; unsignedint count; int fd = -1; int save_errno = errno;
/* A lower bound on the number of temporary files to attempt to generate. The maximum total number of temporary file names that can exist for a given template is 62**6. It should never be necessary to try all these combinations. Instead if a reasonable number of names is tried (we define reasonable as 62**3) fail to give the system administrator the chance to remove the problems. */ #define ATTEMPTS_MIN (62 * 62 * 62)
/* The number of times to attempt to generate a temporary file. To conform to POSIX, this must be no smaller than TMP_MAX. */ #if ATTEMPTS_MIN < TMP_MAX unsignedint attempts = TMP_MAX; #else unsignedint attempts = ATTEMPTS_MIN; #endif
len = strlen (tmpl); if (len < 6 || strcmp (&tmpl[len - 6], "XXXXXX")) { errno = EINVAL; return-1; }
/* This is where the Xs start. */ XXXXXX = &tmpl[len - 6];
/* Get some more or less random data. */ { SYSTEMTIME stNow; FILETIME ftNow;
// get system time GetSystemTime(&stNow); stNow.wMilliseconds = 500; if (!SystemTimeToFileTime(&stNow, &ftNow)) { errno = -1; return-1; }