From e7b42c6db50512ffba48e8e973a4b5f412f0a7c6 Mon Sep 17 00:00:00 2001 From: mhjensen Date: Thu, 17 May 2018 16:29:34 -0400 Subject: [PATCH] introduce error analysis in linear regression --- .../Regression/html/._Regression-bs000.html | 22 +- .../Regression/html/._Regression-bs001.html | 20 +- .../Regression/html/._Regression-bs002.html | 20 +- .../Regression/html/._Regression-bs003.html | 20 +- .../Regression/html/._Regression-bs004.html | 20 +- .../Regression/html/._Regression-bs005.html | 20 +- .../Regression/html/._Regression-bs006.html | 20 +- .../Regression/html/._Regression-bs007.html | 20 +- .../Regression/html/._Regression-bs008.html | 20 +- .../Regression/html/._Regression-bs009.html | 20 +- .../Regression/html/._Regression-bs010.html | 20 +- .../Regression/html/._Regression-bs011.html | 20 +- .../Regression/html/._Regression-bs012.html | 31 +- .../Regression/html/._Regression-bs013.html | 24 +- .../Regression/html/._Regression-bs014.html | 23 +- .../Regression/html/._Regression-bs015.html | 40 +- .../Regression/html/._Regression-bs016.html | 38 +- .../Regression/html/._Regression-bs017.html | 33 +- .../Regression/html/._Regression-bs018.html | 36 +- doc/pub/Regression/html/Regression-bs.html | 22 +- .../Regression/html/Regression-reveal.html | 42 +- .../Regression/html/Regression-solarized.html | 52 +- doc/pub/Regression/html/Regression.html | 52 +- doc/pub/Regression/html/reveal.js/.gitignore | 7 +- doc/pub/Regression/html/reveal.js/.travis.yml | 6 +- doc/pub/Regression/html/reveal.js/LICENSE | 2 +- doc/pub/Regression/html/reveal.js/README.md | 592 ++++--- doc/pub/Regression/html/reveal.js/bower.json | 6 +- .../html/reveal.js/css/print/paper.css | 7 +- .../html/reveal.js/css/print/pdf.css | 101 +- .../Regression/html/reveal.js/css/reveal.scss | 578 +++++-- .../html/reveal.js/css/theme/README.md | 6 +- .../reveal.js/css/theme/source/black.scss | 4 +- .../reveal.js/css/theme/source/white.scss | 4 +- doc/pub/Regression/html/reveal.js/index.html | 390 +---- .../Regression/html/reveal.js/js/reveal.js | 1417 +++++++++++++---- .../html/reveal.js/lib/css/zenburn.css | 119 +- .../html/reveal.js/lib/js/head.min.js | 17 +- .../Regression/html/reveal.js/package.json | 42 +- .../reveal.js/plugin/highlight/highlight.js | 55 +- .../reveal.js/plugin/markdown/example.html | 7 + .../html/reveal.js/plugin/markdown/example.md | 5 + .../reveal.js/plugin/markdown/markdown.js | 57 +- .../html/reveal.js/plugin/markdown/marked.js | 2 +- .../html/reveal.js/plugin/math/math.js | 7 +- .../html/reveal.js/plugin/multiplex/client.js | 2 +- .../html/reveal.js/plugin/multiplex/index.js | 38 +- .../html/reveal.js/plugin/multiplex/master.js | 61 +- .../reveal.js/plugin/notes-server/client.js | 7 +- .../reveal.js/plugin/notes-server/index.js | 31 +- .../reveal.js/plugin/notes-server/notes.html | 241 ++- .../html/reveal.js/plugin/notes/notes.html | 417 ++++- .../html/reveal.js/plugin/notes/notes.js | 45 +- .../reveal.js/plugin/print-pdf/print-pdf.js | 75 +- .../html/reveal.js/plugin/search/search.js | 72 +- .../html/reveal.js/plugin/zoom-js/zoom.js | 40 +- .../html/reveal.js/test/examples/math.html | 2 +- .../test/examples/slide-backgrounds.html | 2 +- .../html/reveal.js/test/test-markdown.html | 2 +- .../Regression/html/reveal.js/test/test.html | 3 +- .../Regression/html/reveal.js/test/test.js | 10 +- doc/pub/Regression/ipynb/Regression.ipynb | 20 +- .../ipynb/ipynb-Regression-src.tar.gz | Bin 211 -> 212 bytes .../pdf/Regression-beamer-handouts2x3.pdf | Bin 274354 -> 275317 bytes doc/pub/Regression/pdf/Regression-beamer.pdf | Bin 259471 -> 260424 bytes doc/pub/Regression/pdf/Regression-minted.pdf | Bin 296932 -> 297861 bytes doc/src/Regression/Regression.do.txt | 17 +- 67 files changed, 3452 insertions(+), 1699 deletions(-) diff --git a/doc/pub/Regression/html/._Regression-bs000.html b/doc/pub/Regression/html/._Regression-bs000.html index 4a67b29fe..2f924099f 100644 --- a/doc/pub/Regression/html/._Regression-bs000.html +++ b/doc/pub/Regression/html/._Regression-bs000.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -191,7 +193,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    May 14, 2018

    +

    May 17, 2018


    @@ -215,7 +217,7 @@ MathJax.Hub.Config({

  • 9
  • 10
  • ...
  • -
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs001.html b/doc/pub/Regression/html/._Regression-bs001.html index f43eec86c..c86c157a3 100644 --- a/doc/pub/Regression/html/._Regression-bs001.html +++ b/doc/pub/Regression/html/._Regression-bs001.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -212,7 +214,7 @@ A regression model aims at finding a likelihood function \( p(y\vert \hat{x}) \)
  • 10
  • 11
  • ...
  • -
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs002.html b/doc/pub/Regression/html/._Regression-bs002.html index cc5368d14..e8e7d3381 100644 --- a/doc/pub/Regression/html/._Regression-bs002.html +++ b/doc/pub/Regression/html/._Regression-bs002.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -209,7 +211,7 @@ where \( \epsilon_i \) is the error in our approximation.
  • 11
  • 12
  • ...
  • -
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs003.html b/doc/pub/Regression/html/._Regression-bs003.html index 74eebe1e7..8fef66ba6 100644 --- a/doc/pub/Regression/html/._Regression-bs003.html +++ b/doc/pub/Regression/html/._Regression-bs003.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -209,7 +211,7 @@ $$
  • 12
  • 13
  • ...
  • -
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs004.html b/doc/pub/Regression/html/._Regression-bs004.html index 723f92182..837168435 100644 --- a/doc/pub/Regression/html/._Regression-bs004.html +++ b/doc/pub/Regression/html/._Regression-bs004.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -229,7 +231,7 @@ $$
  • 13
  • 14
  • ...
  • -
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs005.html b/doc/pub/Regression/html/._Regression-bs005.html index 59697268f..2917f773a 100644 --- a/doc/pub/Regression/html/._Regression-bs005.html +++ b/doc/pub/Regression/html/._Regression-bs005.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -214,7 +216,7 @@ $$
  • 14
  • 15
  • ...
  • -
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs006.html b/doc/pub/Regression/html/._Regression-bs006.html index d1c1f99de..7de057f7f 100644 --- a/doc/pub/Regression/html/._Regression-bs006.html +++ b/doc/pub/Regression/html/._Regression-bs006.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -220,7 +222,7 @@ The left-hand side of this equation forms know. Our error vector \( \hat{\epsilo
  • 15
  • 16
  • ...
  • -
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs007.html b/doc/pub/Regression/html/._Regression-bs007.html index a96947c77..3c9c75745 100644 --- a/doc/pub/Regression/html/._Regression-bs007.html +++ b/doc/pub/Regression/html/._Regression-bs007.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -215,7 +217,7 @@ $$
  • 16
  • 17
  • ...
  • -
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs008.html b/doc/pub/Regression/html/._Regression-bs008.html index 69833f422..5a8bb93b7 100644 --- a/doc/pub/Regression/html/._Regression-bs008.html +++ b/doc/pub/Regression/html/._Regression-bs008.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -218,7 +220,7 @@ $$
  • 17
  • 18
  • ...
  • -
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs009.html b/doc/pub/Regression/html/._Regression-bs009.html index 1910d9c8c..b8182a5a2 100644 --- a/doc/pub/Regression/html/._Regression-bs009.html +++ b/doc/pub/Regression/html/._Regression-bs009.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -234,7 +236,7 @@ $$
  • 18
  • 19
  • ...
  • -
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs010.html b/doc/pub/Regression/html/._Regression-bs010.html index dfe70b9a7..08d50040b 100644 --- a/doc/pub/Regression/html/._Regression-bs010.html +++ b/doc/pub/Regression/html/._Regression-bs010.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -222,7 +224,7 @@ $$
  • 19
  • 20
  • ...
  • -
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs011.html b/doc/pub/Regression/html/._Regression-bs011.html index e6e9f71e6..7d037fe65 100644 --- a/doc/pub/Regression/html/._Regression-bs011.html +++ b/doc/pub/Regression/html/._Regression-bs011.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -224,7 +226,7 @@ meaning that the solution for \( \hat{\beta} \) is the one which minimizes the r
  • 20
  • 21
  • ...
  • -
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs012.html b/doc/pub/Regression/html/._Regression-bs012.html index 06627f8f1..5e6163ae8 100644 --- a/doc/pub/Regression/html/._Regression-bs012.html +++ b/doc/pub/Regression/html/._Regression-bs012.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -173,8 +175,14 @@ MathJax.Hub.Config({

    Simple regression model

    -We are now ready to write our first program which aims at solving the above linear regression equations. We start with data we have produced ourselves, in this case normally distributed random numbers along the \( x \)-axis. These numbers define then the value of a function \( y(x)=4+3x+N(0,1) \). Thereafter we order the \( x \) values and employ our linear regression algorithm to set up the best fit. +We are now ready to write our first program which aims at solving the above linear regression equations. We start with data we have produced ourselves, in this case normally distributed random numbers along the \( x \)-axis. These numbers define then the value of a function \( y(x)=4+3x+N(0,1) \). Thereafter we order the \( x \) values and employ our linear regression algorithm to set up the best fit. Here we find it useful to use the numpy function \( c\_ \) arrays where arrays are stacked along their last axis after being upgraded to at least two dimensions with ones post-pended to the shape. The following examples help in understanding what happens +

    + +

    import numpy as np
    +print(np.c_[np.array([1,2,3]), np.array([4,5,6])])
    +print(np.c_[np.array([[1,2,3]]), 0, 0, np.array([[4,5,6]])])
    +

    @@ -200,6 +208,9 @@ plt.ylabel(r plt.title(r'Linear Regression') plt.show() +

    +We see that, as expected, a linear fit gives a seemingly (from the graph) good representation of the data. +

    @@ -226,7 +237,7 @@ plt.show()

  • 21
  • 22
  • ...
  • -
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs013.html b/doc/pub/Regression/html/._Regression-bs013.html index 8098226bc..ce2dcaf65 100644 --- a/doc/pub/Regression/html/._Regression-bs013.html +++ b/doc/pub/Regression/html/._Regression-bs013.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -173,7 +175,9 @@ MathJax.Hub.Config({

    Simple regression model, now using scikit-learn

    -We can repeat the above algorithm using scikit-learn as follows. + +

    +We can repeat the above algorithm using scikit-learn as follows

    @@ -224,7 +228,7 @@ plt.show()

  • 22
  • 23
  • ...
  • -
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs014.html b/doc/pub/Regression/html/._Regression-bs014.html index b749eb4b2..536b1349f 100644 --- a/doc/pub/Regression/html/._Regression-bs014.html +++ b/doc/pub/Regression/html/._Regression-bs014.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -180,7 +182,8 @@ $$ $$

    -Another quantity is the autocorrelation function we discussed in our chapter on statistical analysis. +Another quantity is the autocorrelation function we discussed in our chapter on statistical analysis. +Let us now try to assess the quality of our fit by studying various measures.

    @@ -207,6 +210,8 @@ Another quantity is the autocorrelation function we discussed in our chapter on

  • 22
  • 23
  • 24
  • +
  • ...
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs015.html b/doc/pub/Regression/html/._Regression-bs015.html index 950cb8fee..1995cfad3 100644 --- a/doc/pub/Regression/html/._Regression-bs015.html +++ b/doc/pub/Regression/html/._Regression-bs015.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -172,26 +174,7 @@ MathJax.Hub.Config({ -

    The \( \chi^2 \) function

    -
    -
    -

    - -

    -Normally, the response (dependent or outcome) variable \( y_i \) the outcome of a numerical experiment or another type of experiment and is thus only an approximation to the true value. It is then always accompanied by an error estimate, often limited to a statistical error estimate given by the standard deviation discussed earlier. In the discussion here we will treat \( y_i \) as our exact value for the response variable. - -

    -Introducing the standard deviation \( \sigma_i \) for each measurement \( y_i \), we define now the \( \chi^2 \) function as -$$ -\chi^2(\hat{\beta})=\sum_{i=0}^{n-1}\frac{\left(y_i-\tilde{y}_i\right)^2}{\sigma_i^2}=\left(\hat{y}-\hat{\tilde{y}}\right)^T\frac{1}{\hat{\Sigma^2}}\left(\hat{y}-\hat{\tilde{y}}\right), -$$ - -where the matrix \( \hat{\Sigma} \) is a diagonal matrix with \( \sigma_i \) as matrix elements. - -

    -

    -
    - +

    Estimate of the error

    @@ -217,6 +200,7 @@ where the matrix \( \hat{\Sigma} \) is a diagonal matrix with \( \sigma_i \) as

  • 22
  • 23
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs016.html b/doc/pub/Regression/html/._Regression-bs016.html index 8ae7cc076..639f6427e 100644 --- a/doc/pub/Regression/html/._Regression-bs016.html +++ b/doc/pub/Regression/html/._Regression-bs016.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -178,22 +180,17 @@ MathJax.Hub.Config({

    -In order to find the parameters \( \beta_i \) we will then minimize the spread of \( \chi^2(\hat{\beta}) \) by requiring +Normally, the response (dependent or outcome) variable \( y_i \) the outcome of a numerical experiment or another type of experiment and is thus only an approximation to the true value. It is then always accompanied by an error estimate, often limited to a statistical error estimate given by the standard deviation discussed earlier. In the discussion here we will treat \( y_i \) as our exact value for the response variable. + +

    +Introducing the standard deviation \( \sigma_i \) for each measurement \( y_i \), we define now the \( \chi^2 \) function as $$ -\frac{\partial \chi^2(\hat{\beta})}{\partial \beta_j} = \frac{\partial }{\partial \beta_j}\left[ \sum_{i=0}^{n-1}\left(\frac{y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}}{\sigma_i}\right)^2\right]=0, +\chi^2(\hat{\beta})=\sum_{i=0}^{n-1}\frac{\left(y_i-\tilde{y}_i\right)^2}{\sigma_i^2}=\left(\hat{y}-\hat{\tilde{y}}\right)^T\frac{1}{\hat{\Sigma^2}}\left(\hat{y}-\hat{\tilde{y}}\right), $$ -which results in -$$ -\frac{\partial \chi^2(\hat{\beta})}{\partial \beta_j} = -2\left[ \sum_{i=0}^{n-1}\frac{x_{ij}}{\sigma_i}\left(\frac{y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}}{\sigma_i}\right)\right]=0, -$$ +where the matrix \( \hat{\Sigma} \) is a diagonal matrix with \( \sigma_i \) as matrix elements. -or in a matrix-vector form as -$$ -\frac{\partial \chi^2(\hat{\beta})}{\partial \hat{\beta}} = 0 = \hat{A}^T\left( \hat{b}-\hat{A}\hat{\beta}\right). -$$ - -where we have defined the matrix \( \hat{A} =\hat{X}/\hat{\Sigma} \) with matrix elements \( a_{ij} = x_{ij}/\sigma_i \) and the vector \( \hat{b} \) with elements \( b_i = y_i/\sigma_i \). +

    @@ -221,6 +218,7 @@ where we have defined the matrix \( \hat{A} =\hat{X}/\hat{\Sigma} \) with matrix

  • 22
  • 23
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs017.html b/doc/pub/Regression/html/._Regression-bs017.html index 2ab31e2a9..164b3fbcb 100644 --- a/doc/pub/Regression/html/._Regression-bs017.html +++ b/doc/pub/Regression/html/._Regression-bs017.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -178,20 +180,22 @@ MathJax.Hub.Config({

    -We can rewrite +In order to find the parameters \( \beta_i \) we will then minimize the spread of \( \chi^2(\hat{\beta}) \) by requiring $$ -\frac{\partial \chi^2(\hat{\beta})}{\partial \hat{\beta}} = 0 = \hat{A}^T\left( \hat{b}-\hat{A}\hat{\beta}\right), +\frac{\partial \chi^2(\hat{\beta})}{\partial \beta_j} = \frac{\partial }{\partial \beta_j}\left[ \sum_{i=0}^{n-1}\left(\frac{y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}}{\sigma_i}\right)^2\right]=0, $$ -as +which results in $$ -\hat{A}^T\hat{b} = \hat{A}^T\hat{A}\hat{\beta}, +\frac{\partial \chi^2(\hat{\beta})}{\partial \beta_j} = -2\left[ \sum_{i=0}^{n-1}\frac{x_{ij}}{\sigma_i}\left(\frac{y_i-\beta_0x_{i,0}-\beta_1x_{i,1}-\beta_2x_{i,2}-\dots-\beta_{n-1}x_{i,n-1}}{\sigma_i}\right)\right]=0, $$ -and if the matrix \( \hat{A}^T\hat{A} \) is invertible we have the solution +or in a matrix-vector form as $$ -\hat{\beta} =\left(\hat{A}^T\hat{A}\right)^{-1}\hat{A}^T\hat{b}. +\frac{\partial \chi^2(\hat{\beta})}{\partial \hat{\beta}} = 0 = \hat{A}^T\left( \hat{b}-\hat{A}\hat{\beta}\right). $$ + +where we have defined the matrix \( \hat{A} =\hat{X}/\hat{\Sigma} \) with matrix elements \( a_{ij} = x_{ij}/\sigma_i \) and the vector \( \hat{b} \) with elements \( b_i = y_i/\sigma_i \). @@ -218,6 +222,7 @@ $$

  • 22
  • 23
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/._Regression-bs018.html b/doc/pub/Regression/html/._Regression-bs018.html index 6b3d60888..c02b5eb27 100644 --- a/doc/pub/Regression/html/._Regression-bs018.html +++ b/doc/pub/Regression/html/._Regression-bs018.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -178,24 +180,19 @@ MathJax.Hub.Config({

    -If we then introduce the matrix +We can rewrite $$ -\hat{H} = \hat{A}^T\hat{A}, +\frac{\partial \chi^2(\hat{\beta})}{\partial \hat{\beta}} = 0 = \hat{A}^T\left( \hat{b}-\hat{A}\hat{\beta}\right), $$ -we have then the following expression for the parameters \( \beta_j \) (the matrix elements of \( \hat{H} \) are \( h_{ij} \)) +as $$ -\beta_j = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}\frac{y_i}{\sigma_i}\frac{x_{ik}}{\sigma_i} = \sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}b_ia_{ik} +\hat{A}^T\hat{b} = \hat{A}^T\hat{A}\hat{\beta}, $$ -We state without proof the expression for the uncertainty in the parameters \( \beta_j \) as +and if the matrix \( \hat{A}^T\hat{A} \) is invertible we have the solution $$ -\sigma^2(\beta_j) = \sum_{i=0}^{n-1}\sigma_i^2\left( \frac{\partial \beta_j}{\partial y_i}\right)^2, -$$ - -resulting in -$$ -\sigma^2(\beta_j) = \left(\sum_{k=0}^{p-1}h_{jk}\sum_{i=0}^{n-1}a_{ik}\right)\left(\sum_{l=0}^{p-1}h_{jl}\sum_{m=0}^{n-1}a_{ml}\right) = h_{jj}! +\hat{\beta} =\left(\hat{A}^T\hat{A}\right)^{-1}\hat{A}^T\hat{b}. $$ @@ -222,6 +219,7 @@ $$

  • 22
  • 23
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/Regression-bs.html b/doc/pub/Regression/html/Regression-bs.html index 4a67b29fe..2f924099f 100644 --- a/doc/pub/Regression/html/Regression-bs.html +++ b/doc/pub/Regression/html/Regression-bs.html @@ -82,21 +82,22 @@ Automatically generated HTML file from DocOnce source 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -148,15 +149,16 @@ MathJax.Hub.Config({
  • Simple regression model
  • Simple regression model, now using scikit-learn
  • Correlations and the quality of our results
  • -
  • The \( \chi^2 \) function
  • +
  • Estimate of the error
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • The \( \chi^2 \) function
  • -
  • Simple regression model with gradient descent
  • -
  • Simple regression model with stochastic gradient descent
  • -
  • The singular value decompostion
  • +
  • The \( \chi^2 \) function
  • +
  • Simple regression model with gradient descent
  • +
  • Simple regression model with stochastic gradient descent
  • +
  • The singular value decompostion
  • @@ -191,7 +193,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    May 14, 2018

    +

    May 17, 2018


    @@ -215,7 +217,7 @@ MathJax.Hub.Config({

  • 9
  • 10
  • ...
  • -
  • 24
  • +
  • 25
  • »
  • diff --git a/doc/pub/Regression/html/Regression-reveal.html b/doc/pub/Regression/html/Regression-reveal.html index 0f1ad5c48..4b32b132a 100644 --- a/doc/pub/Regression/html/Regression-reveal.html +++ b/doc/pub/Regression/html/Regression-reveal.html @@ -148,7 +148,7 @@ MathJax.Hub.Config({
    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

     
    -

    May 14, 2018

    +

    May 17, 2018


    @@ -493,8 +493,14 @@ meaning that the solution for \( \hat{\beta} \) is the one which minimizes the r

    Simple regression model

    -We are now ready to write our first program which aims at solving the above linear regression equations. We start with data we have produced ourselves, in this case normally distributed random numbers along the \( x \)-axis. These numbers define then the value of a function \( y(x)=4+3x+N(0,1) \). Thereafter we order the \( x \) values and employ our linear regression algorithm to set up the best fit. +We are now ready to write our first program which aims at solving the above linear regression equations. We start with data we have produced ourselves, in this case normally distributed random numbers along the \( x \)-axis. These numbers define then the value of a function \( y(x)=4+3x+N(0,1) \). Thereafter we order the \( x \) values and employ our linear regression algorithm to set up the best fit. Here we find it useful to use the numpy function \( c\_ \) arrays where arrays are stacked along their last axis after being upgraded to at least two dimensions with ones post-pended to the shape. The following examples help in understanding what happens +

    + +

    import numpy as np
    +print(np.c_[np.array([1,2,3]), np.array([4,5,6])])
    +print(np.c_[np.array([[1,2,3]]), 0, 0, np.array([[4,5,6]])])
    +

    @@ -520,12 +526,16 @@ plt.ylabel(r'$y$') plt.title(r'Linear Regression') plt.show() +

    +We see that, as expected, a linear fit gives a seemingly (from the graph) good representation of the data.

    Simple regression model, now using scikit-learn

    -We can repeat the above algorithm using scikit-learn as follows. + +

    +We can repeat the above algorithm using scikit-learn as follows

    @@ -564,12 +574,18 @@ $$

     

    -Another quantity is the autocorrelation function we discussed in our chapter on statistical analysis. +Another quantity is the autocorrelation function we discussed in our chapter on statistical analysis. +Let us now try to assess the quality of our fit by studying various measures.

    -

    The \( \chi^2 \) function

    +

    Estimate of the error

    +
    + + +
    +

    The \( \chi^2 \) function

    @@ -592,7 +608,7 @@ where the matrix \( \hat{\Sigma} \) is a diagonal matrix with \( \sigma_i \) as

    -

    The \( \chi^2 \) function

    +

    The \( \chi^2 \) function

    @@ -623,7 +639,7 @@ where we have defined the matrix \( \hat{A} =\hat{X}/\hat{\Sigma} \) with matrix

    -

    The \( \chi^2 \) function

    +

    The \( \chi^2 \) function

    @@ -652,7 +668,7 @@ $$

    -

    The \( \chi^2 \) function

    +

    The \( \chi^2 \) function

    @@ -688,7 +704,7 @@ $$

    -

    The \( \chi^2 \) function

    +

    The \( \chi^2 \) function

    @@ -717,7 +733,7 @@ $$

    -

    The \( \chi^2 \) function

    +

    The \( \chi^2 \) function

    @@ -772,7 +788,7 @@ The LSM suffers often from both being underdetermined and overdetermined in the

    -

    Simple regression model with gradient descent

    +

    Simple regression model with gradient descent

    Add info about the equations, play around with different learning rates

    @@ -817,7 +833,7 @@ plt.show()

    -

    Simple regression model with stochastic gradient descent

    +

    Simple regression model with stochastic gradient descent

    Add info about the equations, play around with different learning rates

    @@ -843,7 +859,7 @@ sgdreg.fit(x,y.ravel())

    -

    The singular value decompostion

    +

    The singular value decompostion

    diff --git a/doc/pub/Regression/html/Regression-solarized.html b/doc/pub/Regression/html/Regression-solarized.html index 154f6eca6..28bc68653 100644 --- a/doc/pub/Regression/html/Regression-solarized.html +++ b/doc/pub/Regression/html/Regression-solarized.html @@ -102,21 +102,22 @@ div { text-align: justify; text-justify: inter-word; } 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -158,7 +159,7 @@ MathJax.Hub.Config({

    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    May 14, 2018

    +

    May 17, 2018












    @@ -459,8 +460,14 @@ meaning that the solution for \( \hat{\beta} \) is the one which minimizes the r









    Simple regression model

    -We are now ready to write our first program which aims at solving the above linear regression equations. We start with data we have produced ourselves, in this case normally distributed random numbers along the \( x \)-axis. These numbers define then the value of a function \( y(x)=4+3x+N(0,1) \). Thereafter we order the \( x \) values and employ our linear regression algorithm to set up the best fit. +We are now ready to write our first program which aims at solving the above linear regression equations. We start with data we have produced ourselves, in this case normally distributed random numbers along the \( x \)-axis. These numbers define then the value of a function \( y(x)=4+3x+N(0,1) \). Thereafter we order the \( x \) values and employ our linear regression algorithm to set up the best fit. Here we find it useful to use the numpy function \( c\_ \) arrays where arrays are stacked along their last axis after being upgraded to at least two dimensions with ones post-pended to the shape. The following examples help in understanding what happens +

    + +

    import numpy as np
    +print(np.c_[np.array([1,2,3]), np.array([4,5,6])])
    +print(np.c_[np.array([[1,2,3]]), 0, 0, np.array([[4,5,6]])])
    +

    @@ -486,11 +493,16 @@ plt.ylabel(r'$y$') plt.title(r'Linear Regression') plt.show()

    +

    +We see that, as expected, a linear fit gives a seemingly (from the graph) good representation of the data. +











    Simple regression model, now using scikit-learn

    -We can repeat the above algorithm using scikit-learn as follows. + +

    +We can repeat the above algorithm using scikit-learn as follows

    @@ -526,12 +538,18 @@ $$ $$

    -Another quantity is the autocorrelation function we discussed in our chapter on statistical analysis. +Another quantity is the autocorrelation function we discussed in our chapter on statistical analysis. +Let us now try to assess the quality of our fit by studying various measures.











    -

    The \( \chi^2 \) function

    +

    Estimate of the error

    + +

    +









    + +

    The \( \chi^2 \) function

    @@ -554,7 +572,7 @@ where the matrix \( \hat{\Sigma} \) is a diagonal matrix with \( \sigma_i \) as











    -

    The \( \chi^2 \) function

    +

    The \( \chi^2 \) function

    @@ -582,7 +600,7 @@ where we have defined the matrix \( \hat{A} =\hat{X}/\hat{\Sigma} \) with matrix











    -

    The \( \chi^2 \) function

    +

    The \( \chi^2 \) function

    @@ -608,7 +626,7 @@ $$











    -

    The \( \chi^2 \) function

    +

    The \( \chi^2 \) function

    @@ -639,7 +657,7 @@ $$











    -

    The \( \chi^2 \) function

    +

    The \( \chi^2 \) function

    @@ -663,7 +681,7 @@ $$











    -

    The \( \chi^2 \) function

    +

    The \( \chi^2 \) function

    @@ -708,7 +726,7 @@ The LSM suffers often from both being underdetermined and overdetermined in the











    -

    Simple regression model with gradient descent

    +

    Simple regression model with gradient descent

    Add info about the equations, play around with different learning rates

    @@ -752,7 +770,7 @@ plt.show()











    -

    Simple regression model with stochastic gradient descent

    +

    Simple regression model with stochastic gradient descent

    Add info about the equations, play around with different learning rates

    @@ -777,7 +795,7 @@ sgdreg.fit(x,y.ravel())











    -

    The singular value decompostion

    +

    The singular value decompostion

    diff --git a/doc/pub/Regression/html/Regression.html b/doc/pub/Regression/html/Regression.html index e42300f00..9cf0843e2 100644 --- a/doc/pub/Regression/html/Regression.html +++ b/doc/pub/Regression/html/Regression.html @@ -107,21 +107,22 @@ div { text-align: justify; text-justify: inter-word; } 2, None, '___sec13'), - ('The $\\chi^2$ function', 2, None, '___sec14'), + ('Estimate of the error', 2, None, '___sec14'), ('The $\\chi^2$ function', 2, None, '___sec15'), ('The $\\chi^2$ function', 2, None, '___sec16'), ('The $\\chi^2$ function', 2, None, '___sec17'), ('The $\\chi^2$ function', 2, None, '___sec18'), ('The $\\chi^2$ function', 2, None, '___sec19'), + ('The $\\chi^2$ function', 2, None, '___sec20'), ('Simple regression model with gradient descent', 2, None, - '___sec20'), + '___sec21'), ('Simple regression model with stochastic gradient descent', 2, None, - '___sec21'), - ('The singular value decompostion', 2, None, '___sec22')]} + '___sec22'), + ('The singular value decompostion', 2, None, '___sec23')]} end of tocinfo --> @@ -163,7 +164,7 @@ MathJax.Hub.Config({

    [2] Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University

    -

    May 14, 2018

    +

    May 17, 2018












    @@ -464,8 +465,14 @@ meaning that the solution for \( \hat{\beta} \) is the one which minimizes the r









    Simple regression model

    -We are now ready to write our first program which aims at solving the above linear regression equations. We start with data we have produced ourselves, in this case normally distributed random numbers along the \( x \)-axis. These numbers define then the value of a function \( y(x)=4+3x+N(0,1) \). Thereafter we order the \( x \) values and employ our linear regression algorithm to set up the best fit. +We are now ready to write our first program which aims at solving the above linear regression equations. We start with data we have produced ourselves, in this case normally distributed random numbers along the \( x \)-axis. These numbers define then the value of a function \( y(x)=4+3x+N(0,1) \). Thereafter we order the \( x \) values and employ our linear regression algorithm to set up the best fit. Here we find it useful to use the numpy function \( c\_ \) arrays where arrays are stacked along their last axis after being upgraded to at least two dimensions with ones post-pended to the shape. The following examples help in understanding what happens +

    + +

    import numpy as np
    +print(np.c_[np.array([1,2,3]), np.array([4,5,6])])
    +print(np.c_[np.array([[1,2,3]]), 0, 0, np.array([[4,5,6]])])
    +

    @@ -491,11 +498,16 @@ plt.ylabel(r plt.title(r'Linear Regression') plt.show()

    +

    +We see that, as expected, a linear fit gives a seemingly (from the graph) good representation of the data. +











    Simple regression model, now using scikit-learn

    -We can repeat the above algorithm using scikit-learn as follows. + +

    +We can repeat the above algorithm using scikit-learn as follows

    @@ -531,12 +543,18 @@ $$ $$

    -Another quantity is the autocorrelation function we discussed in our chapter on statistical analysis. +Another quantity is the autocorrelation function we discussed in our chapter on statistical analysis. +Let us now try to assess the quality of our fit by studying various measures.











    -

    The \( \chi^2 \) function

    +

    Estimate of the error

    + +

    +









    + +

    The \( \chi^2 \) function

    @@ -559,7 +577,7 @@ where the matrix \( \hat{\Sigma} \) is a diagonal matrix with \( \sigma_i \) as











    -

    The \( \chi^2 \) function

    +

    The \( \chi^2 \) function

    @@ -587,7 +605,7 @@ where we have defined the matrix \( \hat{A} =\hat{X}/\hat{\Sigma} \) with matrix











    -

    The \( \chi^2 \) function

    +

    The \( \chi^2 \) function

    @@ -613,7 +631,7 @@ $$











    -

    The \( \chi^2 \) function

    +

    The \( \chi^2 \) function

    @@ -644,7 +662,7 @@ $$











    -

    The \( \chi^2 \) function

    +

    The \( \chi^2 \) function

    @@ -668,7 +686,7 @@ $$











    -

    The \( \chi^2 \) function

    +

    The \( \chi^2 \) function

    @@ -713,7 +731,7 @@ The LSM suffers often from both being underdetermined and overdetermined in the











    -

    Simple regression model with gradient descent

    +

    Simple regression model with gradient descent

    Add info about the equations, play around with different learning rates

    @@ -757,7 +775,7 @@ plt.show()











    -

    Simple regression model with stochastic gradient descent

    +

    Simple regression model with stochastic gradient descent

    Add info about the equations, play around with different learning rates

    @@ -782,7 +800,7 @@ sgdreg.fit(x,y.











    -

    The singular value decompostion

    +

    The singular value decompostion

    diff --git a/doc/pub/Regression/html/reveal.js/.gitignore b/doc/pub/Regression/html/reveal.js/.gitignore index a5df3133d..e7b4f216a 100644 --- a/doc/pub/Regression/html/reveal.js/.gitignore +++ b/doc/pub/Regression/html/reveal.js/.gitignore @@ -1,3 +1,8 @@ +.idea/ +*.iml +*.iws +*.eml +out/ .DS_Store .svn log/*.log @@ -5,4 +10,4 @@ tmp/** node_modules/ .sass-cache css/reveal.min.css -js/reveal.min.js +js/reveal.min.js \ No newline at end of file diff --git a/doc/pub/Regression/html/reveal.js/.travis.yml b/doc/pub/Regression/html/reveal.js/.travis.yml index 165d9ae9f..ec3b27d5d 100644 --- a/doc/pub/Regression/html/reveal.js/.travis.yml +++ b/doc/pub/Regression/html/reveal.js/.travis.yml @@ -1,5 +1,7 @@ language: node_js node_js: - - 0.10 + - 4 before_script: - - npm install -g grunt-cli \ No newline at end of file + - npm install -g grunt-cli +after_script: + - grunt retire diff --git a/doc/pub/Regression/html/reveal.js/LICENSE b/doc/pub/Regression/html/reveal.js/LICENSE index 09623076f..c3e6e5fd6 100644 --- a/doc/pub/Regression/html/reveal.js/LICENSE +++ b/doc/pub/Regression/html/reveal.js/LICENSE @@ -1,4 +1,4 @@ -Copyright (C) 2015 Hakim El Hattab, http://hakim.se +Copyright (C) 2017 Hakim El Hattab, http://hakim.se, and reveal.js contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/doc/pub/Regression/html/reveal.js/README.md b/doc/pub/Regression/html/reveal.js/README.md index 573b19597..f2ab6ca88 100644 --- a/doc/pub/Regression/html/reveal.js/README.md +++ b/doc/pub/Regression/html/reveal.js/README.md @@ -1,12 +1,58 @@ -# reveal.js [![Build Status](https://travis-ci.org/hakimel/reveal.js.svg?branch=master)](https://travis-ci.org/hakimel/reveal.js) +# reveal.js [![Build Status](https://travis-ci.org/hakimel/reveal.js.svg?branch=master)](https://travis-ci.org/hakimel/reveal.js) Slides -A framework for easily creating beautiful presentations using HTML. [Check out the live demo](http://lab.hakim.se/reveal-js/). +A framework for easily creating beautiful presentations using HTML. [Check out the live demo](http://revealjs.com/). -reveal.js comes with a broad range of features including [nested slides](https://github.com/hakimel/reveal.js#markup), [Markdown contents](https://github.com/hakimel/reveal.js#markdown), [PDF export](https://github.com/hakimel/reveal.js#pdf-export), [speaker notes](https://github.com/hakimel/reveal.js#speaker-notes) and a [JavaScript API](https://github.com/hakimel/reveal.js#api). It's best viewed in a modern browser but [fallbacks](https://github.com/hakimel/reveal.js/wiki/Browser-Support) are available to make sure your presentation can still be viewed elsewhere. +reveal.js comes with a broad range of features including [nested slides](https://github.com/hakimel/reveal.js#markup), [Markdown contents](https://github.com/hakimel/reveal.js#markdown), [PDF export](https://github.com/hakimel/reveal.js#pdf-export), [speaker notes](https://github.com/hakimel/reveal.js#speaker-notes) and a [JavaScript API](https://github.com/hakimel/reveal.js#api). There's also a fully featured visual editor and platform for sharing reveal.js presentations at [slides.com](https://slides.com?ref=github). +## Table of contents +- [Online Editor](#online-editor) +- [Instructions](#instructions) + - [Markup](#markup) + - [Markdown](#markdown) + - [Element Attributes](#element-attributes) + - [Slide Attributes](#slide-attributes) +- [Configuration](#configuration) +- [Presentation Size](#presentation-size) +- [Dependencies](#dependencies) +- [Ready Event](#ready-event) +- [Auto-sliding](#auto-sliding) +- [Keyboard Bindings](#keyboard-bindings) +- [Touch Navigation](#touch-navigation) +- [Lazy Loading](#lazy-loading) +- [API](#api) + - [Slide Changed Event](#slide-changed-event) + - [Presentation State](#presentation-state) + - [Slide States](#slide-states) + - [Slide Backgrounds](#slide-backgrounds) + - [Parallax Background](#parallax-background) + - [Slide Transitions](#slide-transitions) + - [Internal links](#internal-links) + - [Fragments](#fragments) + - [Fragment events](#fragment-events) + - [Code syntax highlighting](#code-syntax-highlighting) + - [Slide number](#slide-number) + - [Overview mode](#overview-mode) + - [Fullscreen mode](#fullscreen-mode) + - [Embedded media](#embedded-media) + - [Stretching elements](#stretching-elements) + - [postMessage API](#postmessage-api) +- [PDF Export](#pdf-export) +- [Theming](#theming) +- [Speaker Notes](#speaker-notes) + - [Share and Print Speaker Notes](#share-and-print-speaker-notes) + - [Server Side Speaker Notes](#server-side-speaker-notes) +- [Multiplexing](#multiplexing) + - [Master presentation](#master-presentation) + - [Client presentation](#client-presentation) + - [Socket.io server](#socketio-server) +- [MathJax](#mathjax) +- [Installation](#installation) + - [Basic setup](#basic-setup) + - [Full setup](#full-setup) + - [Folder Structure](#folder-structure) +- [License](#license) -#### More reading: -- [Installation](#installation): Step-by-step instructions for getting reveal.js running on your computer. +#### More reading - [Changelog](https://github.com/hakimel/reveal.js/releases): Up-to-date version history. - [Examples](https://github.com/hakimel/reveal.js/wiki/Example-Presentations): Presentations created with reveal.js, add your own! - [Browser Support](https://github.com/hakimel/reveal.js/wiki/Browser-Support): Explanation of browser support and fallbacks. @@ -14,14 +60,36 @@ reveal.js comes with a broad range of features including [nested slides](https:/ ## Online Editor -Presentations are written using HTML or Markdown but there's also an online editor for those of you who prefer a graphical interface. Give it a try at [http://slides.com](http://slides.com). +Presentations are written using HTML or Markdown but there's also an online editor for those of you who prefer a graphical interface. Give it a try at [https://slides.com](https://slides.com?ref=github). ## Instructions ### Markup -Markup hierarchy needs to be ``

    `` where the ``
    `` represents one slide and can be repeated indefinitely. If you place multiple ``
    ``'s inside of another ``
    `` they will be shown as vertical slides. The first of the vertical slides is the "root" of the others (at the top), and it will be included in the horizontal sequence. For example: +Here's a barebones example of a fully working reveal.js presentation: +```html + + + + + + +
    +
    +
    Slide 1
    +
    Slide 2
    +
    +
    + + + + +``` + +The presentation markup hierarchy needs to be `.reveal > .slides > section` where the `section` represents one slide and can be repeated indefinitely. If you place multiple `section` elements inside of another `section` they will be shown as vertical slides. The first of the vertical slides is the "root" of the others (at the top), and will be included in the horizontal sequence. For example: ```html
    @@ -37,32 +105,36 @@ Markup hierarchy needs to be ``
    ``` elements and wrap the contents in a ``` +
    ``` #### External Markdown -You can write your content as a separate file and have reveal.js load it at runtime. Note the separator arguments which determine how slides are delimited in the external file. The ```data-charset``` attribute is optional and specifies which charset to use when loading the external file. +You can write your content as a separate file and have reveal.js load it at runtime. Note the separator arguments which determine how slides are delimited in the external file: the `data-separator` attribute defines a regular expression for horizontal slides (defaults to `^\r?\n---\r?\n$`, a newline-bounded horizontal rule) and `data-separator-vertical` defines vertical slides (disabled by default). The `data-separator-notes` attribute is a regular expression for specifying the beginning of the current slide's speaker notes (defaults to `note:`). The `data-charset` attribute is optional and specifies which charset to use when loading the external file. -When used locally, this feature requires that reveal.js [runs from a local web server](#full-setup). +When used locally, this feature requires that reveal.js [runs from a local web server](#full-setup). The following example customises all available options: ```html -
    +
    ``` @@ -92,6 +164,19 @@ Special syntax (in html comment) is available for adding attributes to the slide
    ``` +#### Configuring *marked* + +We use [marked](https://github.com/chjj/marked) to parse Markdown. To customise marked's rendering, you can pass in options when [configuring Reveal](#configuration): + +```javascript +Reveal.initialize({ + // Options which are passed into marked + // See https://github.com/chjj/marked#options-1 + markdown: { + smartypants: true + } +}); +``` ### Configuration @@ -100,12 +185,26 @@ At the end of your page you need to initialize reveal by running the following c ```javascript Reveal.initialize({ - // Display controls in the bottom right corner + // Display presentation control arrows controls: true, + // Help the user learn the controls by providing hints, for example by + // bouncing the down arrow when they first encounter a vertical slide + controlsTutorial: true, + + // Determines where controls appear, "edges" or "bottom-right" + controlsLayout: 'bottom-right', + + // Visibility rule for backwards navigation arrows; "faded", "hidden" + // or "visible" + controlsBackArrows: 'faded', + // Display a presentation progress bar progress: true, + // Set default timing of 2 minutes per slide + defaultTiming: 120, + // Display the page number of the current slide slideNumber: false, @@ -130,6 +229,9 @@ Reveal.initialize({ // Change the presentation direction to be RTL rtl: false, + // Randomizes the order of slides each time the presentation loads + shuffle: false, + // Turns fragments on and off globally fragments: true, @@ -141,6 +243,15 @@ Reveal.initialize({ // key is pressed help: true, + // Flags if speaker notes should be visible to all viewers + showNotes: false, + + // Global override for autoplaying embedded media (video/audio/iframe) + // - null: Media will only autoplay if data-autoplay is present + // - true: All media will autoplay, regardless of individual setting + // - false: No media will autoplay, regardless of individual setting + autoPlayMedia: null, + // Number of milliseconds between automatically proceeding to the // next slide, disabled when set to 0, this value can be overwritten // by using a data-autoslide attribute on your slides @@ -149,6 +260,9 @@ Reveal.initialize({ // Stop auto-sliding after user input autoSlideStoppable: true, + // Use this method for navigation when auto-sliding + autoSlideMethod: Reveal.navigateNext, + // Enable slide navigation via mouse wheel mouseWheel: false, @@ -156,16 +270,18 @@ Reveal.initialize({ hideAddressBar: true, // Opens links in an iframe preview overlay + // Add `data-preview-link` and `data-preview-link="false"` to customise each link + // individually previewLinks: false, // Transition style - transition: 'default', // none/fade/slide/convex/concave/zoom + transition: 'slide', // none/fade/slide/convex/concave/zoom // Transition speed transitionSpeed: 'default', // default/fast/slow // Transition style for full page slide backgrounds - backgroundTransition: 'default', // none/fade/slide/convex/concave/zoom + backgroundTransition: 'fade', // none/fade/slide/convex/concave/zoom // Number of slides away from the current that are visible viewDistance: 3, @@ -176,10 +292,14 @@ Reveal.initialize({ // Parallax background size parallaxBackgroundSize: '', // CSS syntax, e.g. "2100px 900px" - // Amount to move parallax background (horizontal and vertical) on slide change - // Number, e.g. 100 - parallaxBackgroundHorizontal: '', - parallaxBackgroundVertical: '' + // Number of pixels to move the parallax background per slide + // - Calculated automatically unless specified + // - Set to 0 to disable movement along an axis + parallaxBackgroundHorizontal: null, + parallaxBackgroundVertical: null, + + // The display mode that will be used to show slides + display: 'block' }); ``` @@ -196,56 +316,6 @@ Reveal.configure({ autoSlide: 5000 }); ``` -### Dependencies - -Reveal.js doesn't _rely_ on any third party scripts to work but a few optional libraries are included by default. These libraries are loaded as dependencies in the order they appear, for example: - -```javascript -Reveal.initialize({ - dependencies: [ - // Cross-browser shim that fully implements classList - https://github.com/eligrey/classList.js/ - { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } }, - - // Interpret Markdown in
    elements - { src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, - { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, - - // Syntax highlight for elements - { src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, - - // Zoom in and out with Alt+click - { src: 'plugin/zoom-js/zoom.js', async: true }, - - // Speaker notes - { src: 'plugin/notes/notes.js', async: true }, - - // Remote control your reveal.js presentation using a touch device - { src: 'plugin/remotes/remotes.js', async: true }, - - // MathJax - { src: 'plugin/math/math.js', async: true } - ] -}); -``` - -You can add your own extensions using the same syntax. The following properties are available for each dependency object: -- **src**: Path to the script to load -- **async**: [optional] Flags if the script should load after reveal.js has started, defaults to false -- **callback**: [optional] Function to execute when the script has loaded -- **condition**: [optional] Function which must return true for the script to be loaded - - -### Ready Event - -A 'ready' event is fired when reveal.js has loaded all non-async dependencies and is ready to start navigating. To check if reveal.js is already 'ready' you can call `Reveal.isReady()`. - -```javascript -Reveal.addEventListener( 'ready', function( event ) { - // event.currentSlide, event.indexh, event.indexv -} ); -``` - - ### Presentation Size All presentations have a normal size, that is the resolution at which they are authored. The framework will automatically scale presentations uniformly based on this size to ensure that everything fits on any given display or viewport. @@ -273,6 +343,69 @@ Reveal.initialize({ }); ``` +If you wish to disable this behavior and do your own scaling (e.g. using media queries), try these settings: + +```javascript +Reveal.initialize({ + + ... + + width: "100%", + height: "100%", + margin: 0, + minScale: 1, + maxScale: 1 +}); +``` + +### Dependencies + +Reveal.js doesn't _rely_ on any third party scripts to work but a few optional libraries are included by default. These libraries are loaded as dependencies in the order they appear, for example: + +```javascript +Reveal.initialize({ + dependencies: [ + // Cross-browser shim that fully implements classList - https://github.com/eligrey/classList.js/ + { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } }, + + // Interpret Markdown in
    elements + { src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, + { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, + + // Syntax highlight for elements + { src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, + + // Zoom in and out with Alt+click + { src: 'plugin/zoom-js/zoom.js', async: true }, + + // Speaker notes + { src: 'plugin/notes/notes.js', async: true }, + + // MathJax + { src: 'plugin/math/math.js', async: true } + ] +}); +``` + +You can add your own extensions using the same syntax. The following properties are available for each dependency object: +- **src**: Path to the script to load +- **async**: [optional] Flags if the script should load after reveal.js has started, defaults to false +- **callback**: [optional] Function to execute when the script has loaded +- **condition**: [optional] Function which must return true for the script to be loaded + +To load these dependencies, reveal.js requires [head.js](http://headjs.com/) *(a script loading library)* to be loaded before reveal.js. + +### Ready Event + +A 'ready' event is fired when reveal.js has loaded all non-async dependencies and is ready to start navigating. To check if reveal.js is already 'ready' you can call `Reveal.isReady()`. + +```javascript +Reveal.addEventListener( 'ready', function( event ) { + // event.currentSlide, event.indexh, event.indexv +} ); +``` + +Note that we also add a `.ready` class to the `.reveal` element so that you can hook into this with CSS. ### Auto-sliding @@ -296,6 +429,8 @@ You can also override the slide duration for individual slides and fragments by
    ``` +To override the method used for navigation when auto-sliding, you can specify the ```autoSlideMethod``` setting. To only navigate along the top layer and ignore vertical slides, set this to ```Reveal.navigateRight```. + Whenever the auto-slide mode is resumed or paused the ```autoslideresumed``` and ```autoslidepaused``` events are fired. @@ -313,6 +448,13 @@ Reveal.configure({ }); ``` +### Touch Navigation + +You can swipe to navigate through a presentation on any touch-enabled device. Horizontal swipes change between horizontal slides, vertical swipes change between vertical slides. If you wish to disable this you can set the `touch` config option to false when initializing reveal.js. + +If there's some part of your content that needs to remain accessible to touch events you'll need to highlight this by adding a `data-prevent-swipe` attribute to the element. One common example where this is useful is elements that need to be scrolled. + + ### Lazy Loading When working on presentation with a lot of media or iframe content it's important to load lazily. Lazy loading means that reveal.js will only load content for the few slides nearest to the current slide. The number of slides that are preloaded is determined by the `viewDistance` configuration option. @@ -347,11 +489,18 @@ Reveal.next(); Reveal.prevFragment(); Reveal.nextFragment(); +// Randomize the order of slides +Reveal.shuffle(); + // Toggle presentation states, optionally pass true/false to force on/off Reveal.toggleOverview(); Reveal.togglePause(); Reveal.toggleAutoSlide(); +// Shows a help overlay with keyboard shortcuts, optionally pass true/false +// to force on/off +Reveal.toggleHelp(); + // Change a config value at runtime Reveal.configure({ controls: true }); @@ -365,9 +514,14 @@ Reveal.getScale(); Reveal.getPreviousSlide(); Reveal.getCurrentSlide(); -Reveal.getIndices(); // { h: 0, v: 0 } } -Reveal.getProgress(); // 0-1 -Reveal.getTotalSlides(); +Reveal.getIndices(); // { h: 0, v: 0 } } +Reveal.getPastSlideCount(); +Reveal.getProgress(); // (0 == first slide, 1 == last slide) +Reveal.getSlides(); // Array of all slides +Reveal.getTotalSlides(); // total number of slides + +// Returns the speaker notes for the current slide +Reveal.getSlideNotes(); // State checks Reveal.isFirstSlide(); @@ -420,26 +574,59 @@ Reveal.addEventListener( 'somestate', function() { ### Slide Backgrounds -Slides are contained within a limited portion of the screen by default to allow them to fit any display and scale uniformly. You can apply full page backgrounds outside of the slide area by adding a ```data-background``` attribute to your ```
    ``` elements. Four different types of backgrounds are supported: color, image, video and iframe. Below are a few examples. +Slides are contained within a limited portion of the screen by default to allow them to fit any display and scale uniformly. You can apply full page backgrounds outside of the slide area by adding a ```data-background``` attribute to your ```
    ``` elements. Four different types of backgrounds are supported: color, image, video and iframe. +#### Color Backgrounds +All CSS color formats are supported, like rgba() or hsl(). ```html -
    -

    All CSS color formats are supported, like rgba() or hsl().

    -
    -
    -

    This slide will have a full-size background image.

    -
    -
    -

    This background image will be sized to 100px and repeated.

    -
    -
    -

    Video. Multiple sources can be defined using a comma separated list. Video will loop when the data-background-video-loop attribute is provided.

    -
    -
    -

    Embeds a web page as a background. Note that the page won't be interactive.

    +
    +

    Color

    ``` +#### Image Backgrounds +By default, background images are resized to cover the full page. Available options: + +| Attribute | Default | Description | +| :--------------------------- | :--------- | :---------- | +| data-background-image | | URL of the image to show. GIFs restart when the slide opens. | +| data-background-size | cover | See [background-size](https://developer.mozilla.org/docs/Web/CSS/background-size) on MDN. | +| data-background-position | center | See [background-position](https://developer.mozilla.org/docs/Web/CSS/background-position) on MDN. | +| data-background-repeat | no-repeat | See [background-repeat](https://developer.mozilla.org/docs/Web/CSS/background-repeat) on MDN. | +```html +
    +

    Image

    +
    +
    +

    This background image will be sized to 100px and repeated

    +
    +``` + +#### Video Backgrounds +Automatically plays a full size video behind the slide. + +| Attribute | Default | Description | +| :--------------------------- | :------ | :---------- | +| data-background-video | | A single video source, or a comma separated list of video sources. | +| data-background-video-loop | false | Flags if the video should play repeatedly. | +| data-background-video-muted | false | Flags if the audio should be muted. | +| data-background-size | cover | Use `cover` for full screen and some cropping or `contain` for letterboxing. | + +```html +
    +

    Video

    +
    +``` + +#### Iframe Backgrounds +Embeds a web page as a slide background that covers 100% of the reveal.js width and height. The iframe is in the background layer, behind your slides, and as such it's not possible to interact with it by default. To make your background interactive, you can add the `data-background-interactive` attribute. +```html +
    +

    Iframe

    +
    +``` + +#### Background Transitions Backgrounds transition using a fade animation by default. This can be changed to a linear sliding transition by passing ```backgroundTransition: 'slide'``` to the ```Reveal.initialize()``` call. Alternatively you can set ```data-background-transition``` on any section with a background to override that specific transition. @@ -456,16 +643,16 @@ Reveal.initialize({ // Parallax background size parallaxBackgroundSize: '', // CSS syntax, e.g. "2100px 900px" - currently only pixels are supported (don't use % or auto) - // Amount of pixels to move the parallax background per slide step, - // a value of 0 disables movement along the given axis - // These are optional, if they aren't specified they'll be calculated automatically + // Number of pixels to move the parallax background per slide + // - Calculated automatically unless specified + // - Set to 0 to disable movement along an axis parallaxBackgroundHorizontal: 200, parallaxBackgroundVertical: 50 }); ``` -Make sure that the background size is much bigger than screen size to allow for some scrolling. [View example](http://lab.hakim.se/reveal-js/?parallaxBackgroundImage=https%3A%2F%2Fs3.amazonaws.com%2Fhakim-static%2Freveal-js%2Freveal-parallax-1.jpg¶llaxBackgroundSize=2100px%20900px). +Make sure that the background size is much bigger than screen size to allow for some scrolling. [View example](http://revealjs.com/?parallaxBackgroundImage=https%3A%2F%2Fs3.amazonaws.com%2Fhakim-static%2Freveal-js%2Freveal-parallax-1.jpg¶llaxBackgroundSize=2100px%20900px). @@ -486,15 +673,15 @@ You can also use different in and out transitions for the same slide: ```html
    - The train goes on … + The train goes on …
    -
    - and on … +
    + and on …
    -
    +
    and stops.
    -
    +
    (Passengers entering and leaving)
    @@ -503,9 +690,6 @@ You can also use different in and out transitions for the same slide: ``` -Note that this does not work with the page and cube transitions. - - ### Internal links It's easy to link between slides. The first example below targets the index of another slide whereas the second targets a slide with an ID attribute (```
    ```): @@ -528,7 +712,7 @@ You can also add relative navigation links, similar to the built in reveal.js co ### Fragments -Fragments are used to highlight individual elements on a slide. Every element with the class ```fragment``` will be stepped through before moving on to the next slide. Here's an example: http://lab.hakim.se/reveal-js/#/fragments +Fragments are used to highlight individual elements on a slide. Every element with the class ```fragment``` will be stepped through before moving on to the next slide. Here's an example: http://revealjs.com/#/fragments The default fragment style is to start out invisible and fade in. This style can be changed by appending a different class to the fragment: @@ -537,6 +721,7 @@ The default fragment style is to start out invisible and fade in. This style can

    grow

    shrink

    fade-out

    +

    fade-up (also down, left and right!)

    visible only once

    blue only once

    highlight-red

    @@ -582,33 +767,41 @@ Reveal.addEventListener( 'fragmenthidden', function( event ) { ### Code syntax highlighting -By default, Reveal is configured with [highlight.js](http://softwaremaniacs.org/soft/highlight/en/) for code syntax highlighting. Below is an example with clojure code that will be syntax highlighted. When the `data-trim` attribute is present surrounding whitespace is automatically removed. +By default, Reveal is configured with [highlight.js](https://highlightjs.org/) for code syntax highlighting. To enable syntax highlighting, you'll have to load the highlight plugin ([plugin/highlight/highlight.js](plugin/highlight/highlight.js)) and a highlight.js CSS theme (Reveal comes packaged with the zenburn theme: [lib/css/zenburn.css](lib/css/zenburn.css)). + +Below is an example with clojure code that will be syntax highlighted. When the `data-trim` attribute is present, surrounding whitespace is automatically removed. HTML will be escaped by default. To avoid this, for example if you are using `` to call out a line of code, add the `data-noescape` attribute to the `` element. ```html
    -
    
    +	
    
     (def lazy-fib
       (concat
        [0 1]
    -   ((fn rfib [a b]
    +   ((fn rfib [a b]
             (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
     	
    ``` ### Slide number -If you would like to display the page number of the current slide you can do so using the ```slideNumber``` configuration value. +If you would like to display the page number of the current slide you can do so using the ```slideNumber``` and ```showSlideNumber``` configuration values. ```javascript // Shows the slide number using default formatting Reveal.configure({ slideNumber: true }); // Slide number formatting can be configured using these variables: -// h: current slide's horizontal index -// v: current slide's vertical index -// c: current slide index (flattened) -// t: total number of slides (flattened) -Reveal.configure({ slideNumber: 'c / t' }); +// "h.v": horizontal . vertical slide number (default) +// "h/v": horizontal / vertical slide number +// "c": flattened slide number +// "c/t": flattened slide number / total slides +Reveal.configure({ slideNumber: 'c/t' }); + +// Control which views the slide number displays on using the "showSlideNumber" value: +// "all": show on all views (default) +// "speaker": only show slide numbers on speaker notes view +// "print": only show slide numbers when printing to PDF +Reveal.configure({ showSlideNumber: 'speaker' }); ``` @@ -626,20 +819,26 @@ Reveal.addEventListener( 'overviewhidden', function( event ) { /* ... */ } ); Reveal.toggleOverview(); ``` + ### Fullscreen mode Just press »F« on your keyboard to show your presentation in fullscreen mode. Press the »ESC« key to exit fullscreen mode. ### Embedded media -Embedded HTML5 `
    diff --git a/doc/pub/Regression/html/reveal.js/plugin/markdown/example.md b/doc/pub/Regression/html/reveal.js/plugin/markdown/example.md index 6f6f577a1..89c75345e 100644 --- a/doc/pub/Regression/html/reveal.js/plugin/markdown/example.md +++ b/doc/pub/Regression/html/reveal.js/plugin/markdown/example.md @@ -29,3 +29,8 @@ Content 3.1 ## External 3.2 Content 3.2 + + +## External 3.3 + +![External Image](https://s3.amazonaws.com/static.slid.es/logo/v2/slides-symbol-512x512.png) diff --git a/doc/pub/Regression/html/reveal.js/plugin/markdown/markdown.js b/doc/pub/Regression/html/reveal.js/plugin/markdown/markdown.js index 15e3b40b3..aa08ee5ed 100644 --- a/doc/pub/Regression/html/reveal.js/plugin/markdown/markdown.js +++ b/doc/pub/Regression/html/reveal.js/plugin/markdown/markdown.js @@ -4,33 +4,26 @@ * of external markdown documents. */ (function( root, factory ) { - if( typeof exports === 'object' ) { + if (typeof define === 'function' && define.amd) { + root.marked = require( './marked' ); + root.RevealMarkdown = factory( root.marked ); + root.RevealMarkdown.initialize(); + } else if( typeof exports === 'object' ) { module.exports = factory( require( './marked' ) ); - } - else { + } else { // Browser globals (root is window) root.RevealMarkdown = factory( root.marked ); root.RevealMarkdown.initialize(); } }( this, function( marked ) { - if( typeof marked === 'undefined' ) { - throw 'The reveal.js Markdown plugin requires marked to be loaded'; - } - - if( typeof hljs !== 'undefined' ) { - marked.setOptions({ - highlight: function( lang, code ) { - return hljs.highlightAuto( lang, code ).value; - } - }); - } - var DEFAULT_SLIDE_SEPARATOR = '^\r?\n---\r?\n$', - DEFAULT_NOTES_SEPARATOR = 'note:', + DEFAULT_NOTES_SEPARATOR = 'notes?:', DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR = '\\\.element\\\s*?(.+?)$', DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR = '\\\.slide:\\\s*?(\\\S.+?)$'; + var SCRIPT_END_PLACEHOLDER = '__SCRIPT_END__'; + /** * Retrieves the markdown contents of a slide section @@ -38,11 +31,15 @@ */ function getMarkdownFromSlide( section ) { - var template = section.querySelector( 'script' ); + // look for a ' ); + var leadingWs = text.match( /^\n?(\s*)/ )[1].length, leadingTabs = text.match( /^\n?(\t*)/ )[1].length; @@ -112,9 +109,13 @@ var notesMatch = content.split( new RegExp( options.notesSeparator, 'mgi' ) ); if( notesMatch.length === 2 ) { - content = notesMatch[0] + ''; + content = notesMatch[0] + ''; } + // prevent script end tags in the content from interfering + // with parsing + content = content.replace( /<\/script>/g, SCRIPT_END_PLACEHOLDER ); + return ''; } @@ -177,7 +178,7 @@ markdownSections += '
    '; sectionStack[i].forEach( function( child ) { - markdownSections += '
    ' + createMarkdownSlide( child, options ) + '
    '; + markdownSections += '
    ' + createMarkdownSlide( child, options ) + '
    '; } ); markdownSections += '
    '; @@ -379,6 +380,24 @@ return { initialize: function() { + if( typeof marked === 'undefined' ) { + throw 'The reveal.js Markdown plugin requires marked to be loaded'; + } + + if( typeof hljs !== 'undefined' ) { + marked.setOptions({ + highlight: function( code, lang ) { + return hljs.highlightAuto( code, [lang] ).value; + } + }); + } + + var options = Reveal.getConfig().markdown; + + if ( options ) { + marked.setOptions( options ); + } + processSlides(); convertSlides(); }, diff --git a/doc/pub/Regression/html/reveal.js/plugin/markdown/marked.js b/doc/pub/Regression/html/reveal.js/plugin/markdown/marked.js index 70af29bf9..555c1dc1d 100644 --- a/doc/pub/Regression/html/reveal.js/plugin/markdown/marked.js +++ b/doc/pub/Regression/html/reveal.js/plugin/markdown/marked.js @@ -3,4 +3,4 @@ * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) * https://github.com/chjj/marked */ -(function(){function e(e){this.tokens=[],this.tokens.links={},this.options=e||a.defaults,this.rules=p.normal,this.options.gfm&&(this.rules=this.options.tables?p.tables:p.gfm)}function t(e,t){if(this.options=t||a.defaults,this.links=e,this.rules=u.normal,this.renderer=this.options.renderer||new n,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.rules=this.options.breaks?u.breaks:u.gfm:this.options.pedantic&&(this.rules=u.pedantic)}function n(e){this.options=e||{}}function r(e){this.tokens=[],this.token=null,this.options=e||a.defaults,this.options.renderer=this.options.renderer||new n,this.renderer=this.options.renderer,this.renderer.options=this.options}function s(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function i(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?String.fromCharCode("x"===t.charAt(1)?parseInt(t.substring(2),16):+t.substring(1)):""})}function l(e,t){return e=e.source,t=t||"",function n(r,s){return r?(s=s.source||s,s=s.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,s),n):new RegExp(e,t)}}function o(){}function h(e){for(var t,n,r=1;rAn error occured:

    "+s(c.message+"",!0)+"
    ";throw c}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:o,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:o,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:o,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=l(p.item,"gm")(/bull/g,p.bullet)(),p.list=l(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=l(p.blockquote)("def",p.def)(),p._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",p.html=l(p.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,p._tag)(),p.paragraph=l(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=h({},p),p.gfm=h({},p.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/}),p.gfm.paragraph=l(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=h({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=p,e.lex=function(t,n){var r=new e(n);return r.lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,n){for(var r,s,i,l,o,h,a,u,c,e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:i.replace(/\n+$/,"")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2],text:i[3]});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(t&&(i=this.rules.nptable.exec(e))){for(e=e.substring(i[0].length),h={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/\n$/,"").split("\n")},u=0;u ?/gm,""),this.token(i,t,!0),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),l=i[2],this.tokens.push({type:"list_start",ordered:l.length>1}),i=i[0].match(this.rules.item),r=!1,c=i.length,u=0;c>u;u++)h=i[u],a=h.length,h=h.replace(/^ *([*+-]|\d+\.) +/,""),~h.indexOf("\n ")&&(a-=h.length,h=this.options.pedantic?h.replace(/^ {1,4}/gm,""):h.replace(new RegExp("^ {1,"+a+"}","gm"),"")),this.options.smartLists&&u!==c-1&&(o=p.bullet.exec(i[u+1])[0],l===o||l.length>1&&o.length>1||(e=i.slice(u+1).join("\n")+e,u=c-1)),s=r||/\n\n(?!\s*$)/.test(h),u!==c-1&&(r="\n"===h.charAt(h.length-1),s||(s=r)),this.tokens.push({type:s?"loose_item_start":"list_item_start"}),this.token(h,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(e))e=e.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:"pre"===i[1]||"script"===i[1]||"style"===i[1],text:i[0]});else if(!n&&t&&(i=this.rules.def.exec(e)))e=e.substring(i[0].length),this.tokens.links[i[1].toLowerCase()]={href:i[2],title:i[3]};else if(t&&(i=this.rules.table.exec(e))){for(e=e.substring(i[0].length),h={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:o,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:o,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,u.link=l(u.link)("inside",u._inside)("href",u._href)(),u.reflink=l(u.reflink)("inside",u._inside)(),u.normal=h({},u),u.pedantic=h({},u.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),u.gfm=h({},u.normal,{escape:l(u.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:l(u.text)("]|","~]|")("|","|https?://|")()}),u.breaks=h({},u.gfm,{br:l(u.br)("{2,}","*")(),text:l(u.gfm.text)("{2,}","*")()}),t.rules=u,t.output=function(e,n,r){var s=new t(n,r);return s.output(e)},t.prototype.output=function(e){for(var t,n,r,i,l="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),l+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=this.mangle(":"===i[1].charAt(6)?i[1].substring(7):i[1]),r=this.mangle("mailto:")+n):(n=s(i[1]),r=n),l+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),l+=this.options.sanitize?s(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,l+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){l+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),l+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),l+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),l+=this.renderer.codespan(s(i[2],!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),l+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),l+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),l+=s(this.smartypants(i[0]));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=s(i[1]),r=n,l+=this.renderer.link(r,null,n);return l},t.prototype.outputLink=function(e,t){var n=s(t.href),r=t.title?s(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,s(e[1]))},t.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/--/g,"—").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},t.prototype.mangle=function(e){for(var t,n="",r=e.length,s=0;r>s;s++)t=e.charCodeAt(s),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},n.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
    '+(n?e:s(e,!0))+"\n
    \n":"
    "+(n?e:s(e,!0))+"\n
    "},n.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,n){return"'+e+"\n"},n.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},n.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},n.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},n.prototype.paragraph=function(e){return"

    "+e+"

    \n"},n.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},n.prototype.tablerow=function(e){return"\n"+e+"\n"},n.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"\n"},n.prototype.strong=function(e){return""+e+""},n.prototype.em=function(e){return""+e+""},n.prototype.codespan=function(e){return""+e+""},n.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},n.prototype.del=function(e){return""+e+""},n.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(i(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(s){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var l='
    "},n.prototype.image=function(e,t,n){var r=''+n+'":">"},r.parse=function(e,t,n){var s=new r(t,n);return s.parse(e)},r.prototype.parse=function(e){this.inline=new t(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var n="";this.next();)n+=this.tok();return n},r.prototype.next=function(){return this.token=this.tokens.pop()},r.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},r.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},r.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,s,i="",l="";for(n="",e=0;e[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]||""});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&(cap[1]==="pre"||cap[1]==="script"||cap[1]==="style"),text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.text(escape(this.smartypants(cap[0])));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){if(!this.options.mangle)return text;var out="",l=text.length,i=0,ch;for(;i.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"
    "+(escaped?code:escape(code,true))+"\n
    "}return'
    '+(escaped?code:escape(code,true))+"\n
    \n"};Renderer.prototype.blockquote=function(quote){return"
    \n"+quote+"
    \n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"'+text+"\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"\n"};Renderer.prototype.listitem=function(text){return"
  • "+text+"
  • \n"};Renderer.prototype.paragraph=function(text){return"

    "+text+"

    \n"};Renderer.prototype.table=function(header,body){return"\n"+"\n"+header+"\n"+"\n"+body+"\n"+"
    \n"};Renderer.prototype.tablerow=function(content){return"\n"+content+"\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"\n"};Renderer.prototype.strong=function(text){return""+text+""};Renderer.prototype.em=function(text){return""+text+""};Renderer.prototype.codespan=function(text){return""+text+""};Renderer.prototype.br=function(){return this.options.xhtml?"
    ":"
    "};Renderer.prototype.del=function(text){return""+text+""};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='
    ";return out};Renderer.prototype.image=function(href,title,text){var out=''+text+'":">";return out};Renderer.prototype.text=function(text){return text};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occured:

    "+escape(e.message+"",true)+"
    "}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}()); \ No newline at end of file diff --git a/doc/pub/Regression/html/reveal.js/plugin/math/math.js b/doc/pub/Regression/html/reveal.js/plugin/math/math.js index 25b751637..e3b408981 100644 --- a/doc/pub/Regression/html/reveal.js/plugin/math/math.js +++ b/doc/pub/Regression/html/reveal.js/plugin/math/math.js @@ -7,14 +7,17 @@ var RevealMath = window.RevealMath || (function(){ var options = Reveal.getConfig().math || {}; - options.mathjax = options.mathjax || 'https://cdn.mathjax.org/mathjax/latest/MathJax.js'; + options.mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js'; options.config = options.config || 'TeX-AMS_HTML-full'; loadScript( options.mathjax + '?config=' + options.config, function() { MathJax.Hub.Config({ messageStyle: 'none', - tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] }, + tex2jax: { + inlineMath: [['$','$'],['\\(','\\)']] , + skipTags: ['script','noscript','style','textarea','pre'] + }, skipStartupTypeset: true }); diff --git a/doc/pub/Regression/html/reveal.js/plugin/multiplex/client.js b/doc/pub/Regression/html/reveal.js/plugin/multiplex/client.js index e6179f6de..3ffd1e033 100644 --- a/doc/pub/Regression/html/reveal.js/plugin/multiplex/client.js +++ b/doc/pub/Regression/html/reveal.js/plugin/multiplex/client.js @@ -8,6 +8,6 @@ if (data.socketId !== socketId) { return; } if( window.location.host === 'localhost:1947' ) return; - Reveal.slide(data.indexh, data.indexv, data.indexf, 'remote'); + Reveal.setState(data.state); }); }()); diff --git a/doc/pub/Regression/html/reveal.js/plugin/multiplex/index.js b/doc/pub/Regression/html/reveal.js/plugin/multiplex/index.js index af058ed2f..8195f046d 100644 --- a/doc/pub/Regression/html/reveal.js/plugin/multiplex/index.js +++ b/doc/pub/Regression/html/reveal.js/plugin/multiplex/index.js @@ -1,37 +1,45 @@ +var http = require('http'); var express = require('express'); var fs = require('fs'); var io = require('socket.io'); var crypto = require('crypto'); -var app = express.createServer(); -var staticDir = express.static; +var app = express(); +var staticDir = express.static; +var server = http.createServer(app); -io = io.listen(app); +io = io(server); var opts = { port: process.env.PORT || 1948, baseDir : __dirname + '/../../' }; -io.sockets.on('connection', function(socket) { - socket.on('slidechanged', function(slideData) { - if (typeof slideData.secret == 'undefined' || slideData.secret == null || slideData.secret === '') return; - if (createHash(slideData.secret) === slideData.socketId) { - slideData.secret = null; - socket.broadcast.emit(slideData.socketId, slideData); +io.on( 'connection', function( socket ) { + socket.on('multiplex-statechanged', function(data) { + if (typeof data.secret == 'undefined' || data.secret == null || data.secret === '') return; + if (createHash(data.secret) === data.socketId) { + data.secret = null; + socket.broadcast.emit(data.socketId, data); }; }); }); -app.configure(function() { - [ 'css', 'js', 'plugin', 'lib' ].forEach(function(dir) { - app.use('/' + dir, staticDir(opts.baseDir + dir)); - }); +[ 'css', 'js', 'plugin', 'lib' ].forEach(function(dir) { + app.use('/' + dir, staticDir(opts.baseDir + dir)); }); app.get("/", function(req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); - fs.createReadStream(opts.baseDir + '/index.html').pipe(res); + + var stream = fs.createReadStream(opts.baseDir + '/index.html'); + stream.on('error', function( error ) { + res.write('

    reveal.js multiplex server.

    Generate token'); + res.end(); + }); + stream.on('readable', function() { + stream.pipe(res); + }); }); app.get("/token", function(req,res) { @@ -47,7 +55,7 @@ var createHash = function(secret) { }; // Actually listen -app.listen(opts.port || null); +server.listen( opts.port || null ); var brown = '\033[33m', green = '\033[32m', diff --git a/doc/pub/Regression/html/reveal.js/plugin/multiplex/master.js b/doc/pub/Regression/html/reveal.js/plugin/multiplex/master.js index b6a7eb7dc..7f4bf4511 100644 --- a/doc/pub/Regression/html/reveal.js/plugin/multiplex/master.js +++ b/doc/pub/Regression/html/reveal.js/plugin/multiplex/master.js @@ -1,51 +1,34 @@ (function() { + // Don't emit events from inside of notes windows if ( window.location.search.match( /receiver/gi ) ) { return; } var multiplex = Reveal.getConfig().multiplex; - var socket = io.connect(multiplex.url); + var socket = io.connect( multiplex.url ); - var notify = function( slideElement, indexh, indexv, origin ) { - if( typeof origin === 'undefined' && origin !== 'remote' ) { - var nextindexh; - var nextindexv; + function post() { - var fragmentindex = Reveal.getIndices().f; - if (typeof fragmentindex == 'undefined') { - fragmentindex = 0; - } + var messageData = { + state: Reveal.getState(), + secret: multiplex.secret, + socketId: multiplex.id + }; - if (slideElement.nextElementSibling && slideElement.parentNode.nodeName == 'SECTION') { - nextindexh = indexh; - nextindexv = indexv + 1; - } else { - nextindexh = indexh + 1; - nextindexv = 0; - } + socket.emit( 'multiplex-statechanged', messageData ); - var slideData = { - indexh : indexh, - indexv : indexv, - indexf : fragmentindex, - nextindexh : nextindexh, - nextindexv : nextindexv, - secret: multiplex.secret, - socketId : multiplex.id - }; - - socket.emit('slidechanged', slideData); - } - } - - Reveal.addEventListener( 'slidechanged', function( event ) { - notify( event.currentSlide, event.indexh, event.indexv, event.origin ); - } ); - - var fragmentNotify = function( event ) { - notify( Reveal.getCurrentSlide(), Reveal.getIndices().h, Reveal.getIndices().v, event.origin ); }; - Reveal.addEventListener( 'fragmentshown', fragmentNotify ); - Reveal.addEventListener( 'fragmenthidden', fragmentNotify ); -}()); \ No newline at end of file + // post once the page is loaded, so the client follows also on "open URL". + window.addEventListener( 'load', post ); + + // Monitor events that trigger a change in state + Reveal.addEventListener( 'slidechanged', post ); + Reveal.addEventListener( 'fragmentshown', post ); + Reveal.addEventListener( 'fragmenthidden', post ); + Reveal.addEventListener( 'overviewhidden', post ); + Reveal.addEventListener( 'overviewshown', post ); + Reveal.addEventListener( 'paused', post ); + Reveal.addEventListener( 'resumed', post ); + +}()); diff --git a/doc/pub/Regression/html/reveal.js/plugin/notes-server/client.js b/doc/pub/Regression/html/reveal.js/plugin/notes-server/client.js index 628586ffb..00b277baf 100644 --- a/doc/pub/Regression/html/reveal.js/plugin/notes-server/client.js +++ b/doc/pub/Regression/html/reveal.js/plugin/notes-server/client.js @@ -41,10 +41,15 @@ } // When a new notes window connects, post our current state - socket.on( 'connect', function( data ) { + socket.on( 'new-subscriber', function( data ) { post(); } ); + // When the state changes from inside of the speaker view + socket.on( 'statechanged-speaker', function( data ) { + Reveal.setState( data.state ); + } ); + // Monitor events that trigger a change in state Reveal.addEventListener( 'slidechanged', post ); Reveal.addEventListener( 'fragmentshown', post ); diff --git a/doc/pub/Regression/html/reveal.js/plugin/notes-server/index.js b/doc/pub/Regression/html/reveal.js/plugin/notes-server/index.js index df917f112..b95f07188 100644 --- a/doc/pub/Regression/html/reveal.js/plugin/notes-server/index.js +++ b/doc/pub/Regression/html/reveal.js/plugin/notes-server/index.js @@ -1,37 +1,40 @@ +var http = require('http'); var express = require('express'); var fs = require('fs'); var io = require('socket.io'); -var _ = require('underscore'); var Mustache = require('mustache'); -var app = express.createServer(); +var app = express(); var staticDir = express.static; +var server = http.createServer(app); -io = io.listen(app); +io = io(server); var opts = { port : 1947, baseDir : __dirname + '/../../' }; -io.sockets.on( 'connection', function( socket ) { +io.on( 'connection', function( socket ) { - socket.on( 'connect', function( data ) { - socket.broadcast.emit( 'connect', data ); + socket.on( 'new-subscriber', function( data ) { + socket.broadcast.emit( 'new-subscriber', data ); }); socket.on( 'statechanged', function( data ) { + delete data.state.overview; socket.broadcast.emit( 'statechanged', data ); }); + socket.on( 'statechanged-speaker', function( data ) { + delete data.state.overview; + socket.broadcast.emit( 'statechanged-speaker', data ); + }); + }); -app.configure( function() { - - [ 'css', 'js', 'images', 'plugin', 'lib' ].forEach( function( dir ) { - app.use( '/' + dir, staticDir( opts.baseDir + dir ) ); - }); - +[ 'css', 'js', 'images', 'plugin', 'lib' ].forEach( function( dir ) { + app.use( '/' + dir, staticDir( opts.baseDir + dir ) ); }); app.get('/', function( req, res ) { @@ -52,7 +55,7 @@ app.get( '/notes/:socketId', function( req, res ) { }); // Actually listen -app.listen( opts.port || null ); +server.listen( opts.port || null ); var brown = '\033[33m', green = '\033[32m', @@ -62,5 +65,5 @@ var slidesLocation = 'http://localhost' + ( opts.port ? ( ':' + opts.port ) : '' console.log( brown + 'reveal.js - Speaker Notes' + reset ); console.log( '1. Open the slides at ' + green + slidesLocation + reset ); -console.log( '2. Click on the link your JS console to go to the notes page' ); +console.log( '2. Click on the link in your JS console to go to the notes page' ); console.log( '3. Advance through your slides and your notes will advance automatically' ); diff --git a/doc/pub/Regression/html/reveal.js/plugin/notes-server/notes.html b/doc/pub/Regression/html/reveal.js/plugin/notes-server/notes.html index 72d0317f1..ab8c5b17a 100644 --- a/doc/pub/Regression/html/reveal.js/plugin/notes-server/notes.html +++ b/doc/pub/Regression/html/reveal.js/plugin/notes-server/notes.html @@ -8,6 +8,7 @@ @@ -152,7 +247,7 @@
    -
    UPCOMING:
    +
    Upcoming

    Time Click to Reset

    @@ -170,6 +265,10 @@
    +
    + + +
    @@ -182,11 +281,20 @@ currentState, currentSlide, upcomingSlide, + layoutLabel, + layoutDropdown, connected = false; var socket = io.connect( window.location.origin ), socketId = '{{socketId}}'; + var SPEAKER_LAYOUTS = { + 'default': 'Default', + 'wide': 'Wide', + 'tall': 'Tall', + 'notes-only': 'Notes only' + }; + socket.on( 'statechanged', function( data ) { // ignore data from sockets that aren't ours @@ -195,7 +303,6 @@ if( connected === false ) { connected = true; - setupIframes( data ); setupKeyboard(); setupNotes(); setupTimer(); @@ -206,13 +313,28 @@ } ); + setupLayout(); + + // Load our presentation iframes + setupIframes(); + + // Once the iframes have loaded, emit a signal saying there's + // a new subscriber which will trigger a 'statechanged' + // message to be sent back window.addEventListener( 'message', function( event ) { var data = JSON.parse( event.data ); if( data && data.namespace === 'reveal' ) { if( /ready/.test( data.eventName ) ) { - socket.emit( 'connect', { socketId: socketId } ); + socket.emit( 'new-subscriber', { socketId: socketId } ); + } + } + + // Messages sent by reveal.js inside of the current slide preview + if( data && data.namespace === 'reveal' ) { + if( /slidechanged|fragmentshown|fragmenthidden|overviewshown|overviewhidden|paused|resumed/.test( data.eventName ) && currentState !== JSON.stringify( data.state ) ) { + socket.emit( 'statechanged-speaker', { state: data.state } ); } } @@ -267,7 +389,7 @@ /** * Creates the preview iframes. */ - function setupIframes( data ) { + function setupIframes() { var params = [ 'receiver', @@ -277,9 +399,8 @@ 'backgroundTransition=none' ].join( '&' ); - var hash = '#/' + data.state.indexh + '/' + data.state.indexv; - var currentURL = '/?' + params + '&postMessageEvents=true' + hash; - var upcomingURL = '/?' + params + '&controls=false' + hash; + var currentURL = '/?' + params + '&postMessageEvents=true'; + var upcomingURL = '/?' + params + '&controls=false'; currentSlide = document.createElement( 'iframe' ); currentSlide.setAttribute( 'width', 1280 ); @@ -351,6 +472,74 @@ } + /** + * Sets up the speaker view layout and layout selector. + */ + function setupLayout() { + + layoutDropdown = document.querySelector( '.speaker-layout-dropdown' ); + layoutLabel = document.querySelector( '.speaker-layout-label' ); + + // Render the list of available layouts + for( var id in SPEAKER_LAYOUTS ) { + var option = document.createElement( 'option' ); + option.setAttribute( 'value', id ); + option.textContent = SPEAKER_LAYOUTS[ id ]; + layoutDropdown.appendChild( option ); + } + + // Monitor the dropdown for changes + layoutDropdown.addEventListener( 'change', function( event ) { + + setLayout( layoutDropdown.value ); + + }, false ); + + // Restore any currently persisted layout + setLayout( getLayout() ); + + } + + /** + * Sets a new speaker view layout. The layout is persisted + * in local storage. + */ + function setLayout( value ) { + + var title = SPEAKER_LAYOUTS[ value ]; + + layoutLabel.innerHTML = 'Layout' + ( title ? ( ': ' + title ) : '' ); + layoutDropdown.value = value; + + document.body.setAttribute( 'data-speaker-layout', value ); + + // Persist locally + if( window.localStorage ) { + window.localStorage.setItem( 'reveal-speaker-layout', value ); + } + + } + + /** + * Returns the ID of the most recently set speaker layout + * or our default layout if none has been set. + */ + function getLayout() { + + if( window.localStorage ) { + var layout = window.localStorage.getItem( 'reveal-speaker-layout' ); + if( layout ) { + return layout; + } + } + + // Default to the first record in the layouts hash + for( var id in SPEAKER_LAYOUTS ) { + return id; + } + + } + function zeroPadInteger( num ) { var str = '00' + parseInt( num ); diff --git a/doc/pub/Regression/html/reveal.js/plugin/notes/notes.html b/doc/pub/Regression/html/reveal.js/plugin/notes/notes.html index 0cc8cf612..4c5b799b5 100644 --- a/doc/pub/Regression/html/reveal.js/plugin/notes/notes.html +++ b/doc/pub/Regression/html/reveal.js/plugin/notes/notes.html @@ -8,6 +8,7 @@