Monthly Archives: October, 2009
Rackspace cloud hosting (256MB Ram) and wordpress performance issue
Any one out there is using rackspace cloud hosting with 256MB Ram and hosting a wordpress? I was doing fine with it, but after I install the subversion on the Fedora VM, I found my apache become very very slow and take over 60s to serve a request….
Actually this is the second time for [...]
Nice way to check dom node className
It happen quite often to me that I need to check the element className in the event handler and to determine what function to trigger. element.className contains all the class name separated by space. e.g. “classA classB classCCC”. So it is bad to check the className like:
if (element.className === “classA”) {…}
or
if (element.className.indexOf(“classC”) > -1) [...]
Detecting page dimension with Javascript
I just come to a problem that need to create a canvas element the will cover on top of the whole page. This prevented me from using style.width and style.height as the drawing will become scaled by the style setting. So I have to calculate the exact page width and height then assign it to [...]