1 <?xml version=
"1.0" encoding=
"utf-8" ?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
6 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
7 <meta name=
"generator" content=
"Docutils 0.4: http://docutils.sourceforge.net/" />
8 <title>MochiKit Documentation Index
</title>
10 <link rel=
"stylesheet" href=
"../../../include/css/documentation.css" type=
"text/css" />
11 <script type=
"text/javascript" src=
"../../../packed/MochiKit/MochiKit.js"></script>
12 <script type=
"text/javascript" src=
"../../js/toc.js"></script>
15 <div class=
"document">
17 <h1><a id=
"distribution" name=
"distribution">Distribution
</a></h1>
18 <p>MochiKit - makes JavaScript suck a bit less
</p>
20 <li><a class=
"mochiref reference" href=
"Async.html">MochiKit.Async
</a> - manage asynchronous tasks
</li>
21 <li><a class=
"mochiref reference" href=
"Base.html">MochiKit.Base
</a> - functional programming and useful comparisons
</li>
22 <li><a class=
"mochiref reference" href=
"DOM.html">MochiKit.DOM
</a> - painless DOM manipulation API
</li>
23 <li><a class=
"mochiref reference" href=
"DragAndDrop.html">MochiKit.DragAndDrop
</a> - drag and drop
</li>
24 <li><a class=
"mochiref reference" href=
"Color.html">MochiKit.Color
</a> - color abstraction with CSS3 support
</li>
25 <li><a class=
"mochiref reference" href=
"DateTime.html">MochiKit.DateTime
</a> -
"what time is it anyway?
"</li>
26 <li><a class=
"mochiref reference" href=
"Format.html">MochiKit.Format
</a> - string formatting goes here
</li>
27 <li><a class=
"mochiref reference" href=
"Iter.html">MochiKit.Iter
</a> - itertools for JavaScript; iteration made HARD,
29 <li><a class=
"mochiref reference" href=
"Logging.html">MochiKit.Logging
</a> - we're all tired of
<tt class=
"docutils literal"><span class=
"pre">alert()
</span></tt></li>
30 <li><a class=
"mochiref reference" href=
"LoggingPane.html">MochiKit.LoggingPane
</a> - interactive
<a class=
"mochiref reference" href=
"Logging.html">MochiKit.Logging
</a>
32 <li><a class=
"mochiref reference" href=
"Selector.html">MochiKit.Selector
</a> - selecting elements by CSS selector syntax
</li>
33 <li><a class=
"mochiref reference" href=
"Signal.html">MochiKit.Signal
</a> - simple universal event handling
</li>
34 <li><a class=
"mochiref reference" href=
"Style.html">MochiKit.Style
</a> - painless CSS manipulation API
</li>
35 <li><a class=
"mochiref reference" href=
"Sortable.html">MochiKit.Sortable
</a> - sortable
</li>
36 <li><a class=
"mochiref reference" href=
"Visual.html">MochiKit.Visual
</a> - visual effects
</li>
40 <h1><a id=
"notes" name=
"notes">Notes
</a></h1>
41 <p>To turn off MochiKit's export feature (which may be necessary for
42 compatibility with some existing code), do this before loading
44 <pre class=
"literal-block">
45 <script type=
"text/javascript
">MochiKit = {__export__: false};
</script
>
47 <p>When export mode is off, you must use fully qualified names for
48 all MochiKit functions (e.g.
<tt class=
"docutils literal"><span class=
"pre">MochiKit.Base.map(...)
</span></tt>).
</p>
51 <h1><a id=
"screencasts" name=
"screencasts">Screencasts
</a></h1>
53 <li><a class=
"reference" href=
"http://mochikit.com/screencasts/MochiKit_Intro-1">MochiKit
1.1 Intro
</a></li>
57 <h1><a id=
"see-also" name=
"see-also">See Also
</a></h1>
59 <li><a class=
"reference" href=
"http://groups.google.com/group/mochikit">Google Groups: MochiKit
</a>: The official mailing list for discussions
60 related to development of and with MochiKit
</li>
61 <li><a class=
"reference" href=
"http://mochikit.com/">mochikit.com
</a>: MochiKit's home on the web
</li>
62 <li><a class=
"reference" href=
"http://bob.pythonmac.org/">from __future__ import *
</a>: Bob Ippolito's blog
</li>
63 <li><a class=
"reference" href=
"http://openjsan.org/doc/b/bo/bob/MochiKit/">MochiKit on JSAN
</a>: the JSAN distribution page for MochiKit
</li>
64 <li><a class=
"reference" href=
"http://del.icio.us/tag/mochikit">MochiKit tag on del.icio.us
</a>: Recent bookmarks related to MochiKit
</li>
65 <li><a class=
"reference" href=
"http://technorati.com/tag/mochikit">MochiKit tag on Technorati
</a>: Recent blog entries related to MochiKit
</li>
69 <h1><a id=
"version-history" name=
"version-history">Version History
</a></h1>
70 <p>2006-XX-XX v1.4
</p>
72 <li>MochiKit.Color's HSV to RGB conversion code fixed to return the correct
73 value (hsv.v for RGB values) in cases where saturation ===
0.
</li>
74 <li>doXHR workaround for a Mozilla bug when calling XMLHttpRequest in certain
75 situations. Always wraps call in a callLater(
0, doXHR, url, opts).
</li>
76 <li>parseQueryString will now parse values with embedded
"=
"</li>
77 <li>Workaround for a Safari DOM crash when using MochiKit.Iter.list.
78 <a class=
"reference" href=
"http://bugs.webkit.org/show_bug.cgi?id=12191">http://bugs.webkit.org/show_bug.cgi?id=
12191</a></li>
79 <li>New removeNodeAttribute function in MochiKit.DOM.
</li>
80 <li>MochiKit.Async.doXHR and dependent functions now accept
201 CREATED and
81 204 NO CONTENT as valid.
</li>
82 <li>MochiKit.DOM.formContents now treats option tags the same way that
83 form posts do in the case of missing and empty string value attributes,
85 <li>MochiKit.Base.queryString now accepts third queryString([names, values])
87 <li>MochiKit.DOM.formContents now defaults to document.body if no element is
89 <li>New MochiKit.Selector module
</li>
90 <li>MochiKit.LoggingPane fixes for Internet Explorer
</li>
91 <li>MochiKit.DOM now creates XHTML nodes in XUL documents.
</li>
92 <li>MochiKit.LoggingPane now works on pages with '#' in the URL on IE
</li>
93 <li>New MochiKit.Async.doXHR as a convenient method for doing custom
94 XMLHttpRequests (e.g. extra headers, overrideMimeType, etc.)
</li>
95 <li>New __connect__ protocol for MochiKit.Signal.connect source notifications
</li>
96 <li>Added colSpan, bgColor to the list of DOM renames for Internet Explorer
</li>
97 <li>New MochiKit.Signal.disconnectAllTo function
</li>
98 <li>MochiKit.Base.parseQueryString now accepts leading question mark
</li>
99 <li>New MochiKit.Base.values function
</li>
100 <li>Fixed MochiKit.Signal.disconnect when called from a signal handler invoked
101 by MochiKit.Signal.signal
</li>
102 <li>parseQueryString now splits on HTML entities equivalent to ampersand as well
</li>
103 <li>Better XHTML compatibility (removed obvious cases where uppercase tagName or
104 nodeName was assumed)
</li>
105 <li>MochiKit.Base.queryString now handles array values in the same way HTML
106 forms handle multiple elements of the same name.
</li>
107 <li>MochiKit.Base.parseQueryString now returns {} for empty query string instead
108 of {
"":
"undefined
"}
</li>
109 <li>MochiKit.DOM.formContents now handles option value=
"" correctly.
</li>
110 <li>MochiKit.DOM now checks for undefined className.
</li>
111 <li>MochiKit.Iter.groupby() now uses compare() to group rather than == and !=
</li>
112 <li>serializeJSON no longer serializes undefined, as per the JSON spec
</li>
113 <li>Fixed an infinite recursion bug in serializeJSON if an adapter
114 returns the object itself.
</li>
115 <li>New MochiKit.Base.operator.seq and sne to support strict comparison
</li>
116 <li>MochiKit.Base.isArrayLike no longer returns true for DOM text nodes
</li>
117 <li>Added readonly-readOnly to the list of DOM renames for Internet Explorer
</li>
118 <li>New MochiKit.Signal event method: confirmUnload (sets returnValue for
120 <li>Fix interpreter help() function for Firefox and IE
</li>
121 <li>API version compatibility notes added
</li>
122 <li>New MochiKit.Base functions methodcaller and compose
</li>
123 <li>Support IE-based native console logging (Debugger, Atlas)
</li>
124 <li>Refactored style functions from MochiKit.DOM to MochiKit.Style
</li>
125 <li>MochiKit.Async.DeferredList is now a proper Deferred
</li>
126 <li>MochiKit.DOM.formContents now supports SELECT multiple tags
</li>
127 <li>Re-use StopIteration Error if the browser already has it
</li>
128 <li>Workaround IE type=
"" bug for INPUT elements
</li>
129 <li>Allow LoggingPane to work in IE with hyphen-containing URLs
</li>
130 <li>Replace percents for Safari native logging to avoid crashing
</li>
131 <li>New MochiKit.DOM.coerceToDOM .dom(node) / .__dom__(node) protocol
</li>
132 <li>MochiKit.DOM's MochiKit.Iter dependency is now optional
</li>
133 <li>Added expand all link to the documentation index
</li>
134 <li>Added MochiKit.DOM.isChildNode
</li>
135 <li>Added synthesizing for onmouseenter/onmouseleave
</li>
137 <p>2006-
04-
29 v1.3
.1 (bug fix release)
</p>
139 <li>Fix sendXMLHttpRequest sendContent regression
</li>
140 <li>Internet Explorer fix in MochiKit.Logging (printfire exception)
</li>
141 <li>Internet Explorer XMLHttpRequest object leak fixed in MochiKit.Async
</li>
143 <p>2006-
04-
26 v1.3
"warp zone
"</p>
145 <li>IMPORTANT: Renamed MochiKit.Base.forward to forwardCall (for export)
</li>
146 <li>IMPORTANT: Renamed MochiKit.Base.find to findValue (for export)
</li>
147 <li>New MochiKit.Base.method as a convenience form of bind that takes the
148 object before the method
</li>
149 <li>New MochiKit.Base.flattenArguments for flattening a list of arguments to
151 <li>Refactored MochiRegExp example to use MochiKit.Signal
</li>
152 <li>New key_events example demonstrating use of MochiKit.Signal's key handling
154 <li>MochiKit.DOM.createDOM API change for convenience: if attrs is a string,
155 null is used and the string will be considered the first node. This
156 allows for the more natural P(
"foo
") rather than P(null,
"foo
").
</li>
157 <li>MochiKit Interpreter example refactored to use MochiKit.Signal and now
158 provides multi-line input and a help() function to get MochiKit function
159 signature from the documentation.
</li>
160 <li>Native Console Logging for the default MochiKit.Logging logger
</li>
161 <li>New MochiKit.Async.DeferredList, gatherResults, maybeDeferred
</li>
162 <li>New MochiKit.Signal example: draggable
</li>
163 <li>Added sanity checking to Deferred to ensure that errors happen when chaining
164 is used incorrectly
</li>
165 <li>Opera sendXMLHttpRequest fix (sends empty string instead of null by default)
</li>
166 <li>Fix a bug in MochiKit.Color that incorrectly generated hex colors for
167 component values smaller than
16/
255.
</li>
168 <li>Fix a bug in MochiKit.Logging that prevented logs from being capped at a
170 <li>MochiKit.Async.Deferred will now wrap thrown objects that are not instanceof
171 Error, so that the errback chain is used instead of the callback chain.
</li>
172 <li>MochiKit.DOM.appendChildNodes and associated functions now append iterables
173 in the correct order.
</li>
174 <li>New MochiKit-based SimpleTest test runner as a replacement for Test.Simple
</li>
175 <li>MochiKit.Base.isNull no longer matches undefined
</li>
176 <li>example doctypes changed to HTML4
</li>
177 <li>isDateLike no longer throws error on null
</li>
178 <li>New MochiKit.Signal module, modeled after the slot/signal mechanism in Qt
</li>
179 <li>updated elementDimensions to calculate width from offsetWidth instead
181 <li>formContents now works with FORM tags that have a name attribute
</li>
182 <li>Documentation now uses MochiKit to generate a function index
</li>
184 <p>2006-
01-
26 v1.2
"the ocho
"</p>
186 <li>Fixed MochiKit.Color.Color.lighterColorWithLevel
</li>
187 <li>Added new MochiKit.Base.findIdentical function to find the index of an
188 element in an Array-like object. Uses === for identity comparison.
</li>
189 <li>Added new MochiKit.Base.find function to find the index of an element in
190 an Array-like object. Uses compare for rich comparison.
</li>
191 <li>MochiKit.Base.bind will accept a string for func, which will be immediately
192 looked up as self[func].
</li>
193 <li>MochiKit.DOM.formContents no longer skips empty form elements for Zope
195 <li>MochiKit.Iter.forEach will now catch StopIteration to break
</li>
196 <li>New MochiKit.DOM.elementDimensions(element) for determining the width and
197 height of an element in the document
</li>
198 <li>MochiKit.DOM's initialization is now compatible with
199 HTMLUnit + JWebUnit + Rhino
</li>
200 <li>MochiKit.LoggingPane will now re-use a
<tt class=
"docutils literal"><span class=
"pre">_MochiKit_LoggingPane
</span></tt> DIV element
201 currently in the document instead of always creating one.
</li>
202 <li>MochiKit.Base now has operator.mul
</li>
203 <li>MochiKit.DOM.formContents correctly handles unchecked checkboxes that have
204 a custom value attribute
</li>
205 <li>Added new MochiKit.Color constructors fromComputedStyle and fromText
</li>
206 <li>MochiKit.DOM.setNodeAttribute should work now
</li>
207 <li>MochiKit.DOM now has a workaround for an IE bug when setting the style
208 property to a string
</li>
209 <li>MochiKit.DOM.createDOM now has workarounds for IE bugs when setting the
210 name and for properties
</li>
211 <li>MochiKit.DOM.scrapeText now walks the DOM tree in-order
</li>
212 <li>MochiKit.LoggingPane now sanitizes the window name to work around IE bug
</li>
213 <li>MochiKit.DOM now translates usemap to useMap to work around IE bug
</li>
214 <li>MochiKit.Logging is now resistant to Prototype's dumb Object.prototype hacks
</li>
215 <li>Added new MochiKit.DOM documentation on element visibility
</li>
216 <li>New MochiKit.DOM.elementPosition(element[, relativeTo={x:
0, y:
0}])
217 for determining the position of an element in the document
</li>
218 <li>Added new MochiKit.DOM createDOMFunc aliases: CANVAS, STRONG
</li>
220 <p>2005-
11-
14 v1.1
</p>
222 <li>Fixed a bug in numberFormatter with large numbers
</li>
223 <li>Massively overhauled documentation
</li>
224 <li>Fast-path for primitives in MochiKit.Base.compare
</li>
225 <li>New groupby and groupby_as_array in MochiKit.Iter
</li>
226 <li>Added iterator factory adapter for objects that implement iterateNext()
</li>
227 <li>Fixed isoTimestamp to handle timestamps with time zone correctly
</li>
228 <li>Added new MochiKit.DOM createDOMFunc aliases: SELECT, OPTION, OPTGROUP,
229 LEGEND, FIELDSET
</li>
230 <li>New MochiKit.DOM formContents and enhancement to queryString to support it
</li>
231 <li>Updated view_source example to use dp.SyntaxHighlighter
1.3.0</li>
232 <li>MochiKit.LoggingPane now uses named windows based on the URL so that
233 a given URL will get the same LoggingPane window after a reload
234 (at the same position, etc.)
</li>
235 <li>MochiKit.DOM now has currentWindow() and currentDocument() context
236 variables that are set with withWindow() and withDocument(). These
237 context variables affect all MochiKit.DOM functionality (getElement,
238 createDOM, etc.)
</li>
239 <li>MochiKit.Base.items will now catch and ignore exceptions for properties
240 that are enumerable but not accessible (e.g. permission denied)
</li>
241 <li>MochiKit.Async.Deferred's addCallback/addErrback/addBoth
242 now accept additional arguments that are used to create a partially
243 applied function. This differs from Twisted in that the callback/errback
244 result becomes the
<em>last
</em> argument, not the first when this feature
246 <li>MochiKit.Async's doSimpleXMLHttpRequest will now accept additional
247 arguments which are used to create a GET query string
</li>
248 <li>Did some refactoring to reduce the footprint of MochiKit by a few
250 <li>escapeHTML to longer escapes ' (apos) and now uses
251 String.replace instead of iterating over every char.
</li>
252 <li>Added DeferredLock to Async
</li>
253 <li>Renamed getElementsComputedStyle to computedStyle and moved
254 it from MochiKit.Visual to MochiKit.DOM
</li>
255 <li>Moved all color support out of MochiKit.Visual and into MochiKit.Color
</li>
256 <li>Fixed range() to accept a negative step
</li>
257 <li>New alias to MochiKit.swapDOM called removeElement
</li>
258 <li>New MochiKit.DOM.setNodeAttribute(node, attr, value) which sets
259 an attribute on a node without raising, roughly equivalent to:
260 updateNodeAttributes(node, {attr: value})
</li>
261 <li>New MochiKit.DOM.getNodeAttribute(node, attr) which gets the value of
262 a node's attribute or returns null without raising
</li>
263 <li>Fixed a potential IE memory leak if using MochiKit.DOM.addToCallStack
264 directly (addLoadEvent did not leak, since it clears the handler)
</li>
266 <p>2005-
10-
24 v1.0
</p>
268 <li>New interpreter example that shows usage of MochiKit.DOM to make
269 an interactive JavaScript interpreter
</li>
270 <li>New MochiKit.LoggingPane for use with the MochiKit.Logging
271 debuggingBookmarklet, with logging_pane example to show its usage
</li>
272 <li>New mochiregexp example that demonstrates MochiKit.DOM and MochiKit.Async
273 in order to provide a live regular expression matching tool
</li>
274 <li>Added advanced number formatting capabilities to MochiKit.Format:
275 numberFormatter(pattern, placeholder=
"", locale=
"default
") and
276 formatLocale(locale=
"default
")
</li>
277 <li>Added updatetree(self, obj[, ...]) to MochiKit.Base, and changed
278 MochiKit.DOM's updateNodeAttributes(node, attrs) to use it when appropiate.
</li>
279 <li>Added new MochiKit.DOM createDOMFunc aliases: BUTTON, TT, PRE
</li>
280 <li>Added truncToFixed(aNumber, precision) and roundToFixed(aNumber, precision)
281 to MochiKit.Format
</li>
282 <li>MochiKit.DateTime can now handle full ISO
8601 timestamps, specifically
283 isoTimestamp(isoString) will convert them to Date objects, and
284 toISOTimestamp(date, true) will return an ISO
8601 timestamp in UTC
</li>
285 <li>Fixed missing errback for sendXMLHttpRequest when the server does not
287 <li>Fixed infinite recusion bug when using roundClass(
"DIV
", ...)
</li>
288 <li>Fixed a bug in MochiKit.Async wait (and callLater) that prevented them
289 from being cancelled properly
</li>
290 <li>Workaround in MochiKit.Base bind (and partial) for functions that don't
291 have an apply method, such as alert
</li>
292 <li>Reliably return null from the string parsing/manipulation functions if
293 the input can't be coerced to a string (s +
"") or the input makes no sense;
294 e.g. isoTimestamp(null) and isoTimestamp(
"") return null
</li>
296 <p>2005-
10-
08 v0.90
</p>
298 <li>Fixed ISO compliance with toISODate
</li>
299 <li>Added missing operator.sub
</li>
300 <li>Placated Mozilla's strict warnings a bit
</li>
301 <li>Added JSON serialization and unserialization support to MochiKit.Base:
302 serializeJSON, evalJSON, registerJSON. This is very similar to the repr
304 <li>Fixed a bug in the script loader that failed in some scenarios when a script
305 tag did not have a
"src
" attribute (thanks Ian!)
</li>
306 <li>Added new MochiKit.DOM createDOMFunc aliases: H1, H2, H3, BR, HR, TEXTAREA,
308 <li>Use encodeURIComponent / decodeURIComponent for MochiKit.Base urlEncode
309 and parseQueryString, when available.
</li>
311 <p>2005-
08-
12 v0.80
</p>
313 <li>Source highlighting in all examples, moved to a view-source example
</li>
314 <li>Added some experimental syntax highlighting for the Rounded Corners example,
315 via the LGPL dp.SyntaxHighlighter
1.2.0 now included in examples/common/lib
</li>
316 <li>Use an indirect binding for the logger conveniences, so that the global
317 logger could be replaced by setting MochiKit.Logger.logger to something else
318 (though an observer is probably a better choice).
</li>
319 <li>Allow MochiKit.DOM.getElementsByTagAndClassName to take a string for parent,
320 which will be looked up with getElement
</li>
321 <li>Fixed bug in MochiKit.Color.fromBackground (was using node.parent instead of
322 node.parentNode)
</li>
323 <li>Consider a
304 (NOT_MODIFIED) response from XMLHttpRequest to be success
</li>
324 <li>Disabled Mozilla map(...) fast-path due to Deer Park compatibility issues
</li>
325 <li>Possible workaround for Safari issue with swapDOM, where it would get
326 confused because two elements were in the DOM at the same time with the
328 <li>Added missing THEAD convenience function to MochiKit.DOM
</li>
329 <li>Added lstrip, rstrip, strip to MochiKit.Format
</li>
330 <li>Added updateNodeAttributes, appendChildNodes, replaceChildNodes to
332 <li>MochiKit.Iter.iextend now has a fast-path for array-like objects
</li>
333 <li>Added HSV color space support to MochiKit.Visual
</li>
334 <li>Fixed a bug in the sortable_tables example, it now converts types
336 <li>Fixed a bug where MochiKit.DOM referenced MochiKit.Iter.next from global
339 <p>2005-
08-
04 v0.70
</p>
341 <li>New ajax_tables example, which shows off XMLHttpRequest, ajax, json, and
342 a little TAL-ish DOM templating attribute language.
</li>
343 <li>sendXMLHttpRequest and functions that use it (loadJSONDoc, etc.) no longer
344 ignore requests with status ==
0, which seems to happen for cached or local
346 <li>Added sendXMLHttpRequest to MochiKit.Async.EXPORT, d'oh.
</li>
347 <li>Changed scrapeText API to return a string by default. This is API-breaking!
348 It was dumb to have the default return value be the form you almost never
350 <li>Added special form to swapDOM(dest, src). If src is null, dest is removed
351 (where previously you'd likely get a DOM exception).
</li>
352 <li>Added three new functions to MochiKit.Base for dealing with URL query
353 strings: urlEncode, queryString, parseQueryString
</li>
354 <li>MochiKit.DOM.createDOM will now use attr[k] = v for all browsers if the name
355 starts with
"on
" (e.g.
"onclick
"). If v is a string, it will set it to
356 new Function(v).
</li>
357 <li>Another workaround for Internet
"worst browser ever
" Explorer's setAttribute
358 usage in MochiKit.DOM.createDOM (checked -
> defaultChecked).
</li>
359 <li>Added UL, OL, LI convenience createDOM aliases to MochiKit.DOM
</li>
360 <li>Packing is now done by Dojo's custom Rhino interpreter, so it's much smaller
363 <p>2005-
07-
29 v0.60
</p>
365 <li>Beefed up the MochiKit.DOM test suite
</li>
366 <li>Fixed return value for MochiKit.DOM.swapElementClass, could return
367 false unexpectedly before
</li>
368 <li>Added an optional
"parent
" argument to
369 MochiKit.DOM.getElementsByTagAndClassName
</li>
370 <li>Added a
"packed
" version in packed/MochiKit/MochiKit.js
</li>
371 <li>Changed build script to rewrite the URLs in tests to account for the
372 JSAN-required reorganization
</li>
373 <li>MochiKit.Compat to potentially work around IE
5.5 issues
374 (
5.0 still not supported). Test.Simple doesn't seem to work there,
376 <li>Several minor documentation corrections
</li>
378 <p>2005-
07-
27 v0.50
</p>
380 <li>Initial Release
</li>
383 <div class=
"section">
384 <h1><a id=
"copyright" name=
"copyright">Copyright
</a></h1>
385 <p>Copyright
2005 Bob Ippolito
<<a class=
"reference" href=
"mailto:bob@redivi.com">bob
@redivi.com
</a>>. This program is
386 dual-licensed free software; you can redistribute it and/or modify it
387 under the terms of the
<a class=
"reference" href=
"http://www.opensource.org/licenses/mit-license.php">MIT License
</a> or the
<a class=
"reference" href=
"http://www.opensource.org/licenses/afl-2.1.php">Academic Free License