andelf fledna Feather

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'
 

2010年4月21日星期三

Compile openssl 1.0.0 with mingw-gcc 4.4

the point is:
mingw's wincrypt.h lost many things
so add this to e_capi.c 

// andelf
#define CERT_STORE_PROV_SYSTEM_A            ((LPCSTR) 9)
#define CERT_STORE_READONLY_FLAG                0x00008000
typedef struct _PUBKEY {
        DWORD   magic;
        DWORD   bitlen;                 // # of bits in modulus
} DHPUBKEY, DSSPUBKEY, KEAPUBKEY, TEKPUBKEY;
WINADVAPI
BOOL
WINAPI CryptEnumProvidersA(
    DWORD dwIndex,
    DWORD *pdwReserved,
    DWORD dwFlags,
    DWORD *pdwProvType,
    LPSTR pszProvName,
    DWORD *pcbProvName);
// end andelf

enjoy your ./Configure mingw && make