old_sql 1.16.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +24 -13
- data/app/controllers/old_sql/report_controller.rb +3 -17
- data/app/views/layouts/old_sql/chart.html.erb +11 -0
- data/app/views/old_sql/report/chart.html.erb +8 -25
- data/lib/generators/old_sql/templates/user_design_template.csv +2 -3
- data/lib/generators/old_sql/templates/user_old_sql_demo_chart_design.yml +18 -9
- data/lib/old_sql/report_design/chart.rb +2 -2
- data/lib/old_sql/report_design/chart_item.rb +4 -4
- data/lib/old_sql/report_design/chart_parser.rb +2 -2
- data/public/javascripts/old_sql/chart.js +33 -0
- metadata +5 -265
- data/public/javascripts/old_sql/MochiKit-1.4.2/Changes +0 -362
- data/public/javascripts/old_sql/MochiKit-1.4.2/LICENSE.txt +0 -69
- data/public/javascripts/old_sql/MochiKit-1.4.2/MANIFEST +0 -179
- data/public/javascripts/old_sql/MochiKit-1.4.2/META.json +0 -17
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Async.html +0 -814
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Base.html +0 -1703
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Color.html +0 -755
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DOM.html +0 -1197
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DateTime.html +0 -168
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/DragAndDrop.html +0 -187
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Format.html +0 -300
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Iter.html +0 -524
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Logging.html +0 -420
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/LoggingPane.html +0 -142
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Position.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Selector.html +0 -240
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Signal.html +0 -508
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Sortable.html +0 -244
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Style.html +0 -385
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/VersionHistory.html +0 -384
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/Visual.html +0 -1161
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/html/MochiKit/index.html +0 -447
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/js/toc.js +0 -113
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Async.rst +0 -767
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Base.rst +0 -1445
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Color.rst +0 -651
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DOM.rst +0 -1143
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DateTime.rst +0 -145
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/DragAndDrop.rst +0 -197
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Format.rst +0 -258
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Iter.rst +0 -454
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Logging.rst +0 -348
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/LoggingPane.rst +0 -128
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Position.rst +0 -26
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Selector.rst +0 -203
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Signal.rst +0 -498
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Sortable.rst +0 -186
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Style.rst +0 -353
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/VersionHistory.rst +0 -362
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/Visual.rst +0 -895
- data/public/javascripts/old_sql/MochiKit-1.4.2/doc/rst/MochiKit/index.rst +0 -83
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.css +0 -69
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/ajax_tables.js +0 -401
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.json +0 -10
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/domains.xml +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/ajax_tables/index.html +0 -96
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.css +0 -4
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/color_wheel.js +0 -95
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/color_wheel/index.html +0 -31
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dnd_sortable.css +0 -23
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/dropmarker.png +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/icon.png +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/index.html +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable2_test.html +0 -150
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable3_test.html +0 -42
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable4_test.html +0 -90
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable5_test.html +0 -29
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_test.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/dnd_sortable/sortable_tree_test.html +0 -189
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.css +0 -28
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/draggable.js +0 -73
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/draggable/index.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_bigslide.html +0 -36
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blind.html +0 -65
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_blindslide.html +0 -31
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_combi.css +0 -18
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_fadeappear.html +0 -61
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_grow_shrink.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_onload.html +0 -67
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue.html +0 -67
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_queue_limit.html +0 -30
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_scroll.html +0 -483
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/effects_slide.html +0 -62
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/full.html +0 -71
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/icon.png +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/effects/index.html +0 -150
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/index.html +0 -88
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.css +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/interpreter/interpreter.js +0 -373
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/index.html +0 -78
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.css +0 -5
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/key_events/key_events.js +0 -85
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/index.html +0 -46
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.css +0 -78
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/logging_pane/logging_pane.js +0 -11
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/index.html +0 -74
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.css +0 -73
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mochiregexp/mochiregexp.js +0 -125
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/index.html +0 -88
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.css +0 -17
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/mouse_events/mouse_events.js +0 -59
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/index.html +0 -28
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.css +0 -3
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/rounded_corners/rounded_corners.js +0 -19
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_boxes.html +0 -45
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_full.html +0 -119
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_ghost.html +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_hoverclass.html +0 -43
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_scroll.html +0 -91
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/dnd_snap.html +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/index.html +0 -93
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/simple_dnd/simple_dnd.css +0 -64
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/index.html +0 -71
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.css +0 -66
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/sortable_tables/sortable_tables.js +0 -203
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/SyntaxHighlighter.css +0 -177
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/Tests.html +0 -339
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushCSharp.js +0 -30
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushDelphi.js +0 -31
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushJScript.js +0 -22
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPhp.js +0 -23
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushPython.js +0 -71
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushSql.js +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushVb.js +0 -29
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shBrushXml.js +0 -61
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/lib/SyntaxHighlighter/shCore.js +0 -622
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.css +0 -1
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.html +0 -19
- data/public/javascripts/old_sql/MochiKit-1.4.2/examples/view-source/view-source.js +0 -70
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/bg_docheader.gif +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_bullet.gif +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/_img/g_logo_doc.gif +0 -0
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/documentation.css +0 -130
- data/public/javascripts/old_sql/MochiKit-1.4.2/include/css/general.css +0 -48
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Async.js +0 -682
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Base.js +0 -1489
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Color.js +0 -863
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DOM.js +0 -1256
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DateTime.js +0 -222
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/DragAndDrop.js +0 -793
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Format.js +0 -304
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Iter.js +0 -844
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Logging.js +0 -315
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/LoggingPane.js +0 -353
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MochiKit.js +0 -188
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/MockDOM.js +0 -115
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Position.js +0 -236
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Selector.js +0 -415
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Signal.js +0 -897
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Sortable.js +0 -589
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Style.js +0 -594
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Test.js +0 -162
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/Visual.js +0 -2026
- data/public/javascripts/old_sql/MochiKit-1.4.2/lib/MochiKit/__package__.js +0 -18
- data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/MochiKit.js +0 -7829
- data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/__package__.js +0 -6
- data/public/javascripts/old_sql/MochiKit-1.4.2/packed/MochiKit/customize.html +0 -251
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/FakeJSAN.js +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/SimpleTest.js +0 -381
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/TestRunner.js +0 -159
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/SimpleTest/test.css +0 -28
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/cli.js +0 -6
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/index.html +0 -25
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/standalone.js +0 -16
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Base.js +0 -577
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Color.js +0 -137
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DateTime.js +0 -52
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_DragAndDrop.js +0 -30
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Format.js +0 -89
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Iter.js +0 -186
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Logging.js +0 -88
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.html +0 -408
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Async.json +0 -1
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Base.html +0 -34
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Color.html +0 -84
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM-Safari.html +0 -48
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DOM.html +0 -363
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DateTime.html +0 -39
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-DragAndDrop.html +0 -54
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Format.html +0 -39
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Iter.html +0 -38
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-JSAN.html +0 -32
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Logging.html +0 -40
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-MochiKit.html +0 -18
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Selector.html +0 -295
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Signal.html +0 -43
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Style.html +0 -223
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_MochiKit-Visual.html +0 -197
- data/public/javascripts/old_sql/MochiKit-1.4.2/tests/test_Signal.js +0 -481
- data/public/javascripts/old_sql/plotkit-0.9.1/COPYING +0 -28
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Base.js +0 -406
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Canvas.js +0 -683
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/EasyPlot.js +0 -161
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/Layout.js +0 -756
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit.js +0 -151
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/PlotKit_Packed.js +0 -2177
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SVG.js +0 -705
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetCanvas.js +0 -348
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/SweetSVG.js +0 -247
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/dummy.svg +0 -9
- data/public/javascripts/old_sql/plotkit-0.9.1/PlotKit/excanvas.js +0 -723
- data/public/javascripts/old_sql/plotkit-0.9.1/README +0 -1
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.html +0 -2
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/MochiKitAdditions.txt +0 -2
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.html +0 -302
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Base.txt +0 -139
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.html +0 -172
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Canvas.txt +0 -81
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.html +0 -155
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.EasyPlot.txt +0 -50
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.html +0 -428
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Layout.txt +0 -330
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.html +0 -368
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.QuickStart.txt +0 -256
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.html +0 -436
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.Renderer.txt +0 -299
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.html +0 -159
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SVG.txt +0 -64
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.html +0 -131
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetCanvas.txt +0 -34
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.html +0 -131
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.SweetSVG.txt +0 -34
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.html +0 -334
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/PlotKit.txt +0 -151
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.html +0 -304
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/SVGCanvasCompat.txt +0 -144
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/barsample.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/black.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/blue.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/cyan.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/doc.css +0 -62
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/generate.py +0 -37
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/green.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/orange.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/piesample.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/purple.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/doc/red.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/scripts/custom_rhino.jar +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/scripts/pack.py +0 -58
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/axis.html +0 -31
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.html +0 -25
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/basic.js +0 -143
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/debug.html +0 -56
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.html +0 -58
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo-svg.js +0 -133
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.html +0 -57
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/demo.js +0 -136
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/dynamic.html +0 -161
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/firefox.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/konqueror.png +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/mozilla.ico +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/msie.gif +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/opera.ico +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/img/safari.gif +0 -0
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels-img.html +0 -38
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/labels.html +0 -43
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/prototype_compat.html +0 -28
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-easy.html +0 -29
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-horiz.html +0 -53
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-neg.html +0 -29
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart-svg.html +0 -61
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/quickstart.html +0 -57
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/sample.txt +0 -6
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.html +0 -29
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg-sweet.js +0 -141
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.html +0 -26
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/svg.js +0 -147
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.html +0 -24
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/sweet.js +0 -89
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/tests.css +0 -66
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.html +0 -20
- data/public/javascripts/old_sql/plotkit-0.9.1/tests/testsvg.js +0 -31
|
@@ -1,454 +0,0 @@
|
|
|
1
|
-
.. title:: MochiKit.Iter - itertools for JavaScript; iteration made HARD, and then easy
|
|
2
|
-
|
|
3
|
-
Name
|
|
4
|
-
====
|
|
5
|
-
|
|
6
|
-
MochiKit.Iter - itertools for JavaScript; iteration made HARD, and
|
|
7
|
-
then easy
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Synopsis
|
|
11
|
-
========
|
|
12
|
-
|
|
13
|
-
::
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
theSum = sum(takewhile(
|
|
17
|
-
partial(operator.gt, 10),
|
|
18
|
-
imap(
|
|
19
|
-
partial(operator.mul, 2),
|
|
20
|
-
count()
|
|
21
|
-
)
|
|
22
|
-
)
|
|
23
|
-
));
|
|
24
|
-
|
|
25
|
-
assert( theSum == (0 + 0 + 2 + 4 + 6 + 8) );
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
Description
|
|
29
|
-
===========
|
|
30
|
-
|
|
31
|
-
All of the functional programming missing from
|
|
32
|
-
:mochiref:`MochiKit.Base` lives here. The functionality in this module
|
|
33
|
-
is largely inspired by Python's iteration protocol [1]_, and the
|
|
34
|
-
itertools module [2]_.
|
|
35
|
-
|
|
36
|
-
MochiKit.Iter defines a standard way to iterate over anything, that
|
|
37
|
-
you can extend with :mochiref:`registerIteratorFactory`, or by implementing
|
|
38
|
-
the ``.iter()`` or ``.__iterator__()`` (in MochiKit 1.4+) protocol.
|
|
39
|
-
Iterators are lazy, so it can potentially be
|
|
40
|
-
cheaper to build a filter chain of iterators than to build lots of
|
|
41
|
-
intermediate arrays. Especially when the data set is very large, but
|
|
42
|
-
the result is not.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Dependencies
|
|
46
|
-
============
|
|
47
|
-
|
|
48
|
-
- :mochiref:`MochiKit.Base`
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
Overview
|
|
52
|
-
========
|
|
53
|
-
|
|
54
|
-
Iteration for JavaScript
|
|
55
|
-
------------------------
|
|
56
|
-
|
|
57
|
-
The best overview right now is in my Iteration for JavaScript [3]_
|
|
58
|
-
blog entry. This information will migrate here eventually.
|
|
59
|
-
|
|
60
|
-
API Reference
|
|
61
|
-
=============
|
|
62
|
-
|
|
63
|
-
Errors
|
|
64
|
-
------
|
|
65
|
-
|
|
66
|
-
:mochidef:`StopIteration`:
|
|
67
|
-
|
|
68
|
-
The singleton :mochiref:`MochiKit.Base.NamedError` that signifies
|
|
69
|
-
the end of an iterator
|
|
70
|
-
|
|
71
|
-
*Availability*:
|
|
72
|
-
Available in MochiKit 1.3.1+
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
Functions
|
|
76
|
-
---------
|
|
77
|
-
|
|
78
|
-
:mochidef:`applymap(fun, seq[, self])`:
|
|
79
|
-
|
|
80
|
-
``applymap(fun, seq)`` -->
|
|
81
|
-
fun.apply(self, seq0), fun.apply(self, seq1), ...
|
|
82
|
-
|
|
83
|
-
*Availability*:
|
|
84
|
-
Available in MochiKit 1.3.1+
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
:mochidef:`chain(p, q[, ...])`:
|
|
88
|
-
|
|
89
|
-
``chain(p, q, ...)`` --> p0, p1, ... plast, q0, q1, ...
|
|
90
|
-
|
|
91
|
-
*Availability*:
|
|
92
|
-
Available in MochiKit 1.3.1+
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
:mochidef:`count(n=0)`:
|
|
96
|
-
|
|
97
|
-
``count(n=0)`` --> n, n + 1, n + 2, ...
|
|
98
|
-
|
|
99
|
-
*Availability*:
|
|
100
|
-
Available in MochiKit 1.3.1+
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
:mochidef:`cycle(p)`:
|
|
104
|
-
|
|
105
|
-
``cycle(p)`` --> p0, p1, ... plast, p0, p1, ...
|
|
106
|
-
|
|
107
|
-
*Availability*:
|
|
108
|
-
Available in MochiKit 1.3.1+
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
:mochidef:`dropwhile(pred, seq)`:
|
|
112
|
-
|
|
113
|
-
``dropwhile(pred, seq)`` --> seq[n], seq[n + 1], starting when
|
|
114
|
-
pred(seq[n]) fails
|
|
115
|
-
|
|
116
|
-
*Availability*:
|
|
117
|
-
Available in MochiKit 1.3.1+
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
:mochidef:`every(iterable, func)`:
|
|
121
|
-
|
|
122
|
-
Return ``true`` if ``func(item)`` is ``true`` for every item in
|
|
123
|
-
``iterable``.
|
|
124
|
-
|
|
125
|
-
*Availability*:
|
|
126
|
-
Available in MochiKit 1.3.1+
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
:mochidef:`exhaust(iterable)`:
|
|
130
|
-
|
|
131
|
-
Exhausts an iterable without saving the results anywhere, like
|
|
132
|
-
:mochiref:`list(iterable)` when you don't care what the output is.
|
|
133
|
-
|
|
134
|
-
*Availability*:
|
|
135
|
-
Available in MochiKit 1.3.1+
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
:mochidef:`forEach(iterable, func[, self])`:
|
|
139
|
-
|
|
140
|
-
Call ``func`` for each item in ``iterable``, and don't save the
|
|
141
|
-
results.
|
|
142
|
-
|
|
143
|
-
*Availability*:
|
|
144
|
-
Available in MochiKit 1.3.1+
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
:mochidef:`groupby(iterable[, keyfunc])`:
|
|
148
|
-
|
|
149
|
-
Make an iterator that returns consecutive keys and groups from the
|
|
150
|
-
iterable. The key is a function computing a key value for each
|
|
151
|
-
element. If not specified or is None, key defaults to an identity
|
|
152
|
-
function and returns the element unchanged. Generally, the
|
|
153
|
-
iterable needs to already be sorted on the same key function.
|
|
154
|
-
|
|
155
|
-
The returned group is itself an iterator that shares the
|
|
156
|
-
underlying iterable with :mochiref:`groupby()`. Because the source
|
|
157
|
-
is shared, when the groupby object is advanced, the previous group
|
|
158
|
-
is no longer visible. So, if that data is needed later, it should
|
|
159
|
-
be stored as an array::
|
|
160
|
-
|
|
161
|
-
var groups = [];
|
|
162
|
-
var uniquekeys = [];
|
|
163
|
-
forEach(groupby(data, keyfunc), function (key_group) {
|
|
164
|
-
groups.push(list(key_group[1]));
|
|
165
|
-
uniquekeys.push(key_group[0]);
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
As a convenience, :mochiref:`groupby_as_array()` is provided to
|
|
169
|
-
suit the above use case.
|
|
170
|
-
|
|
171
|
-
*Availability*:
|
|
172
|
-
Available in MochiKit 1.3.1+
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
:mochidef:`groupby_as_array(iterable[, keyfunc])`:
|
|
176
|
-
|
|
177
|
-
Perform the same task as :mochiref:`groupby()`, except return an
|
|
178
|
-
array of arrays instead of an iterator of iterators.
|
|
179
|
-
|
|
180
|
-
*Availability*:
|
|
181
|
-
Available in MochiKit 1.3.1+
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
:mochidef:`iextend(lst, iterable)`:
|
|
185
|
-
|
|
186
|
-
Just like :mochiref:`list(iterable)`, except it pushes results on
|
|
187
|
-
``lst`` rather than creating a new one.
|
|
188
|
-
|
|
189
|
-
*Availability*:
|
|
190
|
-
Available in MochiKit 1.3.1+
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
:mochidef:`ifilter(pred, seq)`:
|
|
194
|
-
|
|
195
|
-
``ifilter(pred, seq)`` --> elements of seq where ``pred(elem)`` is
|
|
196
|
-
``true``
|
|
197
|
-
|
|
198
|
-
*Availability*:
|
|
199
|
-
Available in MochiKit 1.3.1+
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
:mochidef:`ifilterfalse(pred, seq)`:
|
|
203
|
-
|
|
204
|
-
``ifilterfalse(pred, seq)`` --> elements of seq where
|
|
205
|
-
``pred(elem)`` is ``false``
|
|
206
|
-
|
|
207
|
-
*Availability*:
|
|
208
|
-
Available in MochiKit 1.3.1+
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
:mochidef:`imap(fun, p, q[, ...])`:
|
|
212
|
-
|
|
213
|
-
``imap(fun, p, q, ...)`` --> fun(p0, q0, ...), fun(p1, q1, ...),
|
|
214
|
-
...
|
|
215
|
-
|
|
216
|
-
*Availability*:
|
|
217
|
-
Available in MochiKit 1.3.1+
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
:mochidef:`islice(seq, [start,] stop[, step])`:
|
|
221
|
-
|
|
222
|
-
``islice(seq, [start,] stop[, step])`` --> elements from
|
|
223
|
-
seq[start:stop:step] (in Python slice syntax)
|
|
224
|
-
|
|
225
|
-
*Availability*:
|
|
226
|
-
Available in MochiKit 1.3.1+
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
:mochidef:`iter(iterable[, sentinel])`:
|
|
230
|
-
|
|
231
|
-
Convert the given argument to an iterator (object implementing
|
|
232
|
-
``.next()``).
|
|
233
|
-
|
|
234
|
-
1. If ``iterable`` is an iterator (implements ``.next()``), then
|
|
235
|
-
it will be returned as-is.
|
|
236
|
-
2. If ``iterable`` is an iterator factory (implements
|
|
237
|
-
``.iter()``), then the result of ``iterable.iter()`` will be
|
|
238
|
-
returned.
|
|
239
|
-
3. If ``iterable`` is a JavaScript 1.7 iterator factory (implements
|
|
240
|
-
``.__iterable__()``), then the result of ``iterable.__iterable__()``
|
|
241
|
-
will be returned (MochiKit 1.4+).
|
|
242
|
-
4. Otherwise, the iterator factory
|
|
243
|
-
:mochiref:`MochiKit.Base.AdapterRegistry` is used to find a
|
|
244
|
-
match.
|
|
245
|
-
5. If no factory is found, it will throw ``TypeError``
|
|
246
|
-
|
|
247
|
-
Built-in iterator factories are present for Array-like objects,
|
|
248
|
-
and objects that implement the ``iterateNext`` protocol (e.g. the
|
|
249
|
-
result of Mozilla's ``document.evaluate``).
|
|
250
|
-
|
|
251
|
-
When used directly, using an iterator should look like this::
|
|
252
|
-
|
|
253
|
-
var it = iter(iterable);
|
|
254
|
-
try {
|
|
255
|
-
while (var o = it.next()) {
|
|
256
|
-
// use o
|
|
257
|
-
}
|
|
258
|
-
} catch (e) {
|
|
259
|
-
if (e != StopIteration) {
|
|
260
|
-
throw e;
|
|
261
|
-
}
|
|
262
|
-
// pass
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
This is ugly, so you should use the higher order functions to work
|
|
266
|
-
with iterators whenever possible.
|
|
267
|
-
|
|
268
|
-
*Availability*:
|
|
269
|
-
Available in MochiKit 1.3.1+
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
:mochidef:`izip(p, q[, ...])`:
|
|
273
|
-
|
|
274
|
-
``izip(p, q, ...)`` --> [p0, q0, ...], [p1, q1, ...], ...
|
|
275
|
-
|
|
276
|
-
*Availability*:
|
|
277
|
-
Available in MochiKit 1.3.1+
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
:mochidef:`list(iterable)`:
|
|
281
|
-
|
|
282
|
-
Convert ``iterable`` to a new ``Array``
|
|
283
|
-
|
|
284
|
-
*Availability*:
|
|
285
|
-
Available in MochiKit 1.3.1+
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
:mochidef:`next(iterator)`:
|
|
289
|
-
|
|
290
|
-
Return ``iterator.next()``
|
|
291
|
-
|
|
292
|
-
*Availability*:
|
|
293
|
-
Available in MochiKit 1.3.1+
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
:mochidef:`range([start,] stop[, step])`:
|
|
297
|
-
|
|
298
|
-
Return an iterator containing an arithmetic progression of integers.
|
|
299
|
-
|
|
300
|
-
``range(i, j)`` returns :mochiref:`iter([i, i + 1, i + 2, ..., j -
|
|
301
|
-
1])`
|
|
302
|
-
|
|
303
|
-
``start`` (!) defaults to ``0``. When ``step`` is given, it
|
|
304
|
-
specifies the increment (or decrement). The end point is omitted!
|
|
305
|
-
|
|
306
|
-
For example, ``range(4)`` returns :mochiref:`iter([0, 1, 2, 3])`.
|
|
307
|
-
This iterates over exactly the valid indexes for an array of 4
|
|
308
|
-
elements.
|
|
309
|
-
|
|
310
|
-
*Availability*:
|
|
311
|
-
Available in MochiKit 1.3.1+
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
:mochidef:`reduce(fn, iterable[, initial])`:
|
|
315
|
-
|
|
316
|
-
Apply ``fn(a, b)`` cumulatively to the items of an iterable from
|
|
317
|
-
left to right, so as to reduce the iterable to a single value.
|
|
318
|
-
|
|
319
|
-
For example::
|
|
320
|
-
|
|
321
|
-
reduce(function (a, b) { return a + b; }, [1, 2, 3, 4, 5])
|
|
322
|
-
|
|
323
|
-
calculates::
|
|
324
|
-
|
|
325
|
-
((((1 + 2) + 3) + 4) + 5).
|
|
326
|
-
|
|
327
|
-
If initial is given, it is placed before the items of the sequence
|
|
328
|
-
in the calculation, and serves as a default when the sequence is
|
|
329
|
-
empty.
|
|
330
|
-
|
|
331
|
-
Note that the above example could be written more clearly as::
|
|
332
|
-
|
|
333
|
-
reduce(operator.add, [1, 2, 3, 4, 5])
|
|
334
|
-
|
|
335
|
-
Or even simpler::
|
|
336
|
-
|
|
337
|
-
sum([1, 2, 3, 4, 5])
|
|
338
|
-
|
|
339
|
-
*Availability*:
|
|
340
|
-
Available in MochiKit 1.3.1+
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
:mochidef:`registerIteratorFactory(name, check, iterfactory[, override])`:
|
|
344
|
-
|
|
345
|
-
Register an iterator factory for use with the iter function.
|
|
346
|
-
|
|
347
|
-
``check`` is a ``function(a)`` that returns ``true`` if ``a`` can
|
|
348
|
-
be converted into an iterator with ``iterfactory``.
|
|
349
|
-
|
|
350
|
-
``iterfactory`` is a ``function(a)`` that returns an object with a
|
|
351
|
-
``.next()`` method that returns the next value in the sequence.
|
|
352
|
-
|
|
353
|
-
``iterfactory`` is guaranteed to only be called if ``check(a)``
|
|
354
|
-
returns a true value.
|
|
355
|
-
|
|
356
|
-
If ``override`` is ``true``, then it will be made the
|
|
357
|
-
highest precedence iterator factory. Otherwise, the lowest.
|
|
358
|
-
|
|
359
|
-
*Availability*:
|
|
360
|
-
Available in MochiKit 1.3.1+
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
:mochidef:`repeat(elem[, n])`:
|
|
364
|
-
|
|
365
|
-
``repeat(elem, [,n])`` --> elem, elem, elem, ... endlessly or up
|
|
366
|
-
to n times
|
|
367
|
-
|
|
368
|
-
*Availability*:
|
|
369
|
-
Available in MochiKit 1.3.1+
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
:mochidef:`reversed(iterable)`:
|
|
373
|
-
|
|
374
|
-
Return a reversed array from iterable.
|
|
375
|
-
|
|
376
|
-
*Availability*:
|
|
377
|
-
Available in MochiKit 1.3.1+
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
:mochidef:`some(iterable, func)`:
|
|
381
|
-
|
|
382
|
-
Return ``true`` if ``func(item)`` is ``true`` for at least one
|
|
383
|
-
item in ``iterable``.
|
|
384
|
-
|
|
385
|
-
*Availability*:
|
|
386
|
-
Available in MochiKit 1.3.1+
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
:mochidef:`sorted(iterable[, cmp])`:
|
|
390
|
-
|
|
391
|
-
Return a sorted array from iterable.
|
|
392
|
-
|
|
393
|
-
*Availability*:
|
|
394
|
-
Available in MochiKit 1.3.1+
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
:mochidef:`sum(iterable, start=0)`:
|
|
398
|
-
|
|
399
|
-
Returns the sum of a sequence of numbers plus the value of
|
|
400
|
-
parameter ``start`` (with a default of 0). When the sequence is
|
|
401
|
-
empty, returns start.
|
|
402
|
-
|
|
403
|
-
Equivalent to::
|
|
404
|
-
|
|
405
|
-
reduce(operator.add, iterable, start);
|
|
406
|
-
|
|
407
|
-
*Availability*:
|
|
408
|
-
Available in MochiKit 1.3.1+
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
:mochidef:`takewhile(pred, seq)`:
|
|
412
|
-
|
|
413
|
-
``takewhile(pred, seq)`` --> seq[0], seq[1], ... until
|
|
414
|
-
pred(seq[n]) fails
|
|
415
|
-
|
|
416
|
-
*Availability*:
|
|
417
|
-
Available in MochiKit 1.3.1+
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
:mochidef:`tee(iterable, n=2)`:
|
|
421
|
-
|
|
422
|
-
``tee(it, n=2)`` --> [it1, it2, it3, ... itn] splits one iterator
|
|
423
|
-
into n
|
|
424
|
-
|
|
425
|
-
*Availability*:
|
|
426
|
-
Available in MochiKit 1.3.1+
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
See Also
|
|
430
|
-
========
|
|
431
|
-
|
|
432
|
-
.. [1] The iteration protocol is described in
|
|
433
|
-
PEP 234 - Iterators: http://www.python.org/peps/pep-0234.html
|
|
434
|
-
.. [2] Python's itertools
|
|
435
|
-
module: http://docs.python.org/lib/module-itertools.html
|
|
436
|
-
.. [3] Iteration in JavaScript: http://bob.pythonmac.org/archives/2005/07/06/iteration-in-javascript/
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
Authors
|
|
440
|
-
=======
|
|
441
|
-
|
|
442
|
-
- Bob Ippolito <bob@redivi.com>
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
Copyright
|
|
446
|
-
=========
|
|
447
|
-
|
|
448
|
-
Copyright 2005 Bob Ippolito <bob@redivi.com>. This program is
|
|
449
|
-
dual-licensed free software; you can redistribute it and/or modify it
|
|
450
|
-
under the terms of the `MIT License`_ or the `Academic Free License
|
|
451
|
-
v2.1`_.
|
|
452
|
-
|
|
453
|
-
.. _`MIT License`: http://www.opensource.org/licenses/mit-license.php
|
|
454
|
-
.. _`Academic Free License v2.1`: http://www.opensource.org/licenses/afl-2.1.php
|