…are just poor rip-offs of the Apple iPhone ads. How sad.
Category: Etc
Everything that doesn’t fit anywhere else
I’d completely forgotten about this old TV show until Kotke mentioned it. I watched it whenever I could and was always jealous they got to place Dragon’s Lair (too rich for my blood) for the end…
One thing I’m noticing with all these old game shows and shows from the 80’s in general: the production values are really low compared to today’s stuff, but I find the shows were a lot more entertaining. For all the flash and polish on today’s stuff, there’s just no meat any more. I mean, Deal or No Deal? Very fancy, but it’s horribly dumb. I dunno. Maybe I’m just getting old.
Dojo’s little gems
I really enjoyed Mitch’s article on YUI Lang’s little gems and thought it might be handy to see how to do the same things with Dojo. Here’s the translation:
Trim
var trimMe = " trim me please "; //YUI var trimmed = YAHOO.lang.trim(trimMe); //Dojo // - exactly the same trimmed = dojo.trim(trimMe);
Substitute
var processText = function(key, value) {
return value.toUpperCase();
};
//YUI
YAHOO.lang.substitute('Hello {world}', { world: 'earth'}, processText);
// Dojo
// - Named placeholders are prefaced with a $
// - No support for extraValues from Mitch's example
dojo.require("dojo.string"); // not in base distribution
dojo.string.substitute('Hello ${world}', { world: "earth" }, processText);
Later
// YUI
// - Docs indicate this return type void, which is a timer object?
YAHOO.lang.later(200, foo, "method", [{ data: "bar" }]);
// Dojo
// - No abstraction for timers in Dojo
// - Can use hitch to set calling scope for function
setTimeout(dojo.hitch(foo, "method", { data: "bar" }), 200);
// or
setInterval(dojo.hitch(foo, "method", { data: "bar" }), 200);
Merge
var defaults = { color: "red", answer: 42 };
var config;
//YUI
config = YAHOO.lang.merge(defaults, { color: "blue" });
//Dojo
// - mixin takes a variable number of arguments
// - Values are written to the first object, hence passing {}
// - Later values have precendence
config = dojo.mixin({}, defaults, { color: "yellow" });
SqueezeCenter + Hardy
I upgraded my Ubuntu boxes to 8.04 last night and ran into but one issue: my SlimServer (now SqueezeCenter) would not start. Apparently I’m not the only one with this problem, and solution for now is to jam some more lines into your /etc/apparmor.d/usr.sbin.mysqld
/var/lib/squeezecenter/cache/ r, /var/lib/squeezecenter/cache/my.cnf r, /var/lib/squeezecenter/cache/mysql.startup rw, /var/lib/squeezecenter/cache/mysql-error-log.txt rw, /var/lib/squeezecenter/cache/squeezecenter-mysql.pid w, /var/lib/squeezecenter/cache/squeezecenter-mysql.sock w, /var/lib/squeezecenter/cache/MySQL/ r, /var/lib/squeezecenter/cache/MySQL/** rwk,
According to the bug report, the installer is fixed in trunk, so with the next release (7.0.1?) this won’t be an issue.
Congrats to the Ubuntu guys for such a seamless upgrade! It was really smooth.
There’s this ruined castle on an island just north of Cold Spring that I always wanted to get out and photograph, but never got the chance. However, I found an excellent write-up of what it is (Bannerman’s Island Arsenal), along with some wonderful photos by Shaun O’Boyle (buy here). Definitely worth a read and a look, and possibly a visit if you’re in the area.
