From 44053ec9fee4b0239667d11734375850e1c92b21 Mon Sep 17 00:00:00 2001 From: andyeisenberg Date: Thu, 5 Feb 2026 07:23:38 -0500 Subject: [PATCH] Latest build deployed. --- course/.mapping.json | 2 +- course/_static/._39.47c68f7dc05f7c3e.js | Bin 0 -> 163 bytes .../._39.47c68f7dc05f7c3e.js.LICENSE.txt | Bin 0 -> 163 bytes course/_static/._39.47c68f7dc05f7c3e.js.gz | Bin 0 -> 163 bytes course/_static/._39.47c68f7dc05f7c3e.js.map | Bin 0 -> 163 bytes .../_static/._39.47c68f7dc05f7c3e.js.map.gz | Bin 0 -> 163 bytes course/_static/._420.930dc253cc191e9e.js | Bin 0 -> 163 bytes .../._420.930dc253cc191e9e.js.LICENSE.txt | Bin 0 -> 163 bytes course/_static/._420.930dc253cc191e9e.js.gz | Bin 0 -> 163 bytes course/_static/._420.930dc253cc191e9e.js.map | Bin 0 -> 163 bytes .../_static/._420.930dc253cc191e9e.js.map.gz | Bin 0 -> 163 bytes ..._prefix-runtime.0d5f811896ddeac1.bundle.js | Bin 0 -> 163 bytes ...efix-runtime.0d5f811896ddeac1.bundle.js.gz | Bin 0 -> 163 bytes ...fix-runtime.0d5f811896ddeac1.bundle.js.map | Bin 0 -> 163 bytes ...-runtime.0d5f811896ddeac1.bundle.js.map.gz | Bin 0 -> 163 bytes course/_static/39.47c68f7dc05f7c3e.js | 3 + .../39.47c68f7dc05f7c3e.js.LICENSE.txt | 5 + course/_static/39.47c68f7dc05f7c3e.js.gz | Bin 0 -> 29543 bytes course/_static/39.47c68f7dc05f7c3e.js.map | 1 + course/_static/39.47c68f7dc05f7c3e.js.map.gz | Bin 0 -> 90162 bytes course/_static/420.930dc253cc191e9e.js | 3 + .../420.930dc253cc191e9e.js.LICENSE.txt | 5 + course/_static/420.930dc253cc191e9e.js.gz | Bin 0 -> 29537 bytes course/_static/420.930dc253cc191e9e.js.map | 1 + course/_static/420.930dc253cc191e9e.js.map.gz | Bin 0 -> 90164 bytes course/_static/_runestone-services.xml | 4 +- .../prefix-runtime.0d5f811896ddeac1.bundle.js | 2 + ...efix-runtime.0d5f811896ddeac1.bundle.js.gz | Bin 0 -> 3115 bytes ...fix-runtime.0d5f811896ddeac1.bundle.js.map | 1 + ...-runtime.0d5f811896ddeac1.bundle.js.map.gz | Bin 0 -> 8480 bytes course/_static/webpack_static_imports.json | 2 +- course/_static/webpack_static_imports.json.gz | Bin 154 -> 155 bytes course/_static/webpack_static_imports.xml | 4 +- course/ch-notes.html | 9 +- course/course-documents.html | 9 +- course/frontmatter.html | 9 +- course/index.html | 2 +- course/lunr-pretext-search-index.js | 38 +- course/notes-01-13.html | 9 +- course/notes-01-15.html | 9 +- course/notes-01-20.html | 9 +- course/notes-01-22.html | 9 +- course/notes-01-27.html | 9 +- course/notes-01-29.html | 11 +- course/quiz-01-printable.html | 13 +- course/quiz-01.html | 13 +- course/quiz-02-printable.html | 385 ++++++++++++++++++ course/quiz-02.html | 369 +++++++++++++++++ course/quizzes.html | 14 +- .../recitation-calculus-review-printable.html | 13 +- course/recitation-calculus-review.html | 13 +- course/recitations.html | 13 +- course/root-1-2.html | 9 +- course/syllabus.html | 9 +- 54 files changed, 936 insertions(+), 71 deletions(-) create mode 100755 course/_static/._39.47c68f7dc05f7c3e.js create mode 100755 course/_static/._39.47c68f7dc05f7c3e.js.LICENSE.txt create mode 100755 course/_static/._39.47c68f7dc05f7c3e.js.gz create mode 100755 course/_static/._39.47c68f7dc05f7c3e.js.map create mode 100755 course/_static/._39.47c68f7dc05f7c3e.js.map.gz create mode 100755 course/_static/._420.930dc253cc191e9e.js create mode 100755 course/_static/._420.930dc253cc191e9e.js.LICENSE.txt create mode 100755 course/_static/._420.930dc253cc191e9e.js.gz create mode 100755 course/_static/._420.930dc253cc191e9e.js.map create mode 100755 course/_static/._420.930dc253cc191e9e.js.map.gz create mode 100755 course/_static/._prefix-runtime.0d5f811896ddeac1.bundle.js create mode 100755 course/_static/._prefix-runtime.0d5f811896ddeac1.bundle.js.gz create mode 100755 course/_static/._prefix-runtime.0d5f811896ddeac1.bundle.js.map create mode 100755 course/_static/._prefix-runtime.0d5f811896ddeac1.bundle.js.map.gz create mode 100755 course/_static/39.47c68f7dc05f7c3e.js create mode 100755 course/_static/39.47c68f7dc05f7c3e.js.LICENSE.txt create mode 100755 course/_static/39.47c68f7dc05f7c3e.js.gz create mode 100755 course/_static/39.47c68f7dc05f7c3e.js.map create mode 100755 course/_static/39.47c68f7dc05f7c3e.js.map.gz create mode 100755 course/_static/420.930dc253cc191e9e.js create mode 100755 course/_static/420.930dc253cc191e9e.js.LICENSE.txt create mode 100755 course/_static/420.930dc253cc191e9e.js.gz create mode 100755 course/_static/420.930dc253cc191e9e.js.map create mode 100755 course/_static/420.930dc253cc191e9e.js.map.gz create mode 100755 course/_static/prefix-runtime.0d5f811896ddeac1.bundle.js create mode 100755 course/_static/prefix-runtime.0d5f811896ddeac1.bundle.js.gz create mode 100755 course/_static/prefix-runtime.0d5f811896ddeac1.bundle.js.map create mode 100755 course/_static/prefix-runtime.0d5f811896ddeac1.bundle.js.map.gz create mode 100755 course/quiz-02-printable.html create mode 100755 course/quiz-02.html diff --git a/course/.mapping.json b/course/.mapping.json index d0c1a7a..4e54f2a 100755 --- a/course/.mapping.json +++ b/course/.mapping.json @@ -1 +1 @@ -{"source/main.ptx": ["frontmatter", "course-documents", "ch-notes", "quizzes", "recitations"], "source/syllabus/syllabus.ptx": ["syllabus"], "source/notes/1-13.ptx": ["notes-01-13"], "source/notes/1-15.ptx": ["notes-01-15"], "source/notes/1-20.ptx": ["notes-01-20"], "source/notes/1-22.ptx": ["notes-01-22"], "source/notes/1-27.ptx": ["notes-01-27"], "source/notes/1-29.ptx": ["notes-01-29"], "source/quizzes/quiz-01.ptx": ["quiz-01"], "source/recitations/calculus-review.ptx": ["recitation-calculus-review"]} \ No newline at end of file +{"source/main.ptx": ["frontmatter", "course-documents", "ch-notes", "quizzes", "recitations"], "source/syllabus/syllabus.ptx": ["syllabus"], "source/notes/1-13.ptx": ["notes-01-13"], "source/notes/1-15.ptx": ["notes-01-15"], "source/notes/1-20.ptx": ["notes-01-20"], "source/notes/1-22.ptx": ["notes-01-22"], "source/notes/1-27.ptx": ["notes-01-27"], "source/notes/1-29.ptx": ["notes-01-29"], "source/quizzes/quiz-01.ptx": ["quiz-01"], "source/quizzes/quiz-02.ptx": ["quiz-02"], "source/recitations/calculus-review.ptx": ["recitation-calculus-review"]} \ No newline at end of file diff --git a/course/_static/._39.47c68f7dc05f7c3e.js b/course/_static/._39.47c68f7dc05f7c3e.js new file mode 100755 index 0000000000000000000000000000000000000000..d4c638481f3a3a657f36d188ef835324080a1acd GIT binary patch literal 163 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K!kB^sueM$V05C2SK>z>% literal 0 HcmV?d00001 diff --git a/course/_static/._39.47c68f7dc05f7c3e.js.LICENSE.txt b/course/_static/._39.47c68f7dc05f7c3e.js.LICENSE.txt new file mode 100755 index 0000000000000000000000000000000000000000..d4c638481f3a3a657f36d188ef835324080a1acd GIT binary patch literal 163 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K!kB^sueM$V05C2SK>z>% literal 0 HcmV?d00001 diff --git a/course/_static/._39.47c68f7dc05f7c3e.js.gz b/course/_static/._39.47c68f7dc05f7c3e.js.gz new file mode 100755 index 0000000000000000000000000000000000000000..d4c638481f3a3a657f36d188ef835324080a1acd GIT binary patch literal 163 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K!kB^sueM$V05C2SK>z>% literal 0 HcmV?d00001 diff --git a/course/_static/._39.47c68f7dc05f7c3e.js.map b/course/_static/._39.47c68f7dc05f7c3e.js.map new file mode 100755 index 0000000000000000000000000000000000000000..d4c638481f3a3a657f36d188ef835324080a1acd GIT binary patch literal 163 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K!kB^sueM$V05C2SK>z>% literal 0 HcmV?d00001 diff --git a/course/_static/._39.47c68f7dc05f7c3e.js.map.gz b/course/_static/._39.47c68f7dc05f7c3e.js.map.gz new file mode 100755 index 0000000000000000000000000000000000000000..d4c638481f3a3a657f36d188ef835324080a1acd GIT binary patch literal 163 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K!kB^sueM$V05C2SK>z>% literal 0 HcmV?d00001 diff --git a/course/_static/._420.930dc253cc191e9e.js b/course/_static/._420.930dc253cc191e9e.js new file mode 100755 index 0000000000000000000000000000000000000000..d4c638481f3a3a657f36d188ef835324080a1acd GIT binary patch literal 163 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K!kB^sueM$V05C2SK>z>% literal 0 HcmV?d00001 diff --git a/course/_static/._420.930dc253cc191e9e.js.LICENSE.txt b/course/_static/._420.930dc253cc191e9e.js.LICENSE.txt new file mode 100755 index 0000000000000000000000000000000000000000..d4c638481f3a3a657f36d188ef835324080a1acd GIT binary patch literal 163 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K!kB^sueM$V05C2SK>z>% literal 0 HcmV?d00001 diff --git a/course/_static/._420.930dc253cc191e9e.js.gz b/course/_static/._420.930dc253cc191e9e.js.gz new file mode 100755 index 0000000000000000000000000000000000000000..d4c638481f3a3a657f36d188ef835324080a1acd GIT binary patch literal 163 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K!kB^sueM$V05C2SK>z>% literal 0 HcmV?d00001 diff --git a/course/_static/._420.930dc253cc191e9e.js.map b/course/_static/._420.930dc253cc191e9e.js.map new file mode 100755 index 0000000000000000000000000000000000000000..d4c638481f3a3a657f36d188ef835324080a1acd GIT binary patch literal 163 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K!kB^sueM$V05C2SK>z>% literal 0 HcmV?d00001 diff --git a/course/_static/._420.930dc253cc191e9e.js.map.gz b/course/_static/._420.930dc253cc191e9e.js.map.gz new file mode 100755 index 0000000000000000000000000000000000000000..d4c638481f3a3a657f36d188ef835324080a1acd GIT binary patch literal 163 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K!kB^sueM$V05C2SK>z>% literal 0 HcmV?d00001 diff --git a/course/_static/._prefix-runtime.0d5f811896ddeac1.bundle.js b/course/_static/._prefix-runtime.0d5f811896ddeac1.bundle.js new file mode 100755 index 0000000000000000000000000000000000000000..d4c638481f3a3a657f36d188ef835324080a1acd GIT binary patch literal 163 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K!kB^sueM$V05C2SK>z>% literal 0 HcmV?d00001 diff --git a/course/_static/._prefix-runtime.0d5f811896ddeac1.bundle.js.gz b/course/_static/._prefix-runtime.0d5f811896ddeac1.bundle.js.gz new file mode 100755 index 0000000000000000000000000000000000000000..d4c638481f3a3a657f36d188ef835324080a1acd GIT binary patch literal 163 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K!kB^sueM$V05C2SK>z>% literal 0 HcmV?d00001 diff --git a/course/_static/._prefix-runtime.0d5f811896ddeac1.bundle.js.map b/course/_static/._prefix-runtime.0d5f811896ddeac1.bundle.js.map new file mode 100755 index 0000000000000000000000000000000000000000..d4c638481f3a3a657f36d188ef835324080a1acd GIT binary patch literal 163 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K!kB^sueM$V05C2SK>z>% literal 0 HcmV?d00001 diff --git a/course/_static/._prefix-runtime.0d5f811896ddeac1.bundle.js.map.gz b/course/_static/._prefix-runtime.0d5f811896ddeac1.bundle.js.map.gz new file mode 100755 index 0000000000000000000000000000000000000000..d4c638481f3a3a657f36d188ef835324080a1acd GIT binary patch literal 163 zcmZQz6=P>$Vqox1Ojhs@R)|o50+1L3ClDI}aUl?c_=|y<2;dkJ5(HHS(lG;wxzV&S oBE&_L^K!kB^sueM$V05C2SK>z>% literal 0 HcmV?d00001 diff --git a/course/_static/39.47c68f7dc05f7c3e.js b/course/_static/39.47c68f7dc05f7c3e.js new file mode 100755 index 0000000..bf9a167 --- /dev/null +++ b/course/_static/39.47c68f7dc05f7c3e.js @@ -0,0 +1,3 @@ +/*! For license information please see 39.47c68f7dc05f7c3e.js.LICENSE.txt */ +(self.webpackChunkWebComponents=self.webpackChunkWebComponents||[]).push([[39,420],{52420:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>_});var s=i(78673);i(75794),i(56906),i(78811);class n{constructor(e){this.problem=e}inverseLISIndices(e){for(var t=[],i=0;in&&rh&&(h=c.length,l=c)}var d=[],u=0;for(let t=0;tl.length?d.push(t):e[t]==l[u]?u+=1:d.push(t);return d}grade(){var e=this.problem;e.clearFeedback(),this.correctLines=0,this.percentLines=0,this.incorrectIndents=0;var t,i=e.solution,s=e.answerLines();this.percentLines=Math.min(s.length,i.length)/Math.max(s.length,i.length),s.lengthe[s].indent&&this.indentLeft.push(t[s]);return this.incorrectIndents=this.indentLeft.length+this.indentRight.length,0==this.incorrectIndents}checkCorrectOrdering(e,t){let i=!0;this.correctLines=0,this.solutionLength=e.length;let s=Math.min(e.length,t.length);for(let n=0;n0&&u.length>0;)if(c.length<=u.length){a=c,c=[];for(let e of a)for(let t of o(e))if(l.has(t)||(c.push(t),l.set(t,e)),h.has(t))return[l,h,t]}else{a=u,u=[];for(let e of a)for(let t of r(e))if(h.has(t)||(u.push(t),h.set(t,e)),l.has(t))return[l,h,t]}throw new d("No path between "+t.toString()+" and "+i.toString()+".")}(e,t,i),o=[];null!=r;)o.push(r),r=s.get(r);for(r=n.get(o[0]),o.reverse();null!=r;)o.push(r),r=n.get(r)}(e,t,i)}catch(e){if(e instanceof d)return!1;throw e}return!0}class o{constructor(){this.graph={},this.node=new Map,this.adj=new Map,this.pred=new Map,this.succ=this.adj,this.edge=this.adj}addNode(e){this.succ.has(e)||(this.succ.set(e,new Map),this.pred.set(e,new Map),this.node.set(e))}addEdge(e,t){this.succ.has(e)||(this.succ.set(e,new Map),this.pred.set(e,new Map),this.node.set(e,{})),this.succ.has(t)||(this.succ.set(t,new Map),this.pred.set(t,new Map),this.node.set(t,{}));var i=this.adj.get(e).get(t)||{};this.succ.get(e).set(t,i),this.pred.get(t).set(e,i)}nodes(e=!1){return Array.from(e?this.node.entries():this.node.keys())}edges(e,t=!1){return Array.from(this.edgesIter(e,t))}nodesIter(e=!1){return e?toIterator(this.node):this.node.keys()}get(e){var t=this.adj.get(e);if(void 0===t)throw new KeyError("Graph does not contain node "+e+".");return t}numberOfNodes(){return this.node.size}*nbunchIter(e){if(null==e)yield*this.adj.keys();else if(this.hasNode(e))yield e;else{var t=this.adj;try{for(var i of toIterator(e))t.has(i)&&(yield i)}catch(e){if(e instanceof TypeError)throw new h("nbunch is not a node or a sequence of nodes")}}}*edgesIter(e,t=!1){var i;for(var s of((!0===(i=e)||!1===i||function(e){return!!e&&"object"==typeof e}(i)&&"[object Boolean]"==Object.prototype.toString.call(i))&&(t=e,e=void 0),void 0===e?this.adj:mapIterator(this.nbunchIter(e),(e=>tuple2(e,this.adj.get(e))))))for(var n of s[1]){var r=[s[0],n[0]];t&&(r[2]=n[1]),yield r}}reverse(e=!0){var t;if(e)(t=new this.constructor(null,{name:"Reverse of ("+this.name+")"})).addNodesFrom(this),t.addEdgesFrom(mapIterator(this.edgesIter(null,!0),(e=>tuple3c(e[1],e[0],deepcopy(e[2]),e)))),t.graph=deepcopy(this.graph),t.node=deepcopy(this.node);else{var i=this.pred,s=this.succ;this.succ=i,this.pred=s,this.adj=this.succ,t=this}return t}successorsIter(e){var t=this.succ.get(e);if(void 0!==t)return t.keys();throw new h(sprintf('The node "%j" is not in the digraph.',e))}predecessorsIter(e){var t=this.pred.get(e);if(void 0!==t)return t.keys();throw new h(sprintf('The node "%j" is not in the digraph.',e))}successors(e){return Array.from(this.successorsIter(e))}predecessors(e){return Array.from(this.predecessorsIter(e))}}class a{constructor(e){this.name="JSNetworkXException",this.message=e}}class l extends a{constructor(e){super(e),this.name="JSNetworkXAlgorithmError"}}class h extends a{constructor(e){super(e),this.name="JSNetworkXError"}}class c extends l{constructor(e){super(e),this.name="JSNetworkXUnfeasible"}}class d extends c{constructor(e){super(e),this.name="JSNetworkXNoPath"}}function u(e){var t=new o;for(let i of e){t.addNode(i.tag);for(let e of i.depends)t.addEdge(e,i.tag)}return t}function p(e,t){for(let i of e.edges())if(!t.has(i[0])&&!t.has(i[1]))return!1;return!0}class v extends n{inverseLISIndices(e,t){var i=this.problem.solution,s=t.map((e=>e.lines[0]));let n=u(i),a=new Set,l=new o;for(let e of s){for(let t of a)r(n,{source:e.tag,target:t.tag})&&l.addEdge(e.tag,t.tag);a.add(e)}let h=null,c=function(e){let t={};for(let i=0;i<=e.length;i++)t[i]=[];for(let i=0;i{for(let t=0;ti&&this.indentLeft.push(e.lines[0])}return this.incorrectIndents=this.indentLeft.length+this.indentRight.length,0==this.incorrectIndents}checkCorrectOrdering(e,t){if(!function(e){try{return function(e,t){var i=new Set,s=[],n=new Set;null==t&&(t=e.nodesIter());for(let l of t){if(n.has(l))return;for(var r=[l];r.length>0;){var o=r[r.length-1];if(n.has(o))r.pop();else{i.add(o);var a=[];e.get(o).forEach((function(e,t){if(!n.has(t)){if(i.has(t))throw new c("Graph contains a cycle.");a.push(t)}})),a.length>0?r.push.apply(r,a):(n.add(o),s.unshift(o))}}}}(e),!0}catch(e){if(e instanceof c)return!1;throw e}}(u(e)))throw"Dependency between blocks does not form a Directed Acyclic Graph; Problem unsolvable.";let i=new Set,s=!0;this.correctLines=0,this.solutionLength=e.length;let n=Math.min(e.length,t.length);for(let e=0;ee.trimStart().toLowerCase().startsWith("class ")))?this.text.toLowerCase().startsWith("class")?this.indent=0:this.indent=n.length-this.text.length:this.text.toLowerCase().startsWith("def")?this.indent=0:this.indent=n.length-this.text.length}else this.text=n.replace(/^\s*/,""),this.indent=n.length-this.text.length;"natural"==e.options.language||"math"==e.options.language?s=i?document.createElement("div"):document.createElement("p"):(s=document.createElement("code"),$(s).addClass(e.options.prettifyLanguage)),s.id=e.counterId+"-line-"+this.index,s.innerHTML+=this.text,this.view=s,e.lines.push(this)}initializeWidth(){this.width=$(this.view).outerWidth(!0)-this.problem.options.pixelsPerIndent*this.indent,this.view.fontSize=window.getComputedStyle(this.view,null).getPropertyValue("font-size"),this.view.pixelsPerIndent=this.problem.options.pixelsPerIndent,this.view.indent=this.indent;var e=document.createElement("canvas").getContext("2d"),t=window.getComputedStyle(this.view,null).getPropertyValue("font-family").split(", "),i="abcdefghijklmnopqrstuvwxyz0123456789,./!@#$%^&*-+";e.font=this.view.fontSize+" serif";var s=e.measureText(i).width;for(let n=0;n0&&$(o.view).addClass("indent"+r),n.appendChild(o.view)}var a=document.createElement("div");$(a).addClass("labels"),"left"==this.problem.options.numbered?($(n).addClass("border_left"),$(i).prepend(a),$(i).css({"justify-content":"flex-start"})):"right"==this.problem.options.numbered&&($(a).addClass("border_left"),$(a).css({float:"right"}),$(i).css({"justify-content":"space-between"}),$(i).append(a)),this.view=i,this.isPlaceholder=!1}addLine(e){if($(e.view).removeClass("indent1 indent2 indent3 indent4 indent5 indent6"),this.problem.noindent)e.indent>0&&$(e.view).addClass("indent"+e.indent);else{var t=this.lines,i=t[0].indent;for(let e=1;ee.indent)for(let i=0;i0&&($(e.view).removeClass("indent1 indent2 indent3 indent4 indent5 indent6"),$(e.view).addClass("indent"+e.indent))}this.indent=0,$(this.view).css({"padding-left":"",width:this.problem.areaWidth-22})}addLabel(e,t){var i=document.createElement("div");$(i).addClass("block-label"),"right"==this.problem.options.numbered&&$(i).addClass("right-label"),"left"==this.problem.options.numbered&&$(i).addClass("left-label"),$(i).append(document.createTextNode(e)),$(this.view).children(".labels")[0].append(i),0!=this.labels.length&&$(i).css("margin-top",(t-this.labels[this.labels.length-1][1]-1)*this.lines[t].view.offsetHeight),this.labels.push([e,t])}initializeInteractivity(){if($(this.view).hasClass("disabled"))return this;$(this.view).attr("tabindex","-1"),this.hammer=new(m().Manager)(this.view,{recognizers:[[m().Pan,{direction:m().DIRECTION_ALL,threshold:0,pointers:1}]]});var e=this;this.hammer.on("panstart",(function(t){e.panStart(t)})),this.hammer.on("panend",(function(t){e.panEnd(t)})),this.hammer.on("panmove",(function(t){e.panMove(t)}))}enabled(){return void 0!==$(this.view).attr("tabindex")}isDistractor(){return this.lines[0].distractor}inSourceArea(){var e=this.problem.sourceArea.childNodes;for(let t=0;t=0;s--){var i=e[s];if(i.pairedBin()==t)return i}return e[e.length-1]}}pairedBin(){for(var e=this.problem.pairedBins,t=0;t=0){for(e=0;e0)return s}for(e=0;e=s)break}this.problem.textMoving=!0,this.problem.sourceArea.insertBefore(this.view,t.view),$(this.view).focus()}else this.indent=this.indent-1;this.problem.state=void 0,this.problem.updateView()}}moveUp(){if(this.inSourceArea()){let n=this.problem.sourceBlocks();var e=this.verticalOffset(),t=this.validSourceIndexes();for(let r=0;r=e)return this.problem.textMoving=!0,this.problem.answerArea.insertBefore(this.view,s.view),$(this.view).focus(),this.problem.state=void 0,this.problem.updateView(),this}this.problem.textMoving=!0,this.problem.answerArea.appendChild(this.view),$(this.view).focus(),this.problem.state=void 0,this.problem.updateView()}else this.indent!==this.problem.indent&&(this.indent=this.indent+1,this.problem.state=void 0,this.problem.updateView())}moveDown(){if(this.inSourceArea()){let s=this.problem.sourceBlocks();var e=this.validSourceIndexes();for(let e=0;e1)return this.problem.textMoving=!0,this.problem.sourceArea.insertBefore(this.view,s[i].view),$(this.view).focus(),this.problem.state=void 0,this.problem.updateView(),this}}else{let e=this.problem.answerBlocks();for(var s=0;s=0;i--){var s=e[i];if(t)return this.problem.textFocus=s,s.makeTabIndex(),$(s.view).focus(),this;s.view.id==this.view.id&&(t=!0)}}selectRight(){if(this.inSourceArea()){var e=this.verticalOffset(),t=this.problem.enabledAnswerBlocks();if(0==t.length)return this;for(var i=t[0],s=i.verticalOffset()-e,n=1;n1?`${i} blocks are missing here`:`${i} block is missing here`,$(this.view).append(n),this.isPlaceholder=!0}}class k extends g{constructor(e){super(e,"placeholder",!1),this.isPlaceholderLine=!0}}class y extends b{constructor(e,t){super(e,t),this.isSettled=!0,$(this.view).addClass("settled-block"),$(this.view).addClass("disabled");let i=document.createElement("span");i.classList.add("settled-tooltip"),$(this.view).append(i),$(this.view).find(".settled-tooltip").text("OK")}setBlocksBefore(e){this.blocksBefore=e;var t=e>1?"s":"";if(this.blocksAfter){var i=this.blocksAfter>1?"s":"";$(this.view).find(".settled-tooltip").html(`${e} block${t} ⬆️️), ${this.blocksAfter} block${i} ⬇️`)}else $(this.view).find(".settled-tooltip").html(`${e} block${t} ⬆️️`)}setBlocksAfter(e){this.blocksAfter=e;var t=e>1?"s":"";if(this.blocksBefore){var i=this.blocksBefore>1?"s":"";$(this.view).find(".settled-tooltip").html(`${this.blocksBefore} block${i} ⬆️, ${e} block${t} ⬇️`)}else $(this.view).find(".settled-tooltip").html(`${e} block${t} ️️⬇️`)}}class x extends s.A{constructor(e){super(e);var t=e.orig;this.containerDiv=t,this.origElem=$(t).find("pre.parsonsblocks")[0],this.question=$(t).find(".parsons_question")[0],this.useRunestoneServices=e.useRunestoneServices,this.divid=e.orig.id;var i=super.localStorageKey();this.storageId=i,this.children=this.origElem.childNodes,this.contentArray=[],x.counter++,this.counterId="parsons-"+x.counter,this.initializeOptions(),this.grader="dag"===this.options.grader?new v(this):new n(this),this.grader.showfeedback=this.showfeedback;var s=$(this.origElem).html();this.blockIndex=0,this.checkCount=0,this.numDistinct=0,this.hasSolved=!1,this.initializeLines(s.trim()),this.initializeView(),this.caption="Parsons",this.addCaption("runestone"),this.checkServer("parsons",!0),this.runnableDiv=null}initializeOptions(){var e={pixelsPerIndent:30},t=$(this.origElem).data("maxdist"),i=$(this.origElem).data("order"),s=$(this.origElem).data("noindent"),n=$(this.origElem).data("adaptive"),r=$(this.origElem).data("numbered"),o=$(this.origElem).data("grader"),a=$(this.origElem).data("scaffolding");if(e.numbered=r,e.grader=o,e.scaffolding=a,void 0!==t&&(e.maxdist=t),void 0!==i){i=i.match(/\d+/g);for(var l=0;le.replace(/\s+/g,"")))).indexOf("#tag:"),""==(y=o.substring(w+5,o.indexOf(";",w+5)))&&(y="block-"+r),x=o.indexOf(";depends:");let e=o.substring(x+9,o.indexOf(";",x+9));h=e.length>0?e.split(","):[]}if(o.includes('class="displaymath')?a.displaymath=!0:a.displaymath=!1,o=o.replace(/#(paired|distractor|settled|tag:.*;.*;)/,(function(e,t){return a[t]=!0,""})),a.settled&&r>0&&u.length>0&&!u[u.length-1].isSettled){var d=new k(this);u.push(d),d.distractor=!0,d.paired=!1,d.distractHelptext="",d.groupWithNext=!1,d.indent=0}a.settled&&(n=!0);var u=[];if(a.displaymath)p=[o];else var p=o.split("\n");for(var v=0;v0){for(v=0;v0&&(n-=1),t.indent=n}}else{s=s.sort((function(e,t){return e-t}));for(let e=0;ee.replace(/\s+/g,"")))).indexOf("#tag:"),""==(y=o.substring(w+5,o.indexOf(";",w+5)))&&(y="block-"+r),x=o.indexOf(";depends:");let e=o.substring(x+9,o.indexOf(";",x+9));h=e.length>0?e.split(","):[]}if(o.includes('class="displaymath')?a.displaymath=!0:a.displaymath=!1,o=o.replace(/\s*#(paired|distractor|tag:.*;.*;)\s*/g,(function(e,t){return a[t]=!0,""})),u=[],a.displaymath)p=[o];else p=o.split("\n");for(v=0;v0){for(v=0;vawait f.queueMathJax(e[0]))):void 0!==MathJax.startup&&await f.queueMathJax(e[0])),u=Math.max(u,e.outerWidth(!0)),e.width(u-22);var t=3.8;let i=e.outerHeight(!0);38!=i&&(t=3.1*(i-38)/21),p+=i+g*t}.bind(this),s=0;s0&&a<=4?$(this.answerArea).addClass("answer"+a):$(this.answerArea).addClass("answer");var m=[],b=[];for(s=0;s0&&(m.push(b),b=[]):(b.push(w),w.groupWithNext||(m.push(b),b=[]))}var k,y=[],x=[],_=[];if(this.pairDistractors||!this.options.adaptive){for(s=m.length-1;s>-1;s--)if((b=m[s])[0].paired)for(k=b.length-1;k>-1;k--)x.unshift(b[k].index);else if(x.length>0){for(k=b.length-1;k>-1;k--)x.unshift(b[k].index);y.unshift(x),x=[]}for(s=0;sor{"),_.push(C),this.sourceArea.appendChild(C)}}else y=[];p+=10*y.length,this.areaHeight=p+40,$(this.sourceArea).css({width:this.areaWidth+2,height:p}),$(this.answerArea).css({width:this.options.pixelsPerIndent*a+this.areaWidth+2,height:p}),this.pairedBins=y,this.pairedDivs=_,null!=this.options.numbered&&this.addBlockLabels(e.concat(t)),this.state=void 0,this.updateView(),h&&$(l).replaceWith(this.outerDiv)}initializeInteractivity(){for(var e=0;e(s=this.dateFromTimestamp(s))?e:t}async loadData(e){try{if(!0===this.options.scaffolding){null==(i=e.source)&&(i=e.trash);var t=e.answer;void 0!==(n=null==(s=e.adaptive)?{}:this.optionsFromHash(s)).noindent&&(this.noindent=!0),void 0!==n.checkCount&&(this.checkCount=n.checkCount),void 0!==n.hasSolved&&(this.hasSolved=n.hasSolved),await this.initializeAreas(this.blocksFromSource(),this.settledBlocksFromSource(),n)}else{var i,s,n;null==(i=e.source)&&(i=e.trash),t=e.answer,void 0!==(n=null==(s=e.adaptive)?{}:this.optionsFromHash(s)).noindent&&(this.noindent=!0),void 0!==n.checkCount&&(this.checkCount=n.checkCount),void 0!==n.hasSolved&&(this.hasSolved=n.hasSolved),null==i||null==t||1==t.length?await this.initializeAreas(this.blocksFromSource(),[],n):(this.initializeAreas(this.blocksFromHash(i),this.blocksFromHash(t),n),this.grade=this.grader.grade(),"correct"==this.grade?this.correct=!0:0==this.answerLines().length?this.correct=null:this.correct=!1)}}catch(t){await this.initializeAreas(this.blocksFromSource(),[],n),console.log(`Error restoring answer for student ${e.sid} in ${e.div_id}. Defaulting to original state.`)}!0!==this.needsReinitialization&&(this.initializeInteractivity(),this.isTimed&&!this.assessmentTaken&&this.resetView())}localData(){var e=localStorage.getItem(this.storageId);return null!==e&&"{"==e.charAt(0)?JSON.parse(e):{}}restoreAnswers(e){this.loadData(e)}checkLocalStorage(){this.graderactive||this.loadData(this.localData())}setLocalStorage(e){var t;if(null==e){t={source:this.sourceHash(),answer:this.answerHash(),timestamp:new Date};var i=this.adaptiveHash();i.length>0&&(t.adaptive=i)}else t=e;localStorage.setItem(this.storageId,JSON.stringify(t))}async updatePlaceholders(){setTimeout((()=>{var e,t,i,s=this.answerBlocks();for(e=0;e0&&!s[e-1].isSettled&&!s[e-1].isPlaceholder&&(t=!0),e{for(var e=this.answerBlocks(),t=0;t=t;o--)if(e[o].afterSettledBlockCount==r){n=e[o];break}if(e[o].afterSettledBlockCount!=r)return void console.log("error moving up; no placeholder found");if($(n.view).hasClass("hide")){$(n.view).removeClass("hide");for(var a=0;a0&&(i.disabled=s),i}answerHash(){for(var e=[],t=this.answerBlocks(),i=0;ib&&(f-=1),t.lines[t.lines.length-1].indent==g.lines[0].indent&&(f+=1),f>=p&&(p=f,v=u)}for(t=d[v],g=d[v+1],u=0;u-1?r.push(t):a.push(s):r.push(t);n=r,r=[]}}if(this.recentAttempts<2?this.pairDistractors=!1:this.pairDistractors=!0,void 0===this.options.order){var c=[],d=[];for(s=0;s1)for(d=this.shuffled(d),p=0;p=0){for(var p=s;$.inArray(e[p-1],r)<0;)p--;var v=$.inArray(e[p-1],r),g=$.inArray(e[s],r);r.splice(g,1),r.splice(v,0,e[s])}return r}blockFromHash(e){for(var t=e.split("_"),i=[],s=0;s0&&l.setBlocksBefore(a),o=l,r++,n=0,s=[]}else s[0].distractor||n++,s=[];return i.length>0&&i[i.length-1].isSettled&&(this.lastBlockSettled=!0),console.log("settledblocksfromsource",i),i}getBlockById(e){for(var t=0;t1?$.i18n("msg_parson_correct",this.checkCount):$.i18n("msg_parson_correct_first_try");this.options.runnable&&(i+=" "+$.i18n("msg_parson_correct_runnable")),setTimeout((()=>{e.html(i)}),10)}if("incorrectTooShort"===this.grade&&(t.addClass("incorrect"),this.messageDiv.style.visibility="visible",e.attr("class","alert alert-danger"),setTimeout((()=>{e.html($.i18n("msg_parson_too_short"))}),10)),"incorrectIndent"===this.grade){var i=[];for(let e=0;e{1==i.length?e.html($.i18n("msg_parson_wrong_indent")):e.html($.i18n("msg_parson_wrong_indents"))}),10)}if("incorrectMoveBlocks"===this.grade){var s=this.answerBlocks(),n=[],r=[],o=[];for(let e=0;e{e.html($.i18n("msg_parson_wrong_order"))}),10)}}initializeAdaptive(){if(this.adaptiveId=super.localStorageKey(),this.canHelp=!0,this.checkCount=0,this.numDistinct=0,this.gotHelp=!1,localStorage.getItem(this.adaptiveId+"Problem")==this.divid)return this.checkCount=localStorage.getItem(this.adaptiveId+this.divid+"Count"),null==this.checkCount&&(this.checkCount=0),this;var e=localStorage.getItem(this.adaptiveId+this.divid+"Count");null!=e&&"NaN"!=e||(e=0),this.checkCount=e,this.recentAttempts=localStorage.getItem(this.adaptiveId+"recentAttempts"),null!=this.recentAttempts&&"NaN"!=this.recentAttempts||(this.recentAttempts=3),localStorage.setItem(this.adaptiveId+"recentAttempts",this.recentAttempts),localStorage.setItem(this.adaptiveId+"Problem",this.divid),localStorage.setItem(this.adaptiveId+this.divid+"Count",this.checkCount),localStorage.setItem(this.adaptiveId+"Solved",!1)}usesIndentation(){return!this.noindent&&0!=this.solutionIndent()}distractorToRemove(){var e,t=this.enabledAnswerBlocks();for(let i=0;i{t.html($.i18n("msg_parson_not_solution"))}),10),e.lines[0].distractHelptext&&(e.view.setAttribute("data-toggle","tooltip"),e.view.setAttribute("title",e.lines[0].distractHelptext)),e.disable(),e.inSourceArea())$(e.view).css({"border-color":"#000","background-color":"#fff"}),$(e.view).animate({opacity:.3,"border-color":"#d3d3d3","background-color":"#efefef"},{duration:2e3,complete:function(){$(e.view).css({"border-color":"","background-color":""})}});else{var i=this.sourceArea.getBoundingClientRect(),s=e.pageXCenter()-1,n=e.pageYCenter(),r=i.left+window.pageXOffset+i.width/2,o=i.top+window.pageYOffset+e.view.getBoundingClientRect().height/2,a=e.slideUnderBlock();void 0!==a&&(o+=a.view.getBoundingClientRect().height+20,o+=parseInt($(a.view).css("top")));var l=this;$(e.view).css({"border-color":"#000","background-color":"#fff"}),$(e.view).animate({opacity:1},{duration:4*Math.sqrt(Math.pow(o-n,2)+Math.pow(r-s,2))+500,start:function(){l.moving=e,l.movingX=s,l.movingY=n,l.updateView()},progress:function(e,t,i){l.movingX=s*(1-t)+r*t,l.movingY=n*(1-t)+o*t,l.updateView()},complete:function(){delete l.moving,delete l.movingX,delete l.movingY,l.updateView(),$(e.view).animate({opacity:.3,"border-color":"#d3d3d3","background-color":"#efefef"},{duration:1e3,complete:function(){$(e.view).css({opacity:"","border-color":"","background-color":""}),$(e.view).addClass("disabled")}})}})}}removeIndentation(){var e=$(this.messageDiv);this.messageDiv.style.visibility="visible",e.attr("class","alert alert-info"),setTimeout((()=>{e.html($.i18n("msg_parson_provided_indent"))}),10);for(var t,i,s=200,n=0;n0&&t.indexOf(s)<0)return s;return null}getFurthestBlock(){for(var e=this.solutionBlocks(),t=this.answerBlocks(),i=0,s=0,n=null,r=null,o=0,a=null,l=0,h=0;h0&&(a=e[o-1],l=t.indexOf(a),(s=Math.abs(h-l))>i&&(i=s,n=r));return n}combineBlocks(){var e=this.solutionBlocks(),t=this.answerBlocks(),i=this.sourceBlocks(),s=$(this.messageDiv);this.messageDiv.style.visibility="visible",s.attr("class","alert alert-info"),setTimeout((()=>{s.html($.i18n("msg_parson_combined_blocks"))}),10);var n=null,r=null;null==(r=this.getSolutionBlockInSource())&&(r=this.getFurthestBlock());var o=e.indexOf(r);n=e[o-1];var a=t.indexOf(n),l=t.indexOf(r),h=!1;a>=0&&l>=0?h=a+1!==l:a<0&&l<0?h=(a=i.indexOf(n))+1!==(l=i.indexOf(r)):(h=!0,a<0&&(a=i.indexOf(n)),l<0&&(l=i.indexOf(r)));var c=l3?(alert($.i18n("msg_parson_will_combine")),this.combineBlocks(),this.logMove("combinedBlocks")):(alert($.i18n("msg_parson_three_blocks_left")),this.canHelp=!1):(alert($.i18n("msg_parson_remove_incorrect")),this.removeDistractor(e),this.logMove("removedDistractor-"+e.hash()))}helpMe(){this.clearFeedback(),this.numDistinct<3?alert($.i18n("msg_parson_atleast_three_attempts")):(this.gotHelp=!0,this.makeEasier())}dateFromTimestamp(e){var t=new Date(e);if(isNaN(t.getTime())){var i=e.split(/[- :]/);t=new Date(i[0],i[1]-1,i[2],i[3],i[4],i[5])}return t}shuffled(e){for(var t,i,s=e.length,n=e.slice();0!==s;)i=Math.floor(Math.random()*s),t=n[s-=1],n[s]=n[i],n[i]=t;return n}enterKeyboardMode(){$(this.keyboardTip).show(),$(this.sourceLabel).hide(),$(this.answerLabel).hide(),this.clearFeedback()}exitKeyboardMode(){$(this.keyboardTip).hide(),$(this.sourceLabel).show(),$(this.answerLabel).show()}clearFeedback(){$(this.answerArea).removeClass("incorrect correct");for(var e=this.answerArea.childNodes,t=0;t=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom?"answer":e>=(i=this.sourceArea.getBoundingClientRect()).left&&e<=i.right&&t>=i.top&&t<=i.bottom?"source":"moving"}updateView(){var e,t,i,s=this.state,n=this.movingState(),r=!0,o=!0,a="moving"==n;s==n&&("rest"==n?(r=!1,o=!1):"source"==n?o=!1:"answer"==n?r=!1:"moving"==n&&(o=!1,r=!1)),void 0!==this.moving&&(e=$(this.moving.view).outerHeight(!0),$(this.moving.view).detach());var l,h,c=this.areaWidth-22;if(r){t=0;var d=this.sourceBlocks();if("source"==n){var u=!1,p=this.moving.pairedBin(),v=[];for(y=0;yor{")}1==_.length&&$(C).html("")}}if(o)if(t=0,i=this.areaWidth+this.indent*this.options.pixelsPerIndent-22,d=this.answerBlocks(),"answer"==n){u=!1,f=this.movingX-this.answerArea.getBoundingClientRect().left-window.pageXOffset-c/2-11;var A=Math.round(f/this.options.pixelsPerIndent);for(A<0?A=0:A>this.indent?A=this.indent:f=A*this.options.pixelsPerIndent,m=this.movingY-this.answerArea.getBoundingClientRect().top-window.pageYOffset,this.moving.indent=A,y=0;y=10&&(o+=" "),e[a].addLabel(o,0),s++}n+this.pairedBins.length>=10&&(this.areaWidth+=5,$(this.sourceArea).css({width:$(this.sourceArea).width()+5}),$(this.answerArea).css({width:$(this.answerArea).width()+5}))}resetView(){if(this.clearFeedback(),!0===this.options.scaffolding){const e=document.querySelector(`#copy-answer-button-${this.divid}`);e&&e.classList.add("copy-button-hide")}var e,t=document.body.scrollTop;for(let t=0;t{$.i18n().load({"pt-br":{msg_parson_check_me:"Verificar",msg_parson_reset:"Resetar",msg_parson_help:"Ajuda",msg_parson_too_short:"Seu programa é muito curto. Adicione mais blocos.",msg_parson_drag_from_here:"Arraste daqui",msg_parson_drag_to_here:"Largue os blocos aqui",msg_parson_correct_first_try:"Perfeito! Você levou apenas uma tentativa para resolver. Bom trabalho!",msg_parson_correct:"Perfeito! Você levou $1 tentativas para resolver. Clique em Resetar para tentar resolver em uma tentativa.",msg_parson_wrong_indent:"Este bloco não está indentado corretamente. Indente mais arrastando-o para a direita ou reduza a indentação arrastando para a esquerda.",msg_parson_wrong_indents:"Estes blocos não estão indentados corretamente. Para indentar mais, arraste o bloco para a direita. Para reduzir a indentação, arraste para a esquerda.",msg_parson_wrong_order:"Blocos destacados no seu programa estão errados ou estão na ordem errada. Isso pode ser resolvido movendo, excluindo ou substituindo os blocos destacados.",msg_parson_arrow_navigate:"Use as teclas de setas para navegar. Espaço para selecionar/ desmarcar blocos para mover.",msg_parson_help_info:"Clique no botão Ajuda se você quiser facilitar o problema",msg_parson_not_solution:"Foi desabilitado um bloco de código desnecessário (que não faz parte da solução).",msg_parson_provided_indent:"Foi fornecida a indentação.",msg_parson_combined_blocks:"Dois blocos de códigos foram combinados em um.",msg_parson_remove_incorrect:"Será removido um bloco de código incorreto da área de resposta",msg_parson_will_combine:"Serão combinados dois blocos",msg_parson_atleast_three_attempts:"Você deve tentar pelo menos três vezes antes de pedir ajuda",msg_parson_three_blocks_left:"Restam apenas 3 blocos corretos. Você deve colocá-los em ordem",msg_parson_will_provide_indent:"Será fornecida a indentação"}})},75794:()=>{$.i18n().load({en:{msg_parson_check_me:"Check",msg_parson_reset:"Reset",msg_parson_help:"Help me",msg_parson_too_short:"Your answer is too short. Add more blocks.",msg_parson_drag_from_here:"Drag from here",msg_parson_drag_to_here:"Drop blocks here",msg_parson_correct_first_try:"Perfect! It took you only one try to solve this. Great job!",msg_parson_correct:"Perfect! It took you $1 tries to solve this. Click Reset to try to solve it in one attempt.",msg_parson_correct_runnable:"Click Run below to test out your solution.",msg_parson_wrong_indent:"This block is not indented correctly. Either indent it more by dragging it right or reduce the indention by dragging it left.",msg_parson_wrong_indents:"These blocks are not indented correctly. To indent a block more, drag it to the right. To reduce the indention, drag it to the left.",msg_parson_wrong_order:"Highlighted blocks in your answer are wrong or are in the wrong order. This can be fixed by moving, removing, or replacing highlighted blocks.",msg_parson_arrow_navigate:"Arrow keys to navigate. Space to select / deselect block to move.",msg_parson_help_info:"Click on the Help Me button if you want to make the problem easier",msg_parson_not_solution:"Disabled an unneeded code block (one that is not part of the solution).",msg_parson_provided_indent:"Provided the indentation.",msg_parson_combined_blocks:"Combined two code blocks into one.",msg_parson_remove_incorrect:"Will remove an incorrect code block from answer area",msg_parson_will_combine:"Will combine two blocks",msg_parson_atleast_three_attempts:"You must make at least three distinct full attempts at a solution before you can get help",msg_parson_three_blocks_left:"There are only 3 correct blocks left. You should be able to put them in order",msg_parson_will_provide_indent:"Will provide indentation"}})},78811:()=>{function e(){var t=navigator&&navigator.userAgent&&/\bMSIE 6\./.test(navigator.userAgent);return e=function(){return t},t}!function(){var t="break continue do else for if return while ",i=t+"auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try ",s=i+"alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename typeof using virtual wchar_t where ",n=i+"boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",r=i+"debugger eval export function get null set undefined var with Infinity NaN ",o="caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",a=t+"and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",l=t+"alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ",h=t+"case done elif esac eval fi function in local set then until ",c=s+(n+"as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ")+r+o+a+l+h;function d(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"}function u(e,t,i,s){e.unshift(i,s||0);try{t.splice.apply(t,e)}finally{e.splice(0,2)}}var p=function(){for(var e=["!","!=","!==","#","%","%=","&","&&","&&=","&=","(","*","*=","+=",",","-=","->","/","/=",":","::",";","<","<<","<<=","<=","=","==","===",">",">=",">>",">>=",">>>",">>>=","?","@","[","^","^=","^^","^^=","{","|","|=","||","||=","~","break","case","continue","delete","do","else","finally","instanceof","return","throw","try","typeof"],t="(?:(?:(?:^|[^0-9.])\\.{1,3})|(?:(?:^|[^\\+])\\+)|(?:(?:^|[^\\-])-)",i=0;i:&])/g,"\\$1")}return t+="|^)\\s*$",new RegExp(t)}(),v=/&/g,g=//g,m=/\"/g;function b(e){return e.replace(v,"&").replace(g,"<").replace(f,">")}var w=/</g,k=/>/g,y=/'/g,$=/"/g,x=/&/g,_=/ /g;function C(e){var t=e.indexOf("&");if(t<0)return e;for(--t;(t=e.indexOf("&#",t+1))>=0;){var i=e.indexOf(";",t);if(i>=0){var s=e.substring(t+3,i),n=10;s&&"x"===s.charAt(0)&&(s=s.substring(1),n=16);var r=parseInt(s,n);isNaN(r)||(e=e.substring(0,t)+String.fromCharCode(r)+e.substring(i+1))}}return e.replace(w,"<").replace(k,">").replace(y,"'").replace($,'"').replace(x,"&").replace(_," ")}function I(e){return"XMP"===e.tagName}function A(e,t){switch(e.nodeType){case 1:var i=e.tagName.toLowerCase();t.push("<",i);for(var s=0;s");for(var r=e.firstChild;r;r=r.nextSibling)A(r,t);!e.firstChild&&/^(?:br|link|img)$/.test(i)||t.push("");break;case 2:t.push(e.name.toLowerCase(),'="',function(e){return e.replace(v,"&").replace(g,"<").replace(f,">").replace(m,""")}(e.value),'"');break;case 3:case 4:t.push(b(e.nodeValue))}}var S=null;function T(e){if(null===S){var t=document.createElement("PRE");t.appendChild(document.createTextNode('\n')),S=!/||<\/?[a-zA-Z][^>]*>|<)/g,B=/^ - + @@ -219,7 +219,10 @@ eBookConfig.enable_chatcodes = false;
  • - +
  • diff --git a/course/course-documents.html b/course/course-documents.html index 5dbf87d..133bd5f 100755 --- a/course/course-documents.html +++ b/course/course-documents.html @@ -101,14 +101,14 @@ eBookConfig.allow_pairs = false; eBookConfig.enableScratchAC = false; eBookConfig.build_info = ""; eBookConfig.python3 = null; -eBookConfig.runestone_version = '7.11.11'; +eBookConfig.runestone_version = '7.11.12'; eBookConfig.jobehost = ''; eBookConfig.proxyuri_runs = ''; eBookConfig.proxyuri_files = ''; eBookConfig.enable_chatcodes = false; - + @@ -219,7 +219,10 @@ eBookConfig.enable_chatcodes = false;
  • - +
  • diff --git a/course/frontmatter.html b/course/frontmatter.html index 7560115..b5d88ae 100755 --- a/course/frontmatter.html +++ b/course/frontmatter.html @@ -101,14 +101,14 @@ eBookConfig.allow_pairs = false; eBookConfig.enableScratchAC = false; eBookConfig.build_info = ""; eBookConfig.python3 = null; -eBookConfig.runestone_version = '7.11.11'; +eBookConfig.runestone_version = '7.11.12'; eBookConfig.jobehost = ''; eBookConfig.proxyuri_runs = ''; eBookConfig.proxyuri_files = ''; eBookConfig.enable_chatcodes = false; - + @@ -219,7 +219,10 @@ eBookConfig.enable_chatcodes = false;
  • - +
  • diff --git a/course/index.html b/course/index.html index d4bb52f..7b1a005 100755 --- a/course/index.html +++ b/course/index.html @@ -2,7 +2,7 @@ - + diff --git a/course/lunr-pretext-search-index.js b/course/lunr-pretext-search-index.js index 6e56c4f..2420a1a 100755 --- a/course/lunr-pretext-search-index.js +++ b/course/lunr-pretext-search-index.js @@ -801,6 +801,42 @@ var ptx_lunr_docs = [ "title": "", "body": " A diagnostic test is developed to detect a disease present in 1.3% of the population. For a patient who has the disease, the test will accurately give a positive result 62% of the time. When the patient does not have the disease, the test will accurately give a negative result 99.4% of the time. For a patient who receives a positive test, what is the probability they have the disease? Let be the event of receiving a positive test result and be the event of having the disease. The given information is: , and . Then, using Bayes' Theorem: " }, +{ + "id": "quiz-02", + "level": "1", + "url": "quiz-02.html", + "type": "Worksheet", + "number": "", + "title": "Quiz 2", + "body": " Quiz 2 The following work should be completed individually. Use of notes or textbooks is not allowed. You may use a scientific calculator, not a graphing calculator or phone app. Show all work unless instructed otherwise. Write either True or False for each of the following statements. No justification is required. Let be integers with . Then . True. Suppose is a continuous random variable with pdf and cdf . Then . True. Suppose is a random variable taking values between 0 and 6. Then . False. Consider the joint distribution for and below. Joint Distribution 0.1 0.05 0.1 0.3 0.15 0.3 Find the marginal distributions for and . Are and independent? Since , and are not independent. Suppose a continuous random variable taking values in has cdf . Find the pdf . Find . " +}, +{ + "id": "quiz-02-3-1", + "level": "2", + "url": "quiz-02.html#quiz-02-3-1", + "type": "Worksheet Exercise", + "number": "1", + "title": "", + "body": " Write either True or False for each of the following statements. No justification is required. Let be integers with . Then . True. Suppose is a continuous random variable with pdf and cdf . Then . True. Suppose is a random variable taking values between 0 and 6. Then . False. " +}, +{ + "id": "quiz-02-3-2", + "level": "2", + "url": "quiz-02.html#quiz-02-3-2", + "type": "Worksheet Exercise", + "number": "2", + "title": "", + "body": " Consider the joint distribution for and below. Joint Distribution 0.1 0.05 0.1 0.3 0.15 0.3 Find the marginal distributions for and . Are and independent? Since , and are not independent. " +}, +{ + "id": "quiz-02-4-1", + "level": "2", + "url": "quiz-02.html#quiz-02-4-1", + "type": "Worksheet Exercise", + "number": "3", + "title": "", + "body": " Suppose a continuous random variable taking values in has cdf . Find the pdf . Find . " +}, { "id": "recitation-calculus-review", "level": "1", @@ -851,7 +887,7 @@ var ptx_lunr_docs = [ "level": "2", "url": "recitation-calculus-review.html#thm-FTC", "type": "Theorem", - "number": "90", + "number": "91", "title": "Fundamental Theorem of Calculus.", "body": " Fundamental Theorem of Calculus If is an antiderivative of i.e., if then: " }, diff --git a/course/notes-01-13.html b/course/notes-01-13.html index 08a6348..1669089 100755 --- a/course/notes-01-13.html +++ b/course/notes-01-13.html @@ -101,14 +101,14 @@ eBookConfig.allow_pairs = false; eBookConfig.enableScratchAC = false; eBookConfig.build_info = ""; eBookConfig.python3 = null; -eBookConfig.runestone_version = '7.11.11'; +eBookConfig.runestone_version = '7.11.12'; eBookConfig.jobehost = ''; eBookConfig.proxyuri_runs = ''; eBookConfig.proxyuri_files = ''; eBookConfig.enable_chatcodes = false; - + @@ -219,7 +219,10 @@ eBookConfig.enable_chatcodes = false;
  • - +
  • diff --git a/course/notes-01-15.html b/course/notes-01-15.html index 7b0f0c8..91f1d28 100755 --- a/course/notes-01-15.html +++ b/course/notes-01-15.html @@ -101,14 +101,14 @@ eBookConfig.allow_pairs = false; eBookConfig.enableScratchAC = false; eBookConfig.build_info = ""; eBookConfig.python3 = null; -eBookConfig.runestone_version = '7.11.11'; +eBookConfig.runestone_version = '7.11.12'; eBookConfig.jobehost = ''; eBookConfig.proxyuri_runs = ''; eBookConfig.proxyuri_files = ''; eBookConfig.enable_chatcodes = false; - + @@ -219,7 +219,10 @@ eBookConfig.enable_chatcodes = false;
  • - +
  • diff --git a/course/notes-01-20.html b/course/notes-01-20.html index 3f15bcd..50efac3 100755 --- a/course/notes-01-20.html +++ b/course/notes-01-20.html @@ -101,14 +101,14 @@ eBookConfig.allow_pairs = false; eBookConfig.enableScratchAC = false; eBookConfig.build_info = ""; eBookConfig.python3 = null; -eBookConfig.runestone_version = '7.11.11'; +eBookConfig.runestone_version = '7.11.12'; eBookConfig.jobehost = ''; eBookConfig.proxyuri_runs = ''; eBookConfig.proxyuri_files = ''; eBookConfig.enable_chatcodes = false; - + @@ -219,7 +219,10 @@ eBookConfig.enable_chatcodes = false;
  • - +
  • diff --git a/course/notes-01-22.html b/course/notes-01-22.html index 11e90a6..a34e5c4 100755 --- a/course/notes-01-22.html +++ b/course/notes-01-22.html @@ -101,14 +101,14 @@ eBookConfig.allow_pairs = false; eBookConfig.enableScratchAC = false; eBookConfig.build_info = ""; eBookConfig.python3 = null; -eBookConfig.runestone_version = '7.11.11'; +eBookConfig.runestone_version = '7.11.12'; eBookConfig.jobehost = ''; eBookConfig.proxyuri_runs = ''; eBookConfig.proxyuri_files = ''; eBookConfig.enable_chatcodes = false; - + @@ -219,7 +219,10 @@ eBookConfig.enable_chatcodes = false;
  • - +
  • diff --git a/course/notes-01-27.html b/course/notes-01-27.html index 5cc4f25..a3b6b64 100755 --- a/course/notes-01-27.html +++ b/course/notes-01-27.html @@ -101,14 +101,14 @@ eBookConfig.allow_pairs = false; eBookConfig.enableScratchAC = false; eBookConfig.build_info = ""; eBookConfig.python3 = null; -eBookConfig.runestone_version = '7.11.11'; +eBookConfig.runestone_version = '7.11.12'; eBookConfig.jobehost = ''; eBookConfig.proxyuri_runs = ''; eBookConfig.proxyuri_files = ''; eBookConfig.enable_chatcodes = false; - + @@ -219,7 +219,10 @@ eBookConfig.enable_chatcodes = false;
  • - +
  • diff --git a/course/notes-01-29.html b/course/notes-01-29.html index 0766358..b54c91d 100755 --- a/course/notes-01-29.html +++ b/course/notes-01-29.html @@ -101,14 +101,14 @@ eBookConfig.allow_pairs = false; eBookConfig.enableScratchAC = false; eBookConfig.build_info = ""; eBookConfig.python3 = null; -eBookConfig.runestone_version = '7.11.11'; +eBookConfig.runestone_version = '7.11.12'; eBookConfig.jobehost = ''; eBookConfig.proxyuri_runs = ''; eBookConfig.proxyuri_files = ''; eBookConfig.enable_chatcodes = false; - + @@ -219,7 +219,10 @@ eBookConfig.enable_chatcodes = false;
  • - +
  • @@ -481,7 +484,7 @@ E(X) = 0 \cdot \underbrace{\Pr(X = 0)}_{1 - p} + 1 \cdot \underbrace{\Pr(X = 1)}
    \begin{gather*} -\E)N) = \sum_{i=0}^n i\cdot b(i; n, p) = \sum_{i = 0}^n i \cdot {n \choose i} p^i (1-p)^{n - i}. +\E(N) = \sum_{i=0}^n i\cdot b(i; n, p) = \sum_{i = 0}^n i \cdot {n \choose i} p^i (1-p)^{n - i}. \end{gather*}
    Gross.
    diff --git a/course/quiz-01-printable.html b/course/quiz-01-printable.html index d5ea4b7..2729a78 100755 --- a/course/quiz-01-printable.html +++ b/course/quiz-01-printable.html @@ -101,14 +101,14 @@ eBookConfig.allow_pairs = false; eBookConfig.enableScratchAC = false; eBookConfig.build_info = ""; eBookConfig.python3 = null; -eBookConfig.runestone_version = '7.11.11'; +eBookConfig.runestone_version = '7.11.12'; eBookConfig.jobehost = ''; eBookConfig.proxyuri_runs = ''; eBookConfig.proxyuri_files = ''; eBookConfig.enable_chatcodes = false; - + @@ -135,7 +135,7 @@ eBookConfig.enable_chatcodes = false; -PrevUpNext +PrevUpNext
  • - +
  • @@ -333,7 +336,7 @@ B \amp = \{ (0, 1), (0, 3), (0, 5), (1, 0), (3, 0), (5, 0) \} -PrevUpNext +PrevUpNext
  • - +
  • @@ -317,7 +320,7 @@ B \amp = \{ (0, 1), (0, 3), (0, 5), (1, 0), (3, 0), (5, 0) \}
  • - +
  • @@ -229,7 +232,10 @@ eBookConfig.enable_chatcodes = false;

    Chapter Quizzes

    -
    +
    diff --git a/course/recitation-calculus-review-printable.html b/course/recitation-calculus-review-printable.html index b280cc0..971c495 100755 --- a/course/recitation-calculus-review-printable.html +++ b/course/recitation-calculus-review-printable.html @@ -101,14 +101,14 @@ eBookConfig.allow_pairs = false; eBookConfig.enableScratchAC = false; eBookConfig.build_info = ""; eBookConfig.python3 = null; -eBookConfig.runestone_version = '7.11.11'; +eBookConfig.runestone_version = '7.11.12'; eBookConfig.jobehost = ''; eBookConfig.proxyuri_runs = ''; eBookConfig.proxyuri_files = ''; eBookConfig.enable_chatcodes = false; - + @@ -219,7 +219,10 @@ eBookConfig.enable_chatcodes = false;
  • - +
  • @@ -292,7 +295,7 @@ eBookConfig.enable_chatcodes = false;
    If \(f(x)\) is a probability density function (don’t worry about what that means for now), then integrals such as \(\int_a^b f(x)\ dx\) are used to calculate certain probabilities, as are values of the form \(F(x)\text{.}\) +
    If \(f(x)\) is a probability density function (don’t worry about what that means for now), then integrals such as \(\int_a^b f(x)\ dx\) are used to calculate certain probabilities, as are values of the form \(F(x)\text{.}\)

    5.

    Practice with the following integrals: diff --git a/course/recitation-calculus-review.html b/course/recitation-calculus-review.html index f63094e..1bdb224 100755 --- a/course/recitation-calculus-review.html +++ b/course/recitation-calculus-review.html @@ -101,14 +101,14 @@ eBookConfig.allow_pairs = false; eBookConfig.enableScratchAC = false; eBookConfig.build_info = ""; eBookConfig.python3 = null; -eBookConfig.runestone_version = '7.11.11'; +eBookConfig.runestone_version = '7.11.12'; eBookConfig.jobehost = ''; eBookConfig.proxyuri_runs = ''; eBookConfig.proxyuri_files = ''; eBookConfig.enable_chatcodes = false; - + @@ -219,7 +219,10 @@ eBookConfig.enable_chatcodes = false;
  • - +
  • @@ -277,7 +280,7 @@ eBookConfig.enable_chatcodes = false;
    If \(f(x)\) is a probability density function (don’t worry about what that means for now), then integrals such as \(\int_a^b f(x)\ dx\) are used to calculate certain probabilities, as are values of the form \(F(x)\text{.}\) +
    If \(f(x)\) is a probability density function (don’t worry about what that means for now), then integrals such as \(\int_a^b f(x)\ dx\) are used to calculate certain probabilities, as are values of the form \(F(x)\text{.}\)

    5.

    Practice with the following integrals: diff --git a/course/recitations.html b/course/recitations.html index f874761..a1888d4 100755 --- a/course/recitations.html +++ b/course/recitations.html @@ -101,14 +101,14 @@ eBookConfig.allow_pairs = false; eBookConfig.enableScratchAC = false; eBookConfig.build_info = ""; eBookConfig.python3 = null; -eBookConfig.runestone_version = '7.11.11'; +eBookConfig.runestone_version = '7.11.12'; eBookConfig.jobehost = ''; eBookConfig.proxyuri_runs = ''; eBookConfig.proxyuri_files = ''; eBookConfig.enable_chatcodes = false; - + @@ -135,7 +135,7 @@ eBookConfig.enable_chatcodes = false;
    -PrevUpNext +PrevUpNext
  • - +
  • @@ -231,7 +234,7 @@ eBookConfig.enable_chatcodes = false;
  • - +
  • diff --git a/course/syllabus.html b/course/syllabus.html index c075ecf..5319db1 100755 --- a/course/syllabus.html +++ b/course/syllabus.html @@ -101,14 +101,14 @@ eBookConfig.allow_pairs = false; eBookConfig.enableScratchAC = false; eBookConfig.build_info = ""; eBookConfig.python3 = null; -eBookConfig.runestone_version = '7.11.11'; +eBookConfig.runestone_version = '7.11.12'; eBookConfig.jobehost = ''; eBookConfig.proxyuri_runs = ''; eBookConfig.proxyuri_files = ''; eBookConfig.enable_chatcodes = false; - + @@ -219,7 +219,10 @@ eBookConfig.enable_chatcodes = false;
  • - +