<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=WebFund_2013F_Lecture_15</id>
	<title>WebFund 2013F Lecture 15 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=WebFund_2013F_Lecture_15"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2013F_Lecture_15&amp;action=history"/>
	<updated>2026-06-03T03:10:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2013F_Lecture_15&amp;diff=18192&amp;oldid=prev</id>
		<title>Soma at 18:01, 21 November 2013</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2013F_Lecture_15&amp;diff=18192&amp;oldid=prev"/>
		<updated>2013-11-21T18:01:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:01, 21 November 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The audio from the lecture given on November 11, 2013 is [http://homeostasis.scs.carleton.ca/~soma/webfund-2013f/lectures/comp2406-2013f-lec15-11Nov2013.m4a here].&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Notes==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Notes==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2013F_Lecture_15&amp;diff=18185&amp;oldid=prev</id>
		<title>Sarahmathieson: Created page with &quot;==Notes==  ===Assignment 3 Tips=== * Question 6 : Every time the user score changes, you can update the high score ** Cheating!  It doesn’t have to be constantly updated in ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2013F_Lecture_15&amp;diff=18185&amp;oldid=prev"/>
		<updated>2013-11-11T23:42:06Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Notes==  ===Assignment 3 Tips=== * Question 6 : Every time the user score changes, you can update the high score ** Cheating!  It doesn’t have to be constantly updated in ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Notes==&lt;br /&gt;
&lt;br /&gt;
===Assignment 3 Tips===&lt;br /&gt;
* Question 6 : Every time the user score changes, you can update the high score&lt;br /&gt;
** Cheating!  It doesn’t have to be constantly updated in the background&lt;br /&gt;
** Or could use long poling&lt;br /&gt;
*** Do ajax type call on the client&lt;br /&gt;
*** On the server you would wait, set up a callback for when the high score changes&lt;br /&gt;
* Question 4: &lt;br /&gt;
** var container = $(‘#container’);&lt;br /&gt;
*** returns a jQuery object&lt;br /&gt;
** //for the canvas:&lt;br /&gt;
*** c = $(‘canvas’)[0];&lt;br /&gt;
** Anil will post something online about the problem errorsount.play();&lt;br /&gt;
** Need to use jQuery equivalent for the container.offsetLeft etc in function init()&lt;br /&gt;
&lt;br /&gt;
===Going through tutorial 9===&lt;br /&gt;
* In package.json there is a new line:&lt;br /&gt;
** &amp;quot;validator&amp;quot;: &amp;quot;*&amp;quot;&lt;br /&gt;
*** used for sanitizing user input&lt;br /&gt;
*** req.session.player = sanitize(player).escape();&lt;br /&gt;
**** sanitize sooner rather than later&lt;br /&gt;
**** we only used this in the start function because this is the only user input that was taken&lt;br /&gt;
* Want to send something back to the client?  &lt;br /&gt;
** You can just use ‘send’  in node&lt;br /&gt;
* Complexity has been moved to the client code&lt;br /&gt;
* On the browser:&lt;br /&gt;
** If you want privacy, the only way you have it is doing it within functions!&lt;br /&gt;
*** In public/javascripts/adventure.js&lt;br /&gt;
**** Anonymous function is defined&lt;br /&gt;
**** Prevents you from polluting the global file scope&lt;br /&gt;
** In public/javascripts/adventure.js&lt;br /&gt;
*** $.getJSON(&amp;quot;/getContents&amp;quot;, function(room)&lt;br /&gt;
**** Get JSON object from server&lt;br /&gt;
**** getContents is a function in routes/index.js&lt;br /&gt;
**** this will return a page with an enoded JSON object&lt;br /&gt;
***** jQuery will happily convert this&lt;br /&gt;
** var exits;&lt;br /&gt;
*** doesn’t do anything&lt;br /&gt;
 	$(&amp;#039;.exits&amp;#039;).remove();&lt;br /&gt;
 		    room.roomExits.forEach(function(theExit) {&lt;br /&gt;
 			$(&amp;#039;#exitList&amp;#039;).append(&lt;br /&gt;
 			    &amp;#039;&amp;lt;button type=&amp;quot;button&amp;quot; id=&amp;quot;&amp;#039; + theExit +&lt;br /&gt;
 				&amp;#039;&amp;quot; class=&amp;quot;btn btn-default exits&amp;quot;&amp;gt;&amp;#039;&lt;br /&gt;
 				+ theExit + &amp;#039;&amp;lt;/button&amp;gt;&amp;#039;);&lt;br /&gt;
 			$(&amp;#039;#&amp;#039;+theExit).on(&amp;#039;click&amp;#039;, function() {&lt;br /&gt;
 			    $.post(&amp;quot;/doAction&amp;quot;, {action: &amp;quot;move&amp;quot;,&lt;br /&gt;
 						 room: theExit});&lt;br /&gt;
 			    getRoom();&lt;br /&gt;
 			});&lt;br /&gt;
 		    });&lt;br /&gt;
*** Get rid of all of the exits&lt;br /&gt;
*** Add button&lt;br /&gt;
*** Add even handler&lt;br /&gt;
*** When someone clicks on the mouse, it creates another post&lt;br /&gt;
*** The value of the exit is coming from the argument to the function&lt;br /&gt;
*** Array objects in JavaScript have a standard object called foreach&lt;br /&gt;
** Every webpage defines its own JavaScript scope&lt;br /&gt;
*** Script is similar to include in C&lt;br /&gt;
** Implications of scripts&lt;br /&gt;
*** You don’t know what code you’re incorporating&lt;br /&gt;
*** It changes from minute to minute&lt;br /&gt;
*** It runs in the same executions context of your code&lt;br /&gt;
*** You have to deal with the DOM – it is global and everyone potentially has access to it&lt;br /&gt;
**** What’s to say that code isn’t changing your code&lt;br /&gt;
**** There are some things you can do, but it’s not easy&lt;/div&gt;</summary>
		<author><name>Sarahmathieson</name></author>
	</entry>
</feed>