├── js ├── ace │ ├── mode-text.js │ ├── snippets │ │ ├── d.js │ │ ├── ada.js │ │ ├── dot.js │ │ ├── ejs.js │ │ ├── elm.js │ │ ├── ftl.js │ │ ├── ini.js │ │ ├── jsx.js │ │ ├── mel.js │ │ ├── nix.js │ │ ├── nsis.js │ │ ├── rst.js │ │ ├── sjs.js │ │ ├── svg.js │ │ ├── xml.js │ │ ├── abap.js │ │ ├── cirru.js │ │ ├── cobol.js │ │ ├── curly.js │ │ ├── elixir.js │ │ ├── forth.js │ │ ├── gcode.js │ │ ├── glsl.js │ │ ├── haxe.js │ │ ├── jack.js │ │ ├── jade.js │ │ ├── json.js │ │ ├── julia.js │ │ ├── latex.js │ │ ├── lean.js │ │ ├── less.js │ │ ├── lisp.js │ │ ├── mask.js │ │ ├── mysql.js │ │ ├── ocaml.js │ │ ├── pgsql.js │ │ ├── praat.js │ │ ├── rdoc.js │ │ ├── rhtml.js │ │ ├── rust.js │ │ ├── sass.js │ │ ├── scad.js │ │ ├── scala.js │ │ ├── scss.js │ │ ├── space.js │ │ ├── swift.js │ │ ├── swig.js │ │ ├── text.js │ │ ├── toml.js │ │ ├── twig.js │ │ ├── vhdl.js │ │ ├── yaml.js │ │ ├── csharp.js │ │ ├── eiffel.js │ │ ├── golang.js │ │ ├── groovy.js │ │ ├── liquid.js │ │ ├── logiql.js │ │ ├── lucene.js │ │ ├── matlab.js │ │ ├── pascal.js │ │ ├── prolog.js │ │ ├── protobuf.js │ │ ├── scheme.js │ │ ├── smarty.js │ │ ├── stylus.js │ │ ├── asciidoc.js │ │ ├── c9search.js │ │ ├── fortran.js │ │ ├── gherkin.js │ │ ├── live_script.js │ │ ├── luapage.js │ │ ├── mushcode.js │ │ ├── vbscript.js │ │ ├── verilog.js │ │ ├── autohotkey.js │ │ ├── batchfile.js │ │ ├── coldfusion.js │ │ ├── dockerfile.js │ │ ├── gitignore.js │ │ ├── handlebars.js │ │ ├── html_ruby.js │ │ ├── livescript.js │ │ ├── mipsassembler.js │ │ ├── objectivec.js │ │ ├── plain_text.js │ │ ├── powershell.js │ │ ├── properties.js │ │ ├── typescript.js │ │ ├── apache_conf.js │ │ ├── applescript.js │ │ ├── html_elixir.js │ │ ├── assembly_x86.js │ │ ├── soy_template.js │ │ ├── mips_assembler.js │ │ ├── razor.js │ │ ├── makefile.js │ │ ├── maze.js │ │ ├── snippets.js │ │ ├── haml.js │ │ ├── lua.js │ │ ├── textile.js │ │ ├── diff.js │ │ ├── gobstones.js │ │ ├── velocity.js │ │ ├── sql.js │ │ ├── abc.js │ │ ├── io.js │ │ ├── wollok.js │ │ ├── dart.js │ │ ├── tcl.js │ │ ├── jsoniq.js │ │ ├── xquery.js │ │ ├── haskell.js │ │ ├── markdown.js │ │ ├── clojure.js │ │ ├── sh.js │ │ ├── sqlserver.js │ │ ├── coffee.js │ │ ├── r.js │ │ ├── c_cpp.js │ │ └── jsp.js │ ├── ext-error_marker.js │ ├── mode-plain_text.js │ ├── ext-linking.js │ ├── mode-gitignore.js │ ├── mode-properties.js │ ├── ext-statusbar.js │ ├── mode-lucene.js │ ├── mode-gcode.js │ ├── ext-spellcheck.js │ ├── ext-themelist.js │ ├── mode-ada.js │ ├── mode-sql.js │ ├── mode-lisp.js │ ├── theme-xcode.js │ ├── mode-textile.js │ ├── theme-kuroir.js │ ├── mode-vhdl.js │ ├── theme-clouds.js │ ├── theme-eclipse.js │ ├── mode-toml.js │ ├── theme-github.js │ ├── mode-space.js │ ├── theme-vibrant_ink.js │ ├── theme-dawn.js │ ├── theme-merbivore.js │ ├── theme-idle_fingers.js │ ├── theme-kr_theme.js │ ├── mode-cobol.js │ ├── theme-solarized_dark.js │ ├── mode-gherkin.js │ ├── theme-cobalt.js │ ├── theme-solarized_light.js │ ├── theme-monokai.js │ ├── mode-diff.js │ ├── theme-clouds_midnight.js │ ├── theme-merbivore_soft.js │ ├── theme-twilight.js │ ├── theme-tomorrow.js │ ├── theme-textmate.js │ ├── ext-whitespace.js │ ├── mode-verilog.js │ ├── theme-pastel_on_dark.js │ ├── mode-ini.js │ ├── mode-tex.js │ ├── theme-chrome.js │ └── theme-mono_industrial.js └── module │ └── array1d.js ├── .gitignore ├── algorithm ├── etc │ ├── scratch_paper │ │ ├── scratch_paper │ │ │ ├── code.js │ │ │ └── data.js │ │ └── desc.json │ └── dp │ │ ├── sliding_window │ │ ├── data.js │ │ └── code.js │ │ ├── max_subarray │ │ ├── data.js │ │ └── code.js │ │ ├── longest_increasing_subsequence │ │ ├── data.js │ │ └── code.js │ │ ├── fibonacci │ │ ├── data.js │ │ └── code.js │ │ ├── max_sum_path │ │ ├── data.js │ │ └── code.js │ │ └── desc.json ├── sorting │ ├── bubble │ │ ├── basic │ │ │ ├── data.js │ │ │ └── code.js │ │ └── desc.json │ ├── merge │ │ ├── basic │ │ │ ├── data.js │ │ │ └── code.js │ │ └── desc.json │ ├── quick │ │ ├── basic │ │ │ ├── data.js │ │ │ └── code.js │ │ └── desc.json │ ├── heap │ │ ├── basic │ │ │ ├── data.js │ │ │ └── code.js │ │ └── desc.json │ ├── insertion │ │ ├── basic │ │ │ ├── data.js │ │ │ └── code.js │ │ └── desc.json │ ├── selection │ │ ├── basic │ │ │ ├── data.js │ │ │ └── code.js │ │ └── desc.json │ └── radix │ │ ├── lsd │ │ ├── data.js │ │ └── code.js │ │ └── desc.json ├── search │ └── binary_search │ │ ├── iterative │ │ ├── data.js │ │ └── code.js │ │ ├── recursive │ │ ├── data.js │ │ └── code.js │ │ └── desc.json ├── graph_search │ ├── bellman_ford │ │ ├── shortest_path │ │ │ └── data.js │ │ └── desc.json │ ├── dfs │ │ ├── tree │ │ │ ├── code.js │ │ │ └── data.js │ │ ├── all_paths │ │ │ ├── data.js │ │ │ └── code.js │ │ ├── weighted_graph │ │ │ ├── data.js │ │ │ └── code.js │ │ ├── shortest_path │ │ │ ├── data.js │ │ │ └── code.js │ │ └── desc.json │ ├── bfs │ │ ├── shortest_path │ │ │ ├── data.js │ │ │ └── code.js │ │ ├── tree │ │ │ ├── code.js │ │ │ └── data.js │ │ └── desc.json │ ├── dijkstra │ │ ├── shortest_path │ │ │ ├── data.js │ │ │ └── code.js │ │ └── desc.json │ ├── floyd_warshall │ │ ├── shortest_paths │ │ │ ├── data.js │ │ │ └── code.js │ │ └── desc.json │ └── topological_sort │ │ ├── kahn_algorithm │ │ ├── data.js │ │ └── code.js │ │ └── desc.json ├── mst │ └── prim │ │ ├── normal │ │ ├── data.js │ │ └── code.js │ │ └── desc.json ├── string │ └── edit_distance │ │ ├── dynamic_programming │ │ ├── data.js │ │ └── code.js │ │ └── desc.json └── category.json ├── img ├── image.png └── favicon.ico ├── fonts ├── FontAwesome.otf ├── fontawesome-webfont.eot ├── fontawesome-webfont.ttf ├── fontawesome-webfont.woff └── fontawesome-webfont.woff2 └── LICENSE /js/ace/mode-text.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store -------------------------------------------------------------------------------- /algorithm/etc/scratch_paper/scratch_paper/code.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /algorithm/etc/scratch_paper/scratch_paper/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Tracer(); -------------------------------------------------------------------------------- /img/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biubiu/AlgorithmVisualizer/gh-pages/img/image.png -------------------------------------------------------------------------------- /img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biubiu/AlgorithmVisualizer/gh-pages/img/favicon.ico -------------------------------------------------------------------------------- /fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biubiu/AlgorithmVisualizer/gh-pages/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /algorithm/sorting/bubble/basic/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Array1DTracer(); 2 | var D = Array1D.random(15); 3 | tracer._setData(D); -------------------------------------------------------------------------------- /algorithm/sorting/merge/basic/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Array1DTracer(); 2 | var D = Array1D.random(15); 3 | tracer._setData(D); -------------------------------------------------------------------------------- /algorithm/sorting/quick/basic/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Array1DTracer(); 2 | var D = Array1D.random(15); 3 | tracer._setData(D); -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biubiu/AlgorithmVisualizer/gh-pages/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biubiu/AlgorithmVisualizer/gh-pages/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biubiu/AlgorithmVisualizer/gh-pages/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biubiu/AlgorithmVisualizer/gh-pages/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /algorithm/sorting/heap/basic/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Array1DTracer(); 2 | var D = Array1D.random(10); 3 | tracer._setData(D); 4 | -------------------------------------------------------------------------------- /algorithm/sorting/insertion/basic/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Array1DTracer(); 2 | var D = Array1D.random(15); 3 | tracer._setData(D); -------------------------------------------------------------------------------- /algorithm/sorting/selection/basic/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Array1DTracer(); 2 | var D = Array1D.random(15); 3 | tracer._setData(D); -------------------------------------------------------------------------------- /algorithm/etc/dp/sliding_window/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Array1DTracer(); 2 | var D = Array1D.random(20, -5, 5); 3 | tracer._setData(D); -------------------------------------------------------------------------------- /js/ace/snippets/d.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/d",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="d"}) -------------------------------------------------------------------------------- /algorithm/etc/dp/max_subarray/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Array1DTracer (); 2 | var D = [-2, -3, 4, -1, -2, 1, 5, -3]; 3 | 4 | tracer._setData (D); -------------------------------------------------------------------------------- /js/ace/snippets/ada.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/ada",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="ada"}) -------------------------------------------------------------------------------- /js/ace/snippets/dot.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/dot",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="dot"}) -------------------------------------------------------------------------------- /js/ace/snippets/ejs.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/ejs",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="ejs"}) -------------------------------------------------------------------------------- /js/ace/snippets/elm.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/elm",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="elm"}) -------------------------------------------------------------------------------- /js/ace/snippets/ftl.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/ftl",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="ftl"}) -------------------------------------------------------------------------------- /js/ace/snippets/ini.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/ini",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="ini"}) -------------------------------------------------------------------------------- /js/ace/snippets/jsx.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/jsx",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="jsx"}) -------------------------------------------------------------------------------- /js/ace/snippets/mel.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/mel",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="mel"}) -------------------------------------------------------------------------------- /js/ace/snippets/nix.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/nix",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="nix"}) -------------------------------------------------------------------------------- /js/ace/snippets/nsis.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/nsis",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}) -------------------------------------------------------------------------------- /js/ace/snippets/rst.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/rst",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}) -------------------------------------------------------------------------------- /js/ace/snippets/sjs.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/sjs",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="sjs"}) -------------------------------------------------------------------------------- /js/ace/snippets/svg.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/svg",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="svg"}) -------------------------------------------------------------------------------- /js/ace/snippets/xml.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/xml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="xml"}) -------------------------------------------------------------------------------- /algorithm/search/binary_search/iterative/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Array1DTracer(); 2 | var D = Array1D.randomSorted(15, 0, 50); 3 | tracer._setData(D); -------------------------------------------------------------------------------- /algorithm/search/binary_search/recursive/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Array1DTracer(); 2 | var D = Array1D.randomSorted(15, 0, 50); 3 | tracer._setData(D); -------------------------------------------------------------------------------- /js/ace/snippets/abap.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/abap",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="abap"}) -------------------------------------------------------------------------------- /js/ace/snippets/cirru.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/cirru",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="cirru"}) -------------------------------------------------------------------------------- /js/ace/snippets/cobol.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/cobol",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="cobol"}) -------------------------------------------------------------------------------- /js/ace/snippets/curly.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/curly",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="curly"}) -------------------------------------------------------------------------------- /js/ace/snippets/elixir.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/elixir",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}) -------------------------------------------------------------------------------- /js/ace/snippets/forth.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/forth",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="forth"}) -------------------------------------------------------------------------------- /js/ace/snippets/gcode.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/gcode",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="gcode"}) -------------------------------------------------------------------------------- /js/ace/snippets/glsl.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/glsl",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="glsl"}) -------------------------------------------------------------------------------- /js/ace/snippets/haxe.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/haxe",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="haxe"}) -------------------------------------------------------------------------------- /js/ace/snippets/jack.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/jack",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="jack"}) -------------------------------------------------------------------------------- /js/ace/snippets/jade.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/jade",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="jade"}) -------------------------------------------------------------------------------- /js/ace/snippets/json.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/json",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="json"}) -------------------------------------------------------------------------------- /js/ace/snippets/julia.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/julia",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="julia"}) -------------------------------------------------------------------------------- /js/ace/snippets/latex.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/latex",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="latex"}) -------------------------------------------------------------------------------- /js/ace/snippets/lean.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/lean",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="lean"}) -------------------------------------------------------------------------------- /js/ace/snippets/less.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/less",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="less"}) -------------------------------------------------------------------------------- /js/ace/snippets/lisp.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/lisp",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="lisp"}) -------------------------------------------------------------------------------- /js/ace/snippets/mask.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/mask",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="mask"}) -------------------------------------------------------------------------------- /js/ace/snippets/mysql.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/mysql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="mysql"}) -------------------------------------------------------------------------------- /js/ace/snippets/ocaml.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/ocaml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="ocaml"}) -------------------------------------------------------------------------------- /js/ace/snippets/pgsql.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/pgsql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="pgsql"}) -------------------------------------------------------------------------------- /js/ace/snippets/praat.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/praat",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="praat"}) -------------------------------------------------------------------------------- /js/ace/snippets/rdoc.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/rdoc",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="rdoc"}) -------------------------------------------------------------------------------- /js/ace/snippets/rhtml.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/rhtml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="rhtml"}) -------------------------------------------------------------------------------- /js/ace/snippets/rust.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/rust",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="rust"}) -------------------------------------------------------------------------------- /js/ace/snippets/sass.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/sass",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="sass"}) -------------------------------------------------------------------------------- /js/ace/snippets/scad.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/scad",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="scad"}) -------------------------------------------------------------------------------- /js/ace/snippets/scala.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/scala",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="scala"}) -------------------------------------------------------------------------------- /js/ace/snippets/scss.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/scss",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="scss"}) -------------------------------------------------------------------------------- /js/ace/snippets/space.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/space",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="space"}) -------------------------------------------------------------------------------- /js/ace/snippets/swift.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/swift",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="swift"}) -------------------------------------------------------------------------------- /js/ace/snippets/swig.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/swig",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="swig"}) -------------------------------------------------------------------------------- /js/ace/snippets/text.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/text",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="text"}) -------------------------------------------------------------------------------- /js/ace/snippets/toml.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/toml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="toml"}) -------------------------------------------------------------------------------- /js/ace/snippets/twig.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/twig",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="twig"}) -------------------------------------------------------------------------------- /js/ace/snippets/vhdl.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/vhdl",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="vhdl"}) -------------------------------------------------------------------------------- /js/ace/snippets/yaml.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/yaml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="yaml"}) -------------------------------------------------------------------------------- /js/ace/snippets/csharp.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/csharp",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="csharp"}) -------------------------------------------------------------------------------- /js/ace/snippets/eiffel.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/eiffel",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="eiffel"}) -------------------------------------------------------------------------------- /js/ace/snippets/golang.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/golang",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="golang"}) -------------------------------------------------------------------------------- /js/ace/snippets/groovy.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/groovy",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="groovy"}) -------------------------------------------------------------------------------- /js/ace/snippets/liquid.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/liquid",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="liquid"}) -------------------------------------------------------------------------------- /js/ace/snippets/logiql.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/logiql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="logiql"}) -------------------------------------------------------------------------------- /js/ace/snippets/lucene.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/lucene",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="lucene"}) -------------------------------------------------------------------------------- /js/ace/snippets/matlab.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/matlab",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="matlab"}) -------------------------------------------------------------------------------- /js/ace/snippets/pascal.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/pascal",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="pascal"}) -------------------------------------------------------------------------------- /js/ace/snippets/prolog.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/prolog",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="prolog"}) -------------------------------------------------------------------------------- /js/ace/snippets/protobuf.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/protobuf",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="",t.scope="protobuf"}) -------------------------------------------------------------------------------- /js/ace/snippets/scheme.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/scheme",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="scheme"}) -------------------------------------------------------------------------------- /js/ace/snippets/smarty.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/smarty",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="smarty"}) -------------------------------------------------------------------------------- /js/ace/snippets/stylus.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/stylus",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="stylus"}) -------------------------------------------------------------------------------- /js/ace/snippets/asciidoc.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/asciidoc",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="asciidoc"}) -------------------------------------------------------------------------------- /js/ace/snippets/c9search.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/c9search",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="c9search"}) -------------------------------------------------------------------------------- /js/ace/snippets/fortran.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/fortran",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="fortran"}) -------------------------------------------------------------------------------- /js/ace/snippets/gherkin.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/gherkin",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="gherkin"}) -------------------------------------------------------------------------------- /js/ace/snippets/live_script.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/live_script",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}) -------------------------------------------------------------------------------- /js/ace/snippets/luapage.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/luapage",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="luapage"}) -------------------------------------------------------------------------------- /js/ace/snippets/mushcode.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/mushcode",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="mushcode"}) -------------------------------------------------------------------------------- /js/ace/snippets/vbscript.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/vbscript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="vbscript"}) -------------------------------------------------------------------------------- /js/ace/snippets/verilog.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/verilog",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="verilog"}) -------------------------------------------------------------------------------- /js/ace/snippets/autohotkey.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/autohotkey",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="autohotkey"}) -------------------------------------------------------------------------------- /js/ace/snippets/batchfile.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/batchfile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="batchfile"}) -------------------------------------------------------------------------------- /js/ace/snippets/coldfusion.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/coldfusion",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="coldfusion"}) -------------------------------------------------------------------------------- /js/ace/snippets/dockerfile.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/dockerfile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="dockerfile"}) -------------------------------------------------------------------------------- /js/ace/snippets/gitignore.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/gitignore",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="gitignore"}) -------------------------------------------------------------------------------- /js/ace/snippets/handlebars.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/handlebars",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="handlebars"}) -------------------------------------------------------------------------------- /js/ace/snippets/html_ruby.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/html_ruby",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="html_ruby"}) -------------------------------------------------------------------------------- /js/ace/snippets/livescript.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/livescript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="livescript"}) -------------------------------------------------------------------------------- /js/ace/snippets/mipsassembler.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/mipsassembler",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""}) -------------------------------------------------------------------------------- /js/ace/snippets/objectivec.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/objectivec",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="objectivec"}) -------------------------------------------------------------------------------- /js/ace/snippets/plain_text.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/plain_text",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="plain_text"}) -------------------------------------------------------------------------------- /js/ace/snippets/powershell.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/powershell",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="powershell"}) -------------------------------------------------------------------------------- /js/ace/snippets/properties.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/properties",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="properties"}) -------------------------------------------------------------------------------- /js/ace/snippets/typescript.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/typescript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="typescript"}) -------------------------------------------------------------------------------- /js/ace/snippets/apache_conf.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/apache_conf",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="apache_conf"}) -------------------------------------------------------------------------------- /js/ace/snippets/applescript.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/applescript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="applescript"}) -------------------------------------------------------------------------------- /js/ace/snippets/html_elixir.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/html_elixir",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="html_elixir"}) -------------------------------------------------------------------------------- /js/ace/snippets/assembly_x86.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/assembly_x86",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="assembly_x86"}) -------------------------------------------------------------------------------- /js/ace/snippets/soy_template.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/soy_template",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="soy_template"}) -------------------------------------------------------------------------------- /js/ace/snippets/mips_assembler.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/mips_assembler",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="mips_assembler"}) -------------------------------------------------------------------------------- /algorithm/etc/dp/longest_increasing_subsequence/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Array1DTracer(); 2 | var A = Array1D.random(10, 0, 10); 3 | var LIS = new Array(A.length); 4 | tracer._setData(A); -------------------------------------------------------------------------------- /js/ace/ext-error_marker.js: -------------------------------------------------------------------------------- 1 | ; 2 | (function() { 3 | window.require(["ace/ext/error_marker"], function() {}); 4 | })(); 5 | -------------------------------------------------------------------------------- /js/ace/snippets/razor.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/razor",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet if\n(${1} == ${2}) {\n ${3}\n}",t.scope="razor"}) -------------------------------------------------------------------------------- /algorithm/etc/dp/fibonacci/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Array1DTracer(); 2 | var index = 15; 3 | var D = [1, 1]; 4 | for (var i = 2; i < index; i++) { 5 | D.push(0); 6 | } 7 | tracer._setData(D); -------------------------------------------------------------------------------- /js/ace/snippets/makefile.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/makefile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet ifeq\n ifeq (${1:cond0},${2:cond1})\n ${3:code}\n endif\n",t.scope="makefile"}) -------------------------------------------------------------------------------- /algorithm/sorting/radix/lsd/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Array2DTracer(); 2 | var k = Array1D.random(10, 1, 999); 3 | var D = [ 4 | k, 5 | [0,0,0,0,0,0,0,0,0,0], 6 | [0,0,0,0,0,0,0,0,0,0] 7 | ]; 8 | tracer._setData(D); 9 | -------------------------------------------------------------------------------- /algorithm/etc/dp/fibonacci/code.js: -------------------------------------------------------------------------------- 1 | tracer._pace(300); 2 | for (var i = 2; i < index; i++) { 3 | D[i] = D[i - 2] + D[i - 1]; 4 | tracer._selectSet([i - 2, i - 1]); 5 | tracer._notify(i); 6 | tracer._deselectSet([i - 2, i - 1]); 7 | } -------------------------------------------------------------------------------- /algorithm/graph_search/bellman_ford/shortest_path/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new WeightedDirectedGraphTracer(); 2 | var G = [ 3 | [0, -1, 4, 0, 0], 4 | [0, 0, 3, 2, 2], 5 | [0, 0, 0, 0, 0], 6 | [0, 1, 5, 0, 0], 7 | [0, 0, 0, -3, 0] 8 | ]; 9 | tracer._setData(G); 10 | -------------------------------------------------------------------------------- /js/ace/snippets/maze.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/maze",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet >\ndescription assignment\nscope maze\n -> ${1}= ${2}\n\nsnippet >\ndescription if\nscope maze\n -> IF ${2:**} THEN %${3:L} ELSE %${4:R}\n",t.scope="maze"}) -------------------------------------------------------------------------------- /algorithm/etc/dp/max_sum_path/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Array2DTracer(); 2 | var D = Array2D.random(5, 5, 1, 5); 3 | var DP = []; 4 | for (var i = 0; i < D.length; i++) { 5 | DP.push([]); 6 | for (var j = 0; j < D[i].length; j++) { 7 | DP[i].push(999); 8 | } 9 | } 10 | tracer._setData(DP); -------------------------------------------------------------------------------- /js/ace/snippets/snippets.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/snippets",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# snippets for making snippets :)\nsnippet snip\n snippet ${1:trigger}\n ${2}\nsnippet msnip\n snippet ${1:trigger} ${2:description}\n ${3}\nsnippet v\n {VISUAL}\n",t.scope="snippets"}) -------------------------------------------------------------------------------- /algorithm/graph_search/dfs/tree/code.js: -------------------------------------------------------------------------------- 1 | function DFS(node, parent) { // node = current node, parent = previous node 2 | tracer._visit(node, parent); 3 | for (var i = 0; i < G[node].length; i++) { 4 | if (G[node][i]) { // if current node has the i-th node as a child 5 | DFS(i, node); // recursively call DFS 6 | } 7 | } 8 | } 9 | DFS(0); -------------------------------------------------------------------------------- /algorithm/graph_search/dfs/all_paths/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new DirectedGraphTracer(); 2 | /*var G = [ // G[i][j] indicates whether the path from the i-th node to the j-th node exists or not 3 | [0, 1, 1, 1, 0], 4 | [0, 0, 1, 1, 1], 5 | [0, 0, 0, 0, 0], 6 | [0, 0, 0, 0, 1], 7 | [0, 0, 0, 0, 0] 8 | ];*/ 9 | var G = DirectedGraph.random(5, .75); 10 | tracer._setData(G); -------------------------------------------------------------------------------- /algorithm/mst/prim/normal/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new WeightedUndirectedGraphTracer(); 2 | /*var G = [ // G[i][j] indicates the weight of the path from the i-th node to the j-th node 3 | [0, 3, 0, 1, 0], 4 | [5, 0, 1, 2, 4], 5 | [1, 0, 0, 2, 0], 6 | [0, 2, 0, 0, 1], 7 | [0, 1, 3, 0, 0] 8 | ];*/ 9 | var G = WeightedUndirectedGraph.random(10, .4, 1, 9); 10 | tracer._setData(G); -------------------------------------------------------------------------------- /algorithm/graph_search/dfs/weighted_graph/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new WeightedDirectedGraphTracer(); 2 | /*var G = [ // G[i][j] indicates the weight of the path from the i-th node to the j-th node 3 | [0, 3, 0, 1, 0], 4 | [5, 0, 1, 2, 4], 5 | [1, 0, 0, 2, 0], 6 | [0, 2, 0, 0, 1], 7 | [0, 1, 3, 0, 0] 8 | ];*/ 9 | var G = WeightedDirectedGraph.random(5, .5); 10 | tracer._setData(G); -------------------------------------------------------------------------------- /algorithm/graph_search/bfs/shortest_path/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new WeightedDirectedGraphTracer(); 2 | /*var G = [ // G[i][j] indicates the weight of the path from the i-th node to the j-th node 3 | [0, 3, 0, 1, 0], 4 | [5, 0, 1, 2, 4], 5 | [1, 0, 0, 2, 0], 6 | [0, 2, 0, 0, 1], 7 | [0, 1, 3, 0, 0] 8 | ];*/ 9 | var G = WeightedDirectedGraph.random(10, .3, 1, 9); 10 | tracer._setData(G); -------------------------------------------------------------------------------- /algorithm/graph_search/dfs/shortest_path/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new WeightedDirectedGraphTracer(); 2 | /*var G = [ // G[i][j] indicates the weight of the path from the i-th node to the j-th node 3 | [0, 3, 0, 1, 0], 4 | [5, 0, 1, 2, 4], 5 | [1, 0, 0, 2, 0], 6 | [0, 2, 0, 0, 1], 7 | [0, 1, 3, 0, 0] 8 | ];*/ 9 | var G = WeightedDirectedGraph.random(10, .3, 1, 9); 10 | tracer._setData(G); -------------------------------------------------------------------------------- /algorithm/graph_search/dijkstra/shortest_path/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new WeightedDirectedGraphTracer(); 2 | /*var G = [ // G[i][j] indicates the weight of the path from the i-th node to the j-th node 3 | [0, 3, 0, 1, 0], 4 | [5, 0, 1, 2, 4], 5 | [1, 0, 0, 2, 0], 6 | [0, 2, 0, 0, 1], 7 | [0, 1, 3, 0, 0] 8 | ];*/ 9 | var G = WeightedDirectedGraph.random(10, .4, 1, 9); 10 | tracer._setData(G); -------------------------------------------------------------------------------- /algorithm/graph_search/floyd_warshall/shortest_paths/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new WeightedDirectedGraphTracer(); 2 | /*var G = [ // G[i][j] indicates the weight of the path from the i-th node to the j-th node 3 | [0, 3, 0, 1, 0], 4 | [5, 0, 1, 2, 4], 5 | [1, 0, 0, 2, 0], 6 | [0, 2, 0, 0, 1], 7 | [0, 1, 3, 0, 0] 8 | ];*/ 9 | var G = WeightedDirectedGraph.random(10, .4, 1, 9); 10 | tracer._setData(G); -------------------------------------------------------------------------------- /algorithm/graph_search/topological_sort/kahn_algorithm/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new DirectedGraphTracer (); 2 | // G[i][j] indicates whether the path from the i-th node to the j-th node exists or not. NOTE: The graph must be Directed-Acyclic 3 | var G = [ 4 | [0, 0, 0, 0, 0, 0], 5 | [0, 0, 1, 0, 0, 0], 6 | [0, 0, 0, 1, 0, 0], 7 | [0, 0, 0, 0, 0, 0], 8 | [1, 0, 0, 1, 0, 0], 9 | [1, 1, 0, 0, 0, 0] 10 | ]; 11 | 12 | tracer._setData (G); -------------------------------------------------------------------------------- /js/ace/snippets/haml.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/haml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet t\n %table\n %tr\n %th\n ${1:headers}\n %tr\n %td\n ${2:headers}\nsnippet ul\n %ul\n %li\n ${1:item}\n %li\nsnippet =rp\n = render :partial => '${1:partial}'\nsnippet =rpl\n = render :partial => '${1:partial}', :locals => {}\nsnippet =rpc\n = render :partial => '${1:partial}', :collection => @$1\n\n",t.scope="haml"}) -------------------------------------------------------------------------------- /algorithm/mst/prim/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Prim's Algorithm": "Greedy algorithm that finds a minimum spanning tree for a weighted undirected graph.", 3 | "Applications": [ 4 | ], 5 | "Complexity": { 6 | "time": "worst O(|V|2)" 7 | }, 8 | "References": [ 9 | "Wikipedia" 10 | ], 11 | "files": { 12 | "normal": "Finds minimum spanning tree of a given graph." 13 | } 14 | } -------------------------------------------------------------------------------- /algorithm/string/edit_distance/dynamic_programming/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new Array2DTracer (); 2 | var str1 = 'stack', str2 = 'racket', table = new Array (str1.length + 1); 3 | 4 | table [0] = Array.apply (null, {length: str2.length + 1}).map (Number.call, Number); 5 | for (var i = 1; i < str1.length+1; i++) { 6 | table [i] = Array.apply (null, Array (str2.length+1)).map (Number.prototype.valueOf, -1); 7 | table [i] [0] = i 8 | } 9 | 10 | tracer._setData (table); -------------------------------------------------------------------------------- /algorithm/etc/dp/sliding_window/code.js: -------------------------------------------------------------------------------- 1 | tracer._pace(500); 2 | var sum = D[0] + D[1] + D[2]; 3 | var max = sum; 4 | tracer._print('sum = ' + sum, false); 5 | tracer._selectSet([0, 1, 2]); 6 | for (var i = 3; i < D.length; i++) { 7 | sum += D[i] - D[i - 3]; 8 | if (max < sum) max = sum; 9 | tracer._print('sum = ' + sum, false); 10 | tracer._deselect(i - 3); 11 | tracer._select(i); 12 | } 13 | tracer._deselectSet([D.length - 3, D.length - 2, D.length - 1]); 14 | tracer._print('max = ' + max); -------------------------------------------------------------------------------- /js/ace/mode-plain_text.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/plain_text",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/behaviour"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour").Behaviour,u=function(){this.HighlightRules=s,this.$behaviour=new o};r.inherits(u,i),function(){this.type="text",this.getNextLineIndent=function(e,t,n){return""},this.$id="ace/mode/plain_text"}.call(u.prototype),t.Mode=u}) -------------------------------------------------------------------------------- /js/ace/snippets/lua.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/lua",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet #!\n #!/usr/bin/env lua\n $1\nsnippet local\n local ${1:x} = ${2:1}\nsnippet fun\n function ${1:fname}(${2:...})\n ${3:-- body}\n end\nsnippet for\n for ${1:i}=${2:1},${3:10} do\n ${4:print(i)}\n end\nsnippet forp\n for ${1:i},${2:v} in pairs(${3:table_name}) do\n ${4:-- body}\n end\nsnippet fori\n for ${1:i},${2:v} in ipairs(${3:table_name}) do\n ${4:-- body}\n end\n",t.scope="lua"}) -------------------------------------------------------------------------------- /algorithm/sorting/radix/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Radix LSD Sort": "Radix sort is a non-comparative integer sorting algorithm that sorts data with integer keys by grouping keys by the individual digits which share the same significant position and value.", 3 | "Complexity": { 4 | "time": "worst O(n), best O(n), average O(n)", 5 | "space": "always O(n)" 6 | }, 7 | "References": [ 8 | "Wikipedia" 9 | ], 10 | "files": { 11 | "lsd": "LSD Radix sort" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /algorithm/graph_search/bfs/tree/code.js: -------------------------------------------------------------------------------- 1 | function BFS(s) { // s = start node 2 | var Q = []; 3 | Q.push(s); // add start node to queue 4 | tracer._visit(s); 5 | while (Q.length > 0) { 6 | var node = Q.shift(); // dequeue 7 | for (var i = 0; i < G[node].length; i++) { 8 | if (G[node][i]) { // if current node has the i-th node as a child 9 | Q.push(i); // add child node to queue 10 | tracer._visit(i, node); 11 | } 12 | } 13 | } 14 | } 15 | BFS(0); -------------------------------------------------------------------------------- /js/ace/snippets/textile.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/textile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Jekyll post header\nsnippet header\n ---\n title: ${1:title}\n layout: post\n date: ${2:date} ${3:hour:minute:second} -05:00\n ---\n\n# Image\nsnippet img\n !${1:url}(${2:title}):${3:link}!\n\n# Table\nsnippet |\n |${1}|${2}\n\n# Link\nsnippet link\n "${1:link text}":${2:url}\n\n# Acronym\nsnippet (\n (${1:Expand acronym})${2}\n\n# Footnote\nsnippet fn\n [${1:ref number}] ${3}\n\n fn$1. ${2:footnote}\n \n',t.scope="textile"}) -------------------------------------------------------------------------------- /js/ace/snippets/diff.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/diff",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# DEP-3 (http://dep.debian.net/deps/dep3/) style patch header\nsnippet header DEP-3 style header\n Description: ${1}\n Origin: ${2:vendor|upstream|other}, ${3:url of the original patch}\n Bug: ${4:url in upstream bugtracker}\n Forwarded: ${5:no|not-needed|url}\n Author: ${6:`g:snips_author`}\n Reviewed-by: ${7:name and email}\n Last-Update: ${8:`strftime("%Y-%m-%d")`}\n Applied-Upstream: ${9:upstream version|url|commit}\n\n',t.scope="diff"}) -------------------------------------------------------------------------------- /algorithm/sorting/insertion/basic/code.js: -------------------------------------------------------------------------------- 1 | tracer._print('original array = [' + D.join(', ') + ']'); 2 | tracer._sleep(1000); 3 | tracer._pace(300); 4 | for (var i = 1; i < D.length; i++) { 5 | var key = D[i]; 6 | tracer._print('insert ' + key); 7 | tracer._select(i); 8 | var j; 9 | for (j = i - 1; (j >= 0) && (D[j] > key); j--) { 10 | D[j + 1] = D[j]; 11 | tracer._notify(j + 1); 12 | } 13 | D[j + 1] = key; 14 | tracer._notify(j + 1); 15 | tracer._deselect(i); 16 | } 17 | tracer._print('sorted array = [' + D.join(', ') + ']'); -------------------------------------------------------------------------------- /algorithm/sorting/insertion/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Insertion Sort": "Insertion sort is a simple sorting algorithm that builds the final sorted array (or list) one item at a time. It is much less efficient on large lists than more advanced algorithms such as quicksort, heapsort, or merge sort.", 3 | "Complexity": { 4 | "time": "worst O(n2), best O(n), average O(n2)", 5 | "space": "worst O(1) auxiliary" 6 | }, 7 | "References": [ 8 | "Wikipedia" 9 | ], 10 | "files": { 11 | "basic": "Basic" 12 | } 13 | } -------------------------------------------------------------------------------- /js/ace/snippets/gobstones.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/gobstones",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# Procedure\nsnippet proc\n procedure ${1?:name}(${2:argument}) {\n ${3:// body...}\n }\n\n# Function\nsnippet fun\n function ${1?:name}(${2:argument}) {\n return ${3:// body...}\n }\n\n# Repeat\nsnippet rep\n repeat ${1?:times} {\n ${2:// body...}\n }\n\n# For\nsnippet for\n foreach ${1?:e} in ${2?:list} {\n ${3:// body...} \n }\n\n# If\nsnippet if\n if (${1?:condition}) {\n ${3:// body...} \n }\n\n# While\n while (${1?:condition}) {\n ${2:// body...} \n }\n",t.scope="gobstones"}) -------------------------------------------------------------------------------- /algorithm/graph_search/floyd_warshall/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Floyd-Warshall": "Floyd–Warshall algorithm is an algorithm for finding shortest paths in a weighted graph with positive or negative edge weights (but with no negative cycles)", 3 | "Applications": [ 4 | "" 5 | ], 6 | "Complexity": { 7 | "time": "worst O(|V|3)", 8 | "space": "worst O(|V|2)" 9 | }, 10 | "References": [ 11 | "Wikipedia" 12 | ], 13 | "files": { 14 | "shortest_paths": "Finding the shortest path between all nodes" 15 | } 16 | } -------------------------------------------------------------------------------- /js/ace/snippets/velocity.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/velocity",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# macro\nsnippet #macro\n #macro ( ${1:macroName} ${2:\\$var1, [\\$var2, ...]} )\n ${3:## macro code}\n #end\n# foreach\nsnippet #foreach\n #foreach ( ${1:\\$item} in ${2:\\$collection} )\n ${3:## foreach code}\n #end\n# if\nsnippet #if\n #if ( ${1:true} )\n ${0}\n #end\n# if ... else\nsnippet #ife\n #if ( ${1:true} )\n ${2}\n #else\n ${0}\n #end\n#import\nsnippet #import\n #import ( "${1:path/to/velocity/format}" )\n# set\nsnippet #set\n #set ( $${1:var} = ${0} )\n',t.scope="velocity",t.includeScopes=["html","javascript","css"]}) -------------------------------------------------------------------------------- /algorithm/graph_search/dijkstra/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dijkstra": "Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a graph, which may represent, for example, road networks. It was conceived by computer scientist Edsger W. Dijkstra in 1956 and published three years later.", 3 | "Applications": [ 4 | "Ar." 5 | ], 6 | "Complexity": { 7 | "time": "worst O(|V|2)", 8 | "space": "worst O(|V|)" 9 | }, 10 | "References": [ 11 | "Wikipedia" 12 | ], 13 | "files": { 14 | "shortest_path": "Finding the shortest path between two nodes" 15 | } 16 | } -------------------------------------------------------------------------------- /algorithm/graph_search/bfs/tree/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new DirectedGraphTracer(); 2 | var G = [ // G[i][j] indicates whether the path from the i-th node to the j-th node exists or not 3 | [0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], 4 | [0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0], 5 | [0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], 6 | [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], 7 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], 8 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 9 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 10 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 11 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 12 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 13 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] 14 | ]; 15 | tracer._setTreeData(G, 0); -------------------------------------------------------------------------------- /algorithm/graph_search/dfs/tree/data.js: -------------------------------------------------------------------------------- 1 | var tracer = new DirectedGraphTracer(); 2 | var G = [ // G[i][j] indicates whether the path from the i-th node to the j-th node exists or not 3 | [0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], 4 | [0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0], 5 | [0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], 6 | [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0], 7 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], 8 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 9 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 10 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 11 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 12 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 13 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] 14 | ]; 15 | tracer._setTreeData(G, 0); -------------------------------------------------------------------------------- /algorithm/sorting/bubble/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Bubble Sort": "Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted.", 3 | "Complexity": { 4 | "time": "worst O(n2), best O(n), average O(n2)", 5 | "space": "worst O(1) auxiliary" 6 | }, 7 | "References": [ 8 | "Wikipedia" 9 | ], 10 | "files": { 11 | "basic": "Basic" 12 | } 13 | } -------------------------------------------------------------------------------- /algorithm/etc/scratch_paper/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Scratch Paper": "Write down your own algorithm to be visualized!", 3 | "Code written in the ...": { 4 | "... top editor": "predefines data variables that will be shown in a visualizing module.", 5 | "... bottom editor": "actually implements and visualizes the algorithm." 6 | }, 7 | "References": [ 8 | "Documentation of Tracers" 9 | ], 10 | "Be our contributor": "If you like the visualized result of your code, you can add your code to the side menu via sending us a pull request!", 11 | "files": { 12 | "scratch_paper": "Write down your own algorithm!" 13 | } 14 | } -------------------------------------------------------------------------------- /algorithm/sorting/bubble/basic/code.js: -------------------------------------------------------------------------------- 1 | tracer._print('original array = [' + D.join(', ') + ']'); 2 | tracer._sleep(1000); 3 | tracer._pace(300); 4 | var N = D.length; 5 | var swapped; 6 | do { 7 | swapped = false; 8 | tracer._select(N - 1); 9 | for (var i = 1; i < N; i++) { 10 | if (D[i - 1] > D[i]) { 11 | tracer._print('swap ' + D[i - 1] + ' and ' + D[i]); 12 | var temp = D[i - 1]; 13 | D[i - 1] = D[i]; 14 | D[i] = temp; 15 | swapped = true; 16 | tracer._notify(i - 1, i); 17 | } 18 | } 19 | tracer._deselect(N - 1); 20 | N--; 21 | } while (swapped); 22 | tracer._print('sorted array = [' + D.join(', ') + ']'); -------------------------------------------------------------------------------- /algorithm/sorting/quick/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Quicksort": "Quicksort (sometimes called partition-exchange sort) is an efficient sorting algorithm, serving as a systematic method for placing the elements of an array in order. Developed by Tony Hoare in 1959, with his work published in 1961, it is still a commonly used algorithm for sorting. When implemented well, it can be about two or three times faster than its main competitors, merge sort and heapsort.", 3 | "Complexity": { 4 | "time": "worst O(n2), best O(n log n), average O(n log n)", 5 | "space": "worst O(n) auxiliary" 6 | }, 7 | "References": [ 8 | "Wikipedia" 9 | ], 10 | "files": { 11 | "basic": "Basic" 12 | } 13 | } -------------------------------------------------------------------------------- /algorithm/graph_search/bellman_ford/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Bellman-Ford": "The Bellman–Ford algorithm is an algorithm that computes shortest paths from a single source vertex to all of the other vertices in a weighted digraph. It is different from Dijkstra's Shortest Path Algorithm because it allows NEGATIVE weights unlike Dijkstra's.", 3 | "Applications": [ 4 | "Packet Routing - A variation of BF is used in the Distance vector Routing Protocol" 5 | ], 6 | "Complexity": { 7 | "time": "worst O(|V|.|E|)", 8 | "space": "worst O(|V|)" 9 | }, 10 | "References": [ 11 | "Wikipedia" 12 | ], 13 | "files": { 14 | "shortest_path": "Finding the shortest path" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /algorithm/sorting/selection/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Selection Sort": "Selection sort is a sorting algorithm, specifically an in-place comparison sort. It has O(n2) time complexity, making it inefficient on large lists, and generally performs worse than the similar insertion sort. Selection sort is noted for its simplicity, and it has performance advantages over more complicated algorithms in certain situations, particularly where auxiliary memory is limited.", 3 | "Complexity": { 4 | "time": "worst O(n2), best O(n2), average O(n2)", 5 | "space": "O(1) auxiliary" 6 | }, 7 | "References": [ 8 | "Wikipedia" 9 | ], 10 | "files": { 11 | "basic": "Basic" 12 | } 13 | } -------------------------------------------------------------------------------- /algorithm/sorting/heap/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Heap Sort": "Heapsort is a comparison-based sorting algorithm. Heapsort can be thought of as an improved selection sort: like that algorithm, it divides its input into a sorted and an unsorted region, and it iteratively shrinks the unsorted region by extracting the largest element and moving that to the sorted region. The improvement consists of the use of a heap data structure rather than a linear-time search to find the maximum.", 3 | "Complexity": { 4 | "time": "worst O(n log n), best O(n log n), average O(n log n)", 5 | "space": "worst O(1) auxiliary" 6 | }, 7 | "References": [ 8 | "Wikipedia" 9 | ], 10 | "files": { 11 | "basic": "Basic" 12 | } 13 | } -------------------------------------------------------------------------------- /algorithm/sorting/selection/basic/code.js: -------------------------------------------------------------------------------- 1 | tracer._print('original array = [' + D.join(', ') + ']'); 2 | tracer._sleep(1000); 3 | tracer._pace(500); 4 | for (var i = 0; i < D.length - 1; i++) { 5 | var minJ = i; 6 | tracer._select(i); 7 | for (var j = i + 1; j < D.length; j++) { 8 | tracer._select(j); 9 | if (D[j] < D[minJ]) { 10 | tracer._notify(j); 11 | minJ = j; 12 | } 13 | tracer._deselect(j); 14 | } 15 | if (minJ != i) { 16 | tracer._print('swap ' + D[i] + ' and ' + D[minJ]); 17 | var temp = D[i]; 18 | D[i] = D[minJ]; 19 | D[minJ] = temp; 20 | tracer._notify(i, minJ); 21 | } 22 | tracer._deselect(i); 23 | } 24 | tracer._print('sorted array = [' + D.join(', ') + ']'); 25 | -------------------------------------------------------------------------------- /algorithm/sorting/merge/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Mergesort": "In computer science, merge sort (also commonly spelled mergesort) is an efficient, general-purpose, comparison-based sorting algorithm. Most implementations produce a stable sort, which means that the implementation preserves the input order of equal elements in the sorted output. Mergesort is a divide and conquer algorithm that was invented by John von Neumann in 1945. A detailed description and analysis of bottom-up mergesort appeared in a report by Goldstine and Neumann as early as 1948.", 3 | "Complexity": { 4 | "time": "average O(n log n)", 5 | "space": "worst O(n)" 6 | }, 7 | "References": [ 8 | "Wikipedia" 9 | ], 10 | "files": { 11 | "basic": "Basic" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /js/ace/ext-linking.js: -------------------------------------------------------------------------------- 1 | define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var t=e.editor,n=e.getAccelKey();if(n){var t=e.editor,r=e.getDocumentPosition(),i=t.session,s=i.getTokenAt(r.row,r.column);t._emit("linkHover",{position:r,token:s})}}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("ace/editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}})}); 2 | (function() { 3 | window.require(["ace/ext/linking"], function() {}); 4 | })(); 5 | -------------------------------------------------------------------------------- /algorithm/string/edit_distance/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Edit-Distance": "Given two strings str1 (length M) and str2 (length N) and below operations that can performed on str1. Find minimum number of edits (operations) required to convert str1 into str2.
Insert
Remove
Replace
All of the above operations are of equal cost", 3 | "Applications": [ 4 | "Displaing Near-Proximity Words", 5 | "Information Retrieval (eg- Lucene API)", 6 | "Natural Language Processing" 7 | ], 8 | "Complexity": { 9 | "time": "worst O(|M|.|N|)", 10 | "space": "worst O(|M|.|N|)" 11 | }, 12 | "References": [ 13 | "Wikipedia" 14 | ], 15 | "files": { 16 | "dynamic_programming": "Distance from str1 to str2 using Dynamic Programming (2D Array method)" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /js/ace/mode-gitignore.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/gitignore_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:/^\s*#.*$/},{token:"keyword",regex:/^\s*!.*$/}]},this.normalizeRules()};s.metaData={fileTypes:["gitignore"],name:"Gitignore"},r.inherits(s,i),t.GitignoreHighlightRules=s}),define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gitignore_highlight_rules").GitignoreHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.lineCommentStart="#",this.$id="ace/mode/gitignore"}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /algorithm/etc/dp/max_subarray/code.js: -------------------------------------------------------------------------------- 1 | var maxSubarraySum = (function maxSubarray (array) { 2 | var maxSoFar = 0, 3 | maxEndingHere = 0; 4 | 5 | tracer._print ('Initializing maxSoFar = 0 & maxEndingHere = 0'); 6 | 7 | for (var i = 0; i < array.length; i++) { 8 | tracer._select (i); 9 | tracer._print (maxEndingHere + ' + ' + array [i]); 10 | maxEndingHere += array [i]; 11 | tracer._print ('=> ' + maxEndingHere); 12 | 13 | if (maxEndingHere < 0) { 14 | tracer._print ('maxEndingHere is negative, set to 0'); 15 | maxEndingHere = 0; 16 | } 17 | 18 | if (maxSoFar < maxEndingHere) { 19 | tracer._print ('maxSoFar < maxEndingHere, setting maxSoFar to maxEndingHere (' + maxEndingHere + ')'); 20 | maxSoFar = maxEndingHere; 21 | } 22 | 23 | tracer._deselect (i); 24 | } 25 | 26 | return maxSoFar; 27 | }) (D); 28 | 29 | tracer._print ('Maximum Subarray\'s Sum is: ' + maxSubarraySum); -------------------------------------------------------------------------------- /algorithm/graph_search/dfs/all_paths/code.js: -------------------------------------------------------------------------------- 1 | function DFS(node, parent) { // node = current node, parent = previous node 2 | D[node] = true; // label current node as discovered 3 | tracer._visit(node, parent); 4 | for (var i = 0; i < G[node].length; i++) { 5 | if (G[node][i]) { // if the edge from current node to the i-th node exists 6 | if (!D[i]) { // if the i-th node is not labeled as discovered 7 | DFS(i, node); // recursively call DFS 8 | } 9 | } 10 | } 11 | D[node] = false; // label current node as undiscovered 12 | tracer._leave(node, parent); 13 | } 14 | var D; // D[i] indicates whether the i-th node is discovered or not 15 | for (var i = 0; i < G.length; i++) { // start from every node 16 | tracer._print('start from ' + i); 17 | D = []; 18 | for (var j = 0; j < G.length; j++) D.push(false); 19 | DFS(i); 20 | tracer._clear(); 21 | } -------------------------------------------------------------------------------- /js/ace/snippets/sql.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/sql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet tbl\n create table ${1:table} (\n ${2:columns}\n );\nsnippet col\n ${1:name} ${2:type} ${3:default ''} ${4:not null}\nsnippet ccol\n ${1:name} varchar2(${2:size}) ${3:default ''} ${4:not null}\nsnippet ncol\n ${1:name} number ${3:default 0} ${4:not null}\nsnippet dcol\n ${1:name} date ${3:default sysdate} ${4:not null}\nsnippet ind\n create index ${3:$1_$2} on ${1:table}(${2:column});\nsnippet uind\n create unique index ${1:name} on ${2:table}(${3:column});\nsnippet tblcom\n comment on table ${1:table} is '${2:comment}';\nsnippet colcom\n comment on column ${1:table}.${2:column} is '${3:comment}';\nsnippet addcol\n alter table ${1:table} add (${2:column} ${3:type});\nsnippet seq\n create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};\nsnippet s*\n select * from ${1:table}\n",t.scope="sql"}) -------------------------------------------------------------------------------- /js/ace/snippets/abc.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/abc",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='\nsnippet zupfnoter.print\n %%%%hn.print {"startpos": ${1:pos_y}, "t":"${2:title}", "v":[${3:voices}], "s":[[${4:syncvoices}1,2]], "f":[${5:flowlines}], "sf":[${6:subflowlines}], "j":[${7:jumplines}]}\n\nsnippet zupfnoter.note\n %%%%hn.note {"pos": [${1:pos_x},${2:pos_y}], "text": "${3:text}", "style": "${4:style}"}\n\nsnippet zupfnoter.annotation\n %%%%hn.annotation {"id": "${1:id}", "pos": [${2:pos}], "text": "${3:text}"}\n\nsnippet zupfnoter.lyrics\n %%%%hn.lyrics {"pos": [${1:x_pos},${2:y_pos}]}\n\nsnippet zupfnoter.legend\n %%%%hn.legend {"pos": [${1:x_pos},${2:y_pos}]}\n\n\n\nsnippet zupfnoter.target\n "^:${1:target}"\n\nsnippet zupfnoter.goto\n "^@${1:target}@${2:distance}"\n\nsnippet zupfnoter.annotationref\n "^#${1:target}"\n\nsnippet zupfnoter.annotation\n "^!${1:text}@${2:x_offset},${3:y_offset}"\n\n\n',t.scope="abc"}) -------------------------------------------------------------------------------- /algorithm/search/binary_search/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Binary Search": "Binary Search is a search algorithm that finds the position of a target value within a sorted array. It works by comparing the target value to the middle element of the array; if they are unequal, the lower or upper half of the array is eliminated depending on the result and the search is repeated in the remaining subarray until it is successful.", 3 | "Applications": [ 4 | "Finding values in a sorted collection", 5 | "Traversing binary search trees" 6 | ], 7 | "Complexity": { 8 | "time": "worst O(log(N)), best O(1), average O(log(N))", 9 | "space": "worst O(log(N)) - recursive, O(1) - iterative" 10 | }, 11 | "References": [ 12 | "Wikipedia" 13 | ], 14 | "files": { 15 | "recursive": "Recursively searching a sorted array", 16 | "iterative": "Iteratively searching a sorted array" 17 | } 18 | } -------------------------------------------------------------------------------- /algorithm/etc/dp/longest_increasing_subsequence/code.js: -------------------------------------------------------------------------------- 1 | tracer._pace(500); 2 | 3 | // Initialize LIS values for all indexes 4 | for( var i = 0; i < 20; i++) { 5 | LIS[i] = 1; 6 | } 7 | 8 | tracer._print( 'Calculating Longest Increasing Subsequence values in bottom up manner '); 9 | // Compute optimized LIS values in bottom up manner 10 | for( var i = 1; i < A.length; i++) { 11 | tracer._select(i) ; 12 | tracer._print( ' LIS['+i+'] = ' + LIS[i]); 13 | for( var j =0; j < i; j++) { 14 | tracer._notify(j); 15 | if( A[i] > A[j] && LIS[i] < LIS[j] + 1) { 16 | LIS[i] = LIS[j] + 1; 17 | tracer._print( ' LIS['+i+'] = ' + LIS[i]); 18 | } 19 | } 20 | tracer._deselect(i); 21 | } 22 | 23 | // Pick maximum of all LIS values 24 | tracer._print( 'Now calculate maximum of all LIS values '); 25 | var max = LIS[0]; 26 | for( var i = 1; i < A.length; i++) { 27 | if(max < LIS[i]) { 28 | max = LIS[i]; 29 | } 30 | } 31 | tracer._print('Longest Increasing Subsequence = max of all LIS = ' + max); 32 | -------------------------------------------------------------------------------- /algorithm/etc/dp/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dynamic Programming": "Dynamic programming is both a mathematical optimization method and a computer programming method. In both contexts it refers to simplifying a complicated problem by breaking it down into simpler sub-problems in a recursive manner.", 3 | "Complexity": { 4 | "time": "varies", 5 | "space": "varies" 6 | }, 7 | "References": [ 8 | "Wikipedia" 9 | ], 10 | "files": { 11 | "fibonacci": "Fibonacci Sequence", 12 | "sliding_window": "Finding the largest sum of three contiguous number", 13 | "max_sum_path": "Finding the maximum sum in a path from (0, 0) to (N-1, M-1) when can only move to right or down", 14 | "longest_increasing_subsequence": "Find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in increasing order", 15 | "max_subarray": "Find the sum of the maximum Subarray in the given Array" 16 | } 17 | } -------------------------------------------------------------------------------- /algorithm/graph_search/dfs/weighted_graph/code.js: -------------------------------------------------------------------------------- 1 | function DFS(node, parent, weight) { // node = current node, parent = previous node 2 | D[node] = true; // label current node as discovered 3 | tracer._visit(node, parent, weight); 4 | for (var i = 0; i < G[node].length; i++) { 5 | if (G[node][i]) { // if the edge from current node to the i-th node exists 6 | if (!D[i]) { // if the i-th node is not labeled as discovered 7 | DFS(i, node, weight + G[node][i]); // recursively call DFS 8 | } 9 | } 10 | } 11 | D[node] = false; // label current node as undiscovered 12 | tracer._leave(node, parent, 0); 13 | } 14 | var D; // D[i] indicates whether the i-th node is discovered or not 15 | tracer._pace(1000); 16 | for (var i = 0; i < G.length; i++) { // start from every node 17 | tracer._print('start from ' + i); 18 | D = []; 19 | for (var j = 0; j < G.length; j++) D.push(false); 20 | DFS(i, undefined, 0); 21 | tracer._clear(); 22 | } -------------------------------------------------------------------------------- /algorithm/sorting/quick/basic/code.js: -------------------------------------------------------------------------------- 1 | tracer._print('original array = [' + D.join(', ') + ']'); 2 | tracer._sleep(1000); 3 | tracer._pace(500); 4 | 5 | function quicksort(low, high) { 6 | if (low < high) { 7 | var p = partition(low, high); 8 | quicksort(low, p - 1); 9 | quicksort(p + 1, high); 10 | } 11 | } 12 | 13 | function partition(low, high) { 14 | var pivot = D[high]; 15 | tracer._selectSet([low, high]); 16 | var i = low; 17 | var temp; 18 | 19 | for (var j = low; j < high; j++) { 20 | if (D[j] <= pivot) { 21 | temp = D[i]; 22 | D[i] = D[j]; 23 | D[j] = temp; 24 | tracer._notify(i, j); 25 | i++; 26 | } 27 | } 28 | temp = D[i]; 29 | D[i] = D[high]; 30 | D[high] = temp; 31 | tracer._notify(i, high); 32 | tracer._deselectSet([low, high]); 33 | return i; 34 | } 35 | 36 | quicksort(0, D.length - 1); 37 | tracer._print('sorted array = [' + D.join(', ') + ']'); 38 | -------------------------------------------------------------------------------- /js/ace/mode-properties.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=/\\u[0-9a-fA-F]{4}|\\/;this.$rules={start:[{token:"comment",regex:/[!#].*$/},{token:"keyword",regex:/[=:]$/},{token:"keyword",regex:/[=:]/,next:"value"},{token:"constant.language.escape",regex:e},{defaultToken:"variable"}],value:[{regex:/\\$/,token:"string",next:"value"},{regex:/$/,token:"string",next:"start"},{token:"constant.language.escape",regex:e},{defaultToken:"string"}]}};r.inherits(s,i),t.PropertiesHighlightRules=s}),define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./properties_highlight_rules").PropertiesHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.$id="ace/mode/properties"}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /js/ace/ext-statusbar.js: -------------------------------------------------------------------------------- 1 | define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("ace/lib/dom"),i=e("ace/lib/lang"),s=function(e,t){this.element=r.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this)).schedule.bind(null,100);e.on("changeStatus",n),e.on("changeSelection",n),e.on("keyboardActivity",n)};(function(){this.updateStatus=function(e){function n(e,n){e&&t.push(e,n||"|")}var t=[];n(e.keyBinding.getStatusText(e)),e.commands.recording&&n("REC");var r=e.selection,i=r.lead;if(!r.isEmpty()){var s=e.getSelectionRange();n("("+(s.end.row-s.start.row)+":"+(s.end.column-s.start.column)+")"," ")}n(i.row+":"+i.column," "),r.rangeCount&&n("["+r.rangeCount+"]"," "),t.pop(),this.element.textContent=t.join("")}}).call(s.prototype),t.StatusBar=s}); 2 | (function() { 3 | window.require(["ace/ext/statusbar"], function() {}); 4 | })(); 5 | -------------------------------------------------------------------------------- /js/ace/mode-lucene.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"constant.character.negation",regex:"[\\-]"},{token:"constant.character.interro",regex:"[\\?]"},{token:"constant.character.asterisk",regex:"[\\*]"},{token:"constant.character.proximity",regex:"~[0-9]+\\b"},{token:"keyword.operator",regex:"(?:AND|OR|NOT)\\b"},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"keyword",regex:"[\\S]+:"},{token:"string",regex:'".*?"'},{token:"text",regex:"\\s+"}]}};r.inherits(o,s),t.LuceneHighlightRules=o}),define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lucene_highlight_rules").LuceneHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.$id="ace/mode/lucene"}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /algorithm/graph_search/topological_sort/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "Topological-Sort": "Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge uv, vertex u comes before v in the ordering. Topological Sorting for a graph is not possible if the graph is not a DAG. NOTE: when the graph is represented as an Adjacency Matrix, the Calculation of in-degree Array becomes O(|V|2)", 3 | "Applications": [ 4 | "Job Scheduling", 5 | "Instruction Scheduling", 6 | "Logic Synthesis", 7 | "Determining the order of compilation tasks to perform in makefiles", 8 | "Data serialization" 9 | ], 10 | "Complexity": { 11 | "time": "worst O(|V|+|E|)", 12 | "space": "worst O(|V|)" 13 | }, 14 | "References": [ 15 | "GeeksForGeeks", 16 | "GeeksForGeeks" 17 | ], 18 | "files": { 19 | "kahn_algorithm": "Performing Topological Sort using Queue Data Structure & an array of In-degrees" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Jason Park 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /js/ace/snippets/io.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/io",["require","exports","module"],function(e,t,n){"use strict";t.snippets=[{content:"assertEquals(${1:expected}, ${2:expr})",name:"assertEquals",scope:"io",tabTrigger:"ae"},{content:"${1:${2:newValue} := ${3:Object} }clone do(\n $0\n)",name:"clone do",scope:"io",tabTrigger:"cdo"},{content:'docSlot("${1:slotName}", "${2:documentation}")',name:"docSlot",scope:"io",tabTrigger:"ds"},{content:"(${1:header,}\n ${2:body}\n)$0",keyEquivalent:"@(",name:"Indented Bracketed Line",scope:"io",tabTrigger:"("},{content:"\n $0\n",keyEquivalent:"\r",name:"Special: Return Inside Empty Parenthesis",scope:"io meta.empty-parenthesis.io, io meta.comma-parenthesis.io"},{content:"${1:methodName} := method(${2:args,}\n $0\n)",name:"method",scope:"io",tabTrigger:"m"},{content:'newSlot("${1:slotName}", ${2:defaultValue}, "${3:docString}")$0',name:"newSlot",scope:"io",tabTrigger:"ns"},{content:"${1:name} := Object clone do(\n $0\n)",name:"Object clone do",scope:"io",tabTrigger:"ocdo"},{content:"test${1:SomeFeature} := method(\n $0\n)",name:"testMethod",scope:"io",tabTrigger:"ts"},{content:"${1:Something}Test := ${2:UnitTest} clone do(\n $0\n)",name:"UnitTest",scope:"io",tabTrigger:"ut"}],t.scope="io"}) -------------------------------------------------------------------------------- /algorithm/etc/dp/max_sum_path/code.js: -------------------------------------------------------------------------------- 1 | tracer._print('values = ['); 2 | for (var i = 0; i < D.length; i++) { 3 | tracer._print('    [' + D[i].join(', ') + ']'); 4 | } 5 | tracer._print(']'); 6 | tracer._pace(200); 7 | var N = DP.length; 8 | var M = DP[0].length; 9 | for (var i = 0; i < N; i++) { 10 | for (var j = 0; j < M; j++) { 11 | tracer._sleep(); 12 | if (i == 0 && j == 0) { 13 | tracer._select(i, j); 14 | DP[i][j] = D[i][j]; 15 | tracer._deselect(i, j); 16 | } else if (i == 0) { 17 | tracer._select(i, j - 1); 18 | DP[i][j] = DP[i][j - 1] + D[i][j]; 19 | tracer._deselect(i, j - 1); 20 | } else if (j == 0) { 21 | tracer._select(i - 1, j); 22 | DP[i][j] = DP[i - 1][j] + D[i][j]; 23 | tracer._deselect(i - 1, j); 24 | } else { 25 | tracer._selectSet([{x: i, y: j - 1}, {x: i - 1, y: j}]); 26 | DP[i][j] = Math.max(DP[i][j - 1], DP[i - 1][j]) + D[i][j]; 27 | tracer._deselectSet([{x: i, y: j - 1}, {x: i - 1, y: j}]); 28 | } 29 | tracer._notify(i, j); 30 | } 31 | } 32 | tracer._print('max = ' + DP[N - 1][M - 1]); -------------------------------------------------------------------------------- /js/ace/snippets/wollok.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/wollok",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='##\n## Basic Java packages and import\nsnippet im\n import\nsnippet w.l\n wollok.lang\nsnippet w.i\n wollok.lib\n\n## Class and object\nsnippet cl\n class ${1:`Filename("", "untitled")`} ${2}\nsnippet obj\n object ${1:`Filename("", "untitled")`} ${2:inherits Parent}${3}\nsnippet te\n test ${1:`Filename("", "untitled")`}\n\n##\n## Enhancements\nsnippet inh\n inherits\n\n##\n## Comments\nsnippet /*\n /*\n * ${1}\n */\n\n##\n## Control Statements\nsnippet el\n else\nsnippet if\n if (${1}) ${2}\n\n##\n## Create a Method\nsnippet m\n method ${1:method}(${2}) ${5}\n\n## \n## Tests\nsnippet as\n assert.equals(${1:expected}, ${2:actual})\n\n##\n## Exceptions\nsnippet ca\n catch ${1:e} : (${2:Exception} ) ${3}\nsnippet thr\n throw\nsnippet try\n try {\n ${3}\n } catch ${1:e} : ${2:Exception} {\n }\n\n##\n## Javadocs\nsnippet /**\n /**\n * ${1}\n */\n\n##\n## Print Methods\nsnippet print\n console.println("${1:Message}")\n\n##\n## Setter and Getter Methods\nsnippet set\n method set${1:}(${2:}) {\n $1 = $2\n }\nsnippet get\n method get${1:}() {\n return ${1:};\n }\n\n##\n## Terminate Methods or Loops\nsnippet re\n return',t.scope="wollok"}) -------------------------------------------------------------------------------- /algorithm/category.json: -------------------------------------------------------------------------------- 1 | { 2 | "graph_search": { 3 | "name": "Graph Search", 4 | "list": { 5 | "dfs": "DFS", 6 | "bfs": "BFS", 7 | "dijkstra": "Dijkstra", 8 | "bellman_ford": "Bellman-Ford", 9 | "floyd_warshall": "Floyd-Warshall", 10 | "topological_sort": "Topological-Sort" 11 | } 12 | }, 13 | "mst": { 14 | "name": "Minimum Spanning Tree", 15 | "list": { 16 | "prim": "Prim's Algorithm" 17 | } 18 | }, 19 | "search": { 20 | "name": "Search", 21 | "list": { 22 | "binary_search": "Binary Search" 23 | } 24 | }, 25 | "sorting": { 26 | "name": "Sorting", 27 | "list": { 28 | "insertion": "Insertion Sort", 29 | "selection": "Selection Sort", 30 | "bubble": "Bubble Sort", 31 | "quick": "Quicksort", 32 | "merge": "Mergesort", 33 | "heap" : "Heap Sort", 34 | "radix" : "Radix Sort" 35 | } 36 | }, 37 | "string": { 38 | "name": "String", 39 | "list": { 40 | "edit_distance": "Edit Distance" 41 | } 42 | }, 43 | "etc": { 44 | "name": "Uncategorized", 45 | "list": { 46 | "dp": "Dynamic Programming", 47 | "scratch_paper": " Scratch Paper" 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /algorithm/mst/prim/normal/code.js: -------------------------------------------------------------------------------- 1 | function prim(){ 2 | // Finds a tree so that there exists a path between 3 | // every two nodes while keeping the cost minimal 4 | var minD, minI, minJ, sum=0, D=[]; 5 | for(var i = 0; i < G.length; i++) D.push(0); 6 | D[0] = 1; // First node is visited 7 | for(var k = 0; k < G.length-1; k++){ // Searching for k edges 8 | minD = Infinity; 9 | for(i = 0; i< G.length; i++) 10 | if(D[i]) // First node in an edge must be visited 11 | for(var j = 0; j < G.length; j++) 12 | if(!D[j] && G[i][j]){ 13 | tracer._visit(i, j); 14 | // Second node must not be visited and must be connected to first node 15 | if(G[i][j] < minD){ 16 | // Searching for cheapest edge which satisfies requirements 17 | minD = G[i][j]; 18 | minI = i; 19 | minJ = j; 20 | } 21 | tracer._leave(i, j); 22 | } 23 | tracer._visit(minI, minJ); 24 | D[minJ] = 1; // Visit second node and insert it into or tree 25 | sum += G[minI][minJ]; 26 | } 27 | tracer._print("The sum of all edges is: " + sum); 28 | } 29 | 30 | tracer._pace(500); 31 | tracer._print("nodes that belong to minimum spanning tree are: "); 32 | prim(); -------------------------------------------------------------------------------- /js/ace/snippets/dart.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/dart",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet lib\n library ${1};\n ${2}\nsnippet im\n import '${1}';\n ${2}\nsnippet pa\n part '${1}';\n ${2}\nsnippet pao\n part of ${1};\n ${2}\nsnippet main\n void main() {\n ${1:/* code */}\n }\nsnippet st\n static ${1}\nsnippet fi\n final ${1}\nsnippet re\n return ${1}\nsnippet br\n break;\nsnippet th\n throw ${1}\nsnippet cl\n class ${1:`Filename(\"\", \"untitled\")`} ${2}\nsnippet imp\n implements ${1}\nsnippet ext\n extends ${1}\nsnippet if\n if (${1:true}) {\n ${2}\n }\nsnippet ife\n if (${1:true}) {\n ${2}\n } else {\n ${3}\n }\nsnippet el\n else\nsnippet sw\n switch (${1}) {\n ${2}\n }\nsnippet cs\n case ${1}:\n ${2}\nsnippet de\n default:\n ${1}\nsnippet for\n for (var ${2:i} = 0, len = ${1:things}.length; $2 < len; ${3:++}$2) {\n ${4:$1[$2]}\n }\nsnippet fore\n for (final ${2:item} in ${1:itemList}) {\n ${3:/* code */}\n }\nsnippet wh\n while (${1:/* condition */}) {\n ${2:/* code */}\n }\nsnippet dowh\n do {\n ${2:/* code */}\n } while (${1:/* condition */});\nsnippet as\n assert(${1:/* condition */});\nsnippet try\n try {\n ${2}\n } catch (${1:Exception e}) {\n }\nsnippet tryf\n try {\n ${2}\n } catch (${1:Exception e}) {\n } finally {\n }\n",t.scope="dart"}) -------------------------------------------------------------------------------- /algorithm/graph_search/bfs/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "BFS": "Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a 'search key') and explores the neighbor nodes first, before moving to the next level neighbors.", 3 | "Applications": [ 4 | "Copying garbage collection, Cheney's algorithm", 5 | "Finding the shortest path between two nodes u and v, with path length measured by number of edges (an advantage over depth-first search)", 6 | "Testing a graph for bipartiteness", 7 | "(Reverse) Cuthill–McKee mesh numbering", 8 | "Ford–Fulkerson method for computing the maximum flow in a flow network", 9 | "Serialization/Deserialization of a binary tree vs serialization in sorted order, allows the tree to be re-constructed in an efficient manner.", 10 | "Construction of the failure function of the Aho-Corasick pattern matcher." 11 | ], 12 | "Complexity": { 13 | "time": "worst O(|E|)", 14 | "space": "worst O(|V|)" 15 | }, 16 | "References": [ 17 | "Wikipedia" 18 | ], 19 | "files": { 20 | "tree": "Searching a tree", 21 | "shortest_path": "Finding the shortest path" 22 | } 23 | } -------------------------------------------------------------------------------- /js/ace/mode-gcode.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/gcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="IF|DO|WHILE|ENDWHILE|CALL|ENDIF|SUB|ENDSUB|GOTO|REPEAT|ENDREPEAT|CALL",t="PI",n="ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\(.*\\)"},{token:"comment",regex:"([N])([0-9]+)"},{token:"string",regex:"([G])([0-9]+\\.?[0-9]?)"},{token:"string",regex:"([M])([0-9]+\\.?[0-9]?)"},{token:"constant.numeric",regex:"([-+]?([0-9]*\\.?[0-9]+\\.?))|(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)"},{token:r,regex:"[A-Z]"},{token:"keyword.operator",regex:"EQ|LT|GT|NE|GE|LE|OR|XOR"},{token:"paren.lparen",regex:"[\\[]"},{token:"paren.rparen",regex:"[\\]]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.GcodeHighlightRules=s}),define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gcode_highlight_rules").GcodeHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s};r.inherits(u,i),function(){this.$id="ace/mode/gcode"}.call(u.prototype),t.Mode=u}) -------------------------------------------------------------------------------- /algorithm/string/edit_distance/dynamic_programming/code.js: -------------------------------------------------------------------------------- 1 | tracer._pace (200); 2 | tracer._print ('Initialized DP Table'); 3 | tracer._print ('Y-Axis (Top to Bottom): ' + str1); 4 | tracer._print ('X-Axis (Left to Right): ' + str2); 5 | 6 | var dist = (function editDistance (str1, str2, table) { 7 | //display grid with words 8 | tracer._print ('*** ' + str2.split ('').join (' ')); 9 | table.forEach (function (item, index) { 10 | var character = (index === 0) ? '*' : str1 [index-1]; 11 | tracer._print (character + '\t' + item); 12 | }); 13 | 14 | //begin ED execution 15 | for (var i = 1; i < str1.length+1; i++) { 16 | for (var j = 1; j < str2.length+1; j++) { 17 | if (str1 [i-1] === str2 [j-1]) { 18 | tracer._select (i-1, j-1); 19 | table [i] [j] = table [i-1] [j-1]; 20 | tracer._notify (i, j); 21 | tracer._deselect (i-1, j-1); 22 | } 23 | else { 24 | tracer._select (i-1, j); 25 | tracer._select (i, j-1); 26 | tracer._select (i-1, j-1); 27 | table [i] [j] = Math.min (table [i-1] [j], table [i] [j-1], table [i-1] [j-1]) + 1; 28 | tracer._notify (i, j); 29 | tracer._deselect (i-1, j); 30 | tracer._deselect (i, j-1); 31 | tracer._deselect (i-1, j-1); 32 | } 33 | } 34 | } 35 | 36 | tracer._select (str1.length, str2.length); 37 | return table [str1.length] [str2.length]; 38 | }) (str1, str2, table); 39 | 40 | tracer._print ('Minimum Edit Distance: ' + dist); -------------------------------------------------------------------------------- /algorithm/search/binary_search/iterative/code.js: -------------------------------------------------------------------------------- 1 | function BinarySearch(array, element) { // array = sorted array, element = element to be found 2 | var minIndex = 0; 3 | var maxIndex = array.length - 1; 4 | var testElement; 5 | 6 | while (minIndex <= maxIndex) { 7 | 8 | var middleIndex = Math.floor((minIndex + maxIndex) / 2); 9 | testElement = array[middleIndex]; 10 | 11 | tracer._print('Searching at index: ' + middleIndex); 12 | tracer._select(minIndex, maxIndex); 13 | tracer._notify(middleIndex); 14 | tracer._deselect(minIndex, maxIndex); 15 | 16 | if (testElement < element) { 17 | 18 | tracer._print('Going right.'); 19 | minIndex = middleIndex + 1; 20 | 21 | } else if (testElement > element) { 22 | 23 | tracer._print('Going left.'); 24 | maxIndex = middleIndex - 1; 25 | 26 | } else { 27 | 28 | tracer._print(element + ' is found at position ' + middleIndex + '!'); 29 | tracer._select(middleIndex); 30 | 31 | return middleIndex; 32 | } 33 | } 34 | 35 | tracer._print(element + ' is not found!'); 36 | return -1; 37 | } 38 | 39 | var element = D[Math.random() * D.length | 0]; 40 | 41 | tracer._sleep(1000); 42 | tracer._pace(1000); 43 | tracer._print('Using iterative binary search to find ' + element); 44 | BinarySearch(D, element, 0, D.length - 1); -------------------------------------------------------------------------------- /js/ace/ext-spellcheck.js: -------------------------------------------------------------------------------- 1 | define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(!t.selection.isEmpty())return;var i=t.getCursorPosition(),s=t.session.getWordRange(i.row,i.column),o=t.session.getTextRange(s);t.session.tokenRe.lastIndex=0;if(!t.session.tokenRe.test(o))return;var u="",a=o+" "+u;n.value=a,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var f=!1;r.addListener(n,"keydown",function l(){r.removeListener(n,"keydown",l),f=!0}),t.textInput.setInputHandler(function(e){console.log(e,a,n.selectionStart,n.selectionEnd);if(e==a)return"";if(e.lastIndexOf(a,0)===0)return e.slice(a.length);if(e.substr(n.selectionEnd)==a)return e.slice(0,-a.length);if(e.slice(-2)==u){var r=e.slice(0,-2);if(r.slice(-1)==" ")return f?r.substring(0,n.selectionEnd):(r=r.slice(0,-1),t.session.replace(s,r),"")}return e})};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})}); 2 | (function() { 3 | window.require(["ace/ext/spellcheck"], function() {}); 4 | })(); 5 | -------------------------------------------------------------------------------- /js/ace/ext-themelist.js: -------------------------------------------------------------------------------- 1 | define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"],function(e,t,n){"use strict";e("ace/lib/fixoldbrowsers");var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["IPlastic"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["SQL Server","sqlserver","light"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Cobalt","cobalt","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})}); 2 | (function() { 3 | window.require(["ace/ext/themelist"], function() {}); 4 | })(); 5 | -------------------------------------------------------------------------------- /algorithm/sorting/radix/lsd/code.js: -------------------------------------------------------------------------------- 1 | tracer._print('original array = [' + D[0].join(', ') + ']'); 2 | tracer._sleep(1000); 3 | tracer._pace(300); 4 | function pow(base, expo){ 5 | var ans = 1; 6 | for(var i = 0; i < expo;i++){ 7 | ans *= base; 8 | } 9 | return ans; 10 | } 11 | for(var exp = 0; exp < 3;exp ++){ 12 | tracer._print("Digit: "+exp); 13 | for(var i = 0; i < D[0].length; i++){ 14 | tracer._select(0, i); 15 | D[2][ parseInt( D[0][i] / pow(10, exp) % 10) ] += 1; 16 | tracer._notify(2, parseInt( D[0][i] / pow(10, exp) % 10) ); 17 | tracer._deselect(0, i); 18 | } 19 | for(var i = 1; i < 10; i++){ 20 | tracer._select(2, i - 1); 21 | D[2][i] += D[2][i - 1]; 22 | tracer._notify(2, i); 23 | tracer._deselect(2, i - 1); 24 | } 25 | for(var i = D[0].length - 1; i >= 0; i--){ 26 | tracer._select(0, i); 27 | D[2][parseInt( D[0][i] / pow(10, exp) % 10) ] -= 1; 28 | tracer._notify(2, parseInt( D[0][i] / pow(10, exp) % 10) ); 29 | D[1][ D[2][ parseInt( D[0][i] / pow(10, exp) % 10) ] ] = D[0][i]; 30 | tracer._notify(1, D[2][ parseInt( D[0][i] / pow(10, exp) % 10) ] ); 31 | tracer._deselect(0, i); 32 | } 33 | for(var i = 0; i < D[0].length; i++){ 34 | tracer._select(1, i); 35 | D[0][i] = D[1][i]; 36 | tracer._notify(0, i); 37 | tracer._deselect(1, i); 38 | } 39 | for(var i = 0; i < 10; i++){ 40 | D[2][i] = 0; 41 | tracer._notify(2, i); 42 | } 43 | } 44 | tracer._print('sorted array = [' + D[0].join(', ') + ']'); 45 | -------------------------------------------------------------------------------- /algorithm/graph_search/dfs/desc.json: -------------------------------------------------------------------------------- 1 | { 2 | "DFS": "Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. One starts at the root (selecting some arbitrary node as the root in the case of a graph) and explores as far as possible along each branch before backtracking.", 3 | "Applications": [ 4 | "Finding connected components.", 5 | "Topological sorting.", 6 | "Finding 2-(edge or vertex)-connected components.", 7 | "Finding 3-(edge or vertex)-connected components.", 8 | "Finding the bridges of a graph.", 9 | "Generating words in order to plot the Limit Set of a Group.", 10 | "Finding strongly connected components.", 11 | "Planarity testing", 12 | "Solving puzzles with only one solution, such as mazes. (DFS can be adapted to find all solutions to a maze by only including nodes on the current path in the visited set.)", 13 | "Maze generation may use a randomized depth-first search.", 14 | "Finding biconnectivity in graphs." 15 | ], 16 | "Complexity": { 17 | "time": "worst O(|E|)", 18 | "space": "worst O(|V|)" 19 | }, 20 | "References": [ 21 | "Wikipedia" 22 | ], 23 | "files": { 24 | "tree": "Searching a tree", 25 | "all_paths": "Going through all possible paths without making any circuit", 26 | "weighted_graph": "DFS of Weighted Graph", 27 | "shortest_path": "Finding the shortest path" 28 | } 29 | } -------------------------------------------------------------------------------- /algorithm/search/binary_search/recursive/code.js: -------------------------------------------------------------------------------- 1 | function BinarySearch(array, element, minIndex, maxIndex) { // array = sorted array, element = element to be found, minIndex = low index, maxIndex = high index 2 | if (minIndex > maxIndex) { 3 | tracer._print(element + ' is not found!'); 4 | return -1; 5 | } 6 | 7 | var middleIndex = Math.floor((minIndex + maxIndex) / 2); 8 | var testElement = array[middleIndex]; 9 | 10 | tracer._print('Searching at index: ' + middleIndex); 11 | tracer._select(minIndex, maxIndex); 12 | tracer._notify(middleIndex); 13 | tracer._deselect(minIndex, maxIndex); 14 | 15 | if (testElement < element) { 16 | tracer._print('Going right.'); 17 | return BinarySearch(array, element, middleIndex + 1, maxIndex); 18 | } 19 | 20 | if (testElement > element) { 21 | tracer._print('Going left.'); 22 | return BinarySearch(array, element, minIndex, middleIndex - 1); 23 | } 24 | 25 | if (testElement === element) { 26 | tracer._print(element + ' is found at position ' + middleIndex + '!'); 27 | tracer._select(middleIndex); 28 | return middleIndex; 29 | } 30 | 31 | tracer._print(element + ' is not found!'); 32 | return -1; 33 | } 34 | 35 | var element = D[Math.random() * D.length | 0]; 36 | 37 | tracer._sleep(1000); 38 | tracer._pace(1000); 39 | tracer._print('Using binary search to find ' + element); 40 | BinarySearch(D, element, 0, D.length - 1); -------------------------------------------------------------------------------- /algorithm/sorting/heap/basic/code.js: -------------------------------------------------------------------------------- 1 | tracer._print('Original array = [' + D.join(', ') + ']'); 2 | 3 | function heapSort(array, size) { 4 | var i, j, temp; 5 | 6 | for (i = Math.ceil(size / 2) - 1; i >= 0; i--) { 7 | heapify(array, size, i); 8 | } 9 | 10 | for (j = size - 1; j >= 0; j--) { 11 | temp = array[0]; 12 | array[0] = array[j]; 13 | array[j] = temp; 14 | 15 | tracer._notify(0, j); 16 | tracer._select(j); 17 | 18 | heapify(array, j, 0); 19 | tracer._print('Swapping elements : ' + array[0] + ' & ' + array[j]); 20 | 21 | tracer._deselect(j); 22 | } 23 | } 24 | 25 | function heapify(array, size, root) { 26 | 27 | var largest = root; 28 | var left = 2 * root + 1; 29 | var right = 2 * root + 2; 30 | var temp; 31 | 32 | if (left < size && array[left] > array[largest]) { 33 | largest = left; 34 | } 35 | 36 | if (right < size && array[right] > array[largest]) { 37 | largest = right; 38 | } 39 | 40 | if (largest != root) { 41 | temp = array[root]; 42 | array[root] = array[largest]; 43 | array[largest] = temp; 44 | 45 | tracer._notify(largest, root); 46 | 47 | tracer._print('Swapping elements : ' + array[root] + ' & ' + array[largest]); 48 | 49 | heapify(array, size, largest); 50 | } 51 | } 52 | 53 | tracer._sleep(1000); 54 | tracer._pace(800); 55 | 56 | heapSort(D, D.length); 57 | 58 | tracer._print('Final array = [' + D.join(', ') + ']'); 59 | -------------------------------------------------------------------------------- /algorithm/graph_search/bfs/shortest_path/code.js: -------------------------------------------------------------------------------- 1 | function BFS() { 2 | var W = []; // W[i] indicates the length of the shortest path from start node to the i-th node 3 | var Q = []; 4 | for (var i = 0; i < G.length; i++) { 5 | W.push(MAX_VALUE); 6 | tracer._weight(i, MAX_VALUE); 7 | } 8 | W[s] = 0; 9 | Q.push(s); // add start node to queue 10 | tracer._visit(s, undefined, 0); 11 | while (Q.length > 0) { 12 | var node = Q.shift(); // dequeue 13 | for (var i = 0; i < G[node].length; i++) { 14 | if (G[node][i]) { // if the edge from current node to the i-th node exists 15 | if (W[i] > W[node] + G[node][i]) { // if current path is shorter than the previously shortest path 16 | W[i] = W[node] + G[node][i]; // update the length of the shortest path 17 | Q.push(i); // add child node to queue 18 | tracer._visit(i, node, W[i]); 19 | } 20 | } 21 | } 22 | } 23 | return W[e]; 24 | } 25 | var s = Math.random() * G.length | 0; // s = start node 26 | var e; // e = start node 27 | do { 28 | e = Math.random() * G.length | 0; 29 | } while (s == e); 30 | var MAX_VALUE = Infinity; 31 | tracer._pace(100); 32 | tracer._print('finding the shortest path from ' + s + ' to ' + e); 33 | tracer._sleep(1000); 34 | var minWeight = BFS(s); 35 | if (minWeight == MAX_VALUE) { 36 | tracer._print('there is no path from ' + s + ' to ' + e); 37 | } else { 38 | tracer._print('the shortest path from ' + s + ' to ' + e + ' is ' + minWeight); 39 | } -------------------------------------------------------------------------------- /algorithm/graph_search/floyd_warshall/shortest_paths/code.js: -------------------------------------------------------------------------------- 1 | function FloydWarshall() { 2 | // Finds the shortest path between all nodes 3 | var S = new Array(G.length); 4 | for (var i = 0; i < G.length; i++) S[i] = new Array(G.length) 5 | for (i = 0; i < G.length; i++) { 6 | tracer._visit(i) 7 | for (var j = 0; j < G.length; j++) { 8 | // Distance to self is always 0 9 | if (i == j) S[i][i] = 0; 10 | // Distance between connected nodes is their weight 11 | else if (G[i][j] > 0) { 12 | S[i][j] = G[i][j]; 13 | tracer._visit(j, i, S[i][j]); 14 | tracer._leave(j, i, S[i][j]); 15 | }// Else we don't know the distance and we set it to infinity 16 | else S[i][j] = MAX_VALUE; 17 | } 18 | tracer._leave(i) 19 | } 20 | // If there is a shorter path using k, use it instead 21 | for (var k = 0; k < G.length; k++) 22 | for (i = 0; i < G.length; i++) 23 | for (j = 0; j < G.length; j++) 24 | if (S[i][j] > S[i][k] + S[k][j]) 25 | S[i][j] = S[i][k] + S[k][j]; 26 | for (i = 0; i < G.length; i++) 27 | for (j = 0; j < G.length; j++) 28 | if (S[i][j] == MAX_VALUE) tracer._print('there is no path from ' + i + ' to ' + j); 29 | else tracer._print('the shortest path from ' + i + 30 | ' to ' + j + ' is ' + S[i][j]); 31 | } 32 | var MAX_VALUE = Infinity; 33 | tracer._pace(200); 34 | tracer._print('finding the shortest paths from and to all nodes'); 35 | FloydWarshall(); -------------------------------------------------------------------------------- /algorithm/graph_search/dfs/shortest_path/code.js: -------------------------------------------------------------------------------- 1 | function DFS(node, parent, weight) { // node = current node, parent = previous node 2 | if (minWeight < weight) return; 3 | if (node == e) { 4 | tracer._visit(node, parent, weight); 5 | tracer._leave(node, parent, 0); 6 | if (minWeight > weight) { 7 | minWeight = weight; 8 | } 9 | return; 10 | } 11 | D[node] = true; // label current node as discovered 12 | tracer._visit(node, parent, weight); 13 | for (var i = 0; i < G[node].length; i++) { 14 | if (G[node][i]) { // if the path from current node to the i-th node exists 15 | if (!D[i]) { // if the i-th node is not labeled as discovered 16 | DFS(i, node, weight + G[node][i]); // recursively call DFS 17 | } 18 | } 19 | } 20 | D[node] = false; // label current node as undiscovered 21 | tracer._leave(node, parent, 0); 22 | } 23 | var s = Math.random() * G.length | 0; // s = start node 24 | var e; // e = end node 25 | do { 26 | e = Math.random() * G.length | 0; 27 | } while (s == e); 28 | var MAX_VALUE = Infinity; 29 | var minWeight = MAX_VALUE; 30 | tracer._pace(100); 31 | tracer._print('finding the shortest path from ' + s + ' to ' + e); 32 | tracer._sleep(1000); 33 | var D = []; // D[i] indicates whether the i-th node is discovered or not 34 | for (var i = 0; i < G.length; i++) D.push(false); 35 | DFS(s, undefined, 0); 36 | if (minWeight == MAX_VALUE) { 37 | tracer._print('there is no path from ' + s + ' to ' + e); 38 | } else { 39 | tracer._print('the shortest path from ' + s + ' to ' + e + ' is ' + minWeight); 40 | } -------------------------------------------------------------------------------- /js/ace/snippets/tcl.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/tcl",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# #!/usr/bin/env tclsh\nsnippet #!\n #!/usr/bin/env tclsh\n \n# Process\nsnippet pro\n proc ${1:function_name} {${2:args}} {\n ${3:#body ...}\n }\n#xif\nsnippet xif\n ${1:expr}? ${2:true} : ${3:false}\n# Conditional\nsnippet if\n if {${1}} {\n ${2:# body...}\n }\n# Conditional if..else\nsnippet ife\n if {${1}} {\n ${2:# body...}\n } else {\n ${3:# else...}\n }\n# Conditional if..elsif..else\nsnippet ifee\n if {${1}} {\n ${2:# body...}\n } elseif {${3}} {\n ${4:# elsif...}\n } else {\n ${5:# else...}\n }\n# If catch then\nsnippet ifc\n if { [catch {${1:#do something...}} ${2:err}] } {\n ${3:# handle failure...}\n }\n# Catch\nsnippet catch\n catch {${1}} ${2:err} ${3:options}\n# While Loop\nsnippet wh\n while {${1}} {\n ${2:# body...}\n }\n# For Loop\nsnippet for\n for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} {\n ${4:# body...}\n }\n# Foreach Loop\nsnippet fore\n foreach ${1:x} {${2:#list}} {\n ${3:# body...}\n }\n# after ms script...\nsnippet af\n after ${1:ms} ${2:#do something}\n# after cancel id\nsnippet afc\n after cancel ${1:id or script}\n# after idle\nsnippet afi\n after idle ${1:script}\n# after info id\nsnippet afin\n after info ${1:id}\n# Expr\nsnippet exp\n expr {${1:#expression here}}\n# Switch\nsnippet sw\n switch ${1:var} {\n ${3:pattern 1} {\n ${4:#do something}\n }\n default {\n ${2:#do something}\n }\n }\n# Case\nsnippet ca\n ${1:pattern} {\n ${2:#do something}\n }${3}\n# Namespace eval\nsnippet ns\n namespace eval ${1:path} {${2:#script...}}\n# Namespace current\nsnippet nsc\n namespace current\n",t.scope="tcl"}) -------------------------------------------------------------------------------- /js/ace/snippets/jsoniq.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/jsoniq",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet for\n for $${1:item} in ${2:expr}\nsnippet return\n return ${1:expr}\nsnippet import\n import module namespace ${1:ns} = "${2:http://www.example.com/}";\nsnippet some\n some $${1:varname} in ${2:expr} satisfies ${3:expr}\nsnippet every\n every $${1:varname} in ${2:expr} satisfies ${3:expr}\nsnippet if\n if(${1:true}) then ${2:expr} else ${3:true}\nsnippet switch\n switch(${1:"foo"})\n case ${2:"foo"}\n return ${3:true}\n default return ${4:false}\nsnippet try\n try { ${1:expr} } catch ${2:*} { ${3:expr} }\nsnippet tumbling\n for tumbling window $${1:varname} in ${2:expr}\n start at $${3:start} when ${4:expr}\n end at $${5:end} when ${6:expr}\n return ${7:expr}\nsnippet sliding\n for sliding window $${1:varname} in ${2:expr}\n start at $${3:start} when ${4:expr}\n end at $${5:end} when ${6:expr}\n return ${7:expr}\nsnippet let\n let $${1:varname} := ${2:expr}\nsnippet group\n group by $${1:varname} := ${2:expr}\nsnippet order\n order by ${1:expr} ${2:descending}\nsnippet stable\n stable order by ${1:expr}\nsnippet count\n count $${1:varname}\nsnippet ordered\n ordered { ${1:expr} }\nsnippet unordered\n unordered { ${1:expr} }\nsnippet treat \n treat as ${1:expr}\nsnippet castable\n castable as ${1:atomicType}\nsnippet cast\n cast as ${1:atomicType}\nsnippet typeswitch\n typeswitch(${1:expr})\n case ${2:type} return ${3:expr}\n default return ${4:expr}\nsnippet var\n declare variable $${1:varname} := ${2:expr};\nsnippet fn\n declare function ${1:ns}:${2:name}(){\n ${3:expr}\n };\nsnippet module\n module namespace ${1:ns} = "${2:http://www.example.com}";\n',t.scope="jsoniq"}) -------------------------------------------------------------------------------- /js/ace/snippets/xquery.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/xquery",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet for\n for $${1:item} in ${2:expr}\nsnippet return\n return ${1:expr}\nsnippet import\n import module namespace ${1:ns} = "${2:http://www.example.com/}";\nsnippet some\n some $${1:varname} in ${2:expr} satisfies ${3:expr}\nsnippet every\n every $${1:varname} in ${2:expr} satisfies ${3:expr}\nsnippet if\n if(${1:true}) then ${2:expr} else ${3:true}\nsnippet switch\n switch(${1:"foo"})\n case ${2:"foo"}\n return ${3:true}\n default return ${4:false}\nsnippet try\n try { ${1:expr} } catch ${2:*} { ${3:expr} }\nsnippet tumbling\n for tumbling window $${1:varname} in ${2:expr}\n start at $${3:start} when ${4:expr}\n end at $${5:end} when ${6:expr}\n return ${7:expr}\nsnippet sliding\n for sliding window $${1:varname} in ${2:expr}\n start at $${3:start} when ${4:expr}\n end at $${5:end} when ${6:expr}\n return ${7:expr}\nsnippet let\n let $${1:varname} := ${2:expr}\nsnippet group\n group by $${1:varname} := ${2:expr}\nsnippet order\n order by ${1:expr} ${2:descending}\nsnippet stable\n stable order by ${1:expr}\nsnippet count\n count $${1:varname}\nsnippet ordered\n ordered { ${1:expr} }\nsnippet unordered\n unordered { ${1:expr} }\nsnippet treat \n treat as ${1:expr}\nsnippet castable\n castable as ${1:atomicType}\nsnippet cast\n cast as ${1:atomicType}\nsnippet typeswitch\n typeswitch(${1:expr})\n case ${2:type} return ${3:expr}\n default return ${4:expr}\nsnippet var\n declare variable $${1:varname} := ${2:expr};\nsnippet fn\n declare function ${1:ns}:${2:name}(){\n ${3:expr}\n };\nsnippet module\n module namespace ${1:ns} = "${2:http://www.example.com}";\n',t.scope="xquery"}) -------------------------------------------------------------------------------- /js/ace/mode-ada.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|body|private|then|if|procedure|type|case|in|protected|constant|interface|until||is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.AdaHighlightRules=s}),define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ada_highlight_rules").AdaHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s};r.inherits(u,i),function(){this.lineCommentStart="--",this.$id="ace/mode/ada"}.call(u.prototype),t.Mode=u}) -------------------------------------------------------------------------------- /js/ace/mode-sql.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|foreign|not|references|default|null|inner|cross|natural|database|drop|grant",t="true|false",n="avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl",r="int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|money|real|number|integer",i=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t,"storage.type":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.SqlHighlightRules=s}),define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sql_highlight_rules").SqlHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s};r.inherits(u,i),function(){this.lineCommentStart="--",this.$id="ace/mode/sql"}.call(u.prototype),t.Mode=u}) -------------------------------------------------------------------------------- /js/ace/mode-lisp.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/lisp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="case|do|let|loop|if|else|when",t="eq|neq|and|or",n="null|nil",r="cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn",i=this.createKeywordMapper({"keyword.control":e,"keyword.operator":t,"constant.language":n,"support.function":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:";.*$"},{token:["storage.type.function-type.lisp","text","entity.name.function.lisp"],regex:"(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"},{token:["punctuation.definition.constant.character.lisp","constant.character.lisp"],regex:"(#)((?:\\w|[\\\\+-=<>'\"&#])+)"},{token:["punctuation.definition.variable.lisp","variable.other.global.lisp","punctuation.definition.variable.lisp"],regex:"(\\*)(\\S*)(\\*)"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"string",regex:'"(?=.)',next:"qqstring"}],qqstring:[{token:"constant.character.escape.lisp",regex:"\\\\."},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"}]}};r.inherits(s,i),t.LispHighlightRules=s}),define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lisp_highlight_rules").LispHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.lineCommentStart=";",this.$id="ace/mode/lisp"}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /js/ace/theme-xcode.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/xcode",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-xcode",t.cssText=".ace-xcode .ace_gutter {background: #e8e8e8;color: #333}.ace-xcode .ace_print-margin {width: 1px;background: #e8e8e8}.ace-xcode {background-color: #FFFFFF;color: #000000}.ace-xcode .ace_cursor {color: #000000}.ace-xcode .ace_marker-layer .ace_selection {background: #B5D5FF}.ace-xcode.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;}.ace-xcode .ace_marker-layer .ace_step {background: rgb(198, 219, 174)}.ace-xcode .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #BFBFBF}.ace-xcode .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.071)}.ace-xcode .ace_gutter-active-line {background-color: rgba(0, 0, 0, 0.071)}.ace-xcode .ace_marker-layer .ace_selected-word {border: 1px solid #B5D5FF}.ace-xcode .ace_constant.ace_language,.ace-xcode .ace_keyword,.ace-xcode .ace_meta,.ace-xcode .ace_variable.ace_language {color: #C800A4}.ace-xcode .ace_invisible {color: #BFBFBF}.ace-xcode .ace_constant.ace_character,.ace-xcode .ace_constant.ace_other {color: #275A5E}.ace-xcode .ace_constant.ace_numeric {color: #3A00DC}.ace-xcode .ace_entity.ace_other.ace_attribute-name,.ace-xcode .ace_support.ace_constant,.ace-xcode .ace_support.ace_function {color: #450084}.ace-xcode .ace_fold {background-color: #C800A4;border-color: #000000}.ace-xcode .ace_entity.ace_name.ace_tag,.ace-xcode .ace_support.ace_class,.ace-xcode .ace_support.ace_type {color: #790EAD}.ace-xcode .ace_storage {color: #C900A4}.ace-xcode .ace_string {color: #DF0002}.ace-xcode .ace_comment {color: #008E00}.ace-xcode .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /js/ace/snippets/haskell.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/haskell",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet lang\n {-# LANGUAGE ${1:OverloadedStrings} #-}\nsnippet info\n -- |\n -- Module : ${1:Module.Namespace}\n -- Copyright : ${2:Author} ${3:2011-2012}\n -- License : ${4:BSD3}\n --\n -- Maintainer : ${5:email@something.com}\n -- Stability : ${6:experimental}\n -- Portability : ${7:unknown}\n --\n -- ${8:Description}\n --\nsnippet import\n import ${1:Data.Text}\nsnippet import2\n import ${1:Data.Text} (${2:head})\nsnippet importq\n import qualified ${1:Data.Text} as ${2:T}\nsnippet inst\n instance ${1:Monoid} ${2:Type} where\n ${3}\nsnippet type\n type ${1:Type} = ${2:Type}\nsnippet data\n data ${1:Type} = ${2:$1} ${3:Int}\nsnippet newtype\n newtype ${1:Type} = ${2:$1} ${3:Int}\nsnippet class\n class ${1:Class} a where\n ${2}\nsnippet module\n module `substitute(substitute(expand('%:r'), '[/\\\\]','.','g'),'^\\%(\\l*\\.\\)\\?','','')` (\n ) where\n `expand('%') =~ 'Main' ? \"\\n\\nmain = do\\n print \\\"hello world\\\"\" : \"\"`\n\nsnippet const\n ${1:name} :: ${2:a}\n $1 = ${3:undefined}\nsnippet fn\n ${1:fn} :: ${2:a} -> ${3:a}\n $1 ${4} = ${5:undefined}\nsnippet fn2\n ${1:fn} :: ${2:a} -> ${3:a} -> ${4:a}\n $1 ${5} = ${6:undefined}\nsnippet ap\n ${1:map} ${2:fn} ${3:list}\nsnippet do\n do\n \nsnippet \u03bb\n \\${1:x} -> ${2}\nsnippet \\\n \\${1:x} -> ${2}\nsnippet <-\n ${1:a} <- ${2:m a}\nsnippet \u2190\n ${1:a} <- ${2:m a}\nsnippet ->\n ${1:m a} -> ${2:a}\nsnippet \u2192\n ${1:m a} -> ${2:a}\nsnippet tup\n (${1:a}, ${2:b})\nsnippet tup2\n (${1:a}, ${2:b}, ${3:c})\nsnippet tup3\n (${1:a}, ${2:b}, ${3:c}, ${4:d})\nsnippet rec\n ${1:Record} { ${2:recFieldA} = ${3:undefined}\n , ${4:recFieldB} = ${5:undefined}\n }\nsnippet case\n case ${1:something} of\n ${2} -> ${3}\nsnippet let\n let ${1} = ${2}\n in ${3}\nsnippet where\n where\n ${1:fn} = ${2:undefined}\n",t.scope="haskell"}) -------------------------------------------------------------------------------- /js/ace/snippets/markdown.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/markdown",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Markdown\n\n# Includes octopress (http://octopress.org/) snippets\n\nsnippet [\n [${1:text}](http://${2:address} "${3:title}")\nsnippet [*\n [${1:link}](${2:`@*`} "${3:title}")${4}\n\nsnippet [:\n [${1:id}]: http://${2:url} "${3:title}"\nsnippet [:*\n [${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ![\n ![${1:alttext}](${2:/images/image.jpg} "${3:title}")\nsnippet ![*\n ![${1:alt}](${2:`@*`} "${3:title}")${4}\n\nsnippet ![:\n ![${1:id}]: ${2:url} "${3:title}"\nsnippet ![:*\n ![${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ===\nregex /^/=+/=*//\n ${PREV_LINE/./=/g}\n \n ${0}\nsnippet ---\nregex /^/-+/-*//\n ${PREV_LINE/./-/g}\n \n ${0}\nsnippet blockquote\n {% blockquote %}\n ${1:quote}\n {% endblockquote %}\n\nsnippet blockquote-author\n {% blockquote ${1:author}, ${2:title} %}\n ${3:quote}\n {% endblockquote %}\n\nsnippet blockquote-link\n {% blockquote ${1:author} ${2:URL} ${3:link_text} %}\n ${4:quote}\n {% endblockquote %}\n\nsnippet bt-codeblock-short\n ```\n ${1:code_snippet}\n ```\n\nsnippet bt-codeblock-full\n ``` ${1:language} ${2:title} ${3:URL} ${4:link_text}\n ${5:code_snippet}\n ```\n\nsnippet codeblock-short\n {% codeblock %}\n ${1:code_snippet}\n {% endcodeblock %}\n\nsnippet codeblock-full\n {% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %}\n ${5:code_snippet}\n {% endcodeblock %}\n\nsnippet gist-full\n {% gist ${1:gist_id} ${2:filename} %}\n\nsnippet gist-short\n {% gist ${1:gist_id} %}\n\nsnippet img\n {% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${6:alt_text} %}\n\nsnippet youtube\n {% youtube ${1:video_id} %}\n\n# The quote should appear only once in the text. It is inherently part of it.\n# See http://octopress.org/docs/plugins/pullquote/ for more info.\n\nsnippet pullquote\n {% pullquote %}\n ${1:text} {" ${2:quote} "} ${3:text}\n {% endpullquote %}\n',t.scope="markdown"}) -------------------------------------------------------------------------------- /js/ace/mode-textile.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/textile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:function(e){return e.charAt(0)=="h"?"markup.heading."+e.charAt(1):"markup.heading"},regex:"h1|h2|h3|h4|h5|h6|bq|p|bc|pre",next:"blocktag"},{token:"keyword",regex:"[\\*]+|[#]+"},{token:"text",regex:".+"}],blocktag:[{token:"keyword",regex:"\\. ",next:"start"},{token:"keyword",regex:"\\(",next:"blocktagproperties"}],blocktagproperties:[{token:"keyword",regex:"\\)",next:"blocktag"},{token:"string",regex:"[a-zA-Z0-9\\-_]+"},{token:"keyword",regex:"#"}]}};r.inherits(s,i),t.TextileHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/textile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/textile_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./textile_highlight_rules").TextileHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=function(){this.HighlightRules=s,this.$outdent=new o};r.inherits(u,i),function(){this.type="text",this.getNextLineIndent=function(e,t,n){return e=="intag"?n:""},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/textile"}.call(u.prototype),t.Mode=u}) -------------------------------------------------------------------------------- /js/ace/snippets/clojure.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/clojure",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet comm\n (comment\n ${1}\n )\nsnippet condp\n (condp ${1:pred} ${2:expr}\n ${3})\nsnippet def\n (def ${1})\nsnippet defm\n (defmethod ${1:multifn} "${2:doc-string}" ${3:dispatch-val} [${4:args}]\n ${5})\nsnippet defmm\n (defmulti ${1:name} "${2:doc-string}" ${3:dispatch-fn})\nsnippet defma\n (defmacro ${1:name} "${2:doc-string}" ${3:dispatch-fn})\nsnippet defn\n (defn ${1:name} "${2:doc-string}" [${3:arg-list}]\n ${4})\nsnippet defp\n (defprotocol ${1:name}\n ${2})\nsnippet defr\n (defrecord ${1:name} [${2:fields}]\n ${3:protocol}\n ${4})\nsnippet deft\n (deftest ${1:name}\n (is (= ${2:assertion})))\n ${3})\nsnippet is\n (is (= ${1} ${2}))\nsnippet defty\n (deftype ${1:Name} [${2:fields}]\n ${3:Protocol}\n ${4})\nsnippet doseq\n (doseq [${1:elem} ${2:coll}]\n ${3})\nsnippet fn\n (fn [${1:arg-list}] ${2})\nsnippet if\n (if ${1:test-expr}\n ${2:then-expr}\n ${3:else-expr})\nsnippet if-let \n (if-let [${1:result} ${2:test-expr}]\n (${3:then-expr} $1)\n (${4:else-expr}))\nsnippet imp\n (:import [${1:package}])\n & {:keys [${1:keys}] :or {${2:defaults}}}\nsnippet let\n (let [${1:name} ${2:expr}]\n ${3})\nsnippet letfn\n (letfn [(${1:name) [${2:args}]\n ${3})])\nsnippet map\n (map ${1:func} ${2:coll})\nsnippet mapl\n (map #(${1:lambda}) ${2:coll})\nsnippet met\n (${1:name} [${2:this} ${3:args}]\n ${4})\nsnippet ns\n (ns ${1:name}\n ${2})\nsnippet dotimes\n (dotimes [_ 10]\n (time\n (dotimes [_ ${1:times}]\n ${2})))\nsnippet pmethod\n (${1:name} [${2:this} ${3:args}])\nsnippet refer\n (:refer-clojure :exclude [${1}])\nsnippet require\n (:require [${1:namespace} :as [${2}]])\nsnippet use\n (:use [${1:namespace} :only [${2}]])\nsnippet print\n (println ${1})\nsnippet reduce\n (reduce ${1:(fn [p n] ${3})} ${2})\nsnippet when\n (when ${1:test} ${2:body})\nsnippet when-let\n (when-let [${1:result} ${2:test}]\n ${3:body})\n',t.scope="clojure"}) -------------------------------------------------------------------------------- /js/ace/snippets/sh.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/sh",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Shebang. Executing bash via /usr/bin/env makes scripts more portable.\nsnippet #!\n #!/usr/bin/env bash\n \nsnippet if\n if [[ ${1:condition} ]]; then\n ${2:#statements}\n fi\nsnippet elif\n elif [[ ${1:condition} ]]; then\n ${2:#statements}\nsnippet for\n for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do\n ${3:#statements}\n done\nsnippet fori\n for ${1:needle} in ${2:haystack} ; do\n ${3:#statements}\n done\nsnippet wh\n while [[ ${1:condition} ]]; do\n ${2:#statements}\n done\nsnippet until\n until [[ ${1:condition} ]]; do\n ${2:#statements}\n done\nsnippet case\n case ${1:word} in\n ${2:pattern})\n ${3};;\n esac\nsnippet go \n while getopts \'${1:o}\' ${2:opts} \n do \n case $$2 in\n ${3:o0})\n ${4:#staments};;\n esac\n done\n# Set SCRIPT_DIR variable to directory script is located.\nsnippet sdir\n SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"\n# getopt\nsnippet getopt\n __ScriptVersion="${1:version}"\n\n #=== FUNCTION ================================================================\n # NAME: usage\n # DESCRIPTION: Display usage information.\n #===============================================================================\n function usage ()\n {\n cat <<- EOT\n\n Usage : $${0:0} [options] [--] \n\n Options: \n -h|help Display this message\n -v|version Display script version\n\n EOT\n } # ---------- end of function usage ----------\n\n #-----------------------------------------------------------------------\n # Handle command line arguments\n #-----------------------------------------------------------------------\n\n while getopts ":hv" opt\n do\n case $opt in\n\n h|help ) usage; exit 0 ;;\n\n v|version ) echo "$${0:0} -- Version $__ScriptVersion"; exit 0 ;;\n\n \\? ) echo -e "\\n Option does not exist : $OPTARG\\n"\n usage; exit 1 ;;\n\n esac # --- end of case ---\n done\n shift $(($OPTIND-1))\n\n',t.scope="sh"}) -------------------------------------------------------------------------------- /js/ace/theme-kuroir.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/kuroir",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-kuroir",t.cssText=".ace-kuroir .ace_gutter {background: #e8e8e8;color: #333;}.ace-kuroir .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-kuroir {background-color: #E8E9E8;color: #363636;}.ace-kuroir .ace_cursor {color: #202020;}.ace-kuroir .ace_marker-layer .ace_selection {background: rgba(245, 170, 0, 0.57);}.ace-kuroir.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #E8E9E8;}.ace-kuroir .ace_marker-layer .ace_step {background: rgb(198, 219, 174);}.ace-kuroir .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(0, 0, 0, 0.29);}.ace-kuroir .ace_marker-layer .ace_active-line {background: rgba(203, 220, 47, 0.22);}.ace-kuroir .ace_gutter-active-line {background-color: rgba(203, 220, 47, 0.22);}.ace-kuroir .ace_marker-layer .ace_selected-word {border: 1px solid rgba(245, 170, 0, 0.57);}.ace-kuroir .ace_invisible {color: #BFBFBF}.ace-kuroir .ace_fold {border-color: #363636;}.ace-kuroir .ace_constant{color:#CD6839;}.ace-kuroir .ace_constant.ace_numeric{color:#9A5925;}.ace-kuroir .ace_support{color:#104E8B;}.ace-kuroir .ace_support.ace_function{color:#005273;}.ace-kuroir .ace_support.ace_constant{color:#CF6A4C;}.ace-kuroir .ace_storage{color:#A52A2A;}.ace-kuroir .ace_invalid.ace_illegal{color:#FD1224;background-color:rgba(255, 6, 0, 0.15);}.ace-kuroir .ace_invalid.ace_deprecated{text-decoration:underline;font-style:italic;color:#FD1732;background-color:#E8E9E8;}.ace-kuroir .ace_string{color:#639300;}.ace-kuroir .ace_string.ace_regexp{color:#417E00;background-color:#C9D4BE;}.ace-kuroir .ace_comment{color:rgba(148, 148, 148, 0.91);background-color:rgba(220, 220, 220, 0.56);}.ace-kuroir .ace_variable{color:#009ACD;}.ace-kuroir .ace_meta.ace_tag{color:#005273;}.ace-kuroir .ace_markup.ace_heading{color:#B8012D;background-color:rgba(191, 97, 51, 0.051);}.ace-kuroir .ace_markup.ace_list{color:#8F5B26;}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /js/ace/mode-vhdl.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/vhdl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="access|after|ailas|all|architecture|assert|attribute|begin|block|buffer|bus|case|component|configuration|disconnect|downto|else|elsif|end|entity|file|for|function|generate|generic|guarded|if|impure|in|inertial|inout|is|label|linkage|literal|loop|mapnew|next|of|on|open|others|out|port|process|pure|range|record|reject|report|return|select|shared|subtype|then|to|transport|type|unaffected|united|until|wait|when|while|with",t="bit|bit_vector|boolean|character|integer|line|natural|positive|real|register|severity|signal|signed|std_logic|std_logic_vector|string||text|time|unsigned|variable",n="array|constant",r="abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|srasrl|xnor|xor",i="true|false|null",s=this.createKeywordMapper({"keyword.operator":r,keyword:e,"constant.language":i,"storage.modifier":n,"storage.type":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"keyword",regex:"\\s*(?:library|package|use)\\b"},{token:s,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>"},{token:"punctuation.operator",regex:"\\'|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[(]"},{token:"paren.rparen",regex:"[\\])]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.VHDLHighlightRules=s}),define("ace/mode/vhdl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vhdl_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./vhdl_highlight_rules").VHDLHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s};r.inherits(u,i),function(){this.lineCommentStart="--",this.$id="ace/mode/vhdl"}.call(u.prototype),t.Mode=u}) -------------------------------------------------------------------------------- /js/ace/theme-clouds.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/clouds",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-clouds",t.cssText='.ace-clouds .ace_gutter {background: #ebebeb;color: #333}.ace-clouds .ace_print-margin {width: 1px;background: #e8e8e8}.ace-clouds {background-color: #FFFFFF;color: #000000}.ace-clouds .ace_cursor {color: #000000}.ace-clouds .ace_marker-layer .ace_selection {background: #BDD5FC}.ace-clouds.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;}.ace-clouds .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-clouds .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #BFBFBF}.ace-clouds .ace_marker-layer .ace_active-line {background: #FFFBD1}.ace-clouds .ace_gutter-active-line {background-color : #dcdcdc}.ace-clouds .ace_marker-layer .ace_selected-word {border: 1px solid #BDD5FC}.ace-clouds .ace_invisible {color: #BFBFBF}.ace-clouds .ace_keyword,.ace-clouds .ace_meta,.ace-clouds .ace_support.ace_constant.ace_property-value {color: #AF956F}.ace-clouds .ace_keyword.ace_operator {color: #484848}.ace-clouds .ace_keyword.ace_other.ace_unit {color: #96DC5F}.ace-clouds .ace_constant.ace_language {color: #39946A}.ace-clouds .ace_constant.ace_numeric {color: #46A609}.ace-clouds .ace_constant.ace_character.ace_entity {color: #BF78CC}.ace-clouds .ace_invalid {background-color: #FF002A}.ace-clouds .ace_fold {background-color: #AF956F;border-color: #000000}.ace-clouds .ace_storage,.ace-clouds .ace_support.ace_class,.ace-clouds .ace_support.ace_function,.ace-clouds .ace_support.ace_other,.ace-clouds .ace_support.ace_type {color: #C52727}.ace-clouds .ace_string {color: #5D90CD}.ace-clouds .ace_comment {color: #BCC8BA}.ace-clouds .ace_entity.ace_name.ace_tag,.ace-clouds .ace_entity.ace_other.ace_attribute-name {color: #606060}.ace-clouds .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /js/module/array1d.js: -------------------------------------------------------------------------------- 1 | function Array1DTracer(module) { 2 | return Array2DTracer.call(this, module || Array1DTracer); 3 | } 4 | 5 | Array1DTracer.prototype = $.extend(true, Object.create(Array2DTracer.prototype), { 6 | constructor: Array1DTracer, 7 | _setData: function (D) { 8 | return Array2DTracer.prototype._setData.call(this, [D]); 9 | }, 10 | _notify: function (idx1, idx2) { 11 | if (idx2 === undefined) { 12 | Array2DTracer.prototype._notify.call(this, 0, idx1); 13 | } else { 14 | Array2DTracer.prototype._notify.call(this, 0, idx1, 0, idx2); 15 | } 16 | }, 17 | _select: function (s, e) { 18 | if (e === undefined) { 19 | Array2DTracer.prototype._select.call(this, 0, s); 20 | } else { 21 | Array2DTracer.prototype._selectRow.call(this, 0, s, e); 22 | } 23 | }, 24 | _selectSet: function (indexes) { 25 | var coords = []; 26 | indexes.forEach(function (index) { 27 | coords.push({ 28 | x: 0, 29 | y: index 30 | }); 31 | }); 32 | Array2DTracer.prototype._selectSet.call(this, coords); 33 | }, 34 | _deselect: function (s, e) { 35 | if (e === undefined) { 36 | Array2DTracer.prototype._deselect.call(this, 0, s); 37 | } else { 38 | Array2DTracer.prototype._deselectRow.call(this, 0, s, e); 39 | } 40 | }, 41 | _deselectSet: function (indexes) { 42 | var coords = []; 43 | indexes.forEach(function (index) { 44 | coords.push({ 45 | x: 0, 46 | y: index 47 | }); 48 | }); 49 | Array2DTracer.prototype._deselectSet.call(this, coords); 50 | } 51 | }); 52 | 53 | var Array1D = { 54 | random: function (N, min, max) { 55 | return Array2D.random(1, N, min, max)[0]; 56 | }, 57 | randomSorted: function (N, min, max) { 58 | return Array2D.randomSorted(1, N, min, max)[0]; 59 | } 60 | }; -------------------------------------------------------------------------------- /algorithm/graph_search/dijkstra/shortest_path/code.js: -------------------------------------------------------------------------------- 1 | function Dijkstra(start, end) { 2 | tracer._sleep(); 3 | var MAX_VALUE = Infinity; 4 | var minIndex, minDistance; 5 | var S = []; // S[i] returns the distance from node v to node start 6 | var D = []; // D[i] indicates whether the i-th node is discovered or not 7 | for (var i = 0; i < G.length; i++) { 8 | D.push(false); 9 | S[i] = MAX_VALUE; 10 | } 11 | S[start] = 0; // Starting node is at distance 0 from itself 12 | var k = G.length; 13 | while (k--) { 14 | // Finding a node with the shortest distance from S[minIndex] 15 | minDistance = MAX_VALUE; 16 | for (i = 0; i < G.length; i++) { 17 | if (S[i] < minDistance && !D[i]) { 18 | minDistance = S[i]; 19 | minIndex = i; 20 | } 21 | } 22 | if (minDistance == MAX_VALUE) break; // If there is no edge from current node, jump out of loop 23 | D[minIndex] = true; 24 | tracer._visit(minIndex); 25 | // For every unvisited neighbour of current node, we check 26 | // whether the path to it is shorter if going over the current node 27 | for (i = 0; i < G.length; i++) { 28 | if (G[minIndex][i] && S[i] > S[minIndex] + G[minIndex][i]) { 29 | S[i] = S[minIndex] + G[minIndex][i]; 30 | tracer._visit(i, minIndex, S[i]); 31 | tracer._leave(i, minIndex, S[i]); 32 | } 33 | } 34 | tracer._leave(minIndex); 35 | } 36 | if (S[end] == MAX_VALUE) { 37 | tracer._print('there is no path from ' + start + ' to ' + end); 38 | } else { 39 | tracer._print('the shortest path from ' + start + ' to ' + end + ' is ' + S[end]); 40 | } 41 | } 42 | 43 | var s = Math.random() * G.length | 0; // s = start node 44 | var e; // e = end node 45 | do { 46 | e = Math.random() * G.length | 0; 47 | } while (s == e); 48 | tracer._pace(500); 49 | tracer._print('finding the shortest path from ' + s + ' to ' + e); 50 | Dijkstra(s, e); -------------------------------------------------------------------------------- /js/ace/theme-eclipse.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/eclipse",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssText='.ace-eclipse .ace_gutter {background: #ebebeb;border-right: 1px solid rgb(159, 159, 159);color: rgb(136, 136, 136);}.ace-eclipse .ace_print-margin {width: 1px;background: #ebebeb;}.ace-eclipse {background-color: #FFFFFF;color: black;}.ace-eclipse .ace_fold {background-color: rgb(60, 76, 114);}.ace-eclipse .ace_cursor {color: black;}.ace-eclipse .ace_storage,.ace-eclipse .ace_keyword,.ace-eclipse .ace_variable {color: rgb(127, 0, 85);}.ace-eclipse .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-eclipse .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-eclipse .ace_function {color: rgb(60, 76, 114);}.ace-eclipse .ace_string {color: rgb(42, 0, 255);}.ace-eclipse .ace_comment {color: rgb(113, 150, 130);}.ace-eclipse .ace_comment.ace_doc {color: rgb(63, 95, 191);}.ace-eclipse .ace_comment.ace_doc.ace_tag {color: rgb(127, 159, 191);}.ace-eclipse .ace_constant.ace_numeric {color: darkblue;}.ace-eclipse .ace_tag {color: rgb(25, 118, 116);}.ace-eclipse .ace_type {color: rgb(127, 0, 127);}.ace-eclipse .ace_xml-pe {color: rgb(104, 104, 91);}.ace-eclipse .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-eclipse .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-eclipse .ace_meta.ace_tag {color:rgb(25, 118, 116);}.ace-eclipse .ace_invisible {color: #ddd;}.ace-eclipse .ace_entity.ace_other.ace_attribute-name {color:rgb(127, 0, 127);}.ace-eclipse .ace_marker-layer .ace_step {background: rgb(255, 255, 0);}.ace-eclipse .ace_active-line {background: rgb(232, 242, 254);}.ace-eclipse .ace_gutter-active-line {background-color : #DADADA;}.ace-eclipse .ace_marker-layer .ace_selected-word {border: 1px solid rgb(181, 213, 255);}.ace-eclipse .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.cssClass="ace-eclipse";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /js/ace/snippets/sqlserver.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/sqlserver",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# ISNULL\nsnippet isnull\n ISNULL(${1:check_expression}, ${2:replacement_value})\n# FORMAT\nsnippet format\n FORMAT(${1:value}, ${2:format})\n# CAST\nsnippet cast\n CAST(${1:expression} AS ${2:data_type})\n# CONVERT\nsnippet convert\n CONVERT(${1:data_type}, ${2:expression})\n# DATEPART\nsnippet datepart\n DATEPART(${1:datepart}, ${2:date})\n# DATEDIFF\nsnippet datediff\n DATEDIFF(${1:datepart}, ${2:startdate}, ${3:enddate})\n# DATEADD\nsnippet dateadd\n DATEADD(${1:datepart}, ${2:number}, ${3:date})\n# DATEFROMPARTS \nsnippet datefromparts\n DATEFROMPARTS(${1:year}, ${2:month}, ${3:day})\n# OBJECT_DEFINITION\nsnippet objectdef\n SELECT OBJECT_DEFINITION(OBJECT_ID('${1:sys.server_permissions /*object name*/}'))\n# STUFF XML\nsnippet stuffxml\n STUFF((SELECT ', ' + ${1:ColumnName}\n FROM ${2:TableName}\n WHERE ${3:WhereClause}\n FOR XML PATH('')), 1, 1, '') AS ${4:Alias}\n ${5:/*https://msdn.microsoft.com/en-us/library/ms188043.aspx*/}\n# Create Procedure\nsnippet createproc\n -- =============================================\n -- Author: ${1:Author}\n -- Create date: ${2:Date}\n -- Description: ${3:Description}\n -- =============================================\n CREATE PROCEDURE ${4:Procedure_Name}\n ${5:/*Add the parameters for the stored procedure here*/}\n AS\n BEGIN\n -- SET NOCOUNT ON added to prevent extra result sets from interfering with SELECT statements.\n SET NOCOUNT ON;\n \n ${6:/*Add the T-SQL statements to compute the return value here*/}\n \n END\n GO\n# Create Scalar Function\nsnippet createfn\n -- =============================================\n -- Author: ${1:Author}\n -- Create date: ${2:Date}\n -- Description: ${3:Description}\n -- =============================================\n CREATE FUNCTION ${4:Scalar_Function_Name}\n -- Add the parameters for the function here\n RETURNS ${5:Function_Data_Type}\n AS\n BEGIN\n DECLARE @Result ${5:Function_Data_Type}\n \n ${6:/*Add the T-SQL statements to compute the return value here*/}\n \n END\n GO",t.scope="sqlserver"}) -------------------------------------------------------------------------------- /js/ace/mode-toml.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/toml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"constant.language.boolean":"true|false"},"identifier"),t="[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";this.$rules={start:[{token:"comment.toml",regex:/#.*$/},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:["variable.keygroup.toml"],regex:"(?:^\\s*)(\\[\\[([^\\]]+)\\]\\])"},{token:["variable.keygroup.toml"],regex:"(?:^\\s*)(\\[([^\\]]+)\\])"},{token:e,regex:t},{token:"support.date.toml",regex:"\\d{4}-\\d{2}-\\d{2}(T)\\d{2}:\\d{2}:\\d{2}(Z)"},{token:"constant.numeric.toml",regex:"-?\\d+(\\.?\\d+)?"}],qqstring:[{token:"string",regex:"\\\\$",next:"qqstring"},{token:"constant.language.escape",regex:'\\\\[0tnr"\\\\]'},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.TomlHighlightRules=s}),define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/^\s*\[([^\])]*)]\s*(?:$|[;#])/,this.getFoldWidgetRange=function(e,t,n){var r=this.foldingStartMarker,s=e.getLine(n),o=s.match(r);if(!o)return;var u=o[1]+".",a=s.length,f=e.getLength(),l=n,c=n;while(++nl){var h=e.getLine(c).length;return new i(l,a,c,h)}}}.call(o.prototype)}),define("ace/mode/toml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/toml_highlight_rules","ace/mode/folding/ini"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./toml_highlight_rules").TomlHighlightRules,o=e("./folding/ini").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="#",this.$id="ace/mode/toml"}.call(u.prototype),t.Mode=u}) -------------------------------------------------------------------------------- /js/ace/theme-github.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/github",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-github",t.cssText='.ace-github .ace_gutter {background: #e8e8e8;color: #AAA;}.ace-github {background: #fff;color: #000;}.ace-github .ace_keyword {font-weight: bold;}.ace-github .ace_string {color: #D14;}.ace-github .ace_variable.ace_class {color: teal;}.ace-github .ace_constant.ace_numeric {color: #099;}.ace-github .ace_constant.ace_buildin {color: #0086B3;}.ace-github .ace_support.ace_function {color: #0086B3;}.ace-github .ace_comment {color: #998;font-style: italic;}.ace-github .ace_variable.ace_language {color: #0086B3;}.ace-github .ace_paren {font-weight: bold;}.ace-github .ace_boolean {font-weight: bold;}.ace-github .ace_string.ace_regexp {color: #009926;font-weight: normal;}.ace-github .ace_variable.ace_instance {color: teal;}.ace-github .ace_constant.ace_language {font-weight: bold;}.ace-github .ace_cursor {color: black;}.ace-github.ace_focus .ace_marker-layer .ace_active-line {background: rgb(255, 255, 204);}.ace-github .ace_marker-layer .ace_active-line {background: rgb(245, 245, 245);}.ace-github .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-github.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-github.ace_nobold .ace_line > span {font-weight: normal !important;}.ace-github .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-github .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-github .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-github .ace_gutter-active-line {background-color : rgba(0, 0, 0, 0.07);}.ace-github .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-github .ace_invisible {color: #BFBFBF}.ace-github .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-github .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /js/ace/mode-space.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++nl){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u 0) { 36 | tracer._print ('Iteration #' + iter + '. Queue state: [ ' + String (Q) + ' ]'); 37 | currNode = Q.shift (1); 38 | tracer._visit (currNode); 39 | 40 | for (i = 0; i < G.length; i++) { 41 | if (G [currNode] [i]) { 42 | tracer._print (i + ' has an incoming edge from ' + currNode + '. Decrementing ' + i + '\'s in-degree by 1.'); 43 | tracer._visit (i, currNode); 44 | inDegrees [i]--; 45 | tracer._leave (i, currNode); 46 | 47 | if (!inDegrees [i]) { 48 | tracer._print (i + '\'s in-degree is now 0. Enqueuing ' + i); 49 | Q.push (i); 50 | } 51 | } 52 | } 53 | tracer._leave (currNode); 54 | tracer._print ('In-degrees are: [' + String (inDegrees) + ' ]'); 55 | tracer._print ('-------------------------------------------------------------------'); 56 | 57 | iter++; 58 | } 59 | }) (); -------------------------------------------------------------------------------- /js/ace/theme-kr_theme.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/kr_theme",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-kr-theme",t.cssText=".ace-kr-theme .ace_gutter {background: #1c1917;color: #FCFFE0}.ace-kr-theme .ace_print-margin {width: 1px;background: #1c1917}.ace-kr-theme {background-color: #0B0A09;color: #FCFFE0}.ace-kr-theme .ace_cursor {color: #FF9900}.ace-kr-theme .ace_marker-layer .ace_selection {background: rgba(170, 0, 255, 0.45)}.ace-kr-theme.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #0B0A09;}.ace-kr-theme .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-kr-theme .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(255, 177, 111, 0.32)}.ace-kr-theme .ace_marker-layer .ace_active-line {background: #38403D}.ace-kr-theme .ace_gutter-active-line {background-color : #38403D}.ace-kr-theme .ace_marker-layer .ace_selected-word {border: 1px solid rgba(170, 0, 255, 0.45)}.ace-kr-theme .ace_invisible {color: rgba(255, 177, 111, 0.32)}.ace-kr-theme .ace_keyword,.ace-kr-theme .ace_meta {color: #949C8B}.ace-kr-theme .ace_constant,.ace-kr-theme .ace_constant.ace_character,.ace-kr-theme .ace_constant.ace_character.ace_escape,.ace-kr-theme .ace_constant.ace_other {color: rgba(210, 117, 24, 0.76)}.ace-kr-theme .ace_invalid {color: #F8F8F8;background-color: #A41300}.ace-kr-theme .ace_support {color: #9FC28A}.ace-kr-theme .ace_support.ace_constant {color: #C27E66}.ace-kr-theme .ace_fold {background-color: #949C8B;border-color: #FCFFE0}.ace-kr-theme .ace_support.ace_function {color: #85873A}.ace-kr-theme .ace_storage {color: #FFEE80}.ace-kr-theme .ace_string {color: rgba(164, 161, 181, 0.8)}.ace-kr-theme .ace_string.ace_regexp {color: rgba(125, 255, 192, 0.65)}.ace-kr-theme .ace_comment {font-style: italic;color: #706D5B}.ace-kr-theme .ace_variable {color: #D1A796}.ace-kr-theme .ace_list,.ace-kr-theme .ace_markup.ace_list {background-color: #0F0040}.ace-kr-theme .ace_variable.ace_language {color: #FF80E1}.ace-kr-theme .ace_meta.ace_tag {color: #BABD9C}.ace-kr-theme .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /js/ace/mode-cobol.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|AFTER|MULTIPLY|TEST|ALL|NEGATIVE|TEXT|ALPHABET|NEXT|THAN|ALSO|NO|THEN|ALTERNATE|NOT|THROUGH|AND|NUMBER|THRU|ANY|OCCURS|TIME|ARE|OF|TO|AREA|OFF|TOP||ASCENDING|OMITTED|TRUE|ASSIGN|ON|TYPE|AT|OPEN|UNIT|AUTHOR|OR|UNTIL|BEFORE|OTHER|UP|BLANK|OUTPUT|USE|BLOCK|PAGE|USING|BOTTOM|PERFORM|VALUE|BY|PIC|VALUES|CALL|PICTURE|WHEN|CANCEL|PLUS|WITH|CD|POINTER|WRITE|CHARACTER|POSITION||ZERO|CLOSE|POSITIVE|ZEROS|COLUMN|PROCEDURE|ZEROES|COMMA|PROGRAM|COMMON|PROGRAM-ID|COMMUNICATION|QUOTE|COMP|RANDOM|COMPUTE|READ|CONTAINS|RECEIVE|CONFIGURATION|RECORD|CONTINUE|REDEFINES|CONTROL|REFERENCE|COPY|REMAINDER|COUNT|REPLACE|DATA|REPORT|DATE|RESERVE|DAY|RESET|DELETE|RETURN|DESTINATION|REWIND|DISABLE|REWRITE|DISPLAY|RIGHT|DIVIDE|RUN|DOWN|SAME|ELSE|SEARCH|ENABLE|SECTION|END|SELECT|ENVIRONMENT|SENTENCE|EQUAL|SET|ERROR|SIGN|EXIT|SEQUENTIAL|EXTERNAL|SIZE|FLASE|SORT|FILE|SOURCE|LENGTH|SPACE|LESS|STANDARD|LIMIT|START|LINE|STOP|LOCK|STRING|LOW-VALUE|SUBTRACT",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\*.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.CobolHighlightRules=s}),define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./cobol_highlight_rules").CobolHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s};r.inherits(u,i),function(){this.lineCommentStart="*",this.$id="ace/mode/cobol"}.call(u.prototype),t.Mode=u}) -------------------------------------------------------------------------------- /js/ace/theme-solarized_dark.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/solarized_dark",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-solarized-dark",t.cssText=".ace-solarized-dark .ace_gutter {background: #01313f;color: #d0edf7}.ace-solarized-dark .ace_print-margin {width: 1px;background: #33555E}.ace-solarized-dark {background-color: #002B36;color: #93A1A1}.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,.ace-solarized-dark .ace_storage {color: #93A1A1}.ace-solarized-dark .ace_cursor,.ace-solarized-dark .ace_string.ace_regexp {color: #D30102}.ace-solarized-dark .ace_marker-layer .ace_active-line,.ace-solarized-dark .ace_marker-layer .ace_selection {background: rgba(255, 255, 255, 0.1)}.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #002B36;}.ace-solarized-dark .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-solarized-dark .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(147, 161, 161, 0.50)}.ace-solarized-dark .ace_gutter-active-line {background-color: #0d3440}.ace-solarized-dark .ace_marker-layer .ace_selected-word {border: 1px solid #073642}.ace-solarized-dark .ace_invisible {color: rgba(147, 161, 161, 0.50)}.ace-solarized-dark .ace_keyword,.ace-solarized-dark .ace_meta,.ace-solarized-dark .ace_support.ace_class,.ace-solarized-dark .ace_support.ace_type {color: #859900}.ace-solarized-dark .ace_constant.ace_character,.ace-solarized-dark .ace_constant.ace_other {color: #CB4B16}.ace-solarized-dark .ace_constant.ace_language {color: #B58900}.ace-solarized-dark .ace_constant.ace_numeric {color: #D33682}.ace-solarized-dark .ace_fold {background-color: #268BD2;border-color: #93A1A1}.ace-solarized-dark .ace_entity.ace_name.ace_function,.ace-solarized-dark .ace_entity.ace_name.ace_tag,.ace-solarized-dark .ace_support.ace_function,.ace-solarized-dark .ace_variable,.ace-solarized-dark .ace_variable.ace_language {color: #268BD2}.ace-solarized-dark .ace_string {color: #2AA198}.ace-solarized-dark .ace_comment {font-style: italic;color: #657B83}.ace-solarized-dark .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /js/ace/mode-gherkin.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/gherkin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})",o=function(){var e=[{name:"en",labels:"Feature|Background|Scenario(?: Outline)?|Examples",keywords:"Given|When|Then|And|But"}],t=e.map(function(e){return e.labels}).join("|"),n=e.map(function(e){return e.keywords}).join("|");this.$rules={start:[{token:"constant.numeric",regex:"(?:(?:[1-9]\\d*)|(?:0))"},{token:"comment",regex:"#.*$"},{token:"keyword",regex:"(?:"+t+"):|(?:"+n+")\\b"},{token:"keyword",regex:"\\*"},{token:"string",regex:'"{3}',next:"qqstring3"},{token:"string",regex:'"',next:"qqstring"},{token:"text",regex:"^\\s*(?=@[\\w])",next:[{token:"text",regex:"\\s+"},{token:"variable.parameter",regex:"@[\\w]+"},{token:"empty",regex:"",next:"start"}]},{token:"comment",regex:"<[^>]+>"},{token:"comment",regex:"\\|(?=.)",next:"table-item"},{token:"comment",regex:"\\|$",next:"start"}],qqstring3:[{token:"constant.language.escape",regex:s},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],"table-item":[{token:"comment",regex:/$/,next:"start"},{token:"comment",regex:/\|/},{token:"string",regex:/\\./},{defaultToken:"string"}]},this.normalizeRules()};r.inherits(o,i),t.GherkinHighlightRules=o}),define("ace/mode/gherkin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gherkin_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gherkin_highlight_rules").GherkinHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.lineCommentStart="#",this.$id="ace/mode/gherkin",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=" ",s=this.getTokenizer().getLineTokens(t,e),o=s.tokens;return console.log(e),t.match("[ ]*\\|")&&(r+="| "),o.length&&o[o.length-1].type=="comment"?r:(e=="start"&&(t.match("Scenario:|Feature:|Scenario Outline:|Background:")?r+=i:t.match("(Given|Then).+(:)$|Examples:")?r+=i:t.match("\\*.+")&&(r+="* ")),r)}}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /js/ace/theme-cobalt.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/cobalt",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-cobalt",t.cssText=".ace-cobalt .ace_gutter {background: #011e3a;color: rgb(128,145,160)}.ace-cobalt .ace_print-margin {width: 1px;background: #555555}.ace-cobalt {background-color: #002240;color: #FFFFFF}.ace-cobalt .ace_cursor {color: #FFFFFF}.ace-cobalt .ace_marker-layer .ace_selection {background: rgba(179, 101, 57, 0.75)}.ace-cobalt.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #002240;}.ace-cobalt .ace_marker-layer .ace_step {background: rgb(127, 111, 19)}.ace-cobalt .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(255, 255, 255, 0.15)}.ace-cobalt .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.35)}.ace-cobalt .ace_gutter-active-line {background-color: rgba(0, 0, 0, 0.35)}.ace-cobalt .ace_marker-layer .ace_selected-word {border: 1px solid rgba(179, 101, 57, 0.75)}.ace-cobalt .ace_invisible {color: rgba(255, 255, 255, 0.15)}.ace-cobalt .ace_keyword,.ace-cobalt .ace_meta {color: #FF9D00}.ace-cobalt .ace_constant,.ace-cobalt .ace_constant.ace_character,.ace-cobalt .ace_constant.ace_character.ace_escape,.ace-cobalt .ace_constant.ace_other {color: #FF628C}.ace-cobalt .ace_invalid {color: #F8F8F8;background-color: #800F00}.ace-cobalt .ace_support {color: #80FFBB}.ace-cobalt .ace_support.ace_constant {color: #EB939A}.ace-cobalt .ace_fold {background-color: #FF9D00;border-color: #FFFFFF}.ace-cobalt .ace_support.ace_function {color: #FFB054}.ace-cobalt .ace_storage {color: #FFEE80}.ace-cobalt .ace_entity {color: #FFDD00}.ace-cobalt .ace_string {color: #3AD900}.ace-cobalt .ace_string.ace_regexp {color: #80FFC2}.ace-cobalt .ace_comment {font-style: italic;color: #0088FF}.ace-cobalt .ace_heading,.ace-cobalt .ace_markup.ace_heading {color: #C8E4FD;background-color: #001221}.ace-cobalt .ace_list,.ace-cobalt .ace_markup.ace_list {background-color: #130D26}.ace-cobalt .ace_variable {color: #CCCCCC}.ace-cobalt .ace_variable.ace_language {color: #FF80E1}.ace-cobalt .ace_meta.ace_tag {color: #9EFFFF}.ace-cobalt .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHCLSvkPAAP3AgSDTRd4AAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /js/ace/theme-solarized_light.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/solarized_light",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-solarized-light",t.cssText=".ace-solarized-light .ace_gutter {background: #fbf1d3;color: #333}.ace-solarized-light .ace_print-margin {width: 1px;background: #e8e8e8}.ace-solarized-light {background-color: #FDF6E3;color: #586E75}.ace-solarized-light .ace_cursor {color: #000000}.ace-solarized-light .ace_marker-layer .ace_selection {background: rgba(7, 54, 67, 0.09)}.ace-solarized-light.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FDF6E3;}.ace-solarized-light .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-solarized-light .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(147, 161, 161, 0.50)}.ace-solarized-light .ace_marker-layer .ace_active-line {background: #EEE8D5}.ace-solarized-light .ace_gutter-active-line {background-color : #EDE5C1}.ace-solarized-light .ace_marker-layer .ace_selected-word {border: 1px solid #073642}.ace-solarized-light .ace_invisible {color: rgba(147, 161, 161, 0.50)}.ace-solarized-light .ace_keyword,.ace-solarized-light .ace_meta,.ace-solarized-light .ace_support.ace_class,.ace-solarized-light .ace_support.ace_type {color: #859900}.ace-solarized-light .ace_constant.ace_character,.ace-solarized-light .ace_constant.ace_other {color: #CB4B16}.ace-solarized-light .ace_constant.ace_language {color: #B58900}.ace-solarized-light .ace_constant.ace_numeric {color: #D33682}.ace-solarized-light .ace_fold {background-color: #268BD2;border-color: #586E75}.ace-solarized-light .ace_entity.ace_name.ace_function,.ace-solarized-light .ace_entity.ace_name.ace_tag,.ace-solarized-light .ace_support.ace_function,.ace-solarized-light .ace_variable,.ace-solarized-light .ace_variable.ace_language {color: #268BD2}.ace-solarized-light .ace_storage {color: #073642}.ace-solarized-light .ace_string {color: #2AA198}.ace-solarized-light .ace_string.ace_regexp {color: #D30102}.ace-solarized-light .ace_comment,.ace-solarized-light .ace_entity.ace_other.ace_attribute-name {color: #93A1A1}.ace-solarized-light .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /js/ace/theme-monokai.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/monokai",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-monokai",t.cssText=".ace-monokai .ace_gutter {background: #2F3129;color: #8F908A}.ace-monokai .ace_print-margin {width: 1px;background: #555651}.ace-monokai {background-color: #272822;color: #F8F8F2}.ace-monokai .ace_cursor {color: #F8F8F0}.ace-monokai .ace_marker-layer .ace_selection {background: #49483E}.ace-monokai.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #272822;}.ace-monokai .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-monokai .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #49483E}.ace-monokai .ace_marker-layer .ace_active-line {background: #202020}.ace-monokai .ace_gutter-active-line {background-color: #272727}.ace-monokai .ace_marker-layer .ace_selected-word {border: 1px solid #49483E}.ace-monokai .ace_invisible {color: #52524d}.ace-monokai .ace_entity.ace_name.ace_tag,.ace-monokai .ace_keyword,.ace-monokai .ace_meta.ace_tag,.ace-monokai .ace_storage {color: #F92672}.ace-monokai .ace_punctuation,.ace-monokai .ace_punctuation.ace_tag {color: #fff}.ace-monokai .ace_constant.ace_character,.ace-monokai .ace_constant.ace_language,.ace-monokai .ace_constant.ace_numeric,.ace-monokai .ace_constant.ace_other {color: #AE81FF}.ace-monokai .ace_invalid {color: #F8F8F0;background-color: #F92672}.ace-monokai .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #AE81FF}.ace-monokai .ace_support.ace_constant,.ace-monokai .ace_support.ace_function {color: #66D9EF}.ace-monokai .ace_fold {background-color: #A6E22E;border-color: #F8F8F2}.ace-monokai .ace_storage.ace_type,.ace-monokai .ace_support.ace_class,.ace-monokai .ace_support.ace_type {font-style: italic;color: #66D9EF}.ace-monokai .ace_entity.ace_name.ace_function,.ace-monokai .ace_entity.ace_other,.ace-monokai .ace_entity.ace_other.ace_attribute-name,.ace-monokai .ace_variable {color: #A6E22E}.ace-monokai .ace_variable.ace_parameter {font-style: italic;color: #FD971F}.ace-monokai .ace_string {color: #E6DB74}.ace-monokai .ace_comment {color: #75715E}.ace-monokai .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /js/ace/mode-diff.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{regex:"^(?:\\*{15}|={67}|-{3}|\\+{3})$",token:"punctuation.definition.separator.diff",name:"keyword"},{regex:"^(@@)(\\s*.+?\\s*)(@@)(.*)$",token:["constant","constant.numeric","constant","comment.doc.tag"]},{regex:"^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",token:["constant.numeric","punctuation.definition.range.diff","constant.function","constant.numeric","punctuation.definition.range.diff","invalid"],name:"meta."},{regex:"^(\\-{3}|\\+{3}|\\*{3})( .+)$",token:["constant.numeric","meta.tag"]},{regex:"^([!+>])(.*?)(\\s*)$",token:["support.constant","text","invalid"]},{regex:"^([<\\-])(.*?)(\\s*)$",token:["support.function","string","invalid"]},{regex:"^(diff)(\\s+--\\w+)?(.+?)( .+)?$",token:["variable","variable","keyword","variable"]},{regex:"^Index.+$",token:"variable"},{regex:"^\\s+$",token:"text"},{regex:"\\s*$",token:"invalid"},{defaultToken:"invisible",caseInsensitive:!0}]}};r.inherits(s,i),t.DiffHighlightRules=s}),define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(e,t){this.regExpList=e,this.flag=t,this.foldingStartMarker=RegExp("^("+e.join("|")+")",this.flag)};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i={row:n,column:r.length},o=this.regExpList;for(var u=1;u<=o.length;u++){var a=RegExp("^("+o.slice(0,u).join("|")+")",this.flag);if(a.test(r))break}for(var f=e.getLength();++n0&&!(s%l)&&!(f%l)&&(r[l]=(r[l]||0)+1),n[f]=(n[f]||0)+1}s=f}while(up.score&&(p={score:v,length:u})}if(p.score&&p.score>1.4)var m=p.length;if(i>d+1){if(m==1||di+1)return{ch:" ",length:m}},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(r.ch==" "),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){var n=e.getDocument(),r=n.getAllLines(),i=t?-1:0;for(var s=0,o=r.length;si&&n.removeInLine(s,a,u.length)}},t.convertIndentation=function(e,t,n){var i=e.getTabString()[0],s=e.getTabSize();n||(n=s),t||(t=i);var o=t==" "?t:r.stringRepeat(t,n),u=e.doc,a=u.getAllLines(),f={},l={};for(var c=0,h=a.length;c|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.VerilogHighlightRules=s}),define("ace/mode/verilog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/verilog_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./verilog_highlight_rules").VerilogHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/verilog"}.call(u.prototype),t.Mode=u}) -------------------------------------------------------------------------------- /js/ace/theme-pastel_on_dark.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/pastel_on_dark",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-pastel-on-dark",t.cssText=".ace-pastel-on-dark .ace_gutter {background: #353030;color: #8F938F}.ace-pastel-on-dark .ace_print-margin {width: 1px;background: #353030}.ace-pastel-on-dark {background-color: #2C2828;color: #8F938F}.ace-pastel-on-dark .ace_cursor {color: #A7A7A7}.ace-pastel-on-dark .ace_marker-layer .ace_selection {background: rgba(221, 240, 255, 0.20)}.ace-pastel-on-dark.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #2C2828;}.ace-pastel-on-dark .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-pastel-on-dark .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(255, 255, 255, 0.25)}.ace-pastel-on-dark .ace_marker-layer .ace_active-line {background: rgba(255, 255, 255, 0.031)}.ace-pastel-on-dark .ace_gutter-active-line {background-color: rgba(255, 255, 255, 0.031)}.ace-pastel-on-dark .ace_marker-layer .ace_selected-word {border: 1px solid rgba(221, 240, 255, 0.20)}.ace-pastel-on-dark .ace_invisible {color: rgba(255, 255, 255, 0.25)}.ace-pastel-on-dark .ace_keyword,.ace-pastel-on-dark .ace_meta {color: #757aD8}.ace-pastel-on-dark .ace_constant,.ace-pastel-on-dark .ace_constant.ace_character,.ace-pastel-on-dark .ace_constant.ace_character.ace_escape,.ace-pastel-on-dark .ace_constant.ace_other {color: #4FB7C5}.ace-pastel-on-dark .ace_keyword.ace_operator {color: #797878}.ace-pastel-on-dark .ace_constant.ace_character {color: #AFA472}.ace-pastel-on-dark .ace_constant.ace_language {color: #DE8E30}.ace-pastel-on-dark .ace_constant.ace_numeric {color: #CCCCCC}.ace-pastel-on-dark .ace_invalid,.ace-pastel-on-dark .ace_invalid.ace_illegal {color: #F8F8F8;background-color: rgba(86, 45, 86, 0.75)}.ace-pastel-on-dark .ace_invalid.ace_deprecated {text-decoration: underline;font-style: italic;color: #D2A8A1}.ace-pastel-on-dark .ace_fold {background-color: #757aD8;border-color: #8F938F}.ace-pastel-on-dark .ace_support.ace_function {color: #AEB2F8}.ace-pastel-on-dark .ace_string {color: #66A968}.ace-pastel-on-dark .ace_string.ace_regexp {color: #E9C062}.ace-pastel-on-dark .ace_comment {color: #A6C6FF}.ace-pastel-on-dark .ace_variable {color: #BEBF55}.ace-pastel-on-dark .ace_variable.ace_language {color: #C1C144}.ace-pastel-on-dark .ace_xml-pe {color: #494949}.ace-pastel-on-dark .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYIiPj/8PAARgAh2NTMh8AAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /js/ace/mode-ini.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/ini_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s="\\\\(?:[\\\\0abtrn;#=:]|x[a-fA-F\\d]{4})",o=function(){this.$rules={start:[{token:"punctuation.definition.comment.ini",regex:"#.*",push_:[{token:"comment.line.number-sign.ini",regex:"$|^",next:"pop"},{defaultToken:"comment.line.number-sign.ini"}]},{token:"punctuation.definition.comment.ini",regex:";.*",push_:[{token:"comment.line.semicolon.ini",regex:"$|^",next:"pop"},{defaultToken:"comment.line.semicolon.ini"}]},{token:["keyword.other.definition.ini","text","punctuation.separator.key-value.ini"],regex:"\\b([a-zA-Z0-9_.-]+)\\b(\\s*)(=)"},{token:["punctuation.definition.entity.ini","constant.section.group-title.ini","punctuation.definition.entity.ini"],regex:"^(\\[)(.*?)(\\])"},{token:"punctuation.definition.string.begin.ini",regex:"'",push:[{token:"punctuation.definition.string.end.ini",regex:"'",next:"pop"},{token:"constant.language.escape",regex:s},{defaultToken:"string.quoted.single.ini"}]},{token:"punctuation.definition.string.begin.ini",regex:'"',push:[{token:"constant.language.escape",regex:s},{token:"punctuation.definition.string.end.ini",regex:'"',next:"pop"},{defaultToken:"string.quoted.double.ini"}]}]},this.normalizeRules()};o.metaData={fileTypes:["ini","conf"],keyEquivalent:"^~I",name:"Ini",scopeName:"source.ini"},r.inherits(o,i),t.IniHighlightRules=o}),define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/^\s*\[([^\])]*)]\s*(?:$|[;#])/,this.getFoldWidgetRange=function(e,t,n){var r=this.foldingStartMarker,s=e.getLine(n),o=s.match(r);if(!o)return;var u=o[1]+".",a=s.length,f=e.getLength(),l=n,c=n;while(++nl){var h=e.getLine(c).length;return new i(l,a,c,h)}}}.call(o.prototype)}),define("ace/mode/ini",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ini_highlight_rules","ace/mode/folding/ini"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ini_highlight_rules").IniHighlightRules,o=e("./folding/ini").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart=";",this.blockComment=null,this.$id="ace/mode/ini"}.call(u.prototype),t.Mode=u}) -------------------------------------------------------------------------------- /js/ace/snippets/c_cpp.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/c_cpp",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="## STL Collections\n# std::array\nsnippet array\n std::array<${1:T}, ${2:N}> ${3};${4}\n# std::vector\nsnippet vector\n std::vector<${1:T}> ${2};${3}\n# std::deque\nsnippet deque\n std::deque<${1:T}> ${2};${3}\n# std::forward_list\nsnippet flist\n std::forward_list<${1:T}> ${2};${3}\n# std::list\nsnippet list\n std::list<${1:T}> ${2};${3}\n# std::set\nsnippet set\n std::set<${1:T}> ${2};${3}\n# std::map\nsnippet map\n std::map<${1:Key}, ${2:T}> ${3};${4}\n# std::multiset\nsnippet mset\n std::multiset<${1:T}> ${2};${3}\n# std::multimap\nsnippet mmap\n std::multimap<${1:Key}, ${2:T}> ${3};${4}\n# std::unordered_set\nsnippet uset\n std::unordered_set<${1:T}> ${2};${3}\n# std::unordered_map\nsnippet umap\n std::unordered_map<${1:Key}, ${2:T}> ${3};${4}\n# std::unordered_multiset\nsnippet umset\n std::unordered_multiset<${1:T}> ${2};${3}\n# std::unordered_multimap\nsnippet ummap\n std::unordered_multimap<${1:Key}, ${2:T}> ${3};${4}\n# std::stack\nsnippet stack\n std::stack<${1:T}> ${2};${3}\n# std::queue\nsnippet queue\n std::queue<${1:T}> ${2};${3}\n# std::priority_queue\nsnippet pqueue\n std::priority_queue<${1:T}> ${2};${3}\n##\n## Access Modifiers\n# private\nsnippet pri\n private\n# protected\nsnippet pro\n protected\n# public\nsnippet pub\n public\n# friend\nsnippet fr\n friend\n# mutable\nsnippet mu\n mutable\n## \n## Class\n# class\nsnippet cl\n class ${1:`Filename('$1', 'name')`} \n {\n public:\n $1(${2});\n ~$1();\n\n private:\n ${3:/* data */}\n };\n# member function implementation\nsnippet mfun\n ${4:void} ${1:`Filename('$1', 'ClassName')`}::${2:memberFunction}(${3}) {\n ${5:/* code */}\n }\n# namespace\nsnippet ns\n namespace ${1:`Filename('', 'my')`} {\n ${2}\n } /* namespace $1 */\n##\n## Input/Output\n# std::cout\nsnippet cout\n std::cout << ${1} << std::endl;${2}\n# std::cin\nsnippet cin\n std::cin >> ${1};${2}\n##\n## Iteration\n# for i \nsnippet fori\n for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) {\n ${4:/* code */}\n }${5}\n\n# foreach\nsnippet fore\n for (${1:auto} ${2:i} : ${3:container}) {\n ${4:/* code */}\n }${5}\n# iterator\nsnippet iter\n for (${1:std::vector}<${2:type}>::${3:const_iterator} ${4:i} = ${5:container}.begin(); $4 != $5.end(); ++$4) {\n ${6}\n }${7}\n\n# auto iterator\nsnippet itera\n for (auto ${1:i} = $1.begin(); $1 != $1.end(); ++$1) {\n ${2:std::cout << *$1 << std::endl;}\n }${3}\n##\n## Lambdas\n# lamda (one line)\nsnippet ld\n [${1}](${2}){${3:/* code */}}${4}\n# lambda (multi-line)\nsnippet lld\n [${1}](${2}){\n ${3:/* code */}\n }${4}\n",t.scope="c_cpp"}) -------------------------------------------------------------------------------- /algorithm/sorting/merge/basic/code.js: -------------------------------------------------------------------------------- 1 | tracer._print('original array = [' + D.join(', ') + ']'); 2 | tracer._sleep(1000); 3 | tracer._pace(500); 4 | 5 | function mergeSort(start, end) { 6 | if (Math.abs(end - start) <= 1) return []; 7 | var middle = Math.ceil((start + end) / 2); 8 | 9 | mergeSort(start, middle); 10 | mergeSort(middle, end); 11 | 12 | tracer._print('divide left[' + start + ', ' + (middle - 1) + '], right[' + (middle) + ', ' + (end - 1) + ']'); 13 | return mergeSort.merge(start, middle, end); 14 | } 15 | 16 | mergeSort.merge = function(start, middle, end) { 17 | const leftSize = middle - start; 18 | const rightSize = end - middle; 19 | const maxSize = Math.max(leftSize, rightSize); 20 | const size = end - start; 21 | var left = []; 22 | var right = []; 23 | var i; 24 | 25 | for (i = 0; i < maxSize; i++) { 26 | if (i < leftSize) { 27 | left.push(D[start + i]); 28 | tracer._select(start + i); 29 | tracer._print('insert value into left array[' + i + '] = ' + D[start + i]); 30 | } 31 | if (i < rightSize) { 32 | right.push(D[middle + i]); 33 | tracer._select(middle + i); 34 | tracer._print('insert value into right array[' + i + '] = ' + D[middle + i]); 35 | } 36 | } 37 | tracer._print('left array = [' + left.join(', ') + '],' + 'right array = [' + right.join(', ') + ']'); 38 | 39 | i = 0; 40 | while (i < size) { 41 | if (left[0] && right[0]) { 42 | if (left[0] > right[0]) { 43 | D[start + i] = right.shift(); 44 | tracer._print('rewrite from right array[' + i + '] = ' + D[start + i]); 45 | } else { 46 | D[start + i] = left.shift(); 47 | tracer._print('rewrite from left array[' + i + '] = ' + D[start + i]); 48 | } 49 | } else if (left[0]) { 50 | D[start + i] = left.shift(); 51 | tracer._print('rewrite from left array[' + i + '] = ' + D[start + i]); 52 | } else { 53 | D[start + i] = right.shift(); 54 | tracer._print('rewrite from right array[' + i + '] = ' + D[start + i]); 55 | } 56 | 57 | tracer._deselect(start + i); 58 | tracer._notify(start + i); 59 | i++; 60 | } 61 | 62 | var tempArray = []; 63 | for (i = start; i < end; i++) tempArray.push(D[i]); 64 | tracer._print('merged array = [' + tempArray.join(', ') + ']'); 65 | }; 66 | 67 | mergeSort(0, D.length); 68 | tracer._print('sorted array = [' + D.join(', ') + ']'); 69 | -------------------------------------------------------------------------------- /js/ace/mode-tex.js: -------------------------------------------------------------------------------- 1 | define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(e){e||(e="text"),this.$rules={start:[{token:"comment",regex:"%.*$"},{token:e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:e,regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell."+e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell."+e,regex:"\\s+"},{token:"nospell."+e,regex:"\\w+"}]}};r.inherits(o,s),t.TexHighlightRules=o}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/tex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./text_highlight_rules").TextHighlightRules,o=e("./tex_highlight_rules").TexHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(e){e?this.HighlightRules=s:this.HighlightRules=o,this.$outdent=new u};r.inherits(a,i),function(){this.lineCommentStart="%",this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.allowAutoInsert=function(){return!1},this.$id="ace/mode/tex"}.call(a.prototype),t.Mode=a}) -------------------------------------------------------------------------------- /js/ace/theme-chrome.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/chrome",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-chrome",t.cssText='.ace-chrome .ace_gutter {background: #ebebeb;color: #333;overflow : hidden;}.ace-chrome .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-chrome {background-color: #FFFFFF;color: black;}.ace-chrome .ace_cursor {color: black;}.ace-chrome .ace_invisible {color: rgb(191, 191, 191);}.ace-chrome .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-chrome .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-chrome .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-chrome .ace_invalid {background-color: rgb(153, 0, 0);color: white;}.ace-chrome .ace_fold {}.ace-chrome .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-chrome .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-chrome .ace_support.ace_type,.ace-chrome .ace_support.ace_class.ace-chrome .ace_support.ace_other {color: rgb(109, 121, 222);}.ace-chrome .ace_variable.ace_parameter {font-style:italic;color:#FD971F;}.ace-chrome .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-chrome .ace_comment {color: #236e24;}.ace-chrome .ace_comment.ace_doc {color: #236e24;}.ace-chrome .ace_comment.ace_doc.ace_tag {color: #236e24;}.ace-chrome .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-chrome .ace_variable {color: rgb(49, 132, 149);}.ace-chrome .ace_xml-pe {color: rgb(104, 104, 91);}.ace-chrome .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-chrome .ace_heading {color: rgb(12, 7, 255);}.ace-chrome .ace_list {color:rgb(185, 6, 144);}.ace-chrome .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-chrome .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-chrome .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-chrome .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-chrome .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-chrome .ace_gutter-active-line {background-color : #dcdcdc;}.ace-chrome .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-chrome .ace_storage,.ace-chrome .ace_keyword,.ace-chrome .ace_meta.ace_tag {color: rgb(147, 15, 128);}.ace-chrome .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-chrome .ace_string {color: #1A1AA6;}.ace-chrome .ace_entity.ace_other.ace_attribute-name {color: #994409;}.ace-chrome .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) -------------------------------------------------------------------------------- /js/ace/snippets/jsp.js: -------------------------------------------------------------------------------- 1 | define("ace/snippets/jsp",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='snippet @page\n <%@page contentType="text/html" pageEncoding="UTF-8"%>\nsnippet jstl\n <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>\n <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>\nsnippet jstl:c\n <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>\nsnippet jstl:fn\n <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>\nsnippet cpath\n ${pageContext.request.contextPath}\nsnippet cout\n \nsnippet cset\n \nsnippet cremove\n \nsnippet ccatch\n \nsnippet cif\n \n ${2}\n \nsnippet cchoose\n \n ${1}\n \nsnippet cwhen\n \n ${2}\n \nsnippet cother\n \n ${1}\n \nsnippet cfore\n \n ${4:}\n \nsnippet cfort\n ${2:item1,item2,item3}\n \n ${5:}\n \nsnippet cparam\n \nsnippet cparam+\n \n cparam+${3}\nsnippet cimport\n \nsnippet cimport+\n \n \n cparam+${4}\n \nsnippet curl\n \n ${3}\nsnippet curl+\n \n \n cparam+${6}\n \n ${3}\nsnippet credirect\n \nsnippet contains\n ${fn:contains(${1:string}, ${2:substr})}\nsnippet contains:i\n ${fn:containsIgnoreCase(${1:string}, ${2:substr})}\nsnippet endswith\n ${fn:endsWith(${1:string}, ${2:suffix})}\nsnippet escape\n ${fn:escapeXml(${1:string})}\nsnippet indexof\n ${fn:indexOf(${1:string}, ${2:substr})}\nsnippet join\n ${fn:join(${1:collection}, ${2:delims})}\nsnippet length\n ${fn:length(${1:collection_or_string})}\nsnippet replace\n ${fn:replace(${1:string}, ${2:substr}, ${3:replace})}\nsnippet split\n ${fn:split(${1:string}, ${2:delims})}\nsnippet startswith\n ${fn:startsWith(${1:string}, ${2:prefix})}\nsnippet substr\n ${fn:substring(${1:string}, ${2:begin}, ${3:end})}\nsnippet substr:a\n ${fn:substringAfter(${1:string}, ${2:substr})}\nsnippet substr:b\n ${fn:substringBefore(${1:string}, ${2:substr})}\nsnippet lc\n ${fn:toLowerCase(${1:string})}\nsnippet uc\n ${fn:toUpperCase(${1:string})}\nsnippet trim\n ${fn:trim(${1:string})}\n',t.scope="jsp"}) -------------------------------------------------------------------------------- /js/ace/theme-mono_industrial.js: -------------------------------------------------------------------------------- 1 | define("ace/theme/mono_industrial",["require","exports","module","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-mono-industrial",t.cssText=".ace-mono-industrial .ace_gutter {background: #1d2521;color: #C5C9C9}.ace-mono-industrial .ace_print-margin {width: 1px;background: #555651}.ace-mono-industrial {background-color: #222C28;color: #FFFFFF}.ace-mono-industrial .ace_cursor {color: #FFFFFF}.ace-mono-industrial .ace_marker-layer .ace_selection {background: rgba(145, 153, 148, 0.40)}.ace-mono-industrial.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #222C28;}.ace-mono-industrial .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-mono-industrial .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgba(102, 108, 104, 0.50)}.ace-mono-industrial .ace_marker-layer .ace_active-line {background: rgba(12, 13, 12, 0.25)}.ace-mono-industrial .ace_gutter-active-line {background-color: rgba(12, 13, 12, 0.25)}.ace-mono-industrial .ace_marker-layer .ace_selected-word {border: 1px solid rgba(145, 153, 148, 0.40)}.ace-mono-industrial .ace_invisible {color: rgba(102, 108, 104, 0.50)}.ace-mono-industrial .ace_string {background-color: #151C19;color: #FFFFFF}.ace-mono-industrial .ace_keyword,.ace-mono-industrial .ace_meta {color: #A39E64}.ace-mono-industrial .ace_constant,.ace-mono-industrial .ace_constant.ace_character,.ace-mono-industrial .ace_constant.ace_character.ace_escape,.ace-mono-industrial .ace_constant.ace_numeric,.ace-mono-industrial .ace_constant.ace_other {color: #E98800}.ace-mono-industrial .ace_entity.ace_name.ace_function,.ace-mono-industrial .ace_keyword.ace_operator,.ace-mono-industrial .ace_variable {color: #A8B3AB}.ace-mono-industrial .ace_invalid {color: #FFFFFF;background-color: rgba(153, 0, 0, 0.68)}.ace-mono-industrial .ace_support.ace_constant {color: #C87500}.ace-mono-industrial .ace_fold {background-color: #A8B3AB;border-color: #FFFFFF}.ace-mono-industrial .ace_support.ace_function {color: #588E60}.ace-mono-industrial .ace_entity.ace_name,.ace-mono-industrial .ace_support.ace_class,.ace-mono-industrial .ace_support.ace_type {color: #5778B6}.ace-mono-industrial .ace_storage {color: #C23B00}.ace-mono-industrial .ace_variable.ace_language,.ace-mono-industrial .ace_variable.ace_parameter {color: #648BD2}.ace-mono-industrial .ace_comment {color: #666C68;background-color: #151C19}.ace-mono-industrial .ace_entity.ace_other.ace_attribute-name {color: #909993}.ace-mono-industrial .ace_entity.ace_name.ace_tag {color: #A65EFF}.ace-mono-industrial .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ1NbwZfALD/4PAAlTArlEC4r/AAAAAElFTkSuQmCC) right repeat-y}";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}) --------------------------------------------------------------------------------