2009/03/29

Perception is Truth

It's time to green this old (White) House - again:

"During George W. Bush's two terms, workers installed three solar systems, including a thermal setup on the pool cabana that heats water for the pool and showers, and photovoltaic panels atop a maintenance shed that supplement the mansion's electrical supply. "

2009/03/18

FactCheck.org: Education Spin

FactCheck.org: Education Spin:

  • The high school dropout rate hasn't 'tripled in the past 30 years,' as Obama claimed. According to the Department of Education, it has actually declined by a third[...]
  • Obama also set a goal 'of having the highest proportion of college graduates in the world' by 2020. But in terms of bachelor's degrees, we're nearly there. The U.S. is already second only to Norway in the percentage of adults age 25 to 64 with a four-year degree, and trails by just 1 percentage point.


Nobody listens to the real climate change experts - Telegraph

Nobody listens to the real climate change experts - Telegraph:

"Far from rising with CO2, as the models are programmed to predict they should, the satellite-measured temperature curve has flattened out and then dropped. If the present trend were to continue, the world in 2100 would not in fact be hotter but 1.1C cooler than the 1979-1998 average."
"The best correlation for temperature fluctuations is not CO2 but the magnetic activity of the sun. (For an admirable summary of proceedings by the Australian paleoclimatologist Professor Bob Carter, Google "Heartland" and "Quadrant")."


Here's an example:
"Dr Soon also described the empirical test as to whether extra carbon dioxide will produce extra warming that is conducted in Salt Lake City, and other similar cities, every winter. There, a winter CO2 dome attains CO2 levels up to 500 ppm, as compared to the present background atmospheric level of 380 ppm. Yet no discernible enhanced warming is present in the measured temperature curve for Salt Lake City. It follows that the worldwide rush to inhibit CO2, at huge cost, will have no effect on future climate whatsoever. “The role of CO2 in the climate system is just miniscule”, Dr Soon said."

2009/03/17

Scripting News: 3/17/2009

Scripting News: 3/17/2009:

"to the assembled educators -- you owe it to the next generations, who you serve, to prepare them for the world they will live in as adults, not the world we grew up in. Teach all of them the basics of journalism, no matter what they came to Cal to study. Everyone is now a journalist. You'll see an explosion in your craft, but it will cease to be a profession."


Emphasis added, etc.

2009/03/16

[CentOS-virt] CentOS 5.1 guide for VMware Fusion

I just installed CentOS 5.2 for x86_64 under VMware Fusion 2.0.2. Most things worked without tweaking, but the mouse cursor was always offset from the host system mouse, even when VMware was running full-screen.

This post took care of the problem. If I'm reading correctly, the problem was in X11 configuration, and the fix was to use the vmmouse driver with the "CorePointer" option.

Thanks, Bradley Sepos!

2009/03/13

d(rank)/dt > 0

PolitiFact | 8th graders are in 9th, but showing improvement, not falling:

"We considered giving the president partial credit since American students did come in 9th. But the point of his statement was that they had 'fallen' to that position and that mathematics performance in the U.S. is getting worse relative to other countries. And that's just plain False."

Change you can see through

Obama Administration Declares Proposed IP Treaty a 'National Security' Secret | Threat Level from Wired.com:

"...now, like Bush before him, Obama is playing the national security card to hide details of the controversial Anti-Counterfeiting Trade Agreement being negotiated across the globe."
"...the proposed trade accord would [likely] criminalize peer-to-peer file sharing, subject iPods to border searches and allow internet service providers to monitor their customers' communications."


Not good.

2009/03/08

The TSA oversteps its bounds. Again.

.:: Aero-News Network: The Aviation and Aerospace World's Daily/Real-Time News and Information Service ::.:

It presently appears that anyone on the ramp without a TSA ID is subject to fines or convictions in unknown amounts and arrest or detainment by unknown persons...


It is clear the Montrose Airport Appreciation day [...] could be a bit of an issue and the TSA suggested local law enforcement could somehow staff the escort necessities on the field. How exactly do you escort a large milling crowd?


[2009/03/11]

"As for our common defense, we reject as false the choice between our safety and our ideals." If the President really meant what he said, then he will act quickly to rein in the TSA.

2009/03/05

Web Hooks ≈ callback URLs

WTF is a Web Hook?:

"In short, a web hook, or "http callback" allows you to subscribe to another website's events with a URL. You tell a website, "Hey, when some event happens, send some information about it to this URL". Why? It doesn't matter, it's up to the developer to decide what to do with that information."


(low-lumen) Enlightenment

I begin to see how to apply component-oriented techniques to distributed/federated web application development. Thanks to John Herren (bwo Tim O'Reilly) for the clue.

Stainless for OS X Leopard

Stainless for OS X Leopard:

"A prime example is parallel sessions, which allow you to log into a site using different credentials in separate tabs at the same time. This new technology is woven throughout Stainless, from the private cookie storage system, to session-aware bookmarks that remember the session in which they were saved."


That would be useful for website development, whether testing authentication or propagation of messages/event notifications among users.

Guess I should download and give it a try. So many new tools, so little time...

2009/03/04

FF3.1b2, Safari 4b, and html 5 canvas, continued

The previous post described improved support for the HTML 5 canvas. It turns out the latest betas of both Firefox and Safari also support the canvas toDataURL method.

An obvious use for this method is to let users easily copy and paste rendered depictions into other applications.

    function saveToBitmap() {
var canv = $('#canv');
var img = $('img#bitmap');
img.attr('src', canv[0].toDataURL());
};


toDataURL_result.png

Firefox 3.1b2, Safari 4 Beta and HTML 5 canvas text

This will be useful for depicting chemical structures using HTML5 canvas: both Safari 4 beta and Firefox 3.1b2 support the HTML5 canvas text rendering APIs.

There are still rough edges, e.g. it's hard to measure text dimensions and therefore hard to position text properly. Still, it's great to see!

$(document).ready(function() {
function redraw() {
var canv = $('#canv');
var w = canv.width();
var h = canv.height();
// Let canvas know how big CSS wants it to be.
canv.attr("width", w);
canv.attr("height", h);
var ctx = canv[0].getContext("2d");

ctx.clearRect(0, 0, w, h);

var msg = "Hello, Safari text.";
var fontSpec = "24pt Verdana";

// Find out the dimensions of the rendered msg.
var e = $('<span style="visibility:hidden;font:' + fontSpec + '">' +
msg + '</span>');
$('body').append(e);
var tw = e.width();
var th = e.height();
e.remove();

ctx.save();
ctx.translate(w/2, h/2);
// Indented to highlight transformation state.
ctx.save();
ctx.rotate(-45 * Math.PI / 180.0);
ctx.translate(-tw/2, th/2);
ctx.font = fontSpec;
ctx.fillText(msg, 0, 0);
ctx.restore();
ctx.restore();
};
redraw();
});

2009/03/03

Ubuntu 8.10 and Intel i845 chipsets

Today I tried to install Ubuntu 8.10 on an old Dell Inspiron 1100 laptop. Most of the process went well, but when I tried to login the screen went black.

Okay, sometimes it went to the default amber Ubuntu background color. No matter: I never got any windows or menus. Since I was unfamiliar with Ubuntu's key bindings, the only way out was to cycle power.

It turns out that compiz, which provides the default Ubuntu 8.10 window manager, does not like the old i845 graphics chipset.

Google eventually turned up a way to disable compiz. Here's what worked for me.

Summary

Login using a Failsafe Terminal session, remove compiz and compiz-core, then logout and log back in using an Xclient script session.

Details

  1. Boot as usual.
  2. Before logging in, click the Options link at the bottom left of the display.
  3. Click Select Session...
  4. Click the Failsafe Terminal radio button.
  5. Click the Change Session button.
  6. A dialog will pop up, explaining that this is the Failsafe xterm session. Click OK.
  7. An xterm will open. At its prompt, type
    sudo apt-get remove compiz compiz-core
  8. Enter your password, etc. and confirm the package removal.
  9. When the removal completes, type
    metacity --replace &
    (I'm not sure this is necessary.)
  10. Exit the shell.
  11. When the login screen re-appears, click Options.
  12. Click Select Session...
  13. Click the Run Xclient script radio button.
  14. Click Change Session.
  15. Login again.


TODO

When I get more free time I need to repeat the entire installation process, this time collecting detailed information on the failure. Given enough info, I bet the Ubuntu and/or Compiz teams would be able to fix this problem.

2009/02/25

Japan's boffins: Global warming isn't man-made - The Register

Japan's boffins: Global warming isn't man-made — The Register:

The Register's title is an understatement. The report from The Japan Society of Energy and Resources goes beyond questioning human origins of global warming. It also claims that the pattern of warming since the mid-20th century has ceased.

Excerpts:

One of the five contributors compares computer climate modelling to ancient astrology. Others castigate the paucity of the US ground temperature data set used to support the hypothesis [emph. added], and declare that the unambiguous warming trend from the mid-part of the 20th Century has ceased.


The article includes a translation of parts of the report.
Global mean temperature rose continuously from 1800-1850. The rate of increase was .05 degrees Celsius per 100 years. This was mostly unrelated to CO2 gas (CO2 began to increase suddenly after 1946. Until the sudden increase, the CO2 emissions rate had been almost unchanged for 100 years). However, since 2001, this increase halted. Despite this, CO2 emissions are still increasing.


There is no prediction of this halt in global warming in IPCC simulations.


Hm, I thought there was. Certainly the halt has been discussed online — fun example here — and it has been attributed to a trough in sunspot activity...

But the report addresses this point, too, and goes on to say
...climate change and solar activity's relationship is inconclusive. It is necessary to increase research efforts into the relationship between Earth's climate fluctuations and solar activity.

2009/02/24

ADC - CSS Recipes for WebKit

Safari 4 Beta has some nice features. Some have apparently been around since Safari 3, but I didn't notice. For example:

ADC — CSS Recipes for WebKit:

"Getting columns right on webpages using pure CSS instead of HTML tables has always been tricky. Since the CSS3 properties for multi-column layout are implemented in Safari and WebKit, you can clearly define the number of columns [and] the gap between the columns...

This code defines that the HTML in the columns div tag should be presented in three columns. Each paragraph is its own column."


Wow, that's nice! It means you can define a fluid multi-column layout and have content flow between those columns.
safari_4_columns_1.png

Granted, the layout can do some strange things when images bleed across columns.
safari_4_columns_2.png

Maybe one of the -webkit-column-break-* properties can control this.

[Update: Of course Firefox 3 supports most of these column properties as well, via -moz-column-*. Firefox 3.1 beta 2 extends support to properties such as -moz-column-rule.]

2009/02/18

Canvas for a Text Editor?

Canvas for a Text Editor?:

The HTML 5 specification includes an API to render text on a canvas. Unfortunately, this portion of the canvas API has only been implemented by Firefox, though it's already in WebKit nightly builds (and thus will very likely be in a future version of Safari) and Chromium nightlies (from which Chrome versions are derived). We expect Opera will soon as well.


Support for canvas text in browsers other than Firefox will be a great thing for web applications. I've built 2D chemical structure viewers using Canvas, and the clunkiest aspect has been the overlaid text divs for atom labels. (Thank goodness for TextCanvas. Without it, I wouldn't have made the effort.)

You don't really notice text overlays are being used unless you accidentally click-drag your mouse over a depiction, or you set your browser preferences to disallow text smaller than a set size.

2009/02/17

Flex: Stopping event propagation from itemRenderers | kahunaburger

Flex: Stopping event propagation from itemRenderers | kahunaburger:

"My problem was that whenever I clicked on one of the menu items (the four icons at the bottom of the right tile), the mouse event would not only execute the action associated with the menu-item, no, the event would propagate up the chain and would result in the current tile being selected as well. Not good - this has to stop. "


Kahunaburger just saved me a lot of effort. The posted solution works for DataGrids as well.

macosxhints.com - 10.4: Use Automator to batch add Spotlight comments

Edited lightly:

macosxhints.com - 10.4: Use Automator to batch add Spotlight comments:

10.4: Use Automator to batch add Spotlight comments

By: cafemomo on Wed, May 18 2005 at 6:24AM PDT

In Automator, create the following workflow:

1. Finder > Get Selected Finder Items

2. Spotlight > Add Spotlight Comments to Finder Items

2.1. Keep 'Append to Existing Comments' checked

2.2. Open the Options disclosure area and check 'Show Action When Run' so you can set comments each time

3. In Automator, go to File > Save as Plug-in..., enter 'Add Spotlight Comments' as the 'Save Plug-in As:' name, and make sure 'Plug-in for:' is set to 'Finder'

4. Save and close Automator (if it asks you to save again, do so)

Now in Finder, select some items you want to add comments to and right-click (or control-click) and select 'Add Spotlight Comments' from the 'Automator' submenu.


Handy, e.g. for tagging related travel video clips which have been imported with Final Cut Pro.

Juxtaposition

Op-Ed Columnist - Yes, They Could. So They Did. - NYTimes.com:

It's a plug-in electric car that is also powered by rooftop solar panels -- and the two young women, recent Yale grads, had just driven it all over India in a 'climate caravan' to highlight the solutions to global warming being developed by Indian companies, communities, campuses and innovators, as well as to inspire others to take action.


Charging ahead with energy independence - SantaFeNewMexican.com:
Zappy is an all-electric vehicle under construction in Dan Baker's garage off Old Santa Fe Trail. Baker -- known around town as an avid cyclist -- also is a big solar-energy and electric-vehicle proponent. He'll run Zappy off the 5-kilowatt solar photovoltaic system he had installed on his roof last September.


Purpose Built Vehicles - Bright Automotive (of Indiana):
[Our vehicle] operates in all electric mode for the first 30 miles, then operates in hybrid mode with a full range of 400 miles. Bright Automotive's smart vehicle architecture is also designed to return stored energy back to the electrical grid - potentially reducing peak energy demand.