December 2007 Archives

Emacs in MacOS X 10.5 Leopard

| No Comments | No TrackBacks
Simple web surfing at night brings me to this Emacs blog post saying the built-in Emacs on MacOS Leopard does have Carbon support (which means GUI for Mac Emacsen like me.) I am a big fan of Emacs but I never liked it in a terminal, it's such a limited environment in a terminal so I always use GUI Emacs for all time.

Anyway, the second comment for that post pointed out that one can use the Emacs.app wrapper comming with official emacs CVS repository to build (without compile) a Emacs.app, I just did it and uploaded that to my .Mac public folder. Go download that at here: Emacs.app.tgz (25 kb). You must be using Leopard otherwise it won't work.

Labels: , ,

jquery way to limit image size.

| 2 Comments | No TrackBacks

UPDATE: You might be interested in reading this article: Javascript's way to know the image size.


Find all images under current box, and limit their width to at most the same as current box.

        var w = $(this).width();
        $(this).find("img").each(function() {
            if ( $(this).width() > w ) {
                $(this).width("100%");
            }
        });

This is something similar to always wrap a div around an image. Only it's a piece of un-obstructive javascript instead of over-augmented-semantic-hack-sorting-out-bad-css-box-model.

This generally works good on Firefox, IE7. Didn't try others.

Labels: , ,