Skip to content

Instantly share code, notes, and snippets.

@wharrell1271
wharrell1271 / mhll_primitive.js
Created August 8, 2011 18:39
MHLL standoff markup primitive JS function
var i,l,
str = 'Mary had a little lamb, Its fleece was white as snow, And every where that Mary went The lamb was sure to go;',
poetryM = {'stanza':[[0,109]],'line':[[0,23],[24,53],[54,84],[85,109]]};
console.log('the poem is '+str.length+' characters long');
for(i=0,l=poetryM.line.length;i<l;i++){
console.log('line '+i+': '+str.slice(poetryM.line[i][0],poetryM.line[i][1]));
}
@wharrell1271
wharrell1271 / mhll_poetryML_standoff.js
Created August 8, 2011 18:37
mary had a little lamb Semantic Markup for Poetry standoff
{
'stanza':[
[0,109]
],
'line':[
[0,23],
[24,53],
[54,84],
[85,109]
]
@wharrell1271
wharrell1271 / mhll_html_standoff.js
Created August 8, 2011 18:36
mary had a little lamb HTML standoff markup
{
'p':[
[0,109]
],
'br':[
[24],
[54],
[85]
]
}
@wharrell1271
wharrell1271 / maryhadalittlelamb_oneline.txt
Created August 8, 2011 18:34
mary had a little lamb one line
Mary had a little lamb, Its fleece was white as snow, And every where that Mary went The lamb was sure to go;
@wharrell1271
wharrell1271 / maryhadalittlelamb_poetryML.xml
Created August 8, 2011 16:58
mary had a little lamb Semantic Markup for Poetry
<stanza>
<line>Mary had a little lamb,</line>
<line>Its fleece was white as snow,</line>
<line>And every where that Mary went</line>
<line>The lamb was sure to go;</line>
</stanza>
@wharrell1271
wharrell1271 / maryhadalittlelamb.html
Created August 8, 2011 16:56
mary had a little lamb html
<p>
Mary had a little lamb,<br/>
Its fleece was white as snow,<br/>
And every where that Mary went<br/>
The lamb was sure to go;
</p>
@wharrell1271
wharrell1271 / maryhadalittlelamb.txt
Created August 8, 2011 16:53
the poem mary had a little lamb
Mary had a little lamb,
Its fleece was white as snow,
And every where that Mary went
The lamb was sure to go;