int temp;今天學到一個有趣的新方法:
temp = var1;
var1 = var2;
var2 = temp;
var1 ^= var2;蠻酷的。
var2 ^= var1;
var1 ^= var2;
靠軟體謀生真不易... 勤作筆記,幫助記憶...
int temp;今天學到一個有趣的新方法:
temp = var1;
var1 = var2;
var2 = temp;
var1 ^= var2;蠻酷的。
var2 ^= var1;
var1 ^= var2;
<background>
<starttime>
<year>2003</year>
<month>6</month>
<day>14</day>
<hour>05</hour>
<minute>30</minute>
<second>00</second>
</starttime>
<static>
<duration>1795.0</duration>
<file>/path/to/picture-1.png</file>
</static>
<transition>
<duration>5.0</duration>
<from>/path/to/picture-1.png</from>
<to>/path/to/picture-2.png</to>
</transition>
<static>
<duration>1795.0</duration>
<file>/path/to/picture-2.png</file>
</static>
<transition>
<duration>5.0</duration>
<from>/path/to/picture-2.png</from>
<to>/path/to/picture-1.png</to>
</transition>
</background>
其中:gsettings set org.gnome.desktop.background picture-uri 'file:///path/to/wallpaper.xml'
若你想加上封面、頁首、頁尾等也可以,請自行參閱 wkhtmltopdf -H 的說明。wkhtmltopdf http://news.chinatimes.com/ news.pdf
QSslSocket: cannot call unresolved function SSLv23_client_method4%解決辦法是下載 source 自己編譯。不要擔心,編譯非常簡單:
QSslSocket: cannot call unresolved function SSL_CTX_new
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function ERR_get_error
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_CTX_new
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function ERR_get_error
$ sudo apt-get install qt4-dev-tools
$ wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1.tar.bz2
$ tar xvjf wkhtmltopdf-0.11.0_rc1.tar.bz2
$ cd wkhtmltopdf-0.11.0_rc1/
$ qmake && make
$ sudo apt-get make install
dpkg -i libmp4v2-0_1.6dfsg-0.2ubuntu9_amd64.deb
dpkg -i libmpeg4ip-0_1.6dfsg-0.2ubuntu9_amd64.deb
dpkg -i mpeg4ip-utils_1.6dfsg-0.2ubuntu9_amd64.deb
printer_PostScript/default.print_footercenter =>以上是將列印檔名預設為 firefox.pdf,頁首頁尾設成空白。若你的設定不一樣,要先在列印對話框的 Options 做好設定列印一次,再重新進入 about:config。找出以下看起來是亂碼的設定項目:
printer_PostScript/default.print_footerleft =>
printer_PostScript/default.print_footerright =>
printer_PostScript/default.print_headercenter =>
printer_PostScript/default.print_headerleft =>
printer_PostScript/default.print_headerright =>
printer_PostScript/default.print_to_filename => ~/firefox.pdf
printer_Ã¥ÂÂå°è³æªÂæ¡Â.print_...就可以看出設定字串如何寫 (譬如 "&T"),將此字串複製到 default.print 對應那一部份就可以了。