andelf fledna Feather

2010年5月26日星期三

设置 tkinter 全局字体

使用 Option DataBase 实现


from Tkinter import *

root = Tk()

# fonts for all widgets
root.option_add("*Font", "courier")

# font to use for label widgets
root.option_add("*Label.Font", "helvetica 20 bold")

# make all widgets light blue
root.option_add("*Background", "light blue")

# use gold/black for selections
root.option_add("*selectBackground", "gold")
root.option_add("*selectForeground", "black")

--
__ _
/ ) / // /)
/--/ ____ __/ _ // //
/ (_/ / <_(_/_</_</_//_
/>
</

2010年5月16日星期日

javascript 中的 dir()

mark 型
function dir(object)
{
methods = [];
for (z in object) if (typeof(z) != 'number') methods.push(z);
return methods.join(', ');
}

http://www.davidcramer.net/code/63/dir-in-javascript.html
--
__ _
/ ) / // /)
/--/ ____ __/ _ // //
/ (_/ / <_(_/_</_</_//_
/>
</

2010年5月12日星期三

在看 Emacs 23.2 的 What's new

(defun string> (s1 s2)
(not (or (string< s1 s2)
(string= s1 s2))))
(string> emacs-version "23.1")

--
__ _
/ ) / // /)
/--/ ____ __/ _ // //
/ (_/ / <_(_/_</_</_//_
/>
</

2010年5月8日星期六

disable linum-mode in temp buffers, Emacs 23

define personal globalize linum mode to solve it. :)
;;; linum-mode
(setq linum-format
(lambda (line)
(propertize
(format (let ((w (length (number-to-string
(count-lines (point-min) (point-max))))))
(concat "%4d |")) line) 'face 'linum)))
(defun my-linum-on () ; linum should turn off in non-editor buffer
(unless (or (minibufferp)
(equal frame-title-format "Speedbar 1.0")
(equal (string-match "\\*.*\\*" (buffer-name)) 0))
(linum-mode 1)))
(define-globalized-minor-mode my-global-linum-mode linum-mode my-linum-on)
(my-global-linum-mode 1)


--
__ _
/ ) / // /)
/--/ ____ __/ _ // //
/ (_/ / <_(_/_</_</_//_
/>
</

Test Send From Emacs

Just A test here.

2010年4月22日星期四

__declspec( ) and _imp__

if you are writing a DLL and you want to make the
symbol available in the export table WITHOUT using the DEF file:

__declspec(dllexport) int FooBar();

if you are writing a component and you want to use a function that is
implemented a DLL:

__declspec(dllimport) int FooBar();

if you want to use a function that is implemented in a library (a real
library, not a stub library)

int FooBar();

pycurl python 2.6 win32 build, also openssl 1.0.0 libcurl 7.20.1

the building process is .... 
modified some .c .h Makefile..
finnally got it


downloading:(a exe installer as other py modules)

 pycurl.version 'libcurl/7.20.1 OpenSSL/1.0.0 zlib/1.2.5 c-ares/1.7.1 libssh2/1.2.5'