Wednesday, February 29, 2012

Binomen Art - Trachycarpus fortunei

Trachycarpus fortunei Spelled Out (Left) and with Digital Overlay (Right)
Next up in the Binomen Art series is Trachycarpus fortunei, commonly called Chusan Palm or Windmill Palm. We’ve always used the latter common name. This palm is native to central China. From Quattrocchi: the generic name comes from the Greek trachys meaning “rough” and karpos meaning fruit and refers to the rough surface of the fruits. The specific name honors Robert Fortune, a 19th century Scottish botanist and plant hunter.

The Specimen

We’ve had this particular palm for over 20 years. For many years it was in a pot where it did not flourish. Only when we put in the ground and ignore it, did it take off. We have yet to see it produce flowers or fruits so we can’t confirm the trachys part of the name. It seems to do well in the Seattle climate with the occasional snow as shown from one of the pictures. T. fortunei is known to be pretty hardy.


The Installation

We hung the letters from the petioles of one fan. We fastened each of the letters with a single thread taken from the fibrous stem (not a trunk because it lacks true wood structure?). We threaded a needle with a single fiber and made a hole through each letter to suspend it. Weeks later, the “R” and “A” still remain while the other letters have fallen apart.

Trachycarpus fortunei with Snow – Jan 2012


Planning The Spelling

Trachycarpus fortunei Stem-Trunk Fiber
Trachycarpus fortunei Stem-Trunk FiberTrachycarpus fortunei Stem-Trunk Fiber

Tuesday, February 28, 2012

Travelmarx Music Picks – Winter 2012

Travelmarx Music Picks – Winter 2012

Music we’ve listened to at the end of 2011 and the beginning of 2012. Spotify playlist: Travelmarx Winter 2012.

1. Rickie Lee Jones (Pirates) - After hearing Rickie at the Jazz Alley, we went back to some of the albums with tracks she performed, including Pirates (1981) and the track Living It Up - musical story telling at its finest.

2. Fraser, Budd, Guthrie, Raymond (The Moon and the Melodies) - Memory Gongs played when you need to take it down a notch or two.

3. Augie March (Moo You Blood Choir) - The track Honey Month oozes lushness into our ears. We don’t know what it all means really. For a long time, we misread the track title as Honey Mouth - which could equally apply to the songs on this album.

4. Jóhannsson, Jóhann (Fordlandia) - A minimalist composition inspired by the failure of Henry Ford’s Brazilian rubber plant of the same name. Music to think by.

5. k.d. Lang and Siss Boom Bang (Sing It Loud). Play it loud and often. We like the title track Sing It Loud.

6. Max Richter (Infra) - We have a soft spot for Max Richter and his haunting music.

7. Feist (Metals) - Darker than past albums.

8. Slow Train Soul (Illegal Cargo) - Behind this funky effort is ½ of the Puddo Varano, Morten Varano. You might recognize a number of tracks if you’ve listened to any of the Hotel Costes series before.

9. M. Ward (Hold Time) - Great hooks and lyrics makes you want to listen again and again.

10. Bjork (Biophilia) - With iPad app. We are still trying to make sense of it all.

11. Rinocerose (Guitar Organisation) - A guilty pleasure.

12. Francois Poulenc - (Gloria) - Composed in 1959. We once sang Laudamus te in chorus and we keep coming back to it.

13. The Great Lake Swimmers (Ongiara) - Yes, it is still in heavy rotation in our headphones at work. There is a peaceful and easy feeling about this album. I think I Became Awake will be our 2012 theme song.

14. Uakti and Philip Glass (Aguas da Amazonia) - Two favorite artists, together.

15. Andrew Bird (Useless Creatures) - Please play at our funeral.

16. Finley Quaye (Vanguard) - We came to this album through the track Calendar.

17. William Orbit (My Oracle Lives Uptown) - Radioharp - some tracks are good, others a tad too sweet.

18. Jun Miyake (Stolen From Strangers) - After seeing the movie Pina which featured music from Miyake we just had to get this and we aren’t sorry.

19. Pina Soundtrack - The soundtrack to the Wim Winders film about Pina Bausch. Excellent movie and soundtrack.

20. Devendra Barnhart (Smokey Rolls Down the Canyon) - What can one say about this release? We love it. Shabop Shalom alone is worth it.

21. Cocteau Twins (Snow) - The Cocteau Twins do Frosty the Snowman? It was a big disconnect when we hear in Banana Republic of all places.

22. Wilco (The Whole Love) - We always start off saying “oh” another Wilco release and then we can’t stop listening to it.

23. Carmen Consoli (Elettra) - Love the waltz Sud Est.

24. Melody Gardot (My One and Only Thrill) - The whole album is great. To think we learned about this album in a spin class! Okay, it was a song used for stretching at the end.

25. Kate Bush (50 Words for Snow) - We were excited when we came upon the Director’s Cut earlier this year. Now this? Say it isn’t so. 

Thursday, February 23, 2012

McCoy Schering Mortar and Pestle Cups and Holly, Ilex aquifolium

McCoy Schering Mortar and Pestle Cups and Holly, Ilex aquifolium
This installment in the pots and plants series features sort-of-a-pot - really a cup - with holly, Ilex aquifolium. These cups represent mortar and pestles, the traditional symbol of the pharmacy. The handle is the pestle and the cup is the mortar. The cups here were produced in 1965 by McCoy Pottery for the Schering Corporation. The Schering Corporation is now part of Merck but has roots going back to 1851 when it was founded by Ernst Christian Friederich Schering in Germany.

You can read a detailed story of these mortar and pestles in this article Schering Mortar & Pestle Series. In a nutshell, the Schering Corporation started producing these cups (in several different materials besides ceramics shown here) and other items (e.g. cufflinks, note pad and pen set, swizzle sticks!) in 1963 as promotional items.

The writing and imagery on the cups can be decoded as follows:

- On the handle, the word “Coricidin ®” refers to the drug, Coricidin

- On the base of the cup, the words “secundum artem” mean “according to the arts” - the techniques used and known only by pharmacists for compounding

- On the rim of the cup, the phrase “Galen 131-201 A.D.” refers to the accomplished medical figure of antiquity, Claudius Galen

- On the bottom of the cup the name of the company “Schering” is written, arching over a stylized mortar and pestle

- On one side of the cup is a bust of Galen and on the other side, the common pharmacist’s symbol “Rx”

We will never look at these cups the same after finding out this information in the process of preparing this post. We do use them in our medicine cabinet to hold various tubes and toiletry odds and ends.

On to the plant, it is holly - well to be more specific, our neighbor’s holly. Didn’t think they would miss a few leaves. Holly’s binomial name is Ilex aquifolium. Quattrocchi says that the generic name is from the Latin ilex (elex), icis, the ancient name for the holm oak tree, Quercus ilex. Perhaps due to the similarity in leaves? Curiously, the specific name, aquilfolium, means Holly-like leaves. Names can be confusing at times if you read too much into them without knowing how the name got applied. The name of the family is Aquilfoliceae.

Ironically, holly seems to be rarely used medicinally.

McCoy Schering Mortar and Pestle Cups Showing Bottom Mark
McCoy Schering Mortar and Pestle Cups and Holly, Ilex aquifolium

Sunday, February 19, 2012

Spectral Light and Ushnu at Huanaco Pampa

Step 1: Light Comes Through WindowArcheoastronomy - Step 1, Light Comes in Window
Step 2: Light Reflects off Plastic Cover
Archeoastronomy - Step 2, Light Reflects on Panel
Step 3: Spectral Light Appears on Door
Archeoastronomy - Step 3, Light Shines on Door
The “spectral light” in the title of this post is an event that occurs every January 31st at our house. The event reminder pops up on our calendar as “Spectral Light on Bathroom Door”. It sounds spooky, but is quite simple. The angle of the sun on this day is such that it comes through an east facing window in early to mid-morning, bounces off a security panel plastic cover in an inner hall way and displays a ghostly light pattern on our bathroom door for a few minutes. The bathroom is on the north side of the house and does not receive direct sunlight. The event is one that lets us think of our house as a big calendar of sorts, our little bit of archeoastronomy in action.

There are several points to mention about this light. First, there must be corresponding event in late November but we have never recorded this event. Second, given that in Seattle the number of days of sun per year is not that great, that our spectral light appears magically in winter is all the more amazing. Third, last summer I was unfortunately only able to spend a hurried morning at the British Museum on the tail end of my Wainwright Coast to Coast Walk, but one display that stuck in my mind was a diagram of the Ushnu at Hunacopampa which showed the position of the rising sun on key dates in the year. In the diagram, the June Solstice, Equinox and the December Solstice are shown. Unfortunately or fortunately, our house was not built around key calendar times, so January 31st is what we are left with as a house-calendar date.  (Update: 2012-11-08 - we just saw it again today, approximately 42 days before the Solstice.)

Entrance to the British Museum and the Ushnu at Hunacopampa ExhibitEntrance to the British MuseumUshnu at Hunacopampa - British Museum

An ushnu is a pyramid-shaped, terraced structure that the Incas used for ceremonial purposes. Sort of a stage and throne rolled into one. Huánuco Pampa (in Spanish) is an Incan site that dates from 1470 to 1532 AD. The Huánuco region is in central Peru and served as an Incan administrative center. The role of astronomy at ushnu at Huánuco Pampa is discussed at the Universidad Nacional Mayor de San Marcos - Universidad del Perú web site.

Our house was remodeled in 2005-2006. Two changes we made make the spectral light event possible: a small bump out where the east-facing window is and the enlargement of a passage way. What if we had taken archeoastronomy into account when we were remodeling? The four most expensive words in remodeling: “While we’re at it…”
The Light Path Through the House
House Floor Plan for Remodel

Saturday, February 18, 2012

Weller Clinton Ivory, Peters and Reed Moss Aztec Vases and Dryopteris

Weller Clinton Ivory Vase - Dryopteris
In this installment of the pots and plants series we have a Dryopteris - wood fern - with two different vases: a Weller Clinton Ivory Vase and a Peters and Reed Moss Aztec Vase. We cut the Dryopteris a week earlier during some yard cleaning which explains its dried look in the photos. Wood ferns are common in the Northern Hemisphere.

First, a confession. We thought his was Polystichum polyblepharum - Tassel Fern - for the longest time. The ends of the pinnae and the blade itself have what look like “tassels” to us – hence the confusion - but really, the form is called cresting. (There is a good explanation of fern structures and what you call the parts of a fern at Native Plants for Georgia: Part 2 - Ferns.) We take comfort in the 1906 publication Gardeners’ chronicle, horticultural trade journal where, on page 27, we see the reference to tassels at the tips. Phew.

Anyhow, from our new best friend Quattrocchi [CRC World Dictionary of Plant Names - Who is Umberto Quattrocchi?] we were going to say that the generic name Polystichum comes from the Greek polys “many” and stichos “a row, series” referring to the sori (singular sorus) in many rows. The specific name ploybelpharum means many eyelashed, many fringed [DG] and refers to the bristly scales located along the mid-veins and pinnules. (Now, blepharitus, the inflammation of the eyelash follicles has a whole new significance.) The common name comes from the appearance of the fronds as they unfurl, looking droopy like tassels.

The last bit about the unfurling of the fronds giving rise to the common name Tassel Fern was the first hint that maybe it wasn’t P. polyblepharum. That tidbit along with the generic naming referring to rows of sori made us pause. (The arrangement of the sori is a key identification feature of ferns.) So the doubt entered our minds, we went to see Pina (the Wim Wenders movie about Pina Bausch (1940 - 2009)), came home, and realized it was Dryopteris. Pina helped us understand the pinna - so to speak. Case closed, or sort of. What species is it? (Boy is our record keeping spotty!) By the looks of it, it looks pretty close to Dryopteris affinis ‘Cristata’

Dryopteris Rachis FrondDryopteris Rachis Frond - LabeledPina Bausch

Other terms to keep in mind when thinking about ferns are ramenta and pinnules. Ramenta are the yellow-brown scales on the rachis (part of the stem of the frond). Wood ferns like D. affinis have ramenta as shown here. The pinnules are a secondary division of the pinnae - a leaflet of sorts. In D. affinis they are broadly rectangular with slightly serrated edges.

The specimen that the fronds in the photos come from is grown in a large clay pot under the cover of pear trees with sun-dappled shade. It has what seems to be called a ‘shuttlecock’ type of growth pattern that looks like a badminton birdie. It reaches several feet in height and width. The fronds are usually trashed by mid-winter so we typically remove all the fronds and let it start from scratch.

Okay, so back to Quattrocchi, where we find that Dryopteris comes from the Greek dryopteris (drys “oak, a wood” and pteris “fern”) given to the genus by Dioscorides to a black oak-fern, Asplenium onopteris. And, from Latin dryopteris for a plant similar to dryophonon “a sort of fern” a name given by Plinius. We decided to see if we could confirm this last tidbit of information. We found a copy of the reference Michel Adanson (1727 - 1806), Familles de plantes 2:20 at the Internet Archive (www.archive.org) and tried to look it the fact. Well, we found Dryopteris on page 20, but it’s not until you go to a table of names in the second part (2:560) that you see a mention of Plinius but under a different plants Gale (Myrica gale?). It was confusing to tease apart and figure out how Quattrocchi arrived at the statement, so let’s get on with this post and talk about pots. (Affinis means related to or like another species.)

Weller Clinton Ivory, Peters and Reed Moss Aztec Vases and DryopterisPeters and Reed Moss Aztec Vases - Dryopteris

The vases are thematically related in that they both were made by pottery companies at the beginning of the 20th century in Zanesville, Ohio. (There must be Dryopteris in Ohio?)

The Weller Clinton Ivory Vase we purchased a few years ago in an antique mall in Connecticut. It is about 9” tall and 4 ½” across at the top. It is an ivory color and is not signed. The Weller Pottery of Zanesville, Ohio was a prolific creator of high-end art pieces and functional commercial ware. This vase seems to be from the “middle” period of the Clinton Ivory line, circa 1915.

The Peters and Reed Moss Aztec vase we purchased a dozen or so years ago in a Pioneer Square antique shop. It was described to us as being made between 1905 and 1912, 7 ½” tall, 4 ½” across at the top. The vase is brown and moss green finish and the bottom is not signed. Peters and Reed Pottery (1897 - 1919) was bought out in 1920 and renamed Zane Pottery of Zanesville, Ohio.

Sori on the Back for a Dryopteris Frond and Excerpt from Gardeners’ chronicle, horticultural trade journal, 1906
 

Dryopteris affinis ‘Cristata’ Frond Parts Up Close (No Sori), Ramenta 
Fern Crests – Dryopteris
 

Friday, February 10, 2012

Binomen Art - Scalesia


When we first saw the generic name Scalesia we pronounced it as “Ska-LESS-ia”. After some rooting around on the web for another issue, we ran across this post from BirderNaturalist about a Galápagos cruise. In the post, the author points out that
“Presumably Darwin was the first to collect species from this genus, as it was named by his good friend Joseph Dalton Hooker. And presumably Hooker named it after a Mr. Scales, as that -ia ending is added to a proper name in order to coin plant genera. (Fuchsia was named after Leonhart Fuchs, Poinsettia was named after Joel Roberts Poinsett, etc. I just haven't been able to find out who Scales was, as internet searches always turn up other uses of that common English word.) Keep this in mind when pronouncing "Scalesia," so as to keep the one-syllabled name Scales intact – please, not sca-LEE-sia, which sounds more like a disease or an obscure country north of the Caucasus.”
Point taken. Joseph Dalton Hooker (1817 - 1911) read the paper An Enumeration of the Plants of the Galapagos Archipelago; with Descriptions of those which are new on March 4th, May 6th, and December 16th, 1845 and On the Vegetation of the Galapagos Archipelago, as compared with that of some other Tropical Islands and of the Continent of America on December 1st and 15th, 1846. Both appear in The Transactions of the Linnean Society of London, Volume XX.

Joseph Dalton Hooker’s Galápagos Papers
An Enumeration of the Plants of the Galapagos Archipelago; with Descriptions of those which are new - HookerOn the Vegetation of the Galapagos Archipelago, as compared with that of some other Tropical Islands and of the Continent of America - Hooker
In the An Enumeration… paper, Dalton states “The species of Scalesia form a very natural genus, and all those now to be described agree in every essential particular with the generic character, drawn up by Arnott from an examination of S. atractyloides alone.” Arnott refers to George Walker Arnott (1799 - 1868). While we are not 100% certain how this might have worked, it seems that Hooker deferred to an existing name, and that perhaps, Mr. Scales was a friend of Arnott?

Well, the idea that there might have been a Mr. Scales prompted us to dust off the William T. Stearn (1911 - 2011) classic Botanical Latin, first published in 1966. In Chapter XX, Formation of Names and Epithets in Latin, there is the section Names Commemorating Persons that lists the International Code for Botanical Nomenclature recommendations which include commemorating a person whose (sur)name ends in a consonant. In this case the letters ia are added, except when the name ends in er, when a or ia is added. Here’s are the relevant recommendations online: 20A.1 and 60B.1. Mr. Scales it just may be. But, we still think that the older, dead leaves do look like “scales” flattened against the trunk. Maybe someone didn’t follow the rules when naming the genus?

UPDATE 2012-03-28:  A reader (see comments) has kindly pointed out that the generic name Scalesia was meant to honor the Scottish botanist, William Alexander Stables (1810-1890) but the name got mangled. In a note in the Archives of Natural History the sleuthing that uncovered the etymological blunder is revealed. Thanks Anonymous.

Scalesia Binomen Art at Campo Duro
t

We are not exactly sure of the particular Scalesia shown here. Our guide claimed it was S. gordilloi, but we doubt that since that species seems to be found only on San Cristóbal Island, Galápagos. By the leaf alone, it looks more like S. cordata which is present on Isabela and is where this photograph was taken. This stand of Scalesia was photographed at Campo Duro in the Isabela highlands (lat -0.8723, long -91.0150 or 0d 52’ 20’’ S, 91d 0’ 54” W). The name was spelled with dried leaves found on the ground. The same guide said that some dried Scalesia leaves were used like tobacco.

Scalesia is part of the Asteraceae family and is endemic to the Galápagos Islands. The arborescent behavior - or tree-like behavior - is rare in the Asteraceae family. The species of Scalesia in the Galápagos Islands can be big flower trees! Scalesia are referred to as the Darwin’s finches of the plant world because they demonstrate the process of adaptive radiation. In short, adaptive radiation is the evolution of many species form a common ancestor. More specifically, adaptive radiation is a consequence of alliopatric speciation or geographical speciation. Speciation is the process by which a new species arise.

A species is a biological classification that refers to a group of organisms capable of interbreeding and producing fertile offspring (the main criteria). When a splinter-population of a species gets separated from the main (parental) population so they cannot interbreed anymore with the main population then the splinter population can give rise to a new species. In the case of Scalesia, you can think of seeds that floated, hitched a ride on a bird, or otherwise made their way to Galápagos Islands a few million years ago. In the new niche, the daisies evolved from a single or a few ancestors to fill the island niches, including moist uplands and arid lowlands. It’s unclear to us why in the moist uplands the Scalesia grow so tall. Is it because of the need to compete for light and/or gather the garúa mist and critical moisture during the dry season?

In Jackson’s Galápagos: A Natural History (Chapter 3) there is a good overview of evolution in the Galápagos. The splinter populations (or colonizing populations as he refers to them) that arrive are not usually a representative selection of the parent population, an effect referred to as the “founder effect”. Therefore, the colonizing population is different right from the start. Also, the colonizing population doesn’t have the inertia of the larger parent population to change and is subject to “genetic drift” which means that significant change can happen in just a few generations. And finally, when you think about it, if the colonizers are good long-distance colonizers, like mangrove, then it’s not likely that a new species will form in the new environment. Rather, it’s the plants and animals at the edge of their dispersal capability that give rise to the new races or species. So the daisy family gave rise to a new genus, Scalesia, and the mangroves didn’t.

Collecting Dry Scalesia Leaves to Spell Out the Generic Name and the Leaves Up CloseCollecting Scalesia cordata leavesScalesia cordata leaves

Monday, February 6, 2012

Java Program to Extract What’s in a Sonos Queue

Sonos Controller for Windows
This Java program takes what’s in the Sonos queue and outputs it to a list in a text file and an .m3u file. The origin of this Java program to extract the Sonos queue started with some work we did for the post A Simple Sonos JavaScript Application. A reader (see the comments) contributed a Java program to get the current queue and save its contents to a file. After that effort, we worked extensively on WPF Application to Save and Import Sonos Playlists and learned a few tricks. What we learned there, in particular, getting results recursively, we used to revise the initial Java queue extraction program. This post presents the revised program. It only gets what’s in the queue, so if you want to use this to save playlists you would first need to clear the queue, add a playlist to the queue, run this program (with the correct parameters), and repeat for as many playlists you want to save.

If you don’t know a lot about Java and running programs on your computer (in this case we show it for Windows), go see this post, Java, Apache Ant and Hello World.

You can run the code in several different ways, with Eclipse or just at the command line (just run “ant”) are probably the two most common ways. The program requires three inputs the IP address of a master device, the name of a folder to put the output files, and the name of the output file. Both a text version and an .m3u version of the queue are output.

To get the IP address you can use the Help menu in the Sonos Controller and it shows a summary of the devices it sees. The IP address can be found in the summary. Be warned though, the first item in the list is not necessarily the master and running this program without specifying the IP address of the master will not return any results. That said, if you are having trouble, just reduce a zone to one device and then it will be the master.

The Ant build task and the program are shown below.

Sonos Queue Extractor Running in Eclipse and at the Command Line with Ant
Sonos Queue Extractor - Java, EclipseSonos Queue Extractor - Java, ANT Task

How to Get the IP of a Sonos Device
1. Go to the Help Menu

Sonos Controller Windows
2. Get IP Address from Summary Information
Sonos Controller Windows

The Ant Task
<project name="SonosQueueExtractor " basedir="." default="main">
<property name="src.dir" value="src"/>
<property name="build.dir" value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="jar.dir" value="${build.dir}/jar"/>
<property name="lib.dir" value="lib"/>
<property name="main-class" value="Travelmarx.SonosQueueExtractor"/>

<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</path>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="compile">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" includeantruntime="false"/>
</target>
<target name="jar" depends="compile">
<mkdir dir="${jar.dir}"/>
<jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
</jar>
</target>
<target name="run" depends="jar">
<java classname="${main-class}">
<classpath>
<path refid="classpath"/>
<path location="${jar.dir}/${ant.project.name}.jar"/>
</classpath>
<arg value="192.168.2.155"/>
<arg value="c:\public"/>
<arg value="queue"/>
</java>
</target>
<target name="clean-build" depends="clean,jar"/>
<target name="main" depends="clean,run"/>
</project>
The Java Program: Sonos Queue Extractor
package Travelmarx;

import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.ProtocolException;
import java.net.URL;
import java.net.URLDecoder;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

import org.apache.commons.lang3.StringEscapeUtils;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;


/**
* Class responsible for extracting current Sonos queue to a playlist and text file.
*/

public class SonosQueueExtractor {

public static Integer maxPageResults = 50;
public static String queueName = "Q:0"; // the main queue, can't be used currently with playlist like SQ:14
public static OutputStreamWriter txtFile;
public static OutputStreamWriter m3uFile;
public static String ipAddress;

public SonosQueueExtractor()
throws MalformedURLException, ProtocolException, IOException, SAXException, ParserConfigurationException {

queryQueue(0);
}

private void queryQueue(Integer pageIndex) throws IOException, ParserConfigurationException, SAXException {
// Build HTTP request with SOAP envelope asking for details about the
// current queue.
URL url = new URL("http://" + ipAddress + ":1400/MediaServer/ContentDirectory/Control");
HttpURLConnection request = (HttpURLConnection)url.openConnection();

request.setRequestMethod("POST");
request.addRequestProperty("SOAPACTION", "\"urn:schemas-upnp-org:service:ContentDirectory:1#Browse\"");
request.setDoOutput(true);
request.setReadTimeout(2000);

Integer startPageResults = maxPageResults*pageIndex;
Integer numTotalMatches = 0;

request.connect();

OutputStreamWriter input = new OutputStreamWriter(request.getOutputStream());
input.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n");
input.write("<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\r\n");
input.write(" <s:Body>\r\n");
input.write(" <u:Browse xmlns:u=\"urn:schemas-upnp-org:service:ContentDirectory:1\">\r\n");
input.write(" <ObjectID>" + queueName + "</ObjectID>\r\n");
input.write(" <BrowseFlag>BrowseDirectChildren</BrowseFlag>\r\n");
input.write(" <Filter>upnp:artist,dc:title</Filter>\r\n");
input.write(" <StartingIndex>" + startPageResults.toString() + "</StartingIndex>\r\n");
input.write(" <RequestedCount>" + maxPageResults.toString() + "</RequestedCount>\r\n");
input.write(" <SortCriteria></SortCriteria>\r\n");
input.write(" </u:Browse>\r\n");
input.write(" </s:Body>\r\n");
input.write("</s:Envelope>\r\n");
input.flush();

// Read entire HTTP response, which is assumed to be in UTF-8.
BufferedReader output = new BufferedReader(new InputStreamReader(request.getInputStream(), "UTF-8"));
String oneResponse = new String();
String line;

while ((line = output.readLine()) != null) {
oneResponse += line + "\r\n";
}

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
DocumentBuilder db = dbf.newDocumentBuilder();
String root = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>" + xmlDecode(oneResponse);
Document doc = db.parse(new ByteArrayInputStream(root.getBytes()));
NodeList nodeList = doc.getElementsByTagName("TotalMatches");
numTotalMatches = Integer.parseInt(nodeList.item(0).getTextContent());
Integer nextPageResult = ((startPageResults + maxPageResults) < numTotalMatches) ? startPageResults + maxPageResults : numTotalMatches;
System.out.println("Writing " + startPageResults.toString() + " to " + nextPageResult + " out of "+ numTotalMatches + " matches.");

if (numTotalMatches > maxPageResults*(pageIndex + 1)) {
// Get more items, recursively
pageIndex += 1;
writeToFiles(oneResponse);
queryQueue(pageIndex);
}
else {
writeToFiles(oneResponse);
}

request.disconnect();

}

private void writeToFiles(String response) throws IOException {

int i = 0, j = 0;
i = response.indexOf("&lt;item", j);
while (i >= 0) {
// Loop over all items, where each item is a track on the queue.
j = response.indexOf("&lt;/item&gt;", i);
String track = response.substring(i + 8, j);
String trackNo, artist, title, unc;

trackNo = extract(track, " id=&quot;Q:", "&quot;");
trackNo = trackNo.substring(trackNo.indexOf('/') + 1);
unc = URLDecoder.decode(extract(track, "&gt;x-file-cifs:", "&lt;").replace('/', '\\').replaceAll("%20", " "), "UTF-8");
artist = extract(track, "&lt;dc:creator&gt;", "&lt;/dc:creator&gt;");
title = extract(track, "&lt;dc:title&gt;", "&lt;/dc:title&gt;");

txtFile.append(decode(trackNo + ". " + artist + ": " + title) + "\r\n");
m3uFile.append(decode(unc) + "\r\n");

i = response.indexOf("&lt;item", j);
}
}
/**
* Extracts text surrounded by markers from given string.
* @param s String to extract text from.
* @param start Start marker.
* @param stop Stop marker.
* @return Extracted text found between start and stop markers, markers
* excluded.
*/

private String extract(String s, String start, String stop) {
int i = s.indexOf(start) + start.length();

return s.substring(i, s.indexOf(stop, i));
}

/**
* Decodes HTML character entities. First changes &amp; to &, then uses Apache
* Commons Lang to decode the standard entities and then manually decodes a non-
* standard entity (&apos;).
* @param s Text to be decoded.
* @return Text with HTML character entities decoded.
*/

private String decode(String s) {
// Convert &amp; to &, &apos; to ' and let Apache Commons Lang about the rest.
return StringEscapeUtils.unescapeHtml3(s.replaceAll("&amp;", "&")).replaceAll("&apos;", "'");
}

/**
* Decodes XML character entities. Uses the Apache
* Commons Lang to decode the standard entity.
* @param s Text to be decoded.
* @return Text with XML character entities decoded.
*/
private String xmlDecode(String s) {
String out = s.replaceAll("&amp;", "&");
out = out.replaceAll("&apos;", "'");
out = out.replaceAll("&quot;", "\"");
out = out.replaceAll("&lt;", "<");
out = out.replaceAll("&gt;", ">");
out = out.replaceAll("&nbsp;", " ");
return out;
}

/**
* Extracts current Sonos queue and saves track information to a playlist file
* and a text file. The playlist file is saved in .m3u format and the text file
* is a plain text file with each line in the format
* <track_no>. <artist>: <title>
* Both files are in ISO8859-1 format.
* @param args 0: Sonos master IP address.
* 1: Export file path.
* 2: Playlist name.
* @throws MalformedURLException
* @throws ProtocolException
* @throws IOException
* @throws ParserConfigurationException
* @throws SAXException
*/

public static void main(String[] args)
throws MalformedURLException, ProtocolException, IOException, SAXException, ParserConfigurationException {
if (args.length < 3) {
System.err.println("Usage: SonosQueueExtractor sonos_master_ip_address export_file_path playlist_name");
System.exit(0);
}

ipAddress = args[0];
// Open output files, both in ISO8859-1 encoding.
txtFile = new OutputStreamWriter(new FileOutputStream(new File(args[1] + "/" + args[2] + ".txt")), "8859_1");
m3uFile = new OutputStreamWriter(new FileOutputStream(new File(args[1] + "/" + args[2] + ".m3u")), "8859_1");
new SonosQueueExtractor ();

txtFile.close();
m3uFile.close();
System.out.println("Check " + args[1] + " for output files.");

}
}

Saturday, February 4, 2012

Binomen Art - Scaevola plumieri


Scaevola plumieri - Ink Berry - Tortuga Bay, Santa Cruz, Galapagos
These photos of Inkberry or Sea Grape, Scaevola plumieri, were taken at Tortuga Bay, Santa Cruz in the Galápagos Islands on two different days in early January 2012. This plant from the Goodeniaceae family is native to the Galápagos, and though McMullen [ref] says that S. plumieri is considered rare, we seemed to see a lot of it. The length of the back of the beach at Tortuga Bay is full of S. plumieri. Here is a fact sheet with more information on S. plumieri.

From our new friend the CRC World Dictionary of Plant Names - the generic comes from the name for Roman hero C. Mucius Scaevola, whose surname means “left-handed” and refers to the left-hand twisting of the corolla. The Roman hero thrust his left hand into a fire to prove his bravery and earned himself the surname scaevola. The specific name plumieri honors Charles Plumier, and 18th century French monk, botanist and illustrator. [dg] The common name, Sea Grape, refers to the mature fruit in that it looks like a grape. The other common name, Ink Berry, who knows, maybe it makes a good ink?

We prepared the spelling of the generic name in the sand with dried leaves and twigs. When we got ready to take the picture we found out that our new Lumix camera (TS3) died, so we resorted to a friend’s iPhone to capture the shot (Thanks Debbie and David!!). There is an ominous sky in the east, in the background.

A Marine Iguana (Amblyrhynchus cristatus) Nearby the Bank of Scaevola plumieri at Tortuga Bay, Santa Cruz
Marine Iguana,  Tortuga Bay, Santa Cruz, GalapagosBeach Back of Ink Berry, Tortuga Bay, Santa Cruz, Galapagos
Scaevola plumieri - Ink Berry - Tortuga Bay, Santa Cruz, GalapagosScaevola plumieri - Ink Berry - Tortuga Bay, Santa Cruz, Galapagos

Friday, February 3, 2012

CRC World Dictionary of Plant Names - Who is Umberto Quattrocchi?

CRC World Dictionary of Plant Names - Umberto Quattrocchi?CRC World Dictionary of Plant Names - Umberto Quattrocchi?
CRC World Dictionary of Plant Names - Umberto Quattrocchi?CRC World Dictionary of Plant Names - Umberto Quattrocchi?

I started running across references to Umberto Quattrocchi a few months back and, in particular, Quattrocchi as the author of the CRC World Dictionary of Plant Names, Common Names, Scientific Name, Synonyms, and Etymology. I wondered about the book and who could author such a book. When I think of CRC (CRC Press) I think of a gawky college student sheepishly asking for the CRC Handbook of Chemistry and Physics in the chemistry library at the University of Rochester. That was me and it was an intimidating book. Now, a CRC for plant names? Also, quattrocchi means “four eyes” in Italian. So a guy named four-eyes put together a book on plant names with CRC in the title.

In the end it is me that needs glasses perhaps. I ordered the book on Amazon and when it arrived I was flustered because I just had paid a large sum of money for a book which was only one out of four volumes. Oops. Not content to just read about plants with names starting with R to Z, I forked over the money for the other three volumes. Maybe there is one volume for each of the “quattrocchi”?

All joking aside, I ultimately take my hat off to Quattrocchi and many others who produce works like he has with the dictionary of plant names. My feeble attempts to contribute to human knowledge, pale. I just started the The Journal of a Disappointed Man by the English diarist W.N.P. Barbellion (1889 - 1919). A quote from Richard Fortey in Dry Storeroom No. 1 that talks about the diarist is perhaps appropriate here: “He wanted to know everything, to suck in the whole of nature, but was awestruck by the limitations of his memory and his persistence.”

So who is Umberto Quattrocchi? In the first volume (A - C) there is this extract:

Umberto Quattrocchi was born December 21, 1947, in Bergamo, Italy. He received his degree in political science, his M.D., and his specialization in obstetrics and gynecology all from the University of Palermo.

The author of numerous political and botanical books and articles, his articles on plants and gardening recently have been published in Hortus and The Garden. A member of the Royal Horticultural Society and Botanical Society of America, a Fellow of the Linnean Society, his studies in plants and ethnomedicine have taken him to remote areas of the globe.

In 1992 he retired from the practice of medicine to pursue studies in botany and to continue teaching as a professor of political science at the University of Palermo. His interests include jazz, classical music, book collecting, and the cultivation of tropical, subtropical, and desert species of plants. He lives in Palermo with his wife Paola (also a physician) and their two children Daria and Salvatore.

So how are these as references books (all four volumes)? Physically, a bit unwieldy to manage. The set could have been perhaps reduced in size since the white space on each page seems a bit excessive and the publishers could have either made the book size smaller or reduced the total number of pages. Information-wise, the books seem fine so far. At the end of each volume there is the same extensive bibliography.

For the price of the CRC World Dictionary of Plant Names they seem to be slightly lacking in terms of how they are published. Beyond the white space already mentioned, the images on the front covers are blurry and not the least bit evocative of plants. And finally, nowhere in the volumes is it indicated (at least to my two eyes) what plant is on the front cover. I know, minor point, but still. CRC should have at least one black eye over the presentation of this material.

For a more economical approach to understanding plant names, you can try Gardener’s Latin and the Dictionary of Plant Names discussed in a previous post.

Sample Page, 2397, from the CRC World Dictionary of Plant Names, Scaevola