Monday, January 04, 2010
Sunday, November 08, 2009
Tuesday, October 06, 2009
Interesting article on web page performance and impact of CSS selectors. The article includes some test metrics to backup the author's position and history on the question of CSS selectors impact on page performance.
Bottom line: tweaking for performance only matters with extremely large page sizes. For general to moderately complex pages there is no noticeable benefit gained with CSS selector optimization.
Also has some links in comments section which may be worth following.
Monday, October 05, 2009
Tuesday, September 29, 2009
Thursday, September 24, 2009
This site is very useful and performs well. Lets you test the expresson, view matches, and replace string elements. Not pretty, but performed flawlessly.
This one looks interesting but I've found the performance a bit twitchy. Still, it lets you visually examine your expression and can probably help you find some syntax errors quickly. It's probably going to be worth re-visiting this site to see how it grows.
Sunday, September 13, 2009
Although the script interpreter will insert semicolons at the end of lines, this may break down if the script is stripped of all needless white space. Therefore a good rule of thumb seems to be to put semicolons at the end of lines to clearly indicate the end of statement. Google's practice of using semicolon as statement delimiters seems to be adequate as well.
Thursday, December 25, 2008
Sample countdown timer:
As you can see, the only requirements are that we know the target time and the current time. Current time is easy, and can be obtained using the following code:
I should note that this script has only been tested in Firefox, I don't know if it will work in other browsers. Also, please note the example has seconds resolution, not milliseconds (to get milliseconds, don't divide the epoch times by 1000). That's all, this script is simple, but that should now allow you to take it and improve it as you may see fit.
Monday, November 03, 2008
Saturday, September 20, 2008
- Linux version 2.6.24-1-686 (Debian 2.6.24-7).
- X.org X Server version 1.4.2.
- Video chipset is ATI Radeon HD 3650
- I am running with the testing (Lenny) packages
The following xorg.conf file is what I am currently running with, it is sufficient for providing me with an X desktop spanning both my displays.
Configuring X on a new box was relatively easy. After the new hardware was all in place, and the latest ati driver downloaded, I backed up the original xorg.conf file and run:
This created a vanilla configuration which got the X server up and running, although the desktop was mirrored across both displays. The next step is to configure dual display to emulate one large screen. For this you will need the xrandr tool, which is part of x11-xserver-utils.
After you have the tools installed, run xrandr at the command prompt, this should give you an output similar to the following:
In my case, I have two monitors connected, DVI-I_1/digital and DVI-I_2/digital. Keep those names handy, you will need them later on. Next, we need to define both monitors in xorg.conf. This is done through the "Monitor" sections in the file. I defined "Monitor1" to be "RightOf" "Monitor0". If your configuration is different, you can reverse that. . . or swap monitor cables at the video card.
With the monitors defined, we attach them to the video card through the "Device" section. Notice the monitor labels are the name as is used by xrandr AND prefixed with "monitor-". This is important and took me a while to figure out.
Now we define the screen through the "Screen" section, this defines the geometry. With older versions of X I had to be pretty explicit here how the screen was to be emulated. With the latest version I just need to identify the graphic device which is driving the display.
This is it, when X restarts, it will now come up with one large virtual screen. If this worked, only one of the screens should now have the login prompt.
Final notes: the RADEONHD driver is still in it's infancy; DRI is not yet supported, so it has no 3d capabilities. You can also use the graphical interface to xrandr to configure multi display after you log into X. It's quick and easy although not permanent - you will need to repeat the task when you re-start X. The tool is called "grandr" and is contained in a debian package by the same name.