Flash movie test

March 26th, 2006

<p>Contact Keith Burnett, and tell me what kind of browser you are using</p>

It is possible to upload swf files and embed them in blog posts using WordPress, but you have to either disable the Texttile formatting or remove all the new lines in the pasted Object tag in the html.

Straight line graphs

March 26th, 2006

A straight line graph

Mac OS X Tiger has Grapher hidden away in the Utilities menu. This application can draw graphs and export the resulting plots as TIFF or PDF. This makes it easy to set puzzles and provide illustrations (GIF export would be even easier!).

There must be a simple free or open source graph plotter for Windows that will make plots for Web pages. Greg VanMullem’s MathGV looks like it might do.

Gestures!

March 25th, 2006

“Gestures that complement rather than simply illustrate verbal instructions can boost children’s ability to complete problems in mathematics, researchers report.”

Complementary gestures are illustrated as…

“When using complementary gestures, however, the teachers pointed to each of the numbers on the left and then signalled the subtraction of the five on the right side by scooping their hand away from the number.”

From a New Scientist report of an experiment with 160 primary school children. I can carry on waving my hands in lessons basking in the glow of peer reviewed evidence!

City centre land use

March 25th, 2006

Google Earth picture of bluecoates garden

A Google Earth image showing the Bluecoates Building in Liverpool, currently under ‘renovation’, and the famous Bluecoates garden. This small green space in the middle of the busy central business street of Liverpool was a popular meeting place. The effect was enhanced by the sculptor’s studio and pottery selling gallery that used to stand on the south boundary, creating an enclosed space. The studio and gallery have been demolished as you can see from the image above.

The availability of images of city centres like this suggests various activities based on the plan view they give: land use percentages, networks of streets and access points and so on.

Google Earth

March 24th, 2006

Google Earth has been available for the Mac for some months. Totally addictive when used with broadband…

Textwrangler: remove blank lines

March 19th, 2006

To remove blank lines from a text file in Textwrangler, you have to run search and replace, tick the ‘use Grep’ option and then search on the pattern ^\r. Replace with nowt and the effect is magic. A boon to the ‘everything in one big text file’ advocates.

The pattern < /?[^>]> can be used to remove all the HTML tags from a file (see below). I’d advise replacing the tags with a single space. The pattern should not have a space after the first angle bracket – WordPress and Textile are just playing up with the formatting.

WordPress export

March 18th, 2006

WordPress is a very flexible blog publishing script – but it does depend on a server-side database and the ‘pages’ exist only as database reports. I’m moving over to a static page system (one that produces ‘real’ .html files on the server) based on the minimal blosxom script. I need a way of exporting all my posts from WordPress as a single text file.

The least technical way to do this seems to be to create a special theme (called ‘export’) that has just the text of each post – no html page tags. The total content of the index.php file for such a theme is shown below…
< ?php if ( is_home() || is_single() ) : ?>
< ?php if (have_posts()) : ?>
< ?php while (have_posts()) : the_post(); ?>
$$START
< ?php the_title(); ?>
< ?php print("/n"); ?>
Cat: < ?php the_category(', ') ?>
< ?php print("/n/n"); ?>
< ?php the_content(); ?>< ?php print("/n/n"); ?>
$$END
< ?php endwhile; ?>
< ?php else : ?>
poo
< ?php endif; ?>
< ?php endif; ?>
Once uploaded to a folder called (say) ‘export’ in the wp-themes folder along with a stub css file so the theme can be loaded properly by the wordpress presentation system, I set the Options to list 400+ posts on the home page and select the ‘export’ theme. I then View | Source in the Web browser and copy and paste the plain text into a text editor.

In the editor (Textwrangler or Textpad according to OS) I do a search and replace on the URLs of image files to point them to the new folder. Then I run a Grunge Perl™ script that chops the posts into separate files saved in folders that have the names of the categories – as blosxom needs. The results are OK so far, a few posts with ‘more’ tags embedded need sorting, and any links between posts need to be changed by hand.