Monday, June 6, 2011

Browser-Specific Styles with the Dojo Toolkit

Browser-Specific Styles with the Dojo Toolkit

I was fascinated to learn how dojo.uacss.js adds browser specific CSS classes to html element which make writing maintainable CSS straightforward by providing simple ways to write browser specific CSS customizations.

Read more above.

Saturday, June 4, 2011

A python script for windows which works like which command on unix

Ned Batchelder: wh.py

Monday, May 16, 2011

svn: OPTIONS of '...' could not connect to server

I had this weird problem today with SVN. I was able to browse it using the web browser. I was able to update from SVN, but when I was trying to commit something, I got an error:

svn: OPTIONS of 'http://....': could not connect to server.

This looked weird. Finally I disabled my wifi link and restored a wired ethernet connection to my LAN. After this, the commit went fine without any issues.

I am still wondering what was the real cause behind this problem.

Thursday, May 5, 2011

The Safe Bool Idiom

The Safe Bool Idiom: "Learn how to validate objects in a boolean context without the usual harmful side effects."

Saturday, February 5, 2011

Building ssl for Python 2.5.4 on Windows

I went through the instructions from this blog post:

In the end while building ssl, I faced a one last problem:



C:\MinGW\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.5\Release\ssl\_ssl2.o build\temp.win32-2.5\Release\ssl\_ssl2.def "-LC:\Program Files (x86)\GnuWin32\lib" -LC:\Python25\libs -LC:\Python25\PCBuild -lssl -lcrypto -lwsock32 -lgdi32 -lgw32c -lole32 -luuid -lpython25 -lmsvcr71 -o build\lib.win32-2.5\ssl\_ssl2.pyd -static
build\temp.win32-2.5\Release\ssl\_ssl2.o:_ssl2.c:(.text+0x1724): undefined reference to `_wassert'
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1


As you can notice, the linker is complaining about _wassert.

After some googling, I ended up opening the ssl\_ssl.c file in the ssl source package and added the following lines at the beginning (after Python.h include).



#ifdef __MINGW32__
#undef assert
#define assert(expr) ((void)0)
#endif


The build went smoothly after that.