article

Action executed in 0.000

Brian versus Sleep

Last night i was working on GP as usual. For the last few nights this week me and Sleep have been battling each other. After a late dinner i'll get to work programming. Around 9pm Sleep hits me hard. I'll crash on the couch until midnight or 3am, then return to work. Two nights ago i thought i could work out an idea as i laid down...

Nope! Sleep knocked me out.

But last night, i made a strong come back. I laid down to figure something out and i got the solution before Sleep hit me.

Tonight i look forward to implementing it.

solution

Previously, i've written a function to take the substring of an XML string, while preserving well-formedness. E.g. xml_substring( "<p>The brown <span class='light'>cow jumped over the lazy</span> moon</p>", 50 ) produces <p>The brown <span class='light'>cow jump</span></p>. What i need now is the rest of the string, i.e <p><span class='light'>ed over the lazy</span> moon.</p>. And i figured a way to build this into my recursive algorithm. So far i see only one problem with this, viz. an element with an id attribute can't be split into two.

Comments

none yet

Post a Comment

* indicates a required field
anonymous (If you want to identify yourself, please sign in first.)
required This field is required.

Max size is 2 MB, aspect ratio 3:4 width:height
required This field is required.
Please include a short description.
required This field is required.

480 characters remaining.
is public

(Use this field if you have to. 3000 characters remaining.)
2 quarters, 2 nickels + 100

Trackback URL

http://derocher.org/~brian//trackback.php?ParentId=2614

form