Changeset 811
- Timestamp:
- 04/28/06 13:47:50 (2 years ago)
- Files:
-
- presentations/2006/ajax_experience/slides.html (modified) (15 diffs)
- presentations/2006/ajax_experience/slides.txt (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
presentations/2006/ajax_experience/slides.html
r810 r811 408 408 <li><a class="reference" href="#attributes" id="id49" name="id49">Attributes</a></li> 409 409 <li><a class="reference" href="#alternating" id="id50" name="id50">Alternating</a></li> 410 <li><a class="reference" href="# mochikit-interpreter-again" id="id51" name="id51">MochiKit Interpreter (Again)</a></li>410 <li><a class="reference" href="#interpreter-dom" id="id51" name="id51">Interpreter DOM</a></li> 411 411 <li><a class="reference" href="#scraping-text" id="id52" name="id52">Scraping Text</a></li> 412 412 <li><a class="reference" href="#forms" id="id53" name="id53">Forms</a></li> … … 596 596 <pre class="literal-block"> 597 597 <form id="formNode"> 598 <input type="hidden" name="foo" value="1" />599 <input type="text" name="bar" value="2" />598 <input type="hidden" name="foo" value="1" /> 599 <input type="text" name="bar" value="2" /> 600 600 </form> 601 601 </pre> … … 620 620 <dl class="docutils"> 621 621 <dt>keys(obj):</dt> 622 <dd>Array of every property on obj</dd>622 <dd>Array of obj's properties</dd> 623 623 <dt>items(obj):</dt> 624 <dd>Array of every [property, value] on obj</dd>624 <dd>Array of obj's [property, value]</dd> 625 625 </dl> 626 626 </div> … … 643 643 <dd>concatenates Arrays</dd> 644 644 <dt>extend(self, seq, skip=0):</dt> 645 <dd>extends a listin-place</dd>645 <dd>extends Array in-place</dd> 646 646 <dt>flattenArguments(args[, ...]):</dt> 647 647 <dd>recursively flatten arguments to single Array</dd> … … 654 654 <dd>finds index of value</dd> 655 655 <dt>findIdentical(lst, value):</dt> 656 <dd>finds index of identi val value</dd>656 <dd>finds index of identical value</dd> 657 657 <dt>listMin(lst):</dt> 658 658 <dd>finds least item in lst</dd> … … 665 665 <dl class="docutils"> 666 666 <dt>filter(predicate, lst):</dt> 667 <dd> new Array where predicate(lst[n]) is true</dd>667 <dd>Array where predicate(lst[n])</dd> 668 668 <dt>map(func, lst):</dt> 669 <dd> new Array, [func(lst[0]), func(lst[1]), ...]</dd>670 <dt>keyComparator(key , ...):</dt>671 <dd> new sort function,compare(a[key], b[key])</dd>669 <dd>[func(lst[0]), ...]</dd> 670 <dt>keyComparator(key):</dt> 671 <dd>compare(a[key], b[key])</dd> 672 672 </dl> 673 673 </div> … … 726 726 <dd>n, n + 1, n + 2, ...</dd> 727 727 <dt>cycle(iterable):</dt> 728 <dd>while ( true) { iterable[0], ..., iterable[N]}</dd>728 <dd>while (1) { iterable[0], ... }</dd> 729 729 <dt>repeat(item):</dt> 730 730 <dd>item, item, item, item, ...</dd> … … 774 774 <li>JavaScript has no sprintf</li> 775 775 <li>Thousands separators help readability</li> 776 <li> Based onJava's Number Format Pattern Syntax</li>776 <li>Java's Number Format Pattern Syntax</li> 777 777 </ul> 778 778 </div> … … 781 781 <dl class="docutils"> 782 782 <dt>lstrip(str):</dt> 783 <dd>strip onlyleading whitespace</dd>783 <dd>strip leading whitespace</dd> 784 784 <dt>rstrip(str):</dt> 785 <dd>strip onlytrailing whitespace</dd>785 <dd>strip trailing whitespace</dd> 786 786 <dt>strip(str):</dt> 787 787 <dd>strip leading and trailing whitespace</dd> … … 799 799 <p>Currency:</p> 800 800 <pre class="literal-block"> 801 >>> dollarFormat= numberFormatter("$###,###.##")802 >>> dollarFormat(1234567.89)801 >>> money = numberFormatter("$###,###.##") 802 >>> money(1234567.89) 803 803 "$1,234,567.89" 804 804 </pre> … … 808 808 <p>Percent:</p> 809 809 <pre class="literal-block"> 810 >>> percent Format= numberFormatter("###,###%")811 >>> percent Format(123.45)810 >>> percent = numberFormatter("###,###%") 811 >>> percent(123.45) 812 812 "12,345%" 813 813 </pre> … … 844 844 <p>Pop-up MochiKit.LoggingPane:</p> 845 845 <pre class="literal-block"> 846 javascript: MochiKit.Logging.logger.debuggingBookmarklet()846 javascript:logger.debuggingBookmarklet() 847 847 </pre> 848 848 </div> … … 944 944 </pre> 945 945 </div> 946 <div class="slide" id=" mochikit-interpreter-again">947 <h1> MochiKit Interpreter (Again)</h1>946 <div class="slide" id="interpreter-dom"> 947 <h1>Interpreter DOM</h1> 948 948 <div id="dominterpreter_example"> 949 949 <form id="dominterpreter_form" autocomplete="off"> … … 991 991 <h1>Manipulating DOM</h1> 992 992 <dl class="docutils"> 993 <dt>appendChildNodes(parent Node, childNode...):</dt>993 <dt>appendChildNodes(parent, children...):</dt> 994 994 <dd>Add nodes via createDOM</dd> 995 <dt>replaceChildNodes(parent Node, childNode...):</dt>995 <dt>replaceChildNodes(parent, children...):</dt> 996 996 <dd>Remove all, then append</dd> 997 997 <dt>swapDOM(dest, src):</dt> … … 1005 1005 <dd>node attribute attr=value</dd> 1006 1006 <dt>updateNodeAttributes(node, attrs):</dt> 1007 <dd> Set thenode attributes from object attrs</dd>1007 <dd>node attributes from object attrs</dd> 1008 1008 </dl> 1009 1009 </div> presentations/2006/ajax_experience/slides.txt
r810 r811 170 170 171 171 <form id="formNode"> 172 <input type="hidden" name="foo" value="1" />173 <input type="text" name="bar" value="2" />172 <input type="hidden" name="foo" value="1" /> 173 <input type="text" name="bar" value="2" /> 174 174 </form> 175 175 … … 195 195 196 196 keys(obj): 197 Array of every property on obj197 Array of obj's properties 198 198 199 199 items(obj): 200 Array of every [property, value] on obj200 Array of obj's [property, value] 201 201 202 202 … … 223 223 224 224 extend(self, seq, skip=0): 225 extends a listin-place225 extends Array in-place 226 226 227 227 flattenArguments(args[, ...]): … … 236 236 237 237 findIdentical(lst, value): 238 finds index of identi val value238 finds index of identical value 239 239 240 240 listMin(lst): … … 249 249 250 250 filter(predicate, lst): 251 new Array where predicate(lst[n]) is true251 Array where predicate(lst[n]) 252 252 253 253 map(func, lst): 254 new Array, [func(lst[0]), func(lst[1]), ...]255 256 keyComparator(key , ...):257 new sort function,compare(a[key], b[key])254 [func(lst[0]), ...] 255 256 keyComparator(key): 257 compare(a[key], b[key]) 258 258 259 259 … … 319 319 320 320 cycle(iterable): 321 while ( true) { iterable[0], ..., iterable[N]}321 while (1) { iterable[0], ... } 322 322 323 323 repeat(item): … … 373 373 * JavaScript has no sprintf 374 374 * Thousands separators help readability 375 * Based onJava's Number Format Pattern Syntax375 * Java's Number Format Pattern Syntax 376 376 377 377 … … 380 380 381 381 lstrip(str): 382 strip onlyleading whitespace382 strip leading whitespace 383 383 384 384 rstrip(str): 385 strip onlytrailing whitespace385 strip trailing whitespace 386 386 387 387 strip(str): … … 401 401 Currency:: 402 402 403 >>> dollarFormat= numberFormatter("$###,###.##")404 >>> dollarFormat(1234567.89)403 >>> money = numberFormatter("$###,###.##") 404 >>> money(1234567.89) 405 405 "$1,234,567.89" 406 406 … … 411 411 Percent:: 412 412 413 >>> percent Format= numberFormatter("###,###%")414 >>> percent Format(123.45)413 >>> percent = numberFormatter("###,###%") 414 >>> percent(123.45) 415 415 "12,345%" 416 416 … … 450 450 Pop-up MochiKit.LoggingPane:: 451 451 452 javascript: MochiKit.Logging.logger.debuggingBookmarklet()452 javascript:logger.debuggingBookmarklet() 453 453 454 454 … … 563 563 564 564 565 MochiKit Interpreter (Again) 566 =============== =============565 Interpreter DOM 566 =============== 567 567 568 568 .. raw:: html … … 609 609 ================ 610 610 611 appendChildNodes(parent Node, childNode...):611 appendChildNodes(parent, children...): 612 612 Add nodes via createDOM 613 613 614 replaceChildNodes(parent Node, childNode...):614 replaceChildNodes(parent, children...): 615 615 Remove all, then append 616 616 … … 626 626 627 627 updateNodeAttributes(node, attrs): 628 Set thenode attributes from object attrs628 node attributes from object attrs 629 629 630 630
