install driver. Note that the version of the driver must be correspondent to the GPU card. One can find the correct version in NVIDIA official website. For example, my GPU is GTX970M, then I should use the following commend: sudo apt-get install nvidia-352 and sudo apt-get install nvidia-352-uvm
reboot
Install CUDA Toolkit
download CUDA 7.0 .run file from NVIDIA website. Note that the CUDA version should be correspendent to gcc version and driver version.
change .run file mode by chmod +x *.run
install CUDA by sudo ./*.run. Note to skip the installation of driver.
add necessary environment path by PATH=/path/to/cuda/bin:$PATH and LD_LIBRARY_PATH=/path/to/cuda/lib64:$LD_IBRARY_PATH and export them. Alternatively, one can modify /etc/profile to set the environment paths. For example, add export PATH="/path/to/cuda/bin:$PATH" and in commond line type source /etc/profile
verify the installation. Change directory to CUDA sample and make the samples. Run a sample sudo ./deviceQuery to verify the installation.
My name is Li Zhixuan, currently a computer vision engineer in Beijing, China. If you like, you can call me Joshua, which sounds more or less like my Chinese given name.
I did not notice that I am already a writer until I drew the time line of my humble writing career. The first memories of my starting writing are those diaries that I kept in summer holidays according to my Chinese teacher’s request when I was in grade six to eight. At that time, I just hated writing because I did not know what to write about due to not many meaningful things happened in holidays. Besides, being unable to tell a story lively made me feel pathetic and inferior. However, sometimes I did feel happy about my writings. I remembered that I wrote a short story about how I was annoyed by mosquitoes and got up killing them in a summer night. The story was written in ancient Chinese style imitating a text from my Chinese textbook. I got a Bravo from my Chinese teacher and she said it was really funny to read. Though I still suffered from lack of words and telling stories like presenting facts, I began to feel free to write and cultivated a habit of keeping diaries from then on. Thanks to that, I got three huge notebooks full of growing pains in my “secret chamber”.
I began to know academic writing when I was in university. There were many courses that required an essay for evaluation. From the reference papers, I learnt to propose problems, explain solutions and presenting evidence of effectiveness and feasibility. Unlike most of my peers feeling awful about writing their Master degree dissertations, I felt quite comfortable with it mainly because I had much to share with others. My dissertation was about detecting certain events in surveillance videos. I was so eager to share with others about how meaningful the task was, what flaws current algorithms had and how I improved them that it was as if everything was just bursting out of my mind. Although I write much in Chinese, I have little experience of writing academic papers in English. The only experience is a paper I wrote about detecting pedestrians in images, which was a part of work from my Master dissertation and the paper was published in an international conference. It was because of the conference that I got a chance to visit Krakow, a beautiful historical city in Poland. I felt really proud of myself presenting my work in the conference and it was really a pleasant trip to Krakow, appreciating its marvelous beauty and culture.
Currently, I am working in an IT company and writing patents, project documentation and slides is also my responsibility. In addition, I am writing this blog. Those are some of the reasons I am taking this course. I wish I could really improve myself and have fun with writing!
最近在看一个特别古老的美剧《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; }