Thursday, February 11, 2010

dygraphs plot x-axis labels align with grids

Recently, I learned to use the dygraphs JS library for 2d chart. Dygraphs is designed to
display dense data sets and enable users to explore and interpret them.

I like it more than Flot, another JS ploting library.

One problem I found was that the x-axis labels do not align with the grids in FireFox, while it is fine in Chrome. The fix is quite simple, just never use align = center in the
where the plot is embedded. A note from the author of dygraphs.
dygraphs are not happy when placed inside a tag. This applies to the CSS text-align property as well. If you want to center a Dygraph, put it inside a table with align = center set.



Sunday, January 17, 2010

HP LaserJet 1020 on Ubunut 9.04

After an update, the printer does not work any more.
Linux hpws 2.6.28-17-generic #58-Ubuntu SMP Tue Dec 1 18:57:07 UTC 2009 i686 GNU/Linux
Delete the printer and reinstall HPLIP
sudo apt-get install hplip
The printer is found, but still does not print.
Only after clicking Download Firmfare in HP Device Manager, it starts to respond to the printing request.

Wednesday, December 30, 2009

What is the web service language/framework Barbara Liskov mentioned

In her talk titled "The Power Of Abstraction" given in OOPSLA2009, Barbara Liskov mentioned that she started to learn web services programming, and the language or framework she used has many global variables. I really wonder what she was using.

The talk is good and especially reveals the history of development of abstract data type by the list of influential papers.

Friday, December 11, 2009

Zero copy for Java HTTP file server

This makes it impossible for normal Java-based HTTP service to take the advantage of zero copy.

in reference to:

"It is not possible to create a channel for an arbitrary, pre-existing socket, nor is it possible to specify the SocketImpl object to be used by a socket associated with a socket channel."
- SocketChannel (Java 2 Platform SE 5.0) (view on Google Sidewiki)

Friday, December 4, 2009

Free DNS servers

Maybe some ISP's like this. The last time I tried to find a free DNS is two years ago when the ISP DNS was down. I like the ip they choose, easy to remember.

Maybe DNS is the first place that browsing statistic can be collected.

in reference to:

"To try it out: Configure your network settings to use the IP addresses 8.8.8.8 and 8.8.4.4 as your DNS servers or Read our configuration instructions."
- Google Public DNS (view on Google Sidewiki)

Friday, November 27, 2009

Rich Hickey on function, time, and process

All the concurrency and timing puzzles suddenly become reasonable after listening to his talk titled "Are we there yet". I borrowed the book of "Process and Reality" from the library, and started to learn Whitehead's system.

If you do multithreading programming, or play with JavaScript and XHR, or like Erlnag, Clojure, or Scala, then you would perhaps enjoy his talk.

Wednesday, September 30, 2009

/bin/perl^M: bad interpreter

After digging for a while, it turns out the cause is the perl interpreter on Linux cannot recognize the end of line character CRLF in windows files. What it expects is LF.

Using EOL as end of statement is not system independent.