├── Makefile
├── README.md
├── assets
├── drawing.svg
└── stroke.svg
├── docs
├── google-code-prettify
│ ├── lang-Splus.js
│ ├── lang-aea.js
│ ├── lang-agc.js
│ ├── lang-apollo.js
│ ├── lang-basic.js
│ ├── lang-cbm.js
│ ├── lang-cl.js
│ ├── lang-clj.js
│ ├── lang-css.js
│ ├── lang-dart.js
│ ├── lang-el.js
│ ├── lang-erl.js
│ ├── lang-erlang.js
│ ├── lang-fs.js
│ ├── lang-go.js
│ ├── lang-hs.js
│ ├── lang-lasso.js
│ ├── lang-lassoscript.js
│ ├── lang-latex.js
│ ├── lang-lgt.js
│ ├── lang-lisp.js
│ ├── lang-ll.js
│ ├── lang-llvm.js
│ ├── lang-logtalk.js
│ ├── lang-ls.js
│ ├── lang-lsp.js
│ ├── lang-lua.js
│ ├── lang-matlab.js
│ ├── lang-ml.js
│ ├── lang-mumps.js
│ ├── lang-n.js
│ ├── lang-nemerle.js
│ ├── lang-pascal.js
│ ├── lang-proto.js
│ ├── lang-r.js
│ ├── lang-rd.js
│ ├── lang-rkt.js
│ ├── lang-rust.js
│ ├── lang-s.js
│ ├── lang-scala.js
│ ├── lang-scm.js
│ ├── lang-sql.js
│ ├── lang-ss.js
│ ├── lang-swift.js
│ ├── lang-tcl.js
│ ├── lang-tex.js
│ ├── lang-vb.js
│ ├── lang-vbs.js
│ ├── lang-vhd.js
│ ├── lang-vhdl.js
│ ├── lang-wiki.js
│ ├── lang-xq.js
│ ├── lang-xquery.js
│ ├── lang-yaml.js
│ ├── lang-yml.js
│ ├── prettify.css
│ ├── prettify.js
│ └── run_prettify.js
├── img
│ ├── circle-drawing.gif
│ ├── circle-fail.gif
│ ├── function-3d-1.png
│ ├── function-extrema.png
│ ├── function-not-continuous.png
│ ├── inverse-transform.png
│ ├── ipad-notes.gif
│ ├── line-drawing.gif
│ ├── rect-drawing.gif
│ ├── rect-model.png
│ └── stroke.png
├── index.html
├── katex
│ ├── README.md
│ ├── contrib
│ │ ├── auto-render.js
│ │ ├── auto-render.min.js
│ │ ├── auto-render.mjs
│ │ ├── copy-tex.css
│ │ ├── copy-tex.js
│ │ ├── copy-tex.min.css
│ │ ├── copy-tex.min.js
│ │ ├── copy-tex.mjs
│ │ ├── mathtex-script-type.js
│ │ ├── mathtex-script-type.min.js
│ │ ├── mathtex-script-type.mjs
│ │ ├── mhchem.js
│ │ ├── mhchem.min.js
│ │ ├── mhchem.mjs
│ │ ├── render-a11y-string.js
│ │ ├── render-a11y-string.min.js
│ │ └── render-a11y-string.mjs
│ ├── fonts
│ │ ├── KaTeX_AMS-Regular.ttf
│ │ ├── KaTeX_AMS-Regular.woff
│ │ ├── KaTeX_AMS-Regular.woff2
│ │ ├── KaTeX_Caligraphic-Bold.ttf
│ │ ├── KaTeX_Caligraphic-Bold.woff
│ │ ├── KaTeX_Caligraphic-Bold.woff2
│ │ ├── KaTeX_Caligraphic-Regular.ttf
│ │ ├── KaTeX_Caligraphic-Regular.woff
│ │ ├── KaTeX_Caligraphic-Regular.woff2
│ │ ├── KaTeX_Fraktur-Bold.ttf
│ │ ├── KaTeX_Fraktur-Bold.woff
│ │ ├── KaTeX_Fraktur-Bold.woff2
│ │ ├── KaTeX_Fraktur-Regular.ttf
│ │ ├── KaTeX_Fraktur-Regular.woff
│ │ ├── KaTeX_Fraktur-Regular.woff2
│ │ ├── KaTeX_Main-Bold.ttf
│ │ ├── KaTeX_Main-Bold.woff
│ │ ├── KaTeX_Main-Bold.woff2
│ │ ├── KaTeX_Main-BoldItalic.ttf
│ │ ├── KaTeX_Main-BoldItalic.woff
│ │ ├── KaTeX_Main-BoldItalic.woff2
│ │ ├── KaTeX_Main-Italic.ttf
│ │ ├── KaTeX_Main-Italic.woff
│ │ ├── KaTeX_Main-Italic.woff2
│ │ ├── KaTeX_Main-Regular.ttf
│ │ ├── KaTeX_Main-Regular.woff
│ │ ├── KaTeX_Main-Regular.woff2
│ │ ├── KaTeX_Math-BoldItalic.ttf
│ │ ├── KaTeX_Math-BoldItalic.woff
│ │ ├── KaTeX_Math-BoldItalic.woff2
│ │ ├── KaTeX_Math-Italic.ttf
│ │ ├── KaTeX_Math-Italic.woff
│ │ ├── KaTeX_Math-Italic.woff2
│ │ ├── KaTeX_SansSerif-Bold.ttf
│ │ ├── KaTeX_SansSerif-Bold.woff
│ │ ├── KaTeX_SansSerif-Bold.woff2
│ │ ├── KaTeX_SansSerif-Italic.ttf
│ │ ├── KaTeX_SansSerif-Italic.woff
│ │ ├── KaTeX_SansSerif-Italic.woff2
│ │ ├── KaTeX_SansSerif-Regular.ttf
│ │ ├── KaTeX_SansSerif-Regular.woff
│ │ ├── KaTeX_SansSerif-Regular.woff2
│ │ ├── KaTeX_Script-Regular.ttf
│ │ ├── KaTeX_Script-Regular.woff
│ │ ├── KaTeX_Script-Regular.woff2
│ │ ├── KaTeX_Size1-Regular.ttf
│ │ ├── KaTeX_Size1-Regular.woff
│ │ ├── KaTeX_Size1-Regular.woff2
│ │ ├── KaTeX_Size2-Regular.ttf
│ │ ├── KaTeX_Size2-Regular.woff
│ │ ├── KaTeX_Size2-Regular.woff2
│ │ ├── KaTeX_Size3-Regular.ttf
│ │ ├── KaTeX_Size3-Regular.woff
│ │ ├── KaTeX_Size3-Regular.woff2
│ │ ├── KaTeX_Size4-Regular.ttf
│ │ ├── KaTeX_Size4-Regular.woff
│ │ ├── KaTeX_Size4-Regular.woff2
│ │ ├── KaTeX_Typewriter-Regular.ttf
│ │ ├── KaTeX_Typewriter-Regular.woff
│ │ └── KaTeX_Typewriter-Regular.woff2
│ ├── katex.css
│ ├── katex.js
│ ├── katex.min.css
│ ├── katex.min.js
│ └── katex.mjs
├── math.html
├── src
│ ├── assist.js
│ ├── draw.js
│ ├── index.html
│ └── math.js
├── styles
│ ├── fonts
│ │ ├── firamono_latin.woff2
│ │ └── firamono_latin_ext.woff2
│ ├── main.css
│ └── prettify-theme.css
└── template.html
├── index.lit
├── math.lit
└── template.lit
/Makefile:
--------------------------------------------------------------------------------
1 |
2 | .PHONY: clean all
3 |
4 | all: docs/index.html docs/math.html docs/src/main.js docs/src/math.js
5 |
6 | docs/google-code-prettify docs/katex:
7 | srcweave-format-init -m docs
8 |
9 | docs/src/main.js docs/src/math.js: index.lit template.lit math.lit
10 | srcweave --tangle ./docs/src/ $^
11 |
12 | # separate weaving of tutorial and libraries so they have
13 | # separate TOCs#
14 |
15 | docs/index.html: index.lit
16 | srcweave --weave ./docs/ --formatter srcweave-format $^
17 |
18 | docs/math.html docs/template.html: template.lit math.lit
19 | srcweave --weave ./docs/ --formatter srcweave-format $^
20 |
21 | clean:
22 | rm -f docs/src/main.js
23 | rm -f docs/*.html
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Why Train When You Can Optimize?
2 |
3 | [READ HERE](https://justinmeiners.github.io/why-train-when-you-can-optimize/)
4 |
5 | Here is the [final source](docs/src).
6 |
7 | ## Edits
8 |
9 | This project uses the [srcweave](https://github.com/justinmeiners/srcweave) literate programming system.
10 | If you want to contribute a fix without using this system, feel free to make a PR anyway.
11 |
12 | ## License
13 |
14 | [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) applies to the article and figures.
15 |
16 | MIT applies to all code.
17 |
18 | MIT License
19 |
20 | Copyright (c) 2022 Justin Meiners
21 |
22 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
23 |
24 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
25 |
26 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 |
--------------------------------------------------------------------------------
/assets/drawing.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
212 |
--------------------------------------------------------------------------------
/assets/stroke.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
125 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-Splus.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2012 Jeffrey B. Arnold
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^'\\]|\\[\S\s])*(?:'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![\w.])/],["lit",/^0[Xx][\dA-Fa-f]+([Pp]\d+)?[Li]?/],["lit",/^[+-]?(\d+(\.\d+)?|\.\d+)([Ee][+-]?\d+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|\d+))(?![\w.])/],
18 | ["pun",/^(?:<-|->>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|[!*+/^]|%.*?%|[$=@~]|:{1,3}|[(),;?[\]{}])/],["pln",/^(?:[A-Za-z]+[\w.]*|\.[^\W\d][\w.]*)(?![\w.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-aea.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2009 Onno Hommes.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
18 | null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-agc.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2009 Onno Hommes.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
18 | null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-apollo.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2009 Onno Hommes.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
18 | null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-basic.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2013 Peter Kofler
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | var a=null;
18 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^"(?:[^\n\r"\\]|\\.)*(?:"|$)/,a,'"'],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^REM[^\n\r]*/,a],["kwd",/^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/,a],["pln",/^[a-z][^\W_]?(?:\$|%)?/i,a],["lit",/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/i,a,"0123456789"],["pun",
19 | /^.[^\s\w"$%.]*/,a]]),["basic","cbm"]);
20 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-cbm.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2013 Peter Kofler
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | var a=null;
18 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^"(?:[^\n\r"\\]|\\.)*(?:"|$)/,a,'"'],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^REM[^\n\r]*/,a],["kwd",/^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/,a],["pln",/^[a-z][^\W_]?(?:\$|%)?/i,a],["lit",/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/i,a,"0123456789"],["pun",
19 | /^.[^\s\w"$%.]*/,a]]),["basic","cbm"]);
20 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-cl.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2008 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | var a=null;
18 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
19 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","lsp","scm","ss","rkt"]);
20 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-clj.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Google Inc.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | var a=null;
17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a],
18 | ["typ",/^:[\dA-Za-z-]+/]]),["clj"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-css.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2009 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n\u000c"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]+)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],
18 | ["com",/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}\b/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-dart.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2013 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"]],[["com",/^#!.*/],["kwd",/^\b(?:import|library|part of|part|as|show|hide)\b/i],["com",/^\/\/.*/],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["kwd",/^\b(?:class|interface)\b/i],["kwd",/^\b(?:assert|async|await|break|case|catch|continue|default|do|else|finally|for|if|in|is|new|return|super|switch|sync|this|throw|try|while)\b/i],["kwd",/^\b(?:abstract|const|extends|factory|final|get|implements|native|operator|set|static|typedef|var)\b/i],
18 | ["typ",/^\b(?:bool|double|dynamic|int|num|object|string|void)\b/i],["kwd",/^\b(?:false|null|true)\b/i],["str",/^r?'''[\S\s]*?[^\\]'''/],["str",/^r?"""[\S\s]*?[^\\]"""/],["str",/^r?'('|[^\n\f\r]*?[^\\]')/],["str",/^r?"("|[^\n\f\r]*?[^\\]")/],["typ",/^[A-Z]\w*/],["pln",/^[$_a-z]\w*/i],["pun",/^[!%&*+/:<-?^|~-]/],["lit",/^\b0x[\da-f]+/i],["lit",/^\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i],["lit",/^\b\.\d+(?:e[+-]?\d+)?/i],
19 | ["pun",/^[(),.;[\]{}]/]]),["dart"]);
20 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-el.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2008 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | var a=null;
18 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
19 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","lsp","scm","ss","rkt"]);
20 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-erl.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2013 Andrew Allen
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["lit",/^[a-z]\w*/],["lit",/^'(?:[^\n\f\r'\\]|\\[^&])+'?/,null,"'"],["lit",/^\?[^\t\n ({]+/,null,"?"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n]*/],["kwd",/^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\b/],
18 | ["kwd",/^-[_a-z]+/],["typ",/^[A-Z_]\w*/],["pun",/^[,.;]/]]),["erlang","erl"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-erlang.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2013 Andrew Allen
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["lit",/^[a-z]\w*/],["lit",/^'(?:[^\n\f\r'\\]|\\[^&])+'?/,null,"'"],["lit",/^\?[^\t\n ({]+/,null,"?"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n]*/],["kwd",/^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\b/],
18 | ["kwd",/^-[_a-z]+/],["typ",/^[A-Z_]\w*/],["pun",/^[,.;]/]]),["erlang","erl"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-fs.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2008 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xa0]+(?:[$_a-z][\w']*|``[^\t\n\r`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])(?:'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\(\*[\S\s]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
18 | ["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^(?:[_a-z][\w']*[!#?]?|``[^\t\n\r`]*(?:``|$))/i],["pun",/^[^\w\t\n\r "'\xa0]+/]]),["fs","ml"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-go.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2010 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["pln",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])+(?:'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\/\*[\S\s]*?\*\/)/],["pln",/^(?:[^"'/`]|\/(?![*/]))+/]]),["go"]);
18 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-hs.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2009 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/,
18 | null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-lasso.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^'(?:[^'\\]|\\[\S\s])*(?:'|$)/,a,"'"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"'],["str",/^`[^`]*(?:`|$)/,a,"`"],["lit",/^0x[\da-f]+|\d+/i,a,"0123456789"],["atn",/^#\d+|[#$][_a-z][\w.]*|#![\S ]+lasso9\b/i,a,"#$"]],[["tag",/^[[\]]|<\?(?:lasso(?:script)?|=)|\?>|noprocess\b|no_square_brackets\b/i],["com",/^\/\/[^\n\r]*|\/\*[\S\s]*?\*\//],["atn",
3 | /^-(?!infinity)[_a-z][\w.]*|\.\s*'[_a-z][\w.]*'/i],["lit",/^\d*\.\d+(?:e[+-]?\d+)?|infinity\b|nan\b/i],["atv",/^::\s*[_a-z][\w.]*/i],["lit",/^(?:true|false|none|minimal|full|all|void|and|or|not|bw|nbw|ew|new|cn|ncn|lt|lte|gt|gte|eq|neq|rx|nrx|ft)\b/i],["kwd",/^(?:error_code|error_msg|error_pop|error_push|error_reset|cache|database_names|database_schemanames|database_tablenames|define_tag|define_type|email_batch|encode_set|html_comment|handle|handle_error|header|if|inline|iterate|ljax_target|link|link_currentaction|link_currentgroup|link_currentrecord|link_detail|link_firstgroup|link_firstrecord|link_lastgroup|link_lastrecord|link_nextgroup|link_nextrecord|link_prevgroup|link_prevrecord|log|loop|namespace_using|output_none|portal|private|protect|records|referer|referrer|repeating|resultset|rows|search_args|search_arguments|select|sort_args|sort_arguments|thread_atomic|value_list|while|abort|case|else|if_empty|if_false|if_null|if_true|loop_abort|loop_continue|loop_count|params|params_up|return|return_value|run_children|soap_definetag|soap_lastrequest|soap_lastresponse|tag_name|ascending|average|by|define|descending|do|equals|frozen|group|handle_failure|import|in|into|join|let|match|max|min|on|order|parent|protected|provide|public|require|returnhome|skip|split_thread|sum|take|thread|to|trait|type|where|with|yield|yieldhome)\b/i],
4 | ["typ",/^(?:array|date|decimal|duration|integer|map|pair|string|tag|xml|null|boolean|bytes|keyword|list|locale|queue|set|stack|staticarray|local|var|variable|global|data|self|inherited|currentcapture|givenblock)\b|^\.\.?/i],["pln",/^[_a-z][\w.]*(?:=\s*(?=\())?/i],["pun",/^:=|[!%&*+/<-?\\|-]/]]),["lasso","ls","lassoscript"]);
5 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-lassoscript.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^'(?:[^'\\]|\\[\S\s])*(?:'|$)/,a,"'"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"'],["str",/^`[^`]*(?:`|$)/,a,"`"],["lit",/^0x[\da-f]+|\d+/i,a,"0123456789"],["atn",/^#\d+|[#$][_a-z][\w.]*|#![\S ]+lasso9\b/i,a,"#$"]],[["tag",/^[[\]]|<\?(?:lasso(?:script)?|=)|\?>|noprocess\b|no_square_brackets\b/i],["com",/^\/\/[^\n\r]*|\/\*[\S\s]*?\*\//],["atn",
3 | /^-(?!infinity)[_a-z][\w.]*|\.\s*'[_a-z][\w.]*'/i],["lit",/^\d*\.\d+(?:e[+-]?\d+)?|infinity\b|nan\b/i],["atv",/^::\s*[_a-z][\w.]*/i],["lit",/^(?:true|false|none|minimal|full|all|void|and|or|not|bw|nbw|ew|new|cn|ncn|lt|lte|gt|gte|eq|neq|rx|nrx|ft)\b/i],["kwd",/^(?:error_code|error_msg|error_pop|error_push|error_reset|cache|database_names|database_schemanames|database_tablenames|define_tag|define_type|email_batch|encode_set|html_comment|handle|handle_error|header|if|inline|iterate|ljax_target|link|link_currentaction|link_currentgroup|link_currentrecord|link_detail|link_firstgroup|link_firstrecord|link_lastgroup|link_lastrecord|link_nextgroup|link_nextrecord|link_prevgroup|link_prevrecord|log|loop|namespace_using|output_none|portal|private|protect|records|referer|referrer|repeating|resultset|rows|search_args|search_arguments|select|sort_args|sort_arguments|thread_atomic|value_list|while|abort|case|else|if_empty|if_false|if_null|if_true|loop_abort|loop_continue|loop_count|params|params_up|return|return_value|run_children|soap_definetag|soap_lastrequest|soap_lastresponse|tag_name|ascending|average|by|define|descending|do|equals|frozen|group|handle_failure|import|in|into|join|let|match|max|min|on|order|parent|protected|provide|public|require|returnhome|skip|split_thread|sum|take|thread|to|trait|type|where|with|yield|yieldhome)\b/i],
4 | ["typ",/^(?:array|date|decimal|duration|integer|map|pair|string|tag|xml|null|boolean|bytes|keyword|list|locale|queue|set|stack|staticarray|local|var|variable|global|data|self|inherited|currentcapture|givenblock)\b|^\.\.?/i],["pln",/^[_a-z][\w.]*(?:=\s*(?=\())?/i],["pun",/^:=|[!%&*+/<-?\\|-]/]]),["lasso","ls","lassoscript"]);
5 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-latex.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2011 Martin S.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]);
18 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-lgt.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2014 Paulo Moura
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["lit",/^[a-z]\w*/],["lit",/^'(?:[^\n\f\r'\\]|\\[^&])+'?/,null,"'"],["lit",/^(?:0'.|0b[01]+|0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n\r]*/,null,"%"],["com",/^\/\*[\S\s]*?\*\//],["kwd",/^\s*:-\s(c(a(lls|tegory)|oinductive)|p(ublic|r(ot(ocol|ected)|ivate))|e(l(if|se)|n(coding|sure_loaded)|xport)|i(f|n(clude|itialization|fo))|alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|od(e|ule)|ultifile)|reexport|s(et_(logtalk|prolog)_flag|ynchronized)|o(bject|p)|use(s|_module))/],
18 | ["kwd",/^\s*:-\s(e(lse|nd(if|_(category|object|protocol)))|built_in|dynamic|synchronized|threaded)/],["typ",/^[A-Z_]\w*/],["pun",/^[!#*-/:-?\\^{}]/]]),["logtalk","lgt"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-lisp.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2008 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | var a=null;
18 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
19 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","lsp","scm","ss","rkt"]);
20 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-ll.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2013 Nikhil Dabas
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^!?"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["com",/^;[^\n\r]*/,null,";"]],[["pln",/^[!%@](?:[$\-.A-Z_a-z][\w$\-.]*|\d+)/],["kwd",/^[^\W\d]\w*/,null],["lit",/^\d+\.\d+/],["lit",/^(?:\d+|0[Xx][\dA-Fa-f]+)/],["pun",/^[(-*,:<->[\]{}]|\.\.\.$/]]),["llvm","ll"]);
18 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-llvm.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2013 Nikhil Dabas
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^!?"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["com",/^;[^\n\r]*/,null,";"]],[["pln",/^[!%@](?:[$\-.A-Z_a-z][\w$\-.]*|\d+)/],["kwd",/^[^\W\d]\w*/,null],["lit",/^\d+\.\d+/],["lit",/^(?:\d+|0[Xx][\dA-Fa-f]+)/],["pun",/^[(-*,:<->[\]{}]|\.\.\.$/]]),["llvm","ll"]);
18 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-logtalk.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2014 Paulo Moura
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["lit",/^[a-z]\w*/],["lit",/^'(?:[^\n\f\r'\\]|\\[^&])+'?/,null,"'"],["lit",/^(?:0'.|0b[01]+|0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n\r]*/,null,"%"],["com",/^\/\*[\S\s]*?\*\//],["kwd",/^\s*:-\s(c(a(lls|tegory)|oinductive)|p(ublic|r(ot(ocol|ected)|ivate))|e(l(if|se)|n(coding|sure_loaded)|xport)|i(f|n(clude|itialization|fo))|alias|d(ynamic|iscontiguous)|m(eta_(non_terminal|predicate)|od(e|ule)|ultifile)|reexport|s(et_(logtalk|prolog)_flag|ynchronized)|o(bject|p)|use(s|_module))/],
18 | ["kwd",/^\s*:-\s(e(lse|nd(if|_(category|object|protocol)))|built_in|dynamic|synchronized|threaded)/],["typ",/^[A-Z_]\w*/],["pun",/^[!#*-/:-?\\^{}]/]]),["logtalk","lgt"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-ls.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^'(?:[^'\\]|\\[\S\s])*(?:'|$)/,a,"'"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"'],["str",/^`[^`]*(?:`|$)/,a,"`"],["lit",/^0x[\da-f]+|\d+/i,a,"0123456789"],["atn",/^#\d+|[#$][_a-z][\w.]*|#![\S ]+lasso9\b/i,a,"#$"]],[["tag",/^[[\]]|<\?(?:lasso(?:script)?|=)|\?>|noprocess\b|no_square_brackets\b/i],["com",/^\/\/[^\n\r]*|\/\*[\S\s]*?\*\//],["atn",
3 | /^-(?!infinity)[_a-z][\w.]*|\.\s*'[_a-z][\w.]*'/i],["lit",/^\d*\.\d+(?:e[+-]?\d+)?|infinity\b|nan\b/i],["atv",/^::\s*[_a-z][\w.]*/i],["lit",/^(?:true|false|none|minimal|full|all|void|and|or|not|bw|nbw|ew|new|cn|ncn|lt|lte|gt|gte|eq|neq|rx|nrx|ft)\b/i],["kwd",/^(?:error_code|error_msg|error_pop|error_push|error_reset|cache|database_names|database_schemanames|database_tablenames|define_tag|define_type|email_batch|encode_set|html_comment|handle|handle_error|header|if|inline|iterate|ljax_target|link|link_currentaction|link_currentgroup|link_currentrecord|link_detail|link_firstgroup|link_firstrecord|link_lastgroup|link_lastrecord|link_nextgroup|link_nextrecord|link_prevgroup|link_prevrecord|log|loop|namespace_using|output_none|portal|private|protect|records|referer|referrer|repeating|resultset|rows|search_args|search_arguments|select|sort_args|sort_arguments|thread_atomic|value_list|while|abort|case|else|if_empty|if_false|if_null|if_true|loop_abort|loop_continue|loop_count|params|params_up|return|return_value|run_children|soap_definetag|soap_lastrequest|soap_lastresponse|tag_name|ascending|average|by|define|descending|do|equals|frozen|group|handle_failure|import|in|into|join|let|match|max|min|on|order|parent|protected|provide|public|require|returnhome|skip|split_thread|sum|take|thread|to|trait|type|where|with|yield|yieldhome)\b/i],
4 | ["typ",/^(?:array|date|decimal|duration|integer|map|pair|string|tag|xml|null|boolean|bytes|keyword|list|locale|queue|set|stack|staticarray|local|var|variable|global|data|self|inherited|currentcapture|givenblock)\b|^\.\.?/i],["pln",/^[_a-z][\w.]*(?:=\s*(?=\())?/i],["pun",/^:=|[!%&*+/<-?\\|-]/]]),["lasso","ls","lassoscript"]);
5 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-lsp.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2008 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | var a=null;
18 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
19 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","lsp","scm","ss","rkt"]);
20 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-lua.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2008 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\S\s]*?(?:]\1]|$)|[^\n\r]*)/],["str",/^\[(=*)\[[\S\s]*?(?:]\1]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],
18 | ["pln",/^[_a-z]\w*/i],["pun",/^[^\w\t\n\r \xa0][^\w\t\n\r "'+=\xa0-]*/]]),["lua"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-ml.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2008 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xa0]+(?:[$_a-z][\w']*|``[^\t\n\r`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])(?:'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\(\*[\S\s]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
18 | ["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^(?:[_a-z][\w']*[!#?]?|``[^\t\n\r`]*(?:``|$))/i],["pun",/^[^\w\t\n\r "'\xa0]+/]]),["fs","ml"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-mumps.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2011 Kitware Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"]|\\.)*"/,null,'"']],[["com",/^;[^\n\r]*/,null,";"],["dec",/^\$(?:d|device|ec|ecode|es|estack|et|etrap|h|horolog|i|io|j|job|k|key|p|principal|q|quit|st|stack|s|storage|sy|system|t|test|tl|tlevel|tr|trestart|x|y|z[a-z]*|a|ascii|c|char|d|data|e|extract|f|find|fn|fnumber|g|get|j|justify|l|length|na|name|o|order|p|piece|ql|qlength|qs|qsubscript|q|query|r|random|re|reverse|s|select|st|stack|t|text|tr|translate|nan)\b/i,
18 | null],["kwd",/^(?:[^$]b|break|c|close|d|do|e|else|f|for|g|goto|h|halt|h|hang|i|if|j|job|k|kill|l|lock|m|merge|n|new|o|open|q|quit|r|read|s|set|tc|tcommit|tre|trestart|tro|trollback|ts|tstart|u|use|v|view|w|write|x|xecute)\b/i,null],["lit",/^[+-]?(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?/i],["pln",/^[a-z][^\W_]*/i],["pun",/^[^\w\t\n\r"$%;^\xa0]|_/]]),["mumps"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-n.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2011 Zimin A.V.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | var a=null;
18 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/,
19 | a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/,
20 | a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]);
21 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-nemerle.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2011 Zimin A.V.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | var a=null;
18 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/,
19 | a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/,
20 | a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]);
21 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-pascal.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2013 Peter Kofler
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | var a=null;
18 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^'(?:[^\n\r'\\]|\\.)*(?:'|$)/,a,"'"],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^\(\*[\S\s]*?(?:\*\)|$)|^{[\S\s]*?(?:}|$)/,a],["kwd",/^(?:absolute|and|array|asm|assembler|begin|case|const|constructor|destructor|div|do|downto|else|end|external|for|forward|function|goto|if|implementation|in|inline|interface|interrupt|label|mod|not|object|of|or|packed|procedure|program|record|repeat|set|shl|shr|then|to|type|unit|until|uses|var|virtual|while|with|xor)\b/i,a],
19 | ["lit",/^(?:true|false|self|nil)/i,a],["pln",/^[a-z][^\W_]*/i,a],["lit",/^(?:\$[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)/i,a,"0123456789"],["pun",/^.[^\s\w$'./@]*/,a]]),["pascal"]);
20 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-proto.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2006 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]);
18 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-r.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2012 Jeffrey B. Arnold
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^'\\]|\\[\S\s])*(?:'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![\w.])/],["lit",/^0[Xx][\dA-Fa-f]+([Pp]\d+)?[Li]?/],["lit",/^[+-]?(\d+(\.\d+)?|\.\d+)([Ee][+-]?\d+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|\d+))(?![\w.])/],
18 | ["pun",/^(?:<-|->>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|[!*+/^]|%.*?%|[$=@~]|:{1,3}|[(),;?[\]{}])/],["pln",/^(?:[A-Za-z]+[\w.]*|\.[^\W\d][\w.]*)(?![\w.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-rd.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2012 Jeffrey Arnold
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\n\r]*/,null,"%"]],[["lit",/^\\(?:cr|l?dots|R|tab)\b/],["kwd",/^\\[@-Za-z]+/],["kwd",/^#(?:ifn?def|endif)/],["pln",/^\\[{}]/],["pun",/^[()[\]{}]+/]]),["Rd","rd"]);
18 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-rkt.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2008 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | var a=null;
18 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
19 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","lsp","scm","ss","rkt"]);
20 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-rust.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2015 Chris Morgan
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([],[["pln",/^[\t\n\r \xa0]+/],["com",/^\/\/.*/],["com",/^\/\*[\S\s]*?(?:\*\/|$)/],["str",/^b"(?:[^\\]|\\(?:.|x[\dA-Fa-f]{2}))*?"/],["str",/^"(?:[^\\]|\\(?:.|x[\dA-Fa-f]{2}|u{\[\da-fA-F]{1,6}}))*?"/],["str",/^b?r(#*)"[\S\s]*?"\1/],["str",/^b'([^\\]|\\(.|x[\dA-Fa-f]{2}))'/],["str",/^'([^\\]|\\(.|x[\dA-Fa-f]{2}|u{[\dA-Fa-f]{1,6}}))'/],["tag",/^'\w+?\b/],["kwd",/^(?:match|if|else|as|break|box|continue|extern|fn|for|in|if|impl|let|loop|pub|return|super|unsafe|where|while|use|mod|trait|struct|enum|type|move|mut|ref|static|const|crate)\b/],
18 | ["kwd",/^(?:alignof|become|do|offsetof|priv|pure|sizeof|typeof|unsized|yield|abstract|virtual|final|override|macro)\b/],["typ",/^(?:[iu](8|16|32|64|size)|char|bool|f32|f64|str|Self)\b/],["typ",/^(?:Copy|Send|Sized|Sync|Drop|Fn|FnMut|FnOnce|Box|ToOwned|Clone|PartialEq|PartialOrd|Eq|Ord|AsRef|AsMut|Into|From|Default|Iterator|Extend|IntoIterator|DoubleEndedIterator|ExactSizeIterator|Option|Some|None|Result|Ok|Err|SliceConcatExt|String|ToString|Vec)\b/],["lit",/^(self|true|false|null)\b/],
19 | ["lit",/^\d[\d_]*(?:[iu](?:size|8|16|32|64))?/],["lit",/^0x[\dA-F_a-f]+(?:[iu](?:size|8|16|32|64))?/],["lit",/^0o[0-7_]+(?:[iu](?:size|8|16|32|64))?/],["lit",/^0b[01_]+(?:[iu](?:size|8|16|32|64))?/],["lit",/^\d[\d_]*\.(?![^\s\d.])/],["lit",/^\d[\d_]*\.\d[\d_]*(?:[Ee][+-]?[\d_]+)?(?:f32|f64)?/],["lit",/^\d[\d_]*(?:\.\d[\d_]*)?[Ee][+-]?[\d_]+(?:f32|f64)?/],["lit",/^\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee][+-]?[\d_]+)?(?:f32|f64)/],["atn",
20 | /^[_a-z]\w*!/i],["pln",/^[_a-z]\w*/i],["atv",/^#!?\[[\S\s]*?]/],["pun",/^[!%&(-/:-?[\]^{-}]/],["pln",/./]]),["rust"]);
21 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-s.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2012 Jeffrey B. Arnold
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^'\\]|\\[\S\s])*(?:'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![\w.])/],["lit",/^0[Xx][\dA-Fa-f]+([Pp]\d+)?[Li]?/],["lit",/^[+-]?(\d+(\.\d+)?|\.\d+)([Ee][+-]?\d+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|\d+))(?![\w.])/],
18 | ["pun",/^(?:<-|->>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|[!*+/^]|%.*?%|[$=@~]|:{1,3}|[(),;?[\]{}])/],["pln",/^(?:[A-Za-z]+[\w.]*|\.[^\W\d][\w.]*)(?![\w.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-scala.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2010 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:""(?:""?(?!")|[^"\\]|\\.)*"{0,3}|(?:[^\n\r"\\]|\\.)*"?)/,null,'"'],["lit",/^`(?:[^\n\r\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&(--:-@[-^{-~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\n\r'\\]|\\(?:'|[^\n\r']+))'/],["lit",/^'[$A-Z_a-z][\w$]*(?![\w$'])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
18 | ["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:0(?:[0-7]+|x[\da-f]+)l?|(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:e[+-]?\d+)?f?|l?)|\\.\d+(?:e[+-]?\d+)?f?)/i],["typ",/^[$_]*[A-Z][\d$A-Z_]*[a-z][\w$]*/],["pln",/^[$A-Z_a-z][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-scm.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2008 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | var a=null;
18 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
19 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","lsp","scm","ss","rkt"]);
20 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-sql.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2008 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\n\r]*|\/\*[\S\s]*?(?:\*\/|$))/],["kwd",/^(?:add|all|alter|and|any|apply|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|connect|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|following|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|matched|merge|natural|national|nocheck|nonclustered|nocycle|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|partition|percent|pivot|plan|preceding|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rows?|rule|save|schema|select|session_user|set|setuser|shutdown|some|start|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|unbounded|union|unique|unpivot|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|within|writetext|xml)(?=[^\w-]|$)/i,
18 | null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^[_a-z][\w-]*/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'+\xa0-]*/]]),["sql"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-ss.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2008 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | var a=null;
18 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
19 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","lsp","scm","ss","rkt"]);
20 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-swift.js:
--------------------------------------------------------------------------------
1 | var a=null;
2 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\0\t-\r ]+/,a," \n\r\t\u000b\u000c\0"],["str",/^"(?:[^"\\]|\\.|\\\((?:[^")\\]|\\.)*\))*"/,a,'"']],[["lit",/^(?:0x[\dA-Fa-f][\dA-F_a-f]*\.[\dA-Fa-f][\dA-F_a-f]*[Pp]?|\d[\d_]*\.\d[\d_]*[Ee]?)[+-]?\d[\d_]*/,a],["lit",/^-?(?:0(?:b[01][01_]*|o[0-7][0-7_]*|x[\dA-Fa-f][\dA-F_a-f]*)|\d[\d_]*)/,a],["lit",/^(?:true|false|nil)\b/,a],["kwd",/^\b(?:__COLUMN__|__FILE__|__FUNCTION__|__LINE__|#available|#else|#elseif|#endif|#if|#line|arch|arm|arm64|associativity|as|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|dynamicType|else|enum|fallthrough|final|for|func|get|import|indirect|infix|init|inout|internal|i386|if|in|iOS|iOSApplicationExtension|is|lazy|left|let|mutating|none|nonmutating|operator|optional|OSX|OSXApplicationExtension|override|postfix|precedence|prefix|private|protocol|Protocol|public|required|rethrows|return|right|safe|self|set|static|struct|subscript|super|switch|throw|try|Type|typealias|unowned|unsafe|var|weak|watchOS|while|willSet|x86_64)\b/,a],
3 | ["com",/^\/\/.*?[\n\r]/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/,a],["pun",/^<<=|<=|<<|>>=|>=|>>|===|==|\.\.\.|&&=|\.\.<|!==|!=|&=|~=|[#(),.:;@[\]{}~]|\|\|=|\?\?|\|\||&&|&\*|&\+|&-|&=|\+=|-=|\/=|\*=|\^=|%=|\|=|->|`|==|\+\+|--|[!%&*+/<-?^_|-]/,a],["typ",/^\b(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,a]]),["swift"]);
4 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-tcl.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2012 Pyrios
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | var a=null;
18 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^{+/,a,"{"],["clo",/^}+/,a,"}"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:after|append|apply|array|break|case|catch|continue|error|eval|exec|exit|expr|for|foreach|if|incr|info|proc|return|set|switch|trace|uplevel|upvar|while)\b/,a],["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",
19 | /^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["tcl"]);
20 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-tex.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2011 Martin S.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]);
18 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-vb.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2009 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})*(?:["\u201c\u201d]|$))/i,null,'"\u201c\u201d'],["com",/^['\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\n\r_\u2028\u2029])*/,null,"'\u2018\u2019"]],[["kwd",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\b/i,
18 | null],["com",/^rem\b.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*(?:\[[!#%&@]+])?|\[(?:[a-z]|_\w)\w*])/i],["pun",/^[^\w\t\n\r "'[\]\xa0\u2018\u2019\u201c\u201d\u2028\u2029]+/],["pun",/^(?:\[|])/]]),["vb","vbs"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-vbs.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2009 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})*(?:["\u201c\u201d]|$))/i,null,'"\u201c\u201d'],["com",/^['\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\n\r_\u2028\u2029])*/,null,"'\u2018\u2019"]],[["kwd",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\b/i,
18 | null],["com",/^rem\b.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*(?:\[[!#%&@]+])?|\[(?:[a-z]|_\w)\w*])/i],["pun",/^[^\w\t\n\r "'[\]\xa0\u2018\u2019\u201c\u201d\u2028\u2029]+/],["pun",/^(?:\[|])/]]),["vb","vbs"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-vhd.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2010 benoit@ryder.fr
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[box]?"(?:[^"]|"")*"|'.')/i],["com",/^--[^\n\r]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i,
18 | null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w.\\]+#(?:[+-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:e[+-]?\d+(?:_\d+)*)?)/i],
19 | ["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'\xa0-]*/]]),["vhdl","vhd"]);
20 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-vhdl.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2010 benoit@ryder.fr
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[box]?"(?:[^"]|"")*"|'.')/i],["com",/^--[^\n\r]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i,
18 | null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w.\\]+#(?:[+-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:e[+-]?\d+(?:_\d+)*)?)/i],
19 | ["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'\xa0-]*/]]),["vhdl","vhd"]);
20 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-wiki.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2009 Google Inc.
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\d\t a-gi-z\xa0]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[*=[\]^~]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^[A-Z][a-z][\da-z]+[A-Z][a-z][^\W_]+\b/],["lang-",/^{{{([\S\s]+?)}}}/],["lang-",/^`([^\n\r`]+)`/],["str",/^https?:\/\/[^\s#/?]*(?:\/[^\s#?]*)?(?:\?[^\s#]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\S\s])[^\n\r#*=A-[^`h{~]*/]]),["wiki"]);
18 | PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-yaml.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2015 ribrdb @ code.google.com
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | var a=null;
18 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^[\w-]+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/lang-yml.js:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright (C) 2015 ribrdb @ code.google.com
4 |
5 | Licensed under the Apache License, Version 2.0 (the "License");
6 | you may not use this file except in compliance with the License.
7 | You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | */
17 | var a=null;
18 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^[\w-]+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]);
19 |
--------------------------------------------------------------------------------
/docs/google-code-prettify/prettify.css:
--------------------------------------------------------------------------------
1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
--------------------------------------------------------------------------------
/docs/img/circle-drawing.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmeiners/why-train-when-you-can-optimize/e06e036a2e09f08e29ecab60ed4e24c7286544f1/docs/img/circle-drawing.gif
--------------------------------------------------------------------------------
/docs/img/circle-fail.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmeiners/why-train-when-you-can-optimize/e06e036a2e09f08e29ecab60ed4e24c7286544f1/docs/img/circle-fail.gif
--------------------------------------------------------------------------------
/docs/img/function-3d-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmeiners/why-train-when-you-can-optimize/e06e036a2e09f08e29ecab60ed4e24c7286544f1/docs/img/function-3d-1.png
--------------------------------------------------------------------------------
/docs/img/function-extrema.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmeiners/why-train-when-you-can-optimize/e06e036a2e09f08e29ecab60ed4e24c7286544f1/docs/img/function-extrema.png
--------------------------------------------------------------------------------
/docs/img/function-not-continuous.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmeiners/why-train-when-you-can-optimize/e06e036a2e09f08e29ecab60ed4e24c7286544f1/docs/img/function-not-continuous.png
--------------------------------------------------------------------------------
/docs/img/inverse-transform.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmeiners/why-train-when-you-can-optimize/e06e036a2e09f08e29ecab60ed4e24c7286544f1/docs/img/inverse-transform.png
--------------------------------------------------------------------------------
/docs/img/ipad-notes.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmeiners/why-train-when-you-can-optimize/e06e036a2e09f08e29ecab60ed4e24c7286544f1/docs/img/ipad-notes.gif
--------------------------------------------------------------------------------
/docs/img/line-drawing.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmeiners/why-train-when-you-can-optimize/e06e036a2e09f08e29ecab60ed4e24c7286544f1/docs/img/line-drawing.gif
--------------------------------------------------------------------------------
/docs/img/rect-drawing.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmeiners/why-train-when-you-can-optimize/e06e036a2e09f08e29ecab60ed4e24c7286544f1/docs/img/rect-drawing.gif
--------------------------------------------------------------------------------
/docs/img/rect-model.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmeiners/why-train-when-you-can-optimize/e06e036a2e09f08e29ecab60ed4e24c7286544f1/docs/img/rect-model.png
--------------------------------------------------------------------------------
/docs/img/stroke.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/justinmeiners/why-train-when-you-can-optimize/e06e036a2e09f08e29ecab60ed4e24c7286544f1/docs/img/stroke.png
--------------------------------------------------------------------------------
/docs/katex/README.md:
--------------------------------------------------------------------------------
1 | # [](https://katex.org/)
2 | [](https://www.npmjs.com/package/katex)
3 | [](https://github.com/semantic-release/semantic-release)
4 | [](https://github.com/KaTeX/KaTeX/actions?query=workflow%3ACI)
5 | [](https://codecov.io/gh/KaTeX/KaTeX)
6 | [](https://github.com/KaTeX/KaTeX/discussions)
7 | [](https://www.jsdelivr.com/package/npm/katex)
8 | 
9 | [](https://gitpod.io/#https://github.com/KaTeX/KaTeX)
10 | [](https://opencollective.com/katex)
11 |
12 | KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web.
13 |
14 | * **Fast:** KaTeX renders its math synchronously and doesn't need to reflow the page. See how it compares to a competitor in [this speed test](http://www.intmath.com/cg5/katex-mathjax-comparison.php).
15 | * **Print quality:** KaTeX's layout is based on Donald Knuth's TeX, the gold standard for math typesetting.
16 | * **Self contained:** KaTeX has no dependencies and can easily be bundled with your website resources.
17 | * **Server side rendering:** KaTeX produces the same output regardless of browser or environment, so you can pre-render expressions using Node.js and send them as plain HTML.
18 |
19 | KaTeX is compatible with all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 11.
20 |
21 | KaTeX supports much (but not all) of LaTeX and many LaTeX packages. See the [list of supported functions](https://katex.org/docs/supported.html).
22 |
23 | Try out KaTeX [on the demo page](https://katex.org/#demo)!
24 |
25 | ## Getting started
26 |
27 | ### Starter template
28 |
29 | ```html
30 |
31 |
32 |
33 |
9 | Back to article 10 |
11 | 12 | 13 |14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/src/math.js: -------------------------------------------------------------------------------- 1 | // Created by Justin Meiners (2022) 2 | // License: MIT 3 | "use strict"; 4 | 5 | function lerp(a, b, t) { 6 | return (1 - t) * a + t * b; 7 | }; 8 | 9 | function clamp(low, high, t) { 10 | if (t < low) { 11 | return low; 12 | } else if (t > high) { 13 | return high; 14 | } else { 15 | return t; 16 | } 17 | }; 18 | function Vec(x, y) { 19 | this.x = x; 20 | this.y = y; 21 | }; 22 | 23 | Vec.fromAngle = function(angle) { 24 | return new Vec(Math.cos(angle), Math.sin(angle)); 25 | }; 26 | 27 | Vec.zero = function() { 28 | return new Vec(0, 0); 29 | }; 30 | 31 | Vec.prototype.copy = function() { 32 | return new Vec(this.x, this.y); 33 | }; 34 | 35 | Vec.prototype.dot = function(b) { 36 | return this.x * b.x + this.y * b.y; 37 | }; 38 | 39 | Vec.prototype.lenSqr = function() { 40 | return this.dot(this); 41 | }; 42 | 43 | Vec.prototype.len = function() { 44 | return Math.sqrt(this.lenSqr()); 45 | }; 46 | 47 | Vec.prototype.orthogonal = function() { 48 | return new Vec(-this.y, this.x); 49 | }; 50 | 51 | Vec.prototype.add = function(b) { 52 | this.x += b.x; 53 | this.y += b.y; 54 | return this; 55 | }; 56 | 57 | Vec.prototype.negate = function() { 58 | this.x = -this.x; 59 | this.y = -this.y; 60 | return this; 61 | }; 62 | 63 | Vec.prototype.sub = function(b) { 64 | this.x -= b.x; 65 | this.y -= b.y; 66 | return this; 67 | }; 68 | 69 | Vec.prototype.normalized = function() { 70 | return Vec.scale(this, 1 / this.len()); 71 | }; 72 | 73 | Vec.add = function(a, b) { 74 | return a.copy().add(b); 75 | }; 76 | 77 | Vec.sub = function(a, b) { 78 | return a.copy().sub(b); 79 | }; 80 | 81 | Vec.scale = function(a, s) { 82 | return new Vec(a.x * s, a.y * s); 83 | }; 84 | 85 | Vec.distSqr = function(a, b) { 86 | return Vec.sub(a, b).lenSqr(); 87 | }; 88 | 89 | Vec.dist = function(a, b) { 90 | return Math.sqrt(Vec.distSqr(a, b)); 91 | }; 92 | 93 | Vec.negate = function(v) { 94 | return v.copy().negate(); 95 | }; 96 | 97 | Vec.min = function(a, b) { 98 | return new Vec(Math.min(a.x, b.x), Math.min(a.y, b.y)); 99 | }; 100 | 101 | Vec.max = function(a, b) { 102 | return new Vec(Math.max(a.x, b.x), Math.max(a.y, b.y)); 103 | }; 104 | 105 | Vec.prototype.inBounds = function(min, max) { 106 | return this.x >= min.x && this.y >= min.y && 107 | this.x <= max.x && this.y <= max.y; 108 | }; 109 | 110 | Vec.prototype.inCircle = function(o, r) { 111 | return Vec.distSqr(this, o) < r * r; 112 | }; 113 | 114 | Vec.lerp = function(a, b, t) { 115 | return new Vec(lerp(a.x, b.x, t), lerp(a.y, b.y, t)); 116 | }; 117 | 118 | Vec.centroid = function(points) { 119 | var sum = points.reduce(function(acc, x) { 120 | return Vec.add(acc, x); 121 | }); 122 | 123 | return Vec.scale(sum, 1 / points.length); 124 | }; 125 | 126 | Vec.pathLen = function(path) { 127 | var sum = 0; 128 | for (var i = 1; i < path.length; ++i) { 129 | sum += Vec.dist(path[i], path[i-1]); 130 | } 131 | return sum; 132 | }; 133 | 134 | Vec.bounds = function(points) { 135 | return [points.reduce(Vec.min), points.reduce(Vec.max)]; 136 | }; 137 | function Matrix() { 138 | this.m = new Float64Array(2 * 2); 139 | }; 140 | 141 | Matrix.from = function(a, b, c, d) { 142 | var A = new Matrix(); 143 | A.m[0] = a; A.m[1] = b; 144 | A.m[2] = c; A.m[3] = d; 145 | return A; 146 | }; 147 | 148 | Matrix.fromScale = function(sx, sy) { 149 | return Matrix.from(sx, 0, 0, sy); 150 | }; 151 | 152 | Matrix.fromAngle = function(angle) { 153 | var x = Math.cos(angle); 154 | var y = Math.sin(angle); 155 | return Matrix.from(x, -y, y, x); 156 | }; 157 | 158 | Matrix.prototype.index = function(row, col) { 159 | return row * 2 + col; 160 | }; 161 | 162 | Matrix.prototype.get = function(row, col) { 163 | return this.m[this.index(row, col)]; 164 | }; 165 | 166 | Matrix.prototype.set = function(row, col, x) { 167 | this.m[this.index(row, col)] = x; 168 | }; 169 | 170 | Matrix.prototype.transform = function(v) { 171 | return new Vec( 172 | this.m[0] * v.x + this.m[1] * v.y, 173 | this.m[2] * v.x + this.m[3] * v.y 174 | ); 175 | }; 176 | 177 | Matrix.prototype.add = function(other) { 178 | for (var i = 0; i < 4; ++i) { 179 | this.m[i] += other.m[i]; 180 | }; 181 | return this; 182 | }; 183 | 184 | Matrix.prototype.scale = function(scale) { 185 | for (var i = 0; i < 4; ++i) { 186 | this.m[i] *= scale; 187 | }; 188 | return this; 189 | }; 190 | 191 | Matrix.mul = function(A, B) { 192 | return Matrix.from( 193 | A.m[0] * B.m[0] + A.m[1] * B.m[2], 194 | A.m[0] * B.m[1] + A.m[1] * B.m[3], 195 | A.m[2] * B.m[0] + A.m[3] * B.m[2], 196 | A.m[2] * B.m[1] + A.m[3] * B.m[3] 197 | ); 198 | }; 199 | 200 | Matrix.prototype.det = function() { 201 | return this.m[0] * this.m[3] - this.m[1] * this.m[2]; 202 | }; 203 | 204 | Matrix.inverse = function(A) { 205 | var s = 1.0 / A.det(); 206 | return Matrix.from(A.m[3], -A.m[1], -A.m[2], A.m[0]).scale(s); 207 | }; 208 | 209 | Matrix.prototype.copy = function() { 210 | var copy = new Matrix(); 211 | copy.m.set(this.m); 212 | return copy; 213 | }; 214 | function AffineTransform() { 215 | this.m = Matrix.from(1, 0, 0, 1); 216 | this.t = new Vec(0, 0); 217 | }; 218 | 219 | AffineTransform.prototype.transform = function(v) { 220 | return this.m.transform(v).add(this.t); 221 | }; 222 | 223 | AffineTransform.inverse = function(a) { 224 | var b = new AffineTransform(); 225 | b.m = Matrix.inverse(a.m); 226 | b.t = b.m.transform( a.t.copy().negate()); 227 | return b; 228 | }; 229 | 230 | function makeAckley(a, b, c) { 231 | return function(vars) { 232 | var sumSquares = vars.reduce(function(total, x) { 233 | return total + x * x; 234 | }, 0); 235 | 236 | var sumCos = vars.reduce(function(total, x) { 237 | return total + Math.cos(x * c); 238 | }, 0); 239 | 240 | var n = vars.length; 241 | return -a * Math.exp(-b * Math.sqrt(sumSquares / n)) - Math.exp(sumCos / n) + a + Math.exp(1); 242 | }; 243 | }; 244 | 245 | function testOptimizer() { 246 | var f = makeAckley(20.0, 0.2, 2.0 * Math.PI); 247 | 248 | var options = { 249 | debug: true, 250 | maxIterations: 100, 251 | tolerance: 0.001 252 | }; 253 | 254 | console.log(multivarOptimize([-2.1, -3.04, 4.5], f, options)); 255 | }; 256 | 257 | function multivarOptimize(initial, costFunc, options) { 258 | var maxIterations = options.maxIterations || 10000; 259 | var tolerance = options.tolerance || 0.001; 260 | 261 | function predicate(iterations, image) { 262 | return iterations > maxIterations || image < tolerance; 263 | }; 264 | 265 | var n = initial.length; 266 | 267 | function guessSizes(initial) { 268 | var sizes = new Float64Array(n); 269 | for (var j = 0; j < n; ++j) { 270 | sizes[j] = (0.05 * Math.abs(initial[j])) + 0.00025; 271 | } 272 | return sizes; 273 | }; 274 | 275 | var simplex = new Simplex(n); 276 | simplex.positionAround(initial, guessSizes(initial)); 277 | return simplex.optimize(costFunc, predicate, options); 278 | }; 279 | 280 | function Simplex(n) { 281 | this.dimension = n; 282 | this.vertices = []; 283 | for (var i = 0; i < (n + 1); ++i) { 284 | this.vertices.push(new SimplexVertex(n)); 285 | } 286 | }; 287 | 288 | function SimplexVertex(n) { 289 | this.point = new Float64Array(n); 290 | this.image = 0; 291 | }; 292 | 293 | SimplexVertex.prototype.copyFrom = function(other) { 294 | this.point.set(other.point); 295 | this.image = other.image; 296 | }; 297 | 298 | SimplexVertex.prototype.swapWith = function(other) { 299 | var ptemp = this.point; 300 | var itemp = this.image; 301 | 302 | this.point = other.point; 303 | this.image = other.image; 304 | other.point = ptemp; 305 | other.image = itemp; 306 | }; 307 | 308 | Simplex.prototype.positionAround = function(point, sizes) { 309 | var n = this.dimension; 310 | for (var i = 0; i < (n + 1); ++i) { 311 | for (var j = 0; j < n; ++j) { 312 | this.vertices[i].point[j] = point[j] + ((i - 1 == j) ? sizes[j] : 0.0); 313 | } 314 | } 315 | }; 316 | 317 | Simplex.prototype.sort = function() { 318 | this.vertices.sort(function(a, b) { 319 | return a.image - b.image; 320 | }); 321 | }; 322 | 323 | Simplex.prototype.getCentroid = function(output) { 324 | var n = this.dimension; 325 | // last point is not included 326 | for (var j = 0; j < n; ++j) { 327 | var x = this.vertices[0].point[j]; 328 | for (var i = 1; i < n; ++i) { 329 | x += this.vertices[i].point[j]; 330 | } 331 | output.point[j] = x / n; 332 | } 333 | }; 334 | 335 | Simplex.prototype.getNewPoint = function(centroid, lambda, output) { 336 | var n = this.dimension; 337 | for (var j = 0; j < n; ++j) { 338 | output.point[j] = (1.0 + lambda) * centroid.point[j] - lambda * this.vertices[n].point[j]; 339 | }; 340 | }; 341 | 342 | Simplex.prototype.shrink = function(sigma) { 343 | var n = this.dimension; 344 | for (var i = 1; i < (n + 1); ++i) { 345 | for (var j = 0; j < n; ++j) { 346 | var x = this.vertices[0].point[j]; 347 | this.vertices[i].point[j] = x + sigma * (this.vertices[i].point[j] - x); 348 | } 349 | } 350 | }; 351 | 352 | Simplex.prototype.computeVertexImages = function(costFunc) { 353 | for (var i = 0; i < (this.dimension + 1); ++i) { 354 | this.vertices[i].image = costFunc(this.vertices[i].point); 355 | } 356 | this.sort(); 357 | }; 358 | 359 | Simplex.prototype.optimize = function(costFunc, stopPredicate, options) { 360 | var rho = options.rho || 1.0; // coefficient for "reflect" 361 | var chi = options.chi || 2.0; // coefficient for "expand" 362 | var gamma = options.gamma || 0.5; // coefficient for "contract" 363 | var sigma = options.sigma || 0.5; // coefficient for "shrink" 364 | var debug = options.debug == undefined ? false : options.debug; 365 | 366 | var n = this.dimension; 367 | 368 | var pointR = new SimplexVertex(n); 369 | var pointE = new SimplexVertex(n); 370 | var pointC = new SimplexVertex(n); 371 | var centroid = new SimplexVertex(n); 372 | 373 | this.computeVertexImages(costFunc); 374 | this.getCentroid(centroid); 375 | 376 | var iterations = 1; 377 | 378 | while (!stopPredicate(iterations, this.vertices[0].image)) { 379 | var shrink = false; 380 | this.getNewPoint(centroid, rho, pointR); 381 | pointR.image = costFunc(pointR.point); 382 | 383 | if (pointR.image < this.vertices[0].image) { 384 | this.getNewPoint(centroid, rho * chi, pointE); 385 | pointE.image = costFunc(pointE.point); 386 | 387 | if (pointE.image < pointR.image) { 388 | if (debug) console.log("expand"); 389 | this.vertices[n].copyFrom(pointE); 390 | } else { 391 | if (debug) console.log("reflect"); 392 | this.vertices[n].copyFrom(pointR); 393 | } 394 | } else { 395 | if (pointR.image < this.vertices[n - 1].image) { 396 | if (debug) console.log("reflect"); 397 | this.vertices[n].copyFrom(pointR); 398 | } else { 399 | if (pointR.image < this.vertices[n].image) { 400 | this.getNewPoint(centroid, rho * gamma, pointC); 401 | pointC.image = costFunc(pointC.point); 402 | 403 | if (pointC.image <= pointR.image) { 404 | if (debug) console.log("contract out"); 405 | this.vertices[n].copyFrom(pointC); 406 | } else { 407 | if (debug) console.log("shrink"); 408 | shrink = true; 409 | } 410 | } else { 411 | this.getNewPoint(centroid, -gamma, pointC); 412 | pointC.image = costFunc(pointC.point); 413 | 414 | if (pointC.image < this.vertices[n].image) { 415 | if (debug) console.log("contract inside"); 416 | this.vertices[n].copyFrom(pointC); 417 | } else { 418 | if (debug) console.log("shrink"); 419 | shrink = true; 420 | } 421 | } 422 | } 423 | } 424 | 425 | if (shrink) { 426 | this.shrink(sigma); 427 | this.computeVertexImages(costFunc); 428 | } else { 429 | for (var i = n - 1; i >= 0 && this.vertices[i + 1].image < this.vertices[i].image; i--) { 430 | this.vertices[i + 1].swapWith(this.vertices[i]); 431 | } 432 | 433 | } 434 | this.getCentroid(centroid); 435 | ++iterations; 436 | 437 | if (debug) console.log("best: ", this.vertices[0].point.join(", "), "score: ", this.vertices[0].image); 438 | }; 439 | 440 | return { 441 | vars: this.vertices[0].point, 442 | cost: this.vertices[0].image, 443 | iterations: iterations 444 | }; 445 | }; 446 | -------------------------------------------------------------------------------- /docs/styles/fonts/firamono_latin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/why-train-when-you-can-optimize/e06e036a2e09f08e29ecab60ed4e24c7286544f1/docs/styles/fonts/firamono_latin.woff2 -------------------------------------------------------------------------------- /docs/styles/fonts/firamono_latin_ext.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justinmeiners/why-train-when-you-can-optimize/e06e036a2e09f08e29ecab60ed4e24c7286544f1/docs/styles/fonts/firamono_latin_ext.woff2 -------------------------------------------------------------------------------- /docs/styles/main.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Fira Mono'; 3 | font-style: normal; 4 | font-weight: 400; 5 | font-display: swap; 6 | src: url('fonts/firamono_latin_ext.woff2') format('woff2'); 7 | unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; 8 | } 9 | 10 | @font-face { 11 | font-family: 'Fira Mono'; 12 | font-style: normal; 13 | font-weight: 400; 14 | font-display: swap; 15 | src: url('fonts/firamono_latin.woff2') format('woff2'); 16 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; 17 | } 18 | 19 | body { 20 | min-width: 200px; 21 | max-width: 850px; 22 | margin: 3rem auto; 23 | padding: 0 2rem; 24 | font-size: 14pt; 25 | } 26 | 27 | h1 { 28 | text-align: center; 29 | } 30 | 31 | p { 32 | line-height: 1.3; 33 | } 34 | 35 | li { 36 | margin-bottom: 0.3rem; 37 | } 38 | 39 | img { 40 | max-width: 100%; 41 | display: block; 42 | margin-left: auto; 43 | margin-right: auto; 44 | } 45 | 46 | pre { 47 | margin: 1rem 0; 48 | } 49 | 50 | pre.prettyprint { 51 | border: none; 52 | } 53 | 54 | blockquote { 55 | margin: 1.5rem 3rem; 56 | } 57 | 58 | /* document links */ 59 | 60 | a { 61 | text-decoration: none; 62 | } 63 | 64 | a:link, .block-link a:visited { 65 | color: #0046b3; 66 | } 67 | 68 | a:hover, a:active { 69 | text-decoration: underline; 70 | color: #4d92ff; 71 | } 72 | 73 | a:visited { 74 | color: #662e99; 75 | } 76 | 77 | /* code blocks */ 78 | 79 | code, .block-header { 80 | font-size: 11pt; 81 | font-family: 'Fira Mono',Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace; 82 | } 83 | 84 | .block-header, .block-header + pre.prettyprint { 85 | background-color: #f9f8f4; 86 | border: 1px solid #c7c4b4; 87 | box-sizing: border-box; 88 | } 89 | 90 | .block-header { 91 | display: inline-block; 92 | 93 | /* allows the header to overlap the code block to hide part of the top border */ 94 | position: relative; 95 | z-index: 6; 96 | 97 | border-top-left-radius: 0.6rem; 98 | border-top-right-radius: 0.6rem; 99 | border-bottom-width: 0; 100 | 101 | padding: 0.4rem 0.6rem; 102 | } 103 | 104 | .block-title { 105 | font-weight: normal; 106 | } 107 | 108 | .block-title a { 109 | /* this causes navigating to a block link to scroll you just a few pixels above the block header */ 110 | margin-top: -1rem; 111 | padding-top: 1rem; 112 | } 113 | 114 | .block-title, .block-header a:link, .block-header a:visited { 115 | color: #262521; 116 | } 117 | 118 | .block-header a:hover, .block-header a:active { 119 | color: #737372; 120 | } 121 | 122 | .code-block pre.prettyprint { 123 | padding: 0.6rem; 124 | white-space: pre-wrap; 125 | border-radius: 0.6rem; 126 | } 127 | 128 | .code-block .block-header + pre.prettyprint { 129 | /* overlap to the top 1px of the code block with the header so that the top border is partially obscured */ 130 | position: relative; 131 | z-index: 5; 132 | margin-top: -1px; 133 | 134 | border-top-left-radius: 0; 135 | } 136 | 137 | .block-usages { 138 | margin-top: -1rem; 139 | } 140 | 141 | .block-usages small { 142 | display: inline-block; 143 | margin: 0.4rem 0.6rem; 144 | font-size: 11pt; 145 | color: #363535; 146 | } 147 | 148 | .block-usages a, .block-usages span { 149 | padding: 0 0.5rem; 150 | margin-left: 0.1rem; 151 | } 152 | 153 | .block-usages a { 154 | background-color: #f9f8f4; 155 | border: 1px solid #c7c6bf; 156 | box-sizing: border-box; 157 | 158 | color: #57554a; 159 | border-radius: 0.3rem; 160 | } 161 | 162 | .block-usages a + *, .block-usages span + * { 163 | margin-left: 0.2rem; 164 | } 165 | 166 | .block-usages a:hover, .block-usages a:active { 167 | text-decoration: none; 168 | background-color: #f9f9f7; 169 | color: #a6a28d; 170 | } 171 | 172 | 173 | h1 + p, h1 + p + p { 174 | text-align: center; 175 | } 176 | -------------------------------------------------------------------------------- /docs/styles/prettify-theme.css: -------------------------------------------------------------------------------- 1 | /*! Color themes for Google Code Prettify | MIT License | github.com/jmblog/color-themes-for-google-code-prettify */ 2 | /* Atelier Dune Light with modifications for srcweave */ 3 | 4 | .prettyprint { 5 | border: none; 6 | } 7 | 8 | .pln { 9 | color: #20201d; 10 | } 11 | 12 | /* Specify class=linenums on a pre to get line numbering */ 13 | ol.linenums { 14 | margin-top: 0; 15 | margin-bottom: 0; 16 | color: #999580; 17 | } 18 | 19 | li.L0, 20 | li.L1, 21 | li.L2, 22 | li.L3, 23 | li.L4, 24 | li.L5, 25 | li.L6, 26 | li.L7, 27 | li.L8, 28 | li.L9 { 29 | padding-left: 1em; 30 | background-color: #fefbec; 31 | list-style-type: decimal; 32 | } 33 | 34 | @media screen { 35 | 36 | /* string content */ 37 | 38 | .str { 39 | color: #60ac39; 40 | } 41 | 42 | /* keyword */ 43 | 44 | .kwd { 45 | color: #b854d4; 46 | } 47 | 48 | /* comment */ 49 | 50 | .com { 51 | color: #999580; 52 | } 53 | 54 | /* type name */ 55 | 56 | .typ { 57 | color: #6684e1; 58 | } 59 | 60 | /* literal value */ 61 | 62 | .lit { 63 | color: #b65611; 64 | } 65 | 66 | /* punctuation */ 67 | 68 | .pun { 69 | color: #20201d; 70 | } 71 | 72 | /* lisp open bracket */ 73 | 74 | .opn { 75 | color: #20201d; 76 | } 77 | 78 | /* lisp close bracket */ 79 | 80 | .clo { 81 | color: #20201d; 82 | } 83 | 84 | /* markup tag name */ 85 | 86 | .tag { 87 | color: #d73737; 88 | } 89 | 90 | /* markup attribute name */ 91 | 92 | .atn { 93 | color: #b65611; 94 | } 95 | 96 | /* markup attribute value */ 97 | 98 | .atv { 99 | color: #1fad83; 100 | } 101 | 102 | /* declaration */ 103 | 104 | .dec { 105 | color: #b65611; 106 | } 107 | 108 | /* variable name */ 109 | 110 | .var { 111 | color: #d73737; 112 | } 113 | 114 | /* function name */ 115 | 116 | .fun { 117 | color: #6684e1; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /docs/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |This is the code that sets up the drawing canvas as well as the HTML page.
19 | 20 |function Sim() {
24 | this.canvas = document.getElementById('main-canvas');
25 | this.ctx = this.canvas.getContext('2d', { alpha: false });
26 |
27 | this.canvas.onmousedown = this.mouseDown.bind(this);
28 | this.canvas.onmouseup = this.mouseUp.bind(this);
29 | this.canvas.onmouseout = this.mouseOut.bind(this);
30 | this.canvas.onmousemove = this.mouseMove.bind(this);
31 |
32 | this.shapes = [];
33 | };
34 |
35 | @{sim input}
36 |
37 | Used by 1
document.getElementById("clear-button").onclick = function() {
46 | sim.shapes = [];
47 | drawSim();
48 | };
49 |
50 | function getMousePos(canvas, e) {
51 | var rect = canvas.getBoundingClientRect();
52 | return new Vec(e.clientX - rect.left, e.clientY - rect.top);
53 | }
54 |
55 | Sim.prototype.mouseDown = function(e) {
56 | var mp = getMousePos(this.canvas, e);
57 | this.path = [];
58 | this.path.push(mp);
59 | this.dragging = true;
60 |
61 | e.preventDefault();
62 | };
63 |
64 | Sim.prototype.mouseMove = function(e) {
65 | var mp = getMousePos(this.canvas, e);
66 |
67 | if (this.dragging) {
68 | var lp = this.path[this.path.length - 1];
69 |
70 | if (!mp.inCircle(lp, 6)) {
71 | this.path.push(mp);
72 | drawSim();
73 | }
74 | }
75 | }
76 |
77 | Sim.prototype.mouseUp = function(e) {
78 | if (!this.dragging) return;
79 | var mp = getMousePos(this.canvas, e);
80 | this.path.push(mp);
81 | this.endDrag(e);
82 | }
83 |
84 | Sim.prototype.mouseOut = function(e) {
85 | if (!this.dragging) return;
86 | this.endDrag(e);
87 | }
88 |
89 | Sim.prototype.endDrag = function(e) {
90 | var corrected = tryShapeFit(this.path);
91 | if (corrected) {
92 | this.shapes.push(corrected);
93 | } else {
94 | this.shapes.push({
95 | path: this.path
96 | });
97 | }
98 |
99 | this.path = [];
100 | this.dragging = false;
101 | drawSim();
102 | }
103 |
104 | Used by 1
function drawSim() {
113 | var ctx = sim.ctx;
114 | ctx.lineWidth = 1;
115 | clearCanvas(ctx, sim.canvas);
116 |
117 | ctx.lineWidth = 2;
118 | ctx.strokeStyle = "#000000";
119 | for (var i = 0; i < sim.shapes.length; ++i) {
120 | var s = sim.shapes[i];
121 | if (s.path) {
122 | drawPath(ctx, s.path);
123 | } else if (s.circle) {
124 | ctx.beginPath();
125 | ctx.arc(s.circle.origin.x, s.circle.origin.y, s.circle.radius, 0.0, Math.PI * 2.0);
126 | ctx.closePath();
127 | ctx.stroke();
128 | } else if (s.ellipse) {
129 | ctx.beginPath();
130 | ctx.ellipse(s.ellipse.origin.x, s.ellipse.origin.y, s.ellipse.size.x, s.ellipse.size.y, 0, 0.0, Math.PI * 2.0);
131 | ctx.closePath();
132 | ctx.stroke();
133 | }
134 | }
135 |
136 | ctx.lineWidth = 3;
137 | ctx.strokeStyle = "#FF0000";
138 | if (sim.path) {
139 | drawPath(ctx, sim.path);
140 | }
141 | }
142 |
143 | function clearCanvas(ctx, canvas) {
144 | ctx.fillStyle = '#C1FFC9';
145 | ctx.beginPath();
146 | ctx.rect(0, 0, canvas.width, canvas.height);
147 | ctx.closePath();
148 | return ctx.fill();
149 | }
150 |
151 | function drawPath(ctx, path) {
152 | if (path.length === 0) return;
153 | ctx.beginPath();
154 | ctx.moveTo(path[0].x, path[0].y);
155 | for (var i = 1; i < path.length; ++i) {
156 | ctx.lineTo(path[i].x, path[i].y);
157 | }
158 | ctx.stroke();
159 | }
160 |
161 | Used by 1
// Created by Justin Meiners (2022)
170 | // License: MIT
171 |
172 | "use strict";
173 | @{sim definition}
174 | @{sim rendering}
175 |
176 | var sim = new Sim();
177 | drawSim();
178 |
179 | Here is the HTML page I use.
185 | 186 |<!DOCTYPE html>
190 | <html>
191 | <head>
192 | <title>Drawing assistant</title>
193 | </style>
194 | </head>
195 | <body>
196 | <p>
197 | <a href="../">Back to article</a>
198 | </p>
199 |
200 | <canvas id="main-canvas" width="1024" height="768"></canvas>
201 | <p>
202 | <button id="clear-button">Clear</button>
203 | </p>
204 |
205 | <script src="math.js"></script>
206 | <script src="assist.js"></script>
207 | <script src="draw.js"></script>
208 | </body>
209 | </html>
210 |
211 |