静静的,漂泊在异乡的云

Just another 七十二松 (72pines) weblog

Christmas Day

It reminds me a song: “Do they know it’s Christmas time”

http://www.youtube.com/watch?v=8jEnTSQStGE

TeXLive 2008更新的bug

GUI下要求我去执行

C:\Program Files\texlive\2008\tlpkg\installer\updater.bat

真去了,发现 tlmgr.pl 有个环境变量没有设置,于是找新的 tlmgr 更新:

http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet/2008/update-tlmgr-latest.exe

Fiddler 在windows下面表现很好,可惜用Qt开发的时候Fiddler抓不到,找到一款wireshark的,很是强悍,免费不说,还是 windows/linux都有,甚至windows下面也有绿色版的,包括 U3 移动盘和PortableApp的,携带起来很是方便

QObject::connect

这可能是 Qt 中最重要的功能了:

QObject::connect(&quit, SIGNAL(clicked()), &app, SLOT(quit()));

Qt Tutorial 中说:

This connect() call establishes a one-way connection between two Qt objects (objects that inherit QObject, directly or indirectly). Every Qt object can have both signals (to send messages) and slots (to receive messages). All widgets are Qt objects, since they inherit QWidget, which in turn inherits QObject.

Here, the clicked() signal of quit is connected to the quit() slot of app, so that when the button is clicked, the application quits.

几句黑话

从英文翻译来的,虽不是好的中文,但也可博大家一笑。

  1. 我不能同意你更多
  2. 你得到了他
  3. 你不是凯丁吧?
  4. 我是希尔瑞斯

下载 YouTube 视频

有个FIrefox的插件,很好用 Easy YouTube Video Downloader,能保存为FLV、3GP和MP4格式

Get version number with SubWCRev in Windows:

if(WIN32)
EXECUTE_PROCESS(COMMAND SubWCRev
${dak_SOURCE_DIR}
${dak_SOURCE_DIR}/inc/dak_version_raw.h
${dak_SOURCE_DIR}/inc/dak_version.h)
endif(WIN32)

SubWCRev is part of TotoriseSVN.

Windows 2008 server 的shutdown event tracker对我这种常常重启的用户来说,就是一个额外的负担。可以用如下方法禁用:

运行 gpedit.msc,然后 “Computer Configuration - Administrative Templates - System”, 设置 Display Shutdown Event Tracker  为  disabled.

CMake 是一个跨平台的编译构建系统,它负责搜集系统中的函数库信息,管理源文件的依赖关系,生成合适的脚本供自动编译系统调用,完成程序的编译构建任务(compile and build)。它所能生成的格式包括常用的 Unix/Linux、Cygwin 以及 MinGW 下的 Makefile,Windows 下的 nmake 和 Visual Studio

CMake使用一个 CMakeList.txt 的输入文件,一个简单的例子如下

cmake_minimum_required (VERSION 2.6)
project (HELLO)

# Recurse into the “Hello” and “Demo” subdirectories. This does not actually
# cause another cmake executable to run. The same process will walk through
# the project’s entire directory structure.
add_subdirectory (Hello)
add_subdirectory (Demo)

子目录 Hello 下有 CMakeList.txt 文件:

# Create a library called “Hello” which includes the source file “hello.cxx”.
# The extension is already found. Any number of sources could be listed here.
add_library (Hello hello.cxx)

子目录 Demo 下有 CMakeList.txt

# Make sure the compiler can find include files from our Hello library.
include_directories (${HELLO_SOURCE_DIR}/Hello)

# Make sure the linker can find the Hello library once it is built.
link_directories (${HELLO_BINARY_DIR}/Hello)

# Add executable called “helloDemo” that is built from the source files
# “demo.cxx” and “demo_b.cxx”. The extensions are automatically found.
add_executable (helloDemo demo.cxx demo_b.cxx)

# Link the executable to the Hello library.
target_link_libraries (helloDemo Hello)

通常的编译安装为:

cmake c:\devel\project-X -G “Visual Studio 9 2008″

然后用Visual studio打开生成的 solution 文件。

If you often look at files that are updated,  a log file for a running process, you’ll want to make sure you’re looking at the most recent version of the file.

To do this, add the following to your .emacs:

(global-auto-revert-mode 1)

For more documentation type:

C-h C-f global-auto-revert-mode RET

« Previous Entries