<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://classes.engineering.wustl.edu/cse330/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mitch</id>
	<title>CSE330 Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://classes.engineering.wustl.edu/cse330/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mitch"/>
	<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Special:Contributions/Mitch"/>
	<updated>2026-11-15T21:32:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.4</generator>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_6&amp;diff=2768</id>
		<title>FAQ - Mod 6</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_6&amp;diff=2768"/>
		<updated>2020-12-21T15:42:24Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 6. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== Setup/Logistics ==&lt;br /&gt;
&lt;br /&gt;
=== Should I use a database for Module 6? ===&lt;br /&gt;
You can store everything locally in this module. No need to use a database.&lt;br /&gt;
&lt;br /&gt;
=== How can I add an image to my instance? SFTP isn't working ===&lt;br /&gt;
There are a couple different ways to load an image onto your instance. One of the easiest is to use wget. When logged into your instance, run the following command in the terminal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
$ wget &amp;lt;imageurl&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running this command will download the image straight onto your instance!&lt;br /&gt;
&lt;br /&gt;
== Port 3456 ==&lt;br /&gt;
&lt;br /&gt;
=== What rule should I define for Custom TCP when setting up port 3456? ===&lt;br /&gt;
When setting up the Custom TCP rule for port 3456, it's fine to use the default source of 0.0.0.0/0. The rule will look like this:&lt;br /&gt;
&lt;br /&gt;
Custom TCP 3456 Custom 0.0.0.0/0&lt;br /&gt;
&lt;br /&gt;
=== How do I access my instance at port 3456? ===&lt;br /&gt;
All you have to do is append :3456 to the end of your instance url. Thus, the link would just be http://ec2-xx-xxx-xx-xxx.us-east-2.compute.amazonaws.com:3456/filepath &lt;br /&gt;
&lt;br /&gt;
== NPM/Mime ==&lt;br /&gt;
There are a couple common errors that students run into when setting up their Node.js. One of the most common looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
ENOENT: no such file or directory, open 'home/rlav/package.json'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The specific path may differ for your personal machine, but any path that ends in &amp;quot;package.json&amp;quot; in this error is likely a result of the same problem.&lt;br /&gt;
&lt;br /&gt;
This is another common error message: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
Cannot find module 'mime' error when running static_server.js&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both of these errors are a result of not setting up the package.json correctly. In fact, both are usually a result of not creating package.json at. After installing Node.js, you '''must''' run the following command to generate the package.json file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
$ npm init&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
After generating the package.json file, you must write the correct dependencies. '''Details on this are specified at the [[Node.JS]] page'''. If you follow everything on this page correctly, you should be able to set up Node.js rather smoothly.&lt;br /&gt;
&lt;br /&gt;
[[Category: Module 6]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=Module_6&amp;diff=2767</id>
		<title>Module 6</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Module_6&amp;diff=2767"/>
		<updated>2020-12-21T15:41:49Z</updated>

		<summary type="html">&lt;p&gt;Mitch: /* Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
Module 6 builds upon the JavaScript skills you learned in Module 5.&lt;br /&gt;
&lt;br /&gt;
== Reading ==&lt;br /&gt;
&lt;br /&gt;
The following articles on the online class wiki textbook contain information that will help you complete the assignments.&lt;br /&gt;
&lt;br /&gt;
* [[Node.JS]]&lt;br /&gt;
* [[Socket.IO]]&lt;br /&gt;
* [[FAQ - Mod 6]]&lt;br /&gt;
&lt;br /&gt;
== Individual Assignments ==&lt;br /&gt;
&lt;br /&gt;
=== Install Node.JS ===&lt;br /&gt;
&lt;br /&gt;
Install Node.JS from Apt or Yum according to the instructions in the [[Node.JS]] guide.&lt;br /&gt;
&lt;br /&gt;
=== Static File Server in Node.JS ===&lt;br /&gt;
&lt;br /&gt;
The individual portion of Module 6 is short in order to give you enough time to complete the group portion.&lt;br /&gt;
&lt;br /&gt;
# Copy the example code from the Node.JS guide into a file called ''static_server.js'' or something of that nature.  Save it on your EC2 instance (but not in a place that Apache can serve!).&lt;br /&gt;
#: Ensure that you understand what the static file server script is doing…&lt;br /&gt;
# Make a directory parallel to ''static_server.js'' named ''static''.&lt;br /&gt;
# Change &amp;quot;&amp;lt;STATIC DIRECTORY NAME&amp;gt;&amp;quot; on line 11 of the static fileserver example code to reflect the name of the directory you just made.&lt;br /&gt;
# Save the following files in your ''static'' directory:&lt;br /&gt;
#* ''hello.txt'', a text file containing &amp;quot;Hello World&amp;quot;&lt;br /&gt;
#* ''brookings.jpg'', an image file you can download from here: http://classes.engineering.wustl.edu/cse330/content/brookings.jpg&lt;br /&gt;
#* ''college.html'', an HTML document based on the [[HTML and CSS#Quick and Easy Page Layout|Quick and Easy HTML Layout]] containing an image tag pointing to ''brookings.jpg''&lt;br /&gt;
#* ''phpinfo.php'', a PHP file containing the phpinfo command that generates a diagnostic page of the server:&lt;br /&gt;
#: &amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;?php   phpinfo();   ?&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
# Boot up your Node.JS static fileserver, and from your browser, load all four of the files you created in step 4.&lt;br /&gt;
#: Which ones work and which ones don't?  Why might this be the case?&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
In the group portion of Module 6 you will create a multi-room chat server using Node.JS and Socket.IO. This project must be completed using Node.JS.&lt;br /&gt;
&lt;br /&gt;
This chat service will contain a main lobby where users sign on with a nickname and can communicate with each other.  Users may also create chat rooms for other to join.  The entire app should be displayed on a single webpage, listing the room you are in, all available rooms, and the users in the current room.&lt;br /&gt;
&lt;br /&gt;
The single room chat server and client are provided here: [[Socket.IO]]&lt;br /&gt;
&lt;br /&gt;
== Grading ==&lt;br /&gt;
&lt;br /&gt;
We will be grading the following aspects of your work.  There are 75 points total.&lt;br /&gt;
&lt;br /&gt;
'''Assignments (including code) must be committed to Github by the end of class on the due date (commit early and often). Failing to commit by the end of class on the due date will result in a 0. '''&lt;br /&gt;
&lt;br /&gt;
'''Additionally, for this module, the TA should be able to simply download your repo and start up your file server, without having to copy files or create additional subdirectories.  This applies to both the individual and the creative portion'''&lt;br /&gt;
&lt;br /&gt;
_________&lt;br /&gt;
&lt;br /&gt;
# '''Individual Portion (25 Points):'''&lt;br /&gt;
#* Node.JS is installed on your EC2 instance (5 points)&lt;br /&gt;
#*: ''Take a screenshot of your browser visiting your EC2 instance serving up the college.html web page on port 3456, make sure the URL is visible in the screenshot.''&lt;br /&gt;
#* The ''hello.txt'', ''brookings.jpg'', and ''college.html'' files all load successfully (4 points each)&lt;br /&gt;
#* Visiting a file that does not exist inside the ''static'' directory results in a 404 (4 points)&lt;br /&gt;
#* Discuss in the README.md why ''phpinfo.php'' behaves the way it does when loaded through Node.JS (4 points)&lt;br /&gt;
#* Make sure all of your individual portion files are pushed to Github (include your node.js files, hello.txt, brookings.jpg, college.html, and phpinfo.php)&lt;br /&gt;
&lt;br /&gt;
# '''Multi-room Chat Server (50 Points):'''&lt;br /&gt;
#* '''''Administration of user created chat rooms (25 Points):'''''&lt;br /&gt;
#** Users can create chat rooms with an arbitrary room name(5 points)&lt;br /&gt;
#** Users can join an arbitrary chat room (5 points)&lt;br /&gt;
#** The chat room displays all users currently in the room (5 points)&lt;br /&gt;
#** A private room can be created that is password protected (5 points)&lt;br /&gt;
#** Creators of chat rooms can temporarily kick others out of the room (3 points)&lt;br /&gt;
#** Creators of chat rooms can permanently ban users from joining that particular room (2 points)&lt;br /&gt;
#* '''''Messaging (5 Points):'''''&lt;br /&gt;
#** A user's message shows their username and is sent to everyone in the room (1 point)&lt;br /&gt;
#** Users can send private messages to another user in the same room (4 points)&lt;br /&gt;
#* '''''Best Practices (5 Points):'''''&lt;br /&gt;
#** Code is well formatted and easy to read, with proper commenting (2 points)&lt;br /&gt;
#** Code passes HTML validation (2 points)&lt;br /&gt;
#** node_modules folder is ignored by version control (1 points)&lt;br /&gt;
#* '''''Usability (5 Points):'''''&lt;br /&gt;
#** Communicating with others and joining rooms is easy and intuitive (4 points)&lt;br /&gt;
#** Site is visually appealing (1 point)&lt;br /&gt;
#* '''Creative Portion (10 Points)'''&lt;br /&gt;
&amp;lt;!-- #** Make sure to create a README.md file pointing to your server --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 6]]&lt;br /&gt;
[[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=Module_5&amp;diff=2766</id>
		<title>Module 5</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Module_5&amp;diff=2766"/>
		<updated>2020-12-21T15:41:32Z</updated>

		<summary type="html">&lt;p&gt;Mitch: /* Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
In Module 5, you will learn JavaScript, the dominant client-side web language.  JavaScript is the third and final programming language you will learn in CSE 330.&lt;br /&gt;
&lt;br /&gt;
This article contains your assignments for Module 5.&lt;br /&gt;
&lt;br /&gt;
'''Warning:'''&lt;br /&gt;
&lt;br /&gt;
''This module takes students a while. It is strongly recommended that you start early and ask questions as they come up.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reading ==&lt;br /&gt;
&lt;br /&gt;
The following articles on the online class wiki textbook contain information that will help you complete the assignments.&lt;br /&gt;
&lt;br /&gt;
* [[JavaScript]]&lt;br /&gt;
* [[AJAX and JSON]]&lt;br /&gt;
* [[jQuery]]&lt;br /&gt;
* [[Web Application Security, Part 3]]&lt;br /&gt;
* [[FAQ - Mod 5]]&lt;br /&gt;
&lt;br /&gt;
== Individual Assignments ==&lt;br /&gt;
&lt;br /&gt;
'''''IMPORTANT:'' Both of the individual assignments must be completed ''without'' using a JavaScript library like jQuery.'''  However, you may use jQuery for the group portion.&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Calculator ===&lt;br /&gt;
&lt;br /&gt;
In Module 2, you made a calculator using PHP.  Now you will be making one using JavaScript.&lt;br /&gt;
&lt;br /&gt;
* The web page should have two input fields and a radio button group for the operation, with the 4 basic math operations represented (add, subtract, multiply, divide).&lt;br /&gt;
* JavaScript should monitor all three fields and display the current result whenever the user changes any value in any field, without refreshing the page.&lt;br /&gt;
*: '''Tip 1:''' Consider using either the ''change'' or the ''keyup'' event on the text fields, and either the ''change'' or the ''click'' event on the radio buttons.&lt;br /&gt;
*: '''Tip 2:''' Re-read [[JavaScript|the JavaScript guide]] if you need help figuring our how to bind callback functions to events, or how to determine which radio button is currently selected.  (There are examples for both of these!)&lt;br /&gt;
* The calculator should be completely self-contained; i.e., you should not be making any requests to any other server-side or client-side scripts or web pages after the initial page load.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' You can embed JavaScript code into an HTML document like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
// your code here&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' If your code isn't working the way you expect, use a JavaScript error console.  In Chrome, for example, press Ctrl-Shift-I (or Cmd-Option-I) to open the WebKit inspector.&lt;br /&gt;
&lt;br /&gt;
'''Important:''' It is best practice to fully separate the content, appearance, and behavior.  In previous modules, you may have lost points for using HTML tags that change the appearance of things &amp;lt;nowiki&amp;gt;(like &amp;lt;center&amp;gt; and &amp;lt;font&amp;gt;).&amp;lt;/nowiki&amp;gt;  In this module, make sure that you define your event listeners in JavaScript as in &amp;lt;code&amp;gt;document.getElementById(&amp;quot;xyz&amp;quot;).addEventListener(...)&amp;lt;/code&amp;gt; and '''''not''''' in the HTML like &amp;lt;code&amp;gt;&amp;lt;button onclick=&amp;quot;badExample();&amp;quot;&amp;gt;Bad Example&amp;lt;/button&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Weather Widget ===&lt;br /&gt;
&lt;br /&gt;
In this section, you will make a web page that displays the weather forecast using AJAX requests to a weather server.&lt;br /&gt;
&lt;br /&gt;
# Make an empty HTML document; name it '''weather.html'''&lt;br /&gt;
#: Refer to the [[HTML and CSS]] guide for the skeleton of an HTML document&lt;br /&gt;
# Define a function in JavaScript; call it '''fetchWeather()'''.  You may write your JavaScript in an embedded script in your HTML document.&lt;br /&gt;
# Inside your '''fetchWeather()''' function, make an AJAX request to the weather server.&lt;br /&gt;
#: We have a server that outputs the current weather in JSON format.  The format is documented in the [[#JSON Structure]] section below.&lt;br /&gt;
#: '''URL:''' https://classes.engineering.wustl.edu/cse330/content/weather_json.php&lt;br /&gt;
#* '''IMPORTANT:''' Under normal circumstances, AJAX requests ''cannot'' be performed cross-domain for security reasons.  We have set the &amp;lt;code&amp;gt;Access-Control-Allow-Origin&amp;lt;/code&amp;gt; header on our server to allow requests from your EC2 instances, or from localhost.  '''You will therefore need to upload your code to your EC2, or access it via localhost, in order for the AJAX requests to work.'''  This means that you cannot, for example, complete this part of the individual portion in JSFiddle.&lt;br /&gt;
# In your callback, process the JSON and use JavaScript to manipulate the HTML DOM to display the following information on your page:&lt;br /&gt;
#* Location&lt;br /&gt;
#** City, in a &amp;lt;nowiki&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;/nowiki&amp;gt; tag&lt;br /&gt;
#** State, not in any tag&lt;br /&gt;
#* Humidity&lt;br /&gt;
#* Current Temperature&lt;br /&gt;
#* Image for Tomorrow's Forecast (see [[#Weather Condition Images]] below for more information)&lt;br /&gt;
#* Image for the Day After Tomorrow's Forecast&lt;br /&gt;
# Finally, bind '''fetchWeather()''' to the DOMContentLoaded event so that your weather widget is automatically initialized when the page is loaded:&lt;br /&gt;
#: &amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;document.addEventListener(&amp;quot;DOMContentLoaded&amp;quot;, fetchWeather, false);&amp;lt;/source&amp;gt;&lt;br /&gt;
# In addition, add a button that runs your ''fetchWeather'' function when clicked.  This should update your widget with the current weather conditions.&lt;br /&gt;
&lt;br /&gt;
Use the following HTML:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div class=&amp;quot;weather&amp;quot; id=&amp;quot;weatherWidget&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;weather-loc&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;weather-humidity&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;div class=&amp;quot;weather-temp&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
	&amp;lt;img class=&amp;quot;weather-tomorrow&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;img class=&amp;quot;weather-dayaftertomorrow&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Include the CSS file from here: http://classes.engineering.wustl.edu/cse330/content/weather.css&lt;br /&gt;
&lt;br /&gt;
When everything is working, the weather widget should look something like this:&lt;br /&gt;
&lt;br /&gt;
[[File:WeatherWidget.png]]&lt;br /&gt;
&lt;br /&gt;
'''Important:''' The widget in this section needs to work in only Firefox and Chrome.  It does '''''not''''' need to work Internet Explorer.&lt;br /&gt;
&lt;br /&gt;
==== Tips ====&lt;br /&gt;
&lt;br /&gt;
===== JSON Structure =====&lt;br /&gt;
&lt;br /&gt;
The JSON from our server looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   &amp;quot;updated&amp;quot;: &amp;quot;Thu, 11 Oct 2012 5:54 pm CDT&amp;quot;,&lt;br /&gt;
   &amp;quot;location&amp;quot;: {&lt;br /&gt;
      &amp;quot;city&amp;quot;: &amp;quot;St. Louis&amp;quot;,&lt;br /&gt;
      &amp;quot;state&amp;quot;: &amp;quot;MO&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;wind&amp;quot;: {&lt;br /&gt;
      &amp;quot;chill&amp;quot;: &amp;quot;62&amp;quot;,&lt;br /&gt;
      &amp;quot;direction&amp;quot;: &amp;quot;150&amp;quot;,&lt;br /&gt;
      &amp;quot;speed&amp;quot;: &amp;quot;3 mph&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;atmosphere&amp;quot;: {&lt;br /&gt;
      &amp;quot;humidity&amp;quot;: &amp;quot;50&amp;quot;,&lt;br /&gt;
      &amp;quot;visibility&amp;quot;: &amp;quot;10&amp;quot;,&lt;br /&gt;
      &amp;quot;pressure&amp;quot;: &amp;quot;30.12 in&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;current&amp;quot;: {&lt;br /&gt;
      &amp;quot;code&amp;quot;: &amp;quot;28&amp;quot;,&lt;br /&gt;
      &amp;quot;text&amp;quot;: &amp;quot;Mostly Cloudy&amp;quot;,&lt;br /&gt;
      &amp;quot;temp&amp;quot;: &amp;quot;62°F&amp;quot;,&lt;br /&gt;
      &amp;quot;date&amp;quot;: &amp;quot;Thu, 11 Oct 2012 5:54 pm CDT&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;tomorrow&amp;quot;: {&lt;br /&gt;
      &amp;quot;code&amp;quot;: &amp;quot;29&amp;quot;,&lt;br /&gt;
      &amp;quot;text&amp;quot;: &amp;quot;Clouds Early/Clearing Late&amp;quot;,&lt;br /&gt;
      &amp;quot;low&amp;quot;: &amp;quot;45°F&amp;quot;,&lt;br /&gt;
      &amp;quot;high&amp;quot;: &amp;quot;61°F&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;dayafter&amp;quot;: {&lt;br /&gt;
      &amp;quot;code&amp;quot;: &amp;quot;30&amp;quot;,&lt;br /&gt;
      &amp;quot;text&amp;quot;: &amp;quot;Partly Cloudy&amp;quot;,&lt;br /&gt;
      &amp;quot;low&amp;quot;: &amp;quot;53°F&amp;quot;,&lt;br /&gt;
      &amp;quot;high&amp;quot;: &amp;quot;65°F&amp;quot;&lt;br /&gt;
   },&lt;br /&gt;
   &amp;quot;credit&amp;quot;: &amp;quot;http://us.rd.yahoo.com/dailynews/rss/weather/St._Louis__MO/*http://weather.yahoo.com/forecast/USMO0170_f.html&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Weather Condition Images =====&lt;br /&gt;
&lt;br /&gt;
Each day's forecast has a code.  There are images associated with these codes.&lt;br /&gt;
&lt;br /&gt;
One place to get the images is from here: &amp;lt;nowiki&amp;gt;http://us.yimg.com/i/us/nws/weather/gr/&amp;lt;/nowiki&amp;gt;'''##'''&amp;lt;nowiki&amp;gt;ds.png&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace the '''##''' with the forecast code.  For example, for code 32, the URL would be: http://us.yimg.com/i/us/nws/weather/gr/32ds.png&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
I forgot if I already mentioned this, but '''start early on this project!''' It will take longer than you think, I promise!&lt;br /&gt;
&lt;br /&gt;
You are encouraged to use the advanced version control practices you learned in Module 5 when completing this assignment.&lt;br /&gt;
&lt;br /&gt;
=== Calendar ===&lt;br /&gt;
&lt;br /&gt;
Build a simple calendar that allows users to add and remove events dynamically.&lt;br /&gt;
&lt;br /&gt;
You will use JavaScript to process user interactions at the web browser, without ever refreshing the browser after the initial web page load.  You may use a JavaScript library of your choice, including Ext JS, so long as that JavaScript library does not defeat the purpose of the assignment. If you have questions about this, ask. In particular, libraries like FullCalendar are unacceptable.&lt;br /&gt;
&lt;br /&gt;
Your application should utilize AJAX to run server-side scripts that query your database to save and retrieve information, including user accounts and events.&lt;br /&gt;
&lt;br /&gt;
We have also written some functions to help you get started: [[JavaScript Calendar Library]]&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
* https://calendar.google.com/&lt;br /&gt;
* http://www.zoho.com/calendar/&lt;br /&gt;
&lt;br /&gt;
==== Server Side Language ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additionally, you may use a database of your choice.  MySQL is probably the logical choice since you have been using it since Module 2, but you are free to explore other databases if you like.&lt;br /&gt;
&lt;br /&gt;
==== Requirements ====&lt;br /&gt;
&lt;br /&gt;
* Support a month-by-month view of the calendar.&lt;br /&gt;
*: Show one month at a time, with buttons to move forward or backward.&lt;br /&gt;
*: There should be no limit to how far forward or backward the user can go.&lt;br /&gt;
* Users can register and log in to the website.&lt;br /&gt;
*: You may leverage your MySQL project code and database from module 3 to get started.&lt;br /&gt;
* Unregistered users should see no events on the calendar.&lt;br /&gt;
* Registered users can add events.&lt;br /&gt;
*: All events should have a date and time, but do not need to have a duration.&lt;br /&gt;
*: You do ''not'' need to support recurring events (where you add an event that repeats, for example, every monday).&lt;br /&gt;
* Registered users see only events that they have added.&lt;br /&gt;
*: Your AJAX should not ask the server for events from a certain username.  Instead, your AJAX should ask the server for events, and the server should respond with the events for only the currently-logged-in user (from the session).  Can you think of why?&lt;br /&gt;
* Registered users can delete their events, but not the events of others.&lt;br /&gt;
*: Again, the server should delete events based on the username present in the session.  (If it deletes only based on an Event ID, an attacker could feed any arbitrary Event ID to your server, even if he/she didn't own that event.)&lt;br /&gt;
* All user and event data should be kept in a database.&lt;br /&gt;
* At no time should the main page need to be reloaded.&lt;br /&gt;
*: User registration, user authentication, event addition, and event deletion should all be handled by JavaScript and AJAX requests to your server.&lt;br /&gt;
* Your page needs to work in the versions of Firefox and Chrome installed on the lab computers.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' Run your database schema by a TA before implementing it.&lt;br /&gt;
&lt;br /&gt;
=== Web Security and Validation ===&lt;br /&gt;
&lt;br /&gt;
Your project needs to demonstrate that thought was put into web security and best practice.  For more information, see this week's Web Application Security guide: [[Web Application Security, Part 3]]&lt;br /&gt;
&lt;br /&gt;
In particular:&lt;br /&gt;
&lt;br /&gt;
* '''Your application needs to prevent XSS attacks.'''  Be careful when transmitting data over JSON that will be reflected in an event title!  (Note: JSON data should be sanitized on the client side, not the server side.)&lt;br /&gt;
* '''Perform precautionary measures to prevent session hijacking attacks.'''&lt;br /&gt;
*: You should specify your session cookie to be HTTP-Only.  However, for the means of this module, you need not test for user agent consistency.&lt;br /&gt;
&lt;br /&gt;
You should continue the practices that you have learned in past weeks:&lt;br /&gt;
&lt;br /&gt;
* Pass tokens in forms to prevent CSRF attacks.&lt;br /&gt;
*: '''Hint:''' You will need to send your CSRF tokens in your AJAX requests.  Remember that AJAX still submits forms and runs server-side scripts, just like the vanilla forms you've been using in Modules 2 and 3.&lt;br /&gt;
* Use prepared queries to prevent SQL Injection attacks.&lt;br /&gt;
* If storing passwords in a database, always store them salted and encrypted.&lt;br /&gt;
* Your page should validate with no errors or warnings through the W3C validator.&lt;br /&gt;
&lt;br /&gt;
== Grading ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will be grading the following aspects of your work.  There are 100 points in total.&lt;br /&gt;
&lt;br /&gt;
'''Assignments (including code) must be committed to Github by the end of class on the due date (commit early and often). Failing to commit by the end of class on the due date will result in a 0. ''' &lt;br /&gt;
&lt;br /&gt;
If you do not include a link to your individual and group portion running on your instance in the respective README.md, you will receive a 0 for the missing portion&lt;br /&gt;
&lt;br /&gt;
_________&lt;br /&gt;
&lt;br /&gt;
# '''JavaScript Calculator (10 Points):'''&lt;br /&gt;
#* Calculator successfully adds, subtracts, multiplies, and divides numbers (3 points)&lt;br /&gt;
#* The result is automatically computed when a value in either field is changed (3 points)&lt;br /&gt;
#* Calculator is written entirely in pure, conventional JavaScript with no external libraries (4 points)*&lt;br /&gt;
#*: ''Note: be sure to fully separate content, appearance, and behavior.  This means that you should '''not''' use the event attributes on the HTML elements like onclick, onchange, and onkeyup.''&lt;br /&gt;
# '''Weather Widget (15 Points):'''&lt;br /&gt;
#* Widget performs an AJAX request to fetch the current weather (4 points)&lt;br /&gt;
#* The HTML template is filled with the correct information, including an image (4 points)&lt;br /&gt;
#* Button to reload the weather widget (2 points)&lt;br /&gt;
#* Widget is written entirely in pure, conventional JavaScript with no external libraries (5 points)*&lt;br /&gt;
# '''AJAX Calendar (60 Points):'''&lt;br /&gt;
#* '''''Calendar View (10 Points):'''''&lt;br /&gt;
#** The calendar is displayed as a table grid with days as the columns and weeks as the rows, one month at a time (5 points)&lt;br /&gt;
#** The user can view different months as far in the past or future as desired (5 points)&lt;br /&gt;
#* '''''User and Event Management (25 Points):'''''&lt;br /&gt;
#** Events can be added, modified, and deleted (5 points)&lt;br /&gt;
#** Events have a title, date, and time (2 points)&lt;br /&gt;
#** Users can log into the site, and they cannot view or manipulate events associated with other users (8 points)&lt;br /&gt;
#**: ''Don't fall into the Abuse of Functionality trap!  Check user credentials on the server side as well as on the client side.''&lt;br /&gt;
#** All actions are performed over AJAX, without ever needing to reload the page (7 points)&lt;br /&gt;
#** Refreshing the page does not log a user out (3 points)&lt;br /&gt;
#* '''''Best Practices (20 Points):'''''&lt;br /&gt;
#** Code is well formatted and easy to read, with proper commenting (2 points)&lt;br /&gt;
#** If storing passwords, they are stored salted and hashed (2 points)&lt;br /&gt;
#** All AJAX requests that either contain sensitive information or modify something on the server are performed via POST, not GET (3 points)&lt;br /&gt;
#** Safe from XSS attacks; that is, all content is escaped on output (3 points)&lt;br /&gt;
#** Safe from SQL Injection attacks (2 points)&lt;br /&gt;
#** CSRF tokens are passed when adding/editing/deleting events (3 points)&lt;br /&gt;
#** Session cookie is HTTP-Only (3 points)&lt;br /&gt;
#** Page passes the W3C validator (2 points)&lt;br /&gt;
#* '''''Usability (5 Points):'''''&lt;br /&gt;
#** Site is intuitive to use and navigate (4 points)&lt;br /&gt;
#** Site is visually appealing (1 point)&lt;br /&gt;
# '''Creative Portion (15 Points)'''&lt;br /&gt;
#* '''Additional Calendars Features (worth 15 points):''' Develop some additional features for the calendar, a few examples are provided below.&lt;br /&gt;
#**  Users can tag an event with a particular category and enable/disable those tags in the calendar view. (5 points)&lt;br /&gt;
#**  Users can share their calendar with additional users. (5 points)&lt;br /&gt;
#**  Users can create group events that display on multiple users calendars (5 points)&lt;br /&gt;
#*  '''Make sure to save a description of your creative portion, and a link to your server in your README.md file.'''&lt;br /&gt;
''* These points can be earned only if at least 3 other points have been earned in that category.  This is to prevent these points from being &amp;quot;free.&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 5]]&lt;br /&gt;
[[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_6&amp;diff=2765</id>
		<title>FAQ - Mod 6</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_6&amp;diff=2765"/>
		<updated>2020-12-21T15:34:59Z</updated>

		<summary type="html">&lt;p&gt;Mitch: /* NPM/Mime */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 6. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== Setup/Logistics ==&lt;br /&gt;
&lt;br /&gt;
=== Should I use a database for Module 6? ===&lt;br /&gt;
You can store everything locally in this module. No need to use a database.&lt;br /&gt;
&lt;br /&gt;
=== How can I add an image to my instance? SFTP isn't working ===&lt;br /&gt;
There are a couple different ways to load an image onto your instance. One of the easiest is to use wget. When logged into your instance, run the following command in the terminal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
$ wget &amp;lt;imageurl&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running this command will download the image straight onto your instance!&lt;br /&gt;
&lt;br /&gt;
== NPM/Mime ==&lt;br /&gt;
There are a couple common errors that students run into when setting up their Node.js. One of the most common looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
ENOENT: no such file or directory, open 'home/rlav/package.json'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The specific path may differ for your personal machine, but any path that ends in &amp;quot;package.json&amp;quot; in this error is likely a result of the same problem.&lt;br /&gt;
&lt;br /&gt;
This is another common error message: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
Cannot find module 'mime' error when running static_server.js&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both of these errors are a result of not setting up the package.json correctly. In fact, both are usually a result of not creating package.json at. After installing Node.js, you '''must''' run the following command to generate the package.json file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
$ npm init&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
After generating the package.json file, you must write the correct dependencies. '''Details on this are specified at the [[Node.JS]] page'''. If you follow everything on this page correctly, you should be able to set up Node.js rather smoothly.&lt;br /&gt;
&lt;br /&gt;
== Port 3456 ==&lt;br /&gt;
&lt;br /&gt;
=== What rule should I define for Custom TCP when setting up port 3456? ===&lt;br /&gt;
When setting up the Custom TCP rule for port 3456, it's fine to use the default source of 0.0.0.0/0. The rule will look like this:&lt;br /&gt;
&lt;br /&gt;
Custom TCP 3456 Custom 0.0.0.0/0&lt;br /&gt;
&lt;br /&gt;
=== How do I access my instance at port 3456? ===&lt;br /&gt;
All you have to do is append :3456 to the end of your instance url. Thus, the link would just be http://ec2-xx-xxx-xx-xxx.us-east-2.compute.amazonaws.com:3456/filepath &lt;br /&gt;
&lt;br /&gt;
[[Category: Module 6]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_6&amp;diff=2764</id>
		<title>FAQ - Mod 6</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_6&amp;diff=2764"/>
		<updated>2020-12-21T02:38:16Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 6. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== Setup/Logistics ==&lt;br /&gt;
&lt;br /&gt;
=== Should I use a database for Module 6? ===&lt;br /&gt;
You can store everything locally in this module. No need to use a database.&lt;br /&gt;
&lt;br /&gt;
=== How can I add an image to my instance? SFTP isn't working ===&lt;br /&gt;
There are a couple different ways to load an image onto your instance. One of the easiest is to use wget. When logged into your instance, run the following command in the terminal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
$ wget &amp;lt;imageurl&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running this command will download the image straight onto your instance!&lt;br /&gt;
&lt;br /&gt;
== NPM/Mime ==&lt;br /&gt;
There are a couple common errors that students run into when setting up their Node.js. One of the most common looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
ENOENT: no such file or directory, open 'home/rlav/package.json'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The specific path may differ for your personal machine, but any path that ends in &amp;quot;package.json&amp;quot; in this error is likely a result of the same problem.&lt;br /&gt;
&lt;br /&gt;
This is another common error message: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
Cannot find module 'mime' error when running static_server.js&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both of these errors are a result of not setting up the package.json correctly. In fact, both are usually a result of not creating package.json at. After installing Node.js, you '''must''' run the following command to generate the package.json file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
$ npm init&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
After generating the package.json file, you must write the correct dependencies. Details on this are specified at the [[Node.JS]] page. If you follow everything on this page correctly, you should be able to set up Node.js rather smoothly.&lt;br /&gt;
&lt;br /&gt;
== Port 3456 ==&lt;br /&gt;
&lt;br /&gt;
=== What rule should I define for Custom TCP when setting up port 3456? ===&lt;br /&gt;
When setting up the Custom TCP rule for port 3456, it's fine to use the default source of 0.0.0.0/0. The rule will look like this:&lt;br /&gt;
&lt;br /&gt;
Custom TCP 3456 Custom 0.0.0.0/0&lt;br /&gt;
&lt;br /&gt;
=== How do I access my instance at port 3456? ===&lt;br /&gt;
All you have to do is append :3456 to the end of your instance url. Thus, the link would just be http://ec2-xx-xxx-xx-xxx.us-east-2.compute.amazonaws.com:3456/filepath &lt;br /&gt;
&lt;br /&gt;
[[Category: Module 6]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_6&amp;diff=2763</id>
		<title>FAQ - Mod 6</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_6&amp;diff=2763"/>
		<updated>2020-12-21T02:11:39Z</updated>

		<summary type="html">&lt;p&gt;Mitch: Created page with &amp;quot;Welcome to the frequently asked questions page for Module 6. As many common questions can come up on Piazza, some of those questions are consolidated here.  == Setup/Logistics...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 6. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== Setup/Logistics ==&lt;br /&gt;
&lt;br /&gt;
=== Should I use a database for Module 6? ===&lt;br /&gt;
You can store everything locally in this module. No need to use a database.&lt;br /&gt;
&lt;br /&gt;
=== How can I add an image to my instance? SFTP isn't working ===&lt;br /&gt;
There are a couple different ways to load an image onto your instance. One of the easiest is to use wget. When logged into your instance, run the following command in the terminal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
$ wget &amp;lt;imageurl&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running this command will download the image straight onto your instance!&lt;br /&gt;
&lt;br /&gt;
== NPM/Mime ==&lt;br /&gt;
There are a couple common errors that students run into when setting up their Node.js. One of the most common looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
ENOENT: no such file or directory, open 'home/rlav/package.json'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The specific path may differ for your personal machine, but any path that ends in &amp;quot;package.json&amp;quot; in this error is likely a result of the same problem.&lt;br /&gt;
&lt;br /&gt;
This is another common error message: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
Cannot find module 'mime' error when running static_server.js&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both of these errors are a result of not setting up the package.json correctly. In fact, both are usually a result of not creating package.json at. After installing Node.js, you '''must''' run the following command to generate the package.json file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
$ npm init&lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
After generating the package.json file, you must write the correct dependencies. Details on this are specified at the [[Node.JS]] page. If you follow everything on this page correctly, you should be able to set up Node.js rather smoothly.&lt;br /&gt;
&lt;br /&gt;
[[Category: Module 6]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_5&amp;diff=2762</id>
		<title>FAQ - Mod 5</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_5&amp;diff=2762"/>
		<updated>2020-12-21T02:09:35Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 5. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== File Structure/Languages ==&lt;br /&gt;
&lt;br /&gt;
=== Can I redirect users to another page after login/for any other reason? ===&lt;br /&gt;
For this module, you can '''not''' redirect a user to another page for login or refresh the page on logout. You should have '''one''' single html file , and any on-screen changes should be done through DOM manipulation in Javascript.&lt;br /&gt;
&lt;br /&gt;
=== Can/should I use PHP in this module? ===&lt;br /&gt;
PHP should be used to access the MySQL database for this module, but you should use Javascript for most other functionality. The focus of this module is for you to learn more about Javascript and the DOM, so do not use PHP to redirect to other pages or refresh the current one.&lt;br /&gt;
&lt;br /&gt;
== CSRF Tokens ==&lt;br /&gt;
&lt;br /&gt;
=== How do I pass CSRF tokens between PHP and Javascript? ===&lt;br /&gt;
At the end of your PHP script execution, you can send values back to where you initially called the script from. Think about how you can use this to then store the token in Javascript.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== HTML Validator ==&lt;br /&gt;
&lt;br /&gt;
=== I'm getting a validation warning about missing an src attribute for my weather widget, what should I do about this? ===&lt;br /&gt;
Before you fetch the data in the weather widget, you may not have a src attribute for your img tags. Your warning will likely look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
Element img is missing required attribute src&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An easy way to avoid this warning is to simply put a temporary image on the screen before you load in the weather data.&lt;br /&gt;
&lt;br /&gt;
[[Category: Module 5]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_4&amp;diff=2761</id>
		<title>FAQ - Mod 4</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_4&amp;diff=2761"/>
		<updated>2020-12-21T02:09:07Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 4. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions Cases ==&lt;br /&gt;
&lt;br /&gt;
=== When parsing for a string, should I look for that string exclusively or that string concatenated with other characters? ===&lt;br /&gt;
If you are looking for a string, you should be looking for any exact occurrences of that string. This is the case regardless of what characters are appended to the beginning or the end of said string.&lt;br /&gt;
&lt;br /&gt;
'''Example:''' Parsing for &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''What Should Work'''&lt;br /&gt;
&lt;br /&gt;
hello world, hi hello world, hello worldwide, hhhello worlddd&lt;br /&gt;
&lt;br /&gt;
'''What Shouldn't Work'''&lt;br /&gt;
&lt;br /&gt;
hello weorld, hello to the world&lt;br /&gt;
&lt;br /&gt;
=== In RegEx exercise 2, should I accept strings that have more than three consecutive vowels? ===&lt;br /&gt;
In this exercise, strings with three ''or more'' vowels should be accepted.&lt;br /&gt;
&lt;br /&gt;
'''What Should Work'''&lt;br /&gt;
&lt;br /&gt;
beautiful, queue, coooool!&lt;br /&gt;
&lt;br /&gt;
=== In RegEx exercise 3, is each line a separate input? ===&lt;br /&gt;
Yes. Each line with a potential flight code is a separate input. Your expression does not need to account for separating each potential code.&lt;br /&gt;
&lt;br /&gt;
=== If a batting average ends in a 0, can I round to two decimal places? ===&lt;br /&gt;
A batting average must always be rounded to 3 decimal places, regardless of if it ends in one (or more) zero(s).&lt;br /&gt;
&lt;br /&gt;
'''Expected Batting Average Outputs'''&lt;br /&gt;
&lt;br /&gt;
.270, .300, .050&lt;br /&gt;
&lt;br /&gt;
'''Unacceptable Batting Average Outputs'''&lt;br /&gt;
&lt;br /&gt;
.27, .3, .05&lt;br /&gt;
&lt;br /&gt;
== Logistics == &lt;br /&gt;
&lt;br /&gt;
=== Should I complete this module on my local machine or on my instance? ===&lt;br /&gt;
Unlike other modules, this one can be completed on your local machine!&lt;br /&gt;
&lt;br /&gt;
=== Do I have to save the output of our python script to a .txt file or can I just print it out? ===&lt;br /&gt;
You can just print the output of your script. No need to save it to a .txt file&lt;br /&gt;
&lt;br /&gt;
[[Category: Module 4]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=Node.JS&amp;diff=2760</id>
		<title>Node.JS</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Node.JS&amp;diff=2760"/>
		<updated>2020-12-21T02:08:24Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;AJAX is a useful technology for web applications that need to pull periodic updates from your server.  But what do you do when you have thousands of clients all requesting data that changes real-time?  A PHP+AJAX approach could choke without a lot of effort on your part.  It is situations like these that Node.js comes to the rescue. Node.js is a web framework, made in JavaScript, that's become extremely popular over the last few years.&lt;br /&gt;
&lt;br /&gt;
In general, JavaScript frameworks are very trendy right now; it can be hard to keep up with the new cool thing. In fact, there's a joke website https://dayssincelastjavascriptframework.com/, that &amp;quot;tracks&amp;quot; how long it's been since a new framework has come out.&lt;br /&gt;
&lt;br /&gt;
== Non-Blocking I/O ==&lt;br /&gt;
&lt;br /&gt;
You dabbled in the concept of non-blocking I/O when you implemented AJAX in the previous JavaScript module.  Node.js uses this execution model at its core.&lt;br /&gt;
&lt;br /&gt;
The core idea is the use of '''''anonymous functions''''' as ''callbacks'' for processing the results of intensive operations.  Consider the pseudo-code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Blocking I/O Pseudo-Code&lt;br /&gt;
&lt;br /&gt;
var data = database.query(&amp;quot;select * from news&amp;quot;);&lt;br /&gt;
print data[0].title;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above pseudo-code queries a database, saves the result of the query in a variable named ''data'', and then prints out the first title in ''data''.  The problem arises when multiple clients all want to access the server at the same time.  ''In a blocking I/O model, a client needs to wait until all other clients are finished before it can start its process.''  With intensive operations and thousands of clients, this can easily crash your server!&lt;br /&gt;
&lt;br /&gt;
The solution is to use ''non-blocking I/O''.  Consider this revised pseudo-code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Non-Blocking I/O Pseudo-Code&lt;br /&gt;
&lt;br /&gt;
database.query(&amp;quot;select * from news&amp;quot;, function(data){&lt;br /&gt;
	print data[0].title;&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The revised pseudo-code achieves the same end result as the first version.  However, ''it allows other clients to perform tasks while this process is waiting for the database to be queried!''  The code occurs in two parts: first, we start the query.  Second, ''when the query is complete'', our '''anonymous callback function''' is executed.  In Node.js, callback functions are usually passed one or more parameters.&lt;br /&gt;
&lt;br /&gt;
Better yet, with non-blocking I/O, you have no concurrency issues, because everything runs in just one thread.  Nifty!&lt;br /&gt;
&lt;br /&gt;
== Installing Node.js ==&lt;br /&gt;
&lt;br /&gt;
Run the following commands to install Node and NPM:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ curl --silent --location https://rpm.nodesource.com/setup_12.x | sudo bash -&lt;br /&gt;
$ sudo yum install -y nodejs&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The unofficial instructions for installing Node.js can be found here: https://gist.github.com/isaacs/579814&lt;br /&gt;
&lt;br /&gt;
There are several choices, but my favorite is probably ''use-nave-no-shell.sh''.&lt;br /&gt;
&lt;br /&gt;
The instructions at the above link have a couple bugs.  If you run this sequence of commands, Node and NPM will install correctly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir ~/.nave&lt;br /&gt;
$ cd ~/.nave&lt;br /&gt;
$ wget http://github.com/isaacs/nave/raw/master/nave.sh&lt;br /&gt;
$ sudo ln -s $PWD/nave.sh /usr/local/bin/nave&lt;br /&gt;
$ chmod a+x nave.sh&lt;br /&gt;
$ sudo chown -R $USER:$USER /usr/local&lt;br /&gt;
$ nave usemain stable&lt;br /&gt;
$ curl -L https://www.npmjs.org/install.sh | sh&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Your First Node.js Application: Hello World ==&lt;br /&gt;
&lt;br /&gt;
Let's try running the example application given on the front page of nodejs.org:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
const http = require('http');&lt;br /&gt;
http.createServer(function (req, res) {&lt;br /&gt;
	res.writeHead(200, {&lt;br /&gt;
		'Content-Type': 'text/plain'&lt;br /&gt;
	});&lt;br /&gt;
	res.end('Hello World\n');&lt;br /&gt;
}).listen(3456);&lt;br /&gt;
console.log('Server running at http://localhost:3456/');&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paste the example into a file named `hello.js`, and then run it by calling `node hello.js`.  You should now be able to see your Hello World by visiting your server at port 3456!  (Press ^C to stop the application.)  '''Note:''' If you're running the code from your EC2 instance, you will need to open port 3456.&lt;br /&gt;
&lt;br /&gt;
Let's walk through each line in the above example.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;var http = require('http');&amp;lt;/code&amp;gt; enables us to use Node's built-in HTTP server.  We've been spoiled that languages like PHP automatically load all of the libraries that we need.  However, '''''most functionality in Node.js is NOT loaded by default.'''''  When you want to use any non-fundamental feature of Node, you need to ''require'' it into a variable, as this example does with the HTTP package.  You should be familiar with this concept when you needed to use ArrayList and other specialty packages in Java in CSE 132.&lt;br /&gt;
* &amp;lt;code&amp;gt;http.createServer(function (req, res) { ... }).listen(3456);&amp;lt;/code&amp;gt; uses the HTTP server API to listen for HTTP connections on port 3456.  The anonymous callback function will be called whenever a connection is made.&lt;br /&gt;
* &amp;lt;code&amp;gt;res.writeHead(200, { 'Content-Type': 'text/plain' });&amp;lt;/code&amp;gt; specifies the Content-Type header to be &amp;quot;text/plain&amp;quot;.&lt;br /&gt;
* &amp;lt;code&amp;gt;res.end('Hello World\n');&amp;lt;/code&amp;gt; writes &amp;quot;Hello World&amp;quot; to the response.&lt;br /&gt;
&lt;br /&gt;
Note the use of non-blocking I/O, even in this one little example.  ''Whenever a connection is made, the callback function will be called and passed parameters associated with that connection.''&lt;br /&gt;
&lt;br /&gt;
== A Static File Server Using Node.js ==&lt;br /&gt;
&lt;br /&gt;
Node.js does not automatically serve up static files in the way that an Apache/PHP does.  We need to either use an extension that handles this for us, like Express, or we need to write our own code to make a simple static file server.  The latter option is really not all that difficult, and it gives good insight into how a static file server works.&lt;br /&gt;
&lt;br /&gt;
=== Installing Packages ===&lt;br /&gt;
&lt;br /&gt;
In order for the example code below to work, you need to install the ''mime'' package.  To do this, '''cd to the working directory where you will save your Node.js JavaScript file''' and run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ npm install mime --save&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''npm'' is the package manager for Node.js.  Unlike all of the package managers we've used up to this point, ''npm'' installs dependencies locally, ''not'' globally.  This means that you can have two different projects using different versions of the same package.  ''npm'' will create a ''node_modules'' directory in the CWD and will install the packages into it.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' When using npm to install local dependencies, '''''do not use sudo'''''.  It will screw up your file permissions.&lt;br /&gt;
&lt;br /&gt;
=== Static Fileserver Code ===&lt;br /&gt;
&lt;br /&gt;
The following code will make an HTTP server on port 3456 that serves up all static files in &amp;lt;STATIC DIRECTORY NAME&amp;gt; relative to app.js.&lt;br /&gt;
&lt;br /&gt;
'''Make an attempt to understand this code.'''  It's important that you are comfortable with the non-blocking nature, as well as how we handle file I/O. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Require the functionality we need to use:&lt;br /&gt;
var http = require('http'),&lt;br /&gt;
	url = require('url'),&lt;br /&gt;
	path = require('path'),&lt;br /&gt;
	mime = require('mime'),&lt;br /&gt;
	path = require('path'),&lt;br /&gt;
	fs = require('fs');&lt;br /&gt;
&lt;br /&gt;
// Make a simple fileserver for all of our static content.&lt;br /&gt;
// Everything underneath &amp;lt;STATIC DIRECTORY NAME&amp;gt; will be served.&lt;br /&gt;
var app = http.createServer(function(req, resp){&lt;br /&gt;
	var filename = path.join(__dirname, &amp;quot;&amp;lt;STATIC DIRECTORY NAME&amp;gt;&amp;quot;, url.parse(req.url).pathname);&lt;br /&gt;
	(fs.exists || path.exists)(filename, function(exists){&lt;br /&gt;
		if (exists) {&lt;br /&gt;
			fs.readFile(filename, function(err, data){&lt;br /&gt;
				if (err) {&lt;br /&gt;
					// File exists but is not readable (permissions issue?)&lt;br /&gt;
					resp.writeHead(500, {&lt;br /&gt;
						&amp;quot;Content-Type&amp;quot;: &amp;quot;text/plain&amp;quot;&lt;br /&gt;
					});&lt;br /&gt;
					resp.write(&amp;quot;Internal server error: could not read file&amp;quot;);&lt;br /&gt;
					resp.end();&lt;br /&gt;
					return;&lt;br /&gt;
				}&lt;br /&gt;
				&lt;br /&gt;
				// File exists and is readable&lt;br /&gt;
				var mimetype = mime.getType(filename);&lt;br /&gt;
				resp.writeHead(200, {&lt;br /&gt;
					&amp;quot;Content-Type&amp;quot;: mimetype&lt;br /&gt;
				});&lt;br /&gt;
				resp.write(data);&lt;br /&gt;
				resp.end();&lt;br /&gt;
				return;&lt;br /&gt;
			});&lt;br /&gt;
		}else{&lt;br /&gt;
			// File does not exist&lt;br /&gt;
			resp.writeHead(404, {&lt;br /&gt;
				&amp;quot;Content-Type&amp;quot;: &amp;quot;text/plain&amp;quot;&lt;br /&gt;
			});&lt;br /&gt;
			resp.write(&amp;quot;Requested file not found: &amp;quot;+filename);&lt;br /&gt;
			resp.end();&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
	});&lt;br /&gt;
});&lt;br /&gt;
app.listen(3456);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Port 3456 ===&lt;br /&gt;
&lt;br /&gt;
We are running our server on port 3456 as opposed to the default web server port, which of course is 80.  We therefore need to open our Node.js application like this:&lt;br /&gt;
&lt;br /&gt;
http://ec2-xx-xx-xx-xx.compute-1.amazonaws.com:3456/path.extension&lt;br /&gt;
&lt;br /&gt;
However, this won't work on the first time.  ''Why?'' (Try to figure this out on your own before reading the next paragraph.)&lt;br /&gt;
&lt;br /&gt;
We need to open port 3456 on our Amazon EC2 instance.  Remember when you opened port 80 way back in Module 2?  We need to do the same sort of procedure again now.&lt;br /&gt;
&lt;br /&gt;
# Log into your EC2 management console&lt;br /&gt;
# Go to &amp;quot;Security Groups&amp;quot;&lt;br /&gt;
# Select your security group from Module 2&lt;br /&gt;
# Under &amp;quot;Inbound&amp;quot;, create a custom TCP rule for port 3456, and apply your changes.&lt;br /&gt;
&lt;br /&gt;
== Node.js Security ==&lt;br /&gt;
&lt;br /&gt;
Just because we're writing in JavaScript doesn't mean that we can forget about the security practices you've been learning in the last three months of CSE 330.  XSS is still a problem, as is the use of ''eval'', CSRF attacks, and so on.&lt;br /&gt;
&lt;br /&gt;
The two links below have good information about security vulnerabilities specific to Node.js that you should think about when crafting your application.&lt;br /&gt;
&lt;br /&gt;
# Book from PragProg ($24, 2015): https://pragprog.com/book/kdnodesec/secure-your-node-js-web-application&lt;br /&gt;
# Slideshow from a Switzerland Conference on Application Security (2012): http://www.slideshare.net/ASF-WS/asfws-2012-nodejs-security-old-vulnerabilities-in-new-dresses-par-sven-vetsch&lt;br /&gt;
&lt;br /&gt;
== Node.js Conventions ==&lt;br /&gt;
&lt;br /&gt;
There ought to be a standard way to save metadata about your app, right?  Well, ''npm'' introduces a straightforward way to do this in the form of a ''package.json'' file.&lt;br /&gt;
&lt;br /&gt;
To make your ''npm'' file with a step-by-step prompt, run in your project root directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ npm init&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One nifty feature of ''package.json'' is the way it automatically handles dependencies.  For example, you can put the following lines in your ''package.json'':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;quot;dependencies&amp;quot;: {&lt;br /&gt;
    &amp;quot;mime&amp;quot;: &amp;quot;~2.4.6&amp;quot;,&lt;br /&gt;
    &amp;quot;socket.io&amp;quot;: &amp;quot;~1.0.0&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, back on the command line, when you run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ npm install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it automatically installs the dependencies for you!  No more headaches of trying to figure out which modules you need to install; all that information is saved for you in your code base.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' Once you set up your ''package.json'' file, you can automatically add a dependency to it by using the ''--save'' argument on ''npm install'': &amp;lt;code&amp;gt;npm install --save socket.io&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 7]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=Node.JS&amp;diff=2759</id>
		<title>Node.JS</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Node.JS&amp;diff=2759"/>
		<updated>2020-12-21T02:08:16Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;AJAX is a useful technology for web applications that need to pull periodic updates from your server.  But what do you do when you have thousands of clients all requesting data that changes real-time?  A PHP+AJAX approach could choke without a lot of effort on your part.  It is situations like these that Node.js comes to the rescue. Node.js is a web framework, made in JavaScript, that's become extremely popular over the last few years.&lt;br /&gt;
&lt;br /&gt;
In general, JavaScript frameworks are very trendy right now; it can be hard to keep up with the new cool thing. In fact, there's a joke website https://dayssincelastjavascriptframework.com/, that &amp;quot;tracks&amp;quot; how long it's been since a new framework has come out.&lt;br /&gt;
&lt;br /&gt;
== Non-Blocking I/O ==&lt;br /&gt;
&lt;br /&gt;
You dabbled in the concept of non-blocking I/O when you implemented AJAX in the previous JavaScript module.  Node.js uses this execution model at its core.&lt;br /&gt;
&lt;br /&gt;
The core idea is the use of '''''anonymous functions''''' as ''callbacks'' for processing the results of intensive operations.  Consider the pseudo-code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Blocking I/O Pseudo-Code&lt;br /&gt;
&lt;br /&gt;
var data = database.query(&amp;quot;select * from news&amp;quot;);&lt;br /&gt;
print data[0].title;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above pseudo-code queries a database, saves the result of the query in a variable named ''data'', and then prints out the first title in ''data''.  The problem arises when multiple clients all want to access the server at the same time.  ''In a blocking I/O model, a client needs to wait until all other clients are finished before it can start its process.''  With intensive operations and thousands of clients, this can easily crash your server!&lt;br /&gt;
&lt;br /&gt;
The solution is to use ''non-blocking I/O''.  Consider this revised pseudo-code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Non-Blocking I/O Pseudo-Code&lt;br /&gt;
&lt;br /&gt;
database.query(&amp;quot;select * from news&amp;quot;, function(data){&lt;br /&gt;
	print data[0].title;&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The revised pseudo-code achieves the same end result as the first version.  However, ''it allows other clients to perform tasks while this process is waiting for the database to be queried!''  The code occurs in two parts: first, we start the query.  Second, ''when the query is complete'', our '''anonymous callback function''' is executed.  In Node.js, callback functions are usually passed one or more parameters.&lt;br /&gt;
&lt;br /&gt;
Better yet, with non-blocking I/O, you have no concurrency issues, because everything runs in just one thread.  Nifty!&lt;br /&gt;
&lt;br /&gt;
== Installing Node.js ==&lt;br /&gt;
&lt;br /&gt;
Run the following commands to install Node and NPM:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ curl --silent --location https://rpm.nodesource.com/setup_12.x | sudo bash -&lt;br /&gt;
$ sudo yum install -y nodejs&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The unofficial instructions for installing Node.js can be found here: https://gist.github.com/isaacs/579814&lt;br /&gt;
&lt;br /&gt;
There are several choices, but my favorite is probably ''use-nave-no-shell.sh''.&lt;br /&gt;
&lt;br /&gt;
The instructions at the above link have a couple bugs.  If you run this sequence of commands, Node and NPM will install correctly:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ mkdir ~/.nave&lt;br /&gt;
$ cd ~/.nave&lt;br /&gt;
$ wget http://github.com/isaacs/nave/raw/master/nave.sh&lt;br /&gt;
$ sudo ln -s $PWD/nave.sh /usr/local/bin/nave&lt;br /&gt;
$ chmod a+x nave.sh&lt;br /&gt;
$ sudo chown -R $USER:$USER /usr/local&lt;br /&gt;
$ nave usemain stable&lt;br /&gt;
$ curl -L https://www.npmjs.org/install.sh | sh&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Your First Node.js Application: Hello World ==&lt;br /&gt;
&lt;br /&gt;
Let's try running the example application given on the front page of nodejs.org:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
const http = require('http');&lt;br /&gt;
http.createServer(function (req, res) {&lt;br /&gt;
	res.writeHead(200, {&lt;br /&gt;
		'Content-Type': 'text/plain'&lt;br /&gt;
	});&lt;br /&gt;
	res.end('Hello World\n');&lt;br /&gt;
}).listen(3456);&lt;br /&gt;
console.log('Server running at http://localhost:3456/');&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paste the example into a file named `hello.js`, and then run it by calling `node hello.js`.  You should now be able to see your Hello World by visiting your server at port 3456!  (Press ^C to stop the application.)  '''Note:''' If you're running the code from your EC2 instance, you will need to open port 3456.&lt;br /&gt;
&lt;br /&gt;
Let's walk through each line in the above example.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;var http = require('http');&amp;lt;/code&amp;gt; enables us to use Node's built-in HTTP server.  We've been spoiled that languages like PHP automatically load all of the libraries that we need.  However, '''''most functionality in Node.js is NOT loaded by default.'''''  When you want to use any non-fundamental feature of Node, you need to ''require'' it into a variable, as this example does with the HTTP package.  You should be familiar with this concept when you needed to use ArrayList and other specialty packages in Java in CSE 132.&lt;br /&gt;
* &amp;lt;code&amp;gt;http.createServer(function (req, res) { ... }).listen(3456);&amp;lt;/code&amp;gt; uses the HTTP server API to listen for HTTP connections on port 3456.  The anonymous callback function will be called whenever a connection is made.&lt;br /&gt;
* &amp;lt;code&amp;gt;res.writeHead(200, { 'Content-Type': 'text/plain' });&amp;lt;/code&amp;gt; specifies the Content-Type header to be &amp;quot;text/plain&amp;quot;.&lt;br /&gt;
* &amp;lt;code&amp;gt;res.end('Hello World\n');&amp;lt;/code&amp;gt; writes &amp;quot;Hello World&amp;quot; to the response.&lt;br /&gt;
&lt;br /&gt;
Note the use of non-blocking I/O, even in this one little example.  ''Whenever a connection is made, the callback function will be called and passed parameters associated with that connection.''&lt;br /&gt;
&lt;br /&gt;
== A Static File Server Using Node.js ==&lt;br /&gt;
&lt;br /&gt;
Node.js does not automatically serve up static files in the way that an Apache/PHP does.  We need to either use an extension that handles this for us, like Express, or we need to write our own code to make a simple static file server.  The latter option is really not all that difficult, and it gives good insight into how a static file server works.&lt;br /&gt;
&lt;br /&gt;
=== Installing Packages ===&lt;br /&gt;
&lt;br /&gt;
In order for the example code below to work, you need to install the ''mime'' package.  To do this, '''cd to the working directory where you will save your Node.js JavaScript file''' and run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;$ npm install mime --save&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''npm'' is the package manager for Node.js.  Unlike all of the package managers we've used up to this point, ''npm'' installs dependencies locally, ''not'' globally.  This means that you can have two different projects using different versions of the same package.  ''npm'' will create a ''node_modules'' directory in the CWD and will install the packages into it.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' When using npm to install local dependencies, '''''do not use sudo'''''.  It will screw up your file permissions.&lt;br /&gt;
&lt;br /&gt;
=== Static Fileserver Code ===&lt;br /&gt;
&lt;br /&gt;
The following code will make an HTTP server on port 3456 that serves up all static files in &amp;lt;STATIC DIRECTORY NAME&amp;gt; relative to app.js.&lt;br /&gt;
&lt;br /&gt;
'''Make an attempt to understand this code.'''  It's important that you are comfortable with the non-blocking nature, as well as how we handle file I/O. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Require the functionality we need to use:&lt;br /&gt;
var http = require('http'),&lt;br /&gt;
	url = require('url'),&lt;br /&gt;
	path = require('path'),&lt;br /&gt;
	mime = require('mime'),&lt;br /&gt;
	path = require('path'),&lt;br /&gt;
	fs = require('fs');&lt;br /&gt;
&lt;br /&gt;
// Make a simple fileserver for all of our static content.&lt;br /&gt;
// Everything underneath &amp;lt;STATIC DIRECTORY NAME&amp;gt; will be served.&lt;br /&gt;
var app = http.createServer(function(req, resp){&lt;br /&gt;
	var filename = path.join(__dirname, &amp;quot;&amp;lt;STATIC DIRECTORY NAME&amp;gt;&amp;quot;, url.parse(req.url).pathname);&lt;br /&gt;
	(fs.exists || path.exists)(filename, function(exists){&lt;br /&gt;
		if (exists) {&lt;br /&gt;
			fs.readFile(filename, function(err, data){&lt;br /&gt;
				if (err) {&lt;br /&gt;
					// File exists but is not readable (permissions issue?)&lt;br /&gt;
					resp.writeHead(500, {&lt;br /&gt;
						&amp;quot;Content-Type&amp;quot;: &amp;quot;text/plain&amp;quot;&lt;br /&gt;
					});&lt;br /&gt;
					resp.write(&amp;quot;Internal server error: could not read file&amp;quot;);&lt;br /&gt;
					resp.end();&lt;br /&gt;
					return;&lt;br /&gt;
				}&lt;br /&gt;
				&lt;br /&gt;
				// File exists and is readable&lt;br /&gt;
				var mimetype = mime.getType(filename);&lt;br /&gt;
				resp.writeHead(200, {&lt;br /&gt;
					&amp;quot;Content-Type&amp;quot;: mimetype&lt;br /&gt;
				});&lt;br /&gt;
				resp.write(data);&lt;br /&gt;
				resp.end();&lt;br /&gt;
				return;&lt;br /&gt;
			});&lt;br /&gt;
		}else{&lt;br /&gt;
			// File does not exist&lt;br /&gt;
			resp.writeHead(404, {&lt;br /&gt;
				&amp;quot;Content-Type&amp;quot;: &amp;quot;text/plain&amp;quot;&lt;br /&gt;
			});&lt;br /&gt;
			resp.write(&amp;quot;Requested file not found: &amp;quot;+filename);&lt;br /&gt;
			resp.end();&lt;br /&gt;
			return;&lt;br /&gt;
		}&lt;br /&gt;
	});&lt;br /&gt;
});&lt;br /&gt;
app.listen(3456);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Port 3456 ===&lt;br /&gt;
&lt;br /&gt;
We are running our server on port 3456 as opposed to the default web server port, which of course is 80.  We therefore need to open our Node.js application like this:&lt;br /&gt;
&lt;br /&gt;
http://ec2-xx-xx-xx-xx.compute-1.amazonaws.com:3456/path.extension&lt;br /&gt;
&lt;br /&gt;
However, this won't work on the first time.  ''Why?'' (Try to figure this out on your own before reading the next paragraph.)&lt;br /&gt;
&lt;br /&gt;
We need to open port 3456 on our Amazon EC2 instance.  Remember when you opened port 80 way back in Module 2?  We need to do the same sort of procedure again now.&lt;br /&gt;
&lt;br /&gt;
# Log into your EC2 management console&lt;br /&gt;
# Go to &amp;quot;Security Groups&amp;quot;&lt;br /&gt;
# Select your security group from Module 2&lt;br /&gt;
# Under &amp;quot;Inbound&amp;quot;, create a custom TCP rule for port 3456, and apply your changes.&lt;br /&gt;
&lt;br /&gt;
== Node.js Security ==&lt;br /&gt;
&lt;br /&gt;
Just because we're writing in JavaScript doesn't mean that we can forget about the security practices you've been learning in the last three months of CSE 330.  XSS is still a problem, as is the use of ''eval'', CSRF attacks, and so on.&lt;br /&gt;
&lt;br /&gt;
The two links below have good information about security vulnerabilities specific to Node.js that you should think about when crafting your application.&lt;br /&gt;
&lt;br /&gt;
# Book from PragProg ($24, 2015): https://pragprog.com/book/kdnodesec/secure-your-node-js-web-application&lt;br /&gt;
# Slideshow from a Switzerland Conference on Application Security (2012): http://www.slideshare.net/ASF-WS/asfws-2012-nodejs-security-old-vulnerabilities-in-new-dresses-par-sven-vetsch&lt;br /&gt;
&lt;br /&gt;
== Node.js Conventions ==&lt;br /&gt;
&lt;br /&gt;
There ought to be a standard way to save metadata about your app, right?  Well, ''npm'' introduces a straightforward way to do this in the form of a ''package.json'' file.&lt;br /&gt;
&lt;br /&gt;
To make your ''npm'' file with a step-by-step prompt, run in your project root directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ npm init&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One nifty feature of ''package.json'' is the way it automatically handles dependencies.  For example, you can put the following lines in your ''package.json'':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;quot;dependencies&amp;quot;: {&lt;br /&gt;
    &amp;quot;mime&amp;quot;: &amp;quot;~2.4.6&amp;quot;,&lt;br /&gt;
    &amp;quot;socket.io&amp;quot;: &amp;quot;~1.0.0&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, back on the command line, when you run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ npm install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it automatically installs the dependencies for you!  No more headaches of trying to figure out which modules you need to install; all that information is saved for you in your code base.&lt;br /&gt;
&lt;br /&gt;
'''Tip:''' Once you set up your ''package.json'' file, you can automatically add a dependency to it by using the ''--save'' argument on ''npm install'': &amp;lt;code&amp;gt;npm install --save socket.io&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 6]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_5&amp;diff=2758</id>
		<title>FAQ - Mod 5</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_5&amp;diff=2758"/>
		<updated>2020-12-21T01:32:06Z</updated>

		<summary type="html">&lt;p&gt;Mitch: Created page with &amp;quot;Welcome to the frequently asked questions page for Module 5. As many common questions can come up on Piazza, some of those questions are consolidated here.  == File Structure/...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 5. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== File Structure/Languages ==&lt;br /&gt;
&lt;br /&gt;
=== Can I redirect users to another page after login/for any other reason? ===&lt;br /&gt;
For this module, you can '''not''' redirect a user to another page for login or refresh the page on logout. You should have '''one''' single html file , and any on-screen changes should be done through DOM manipulation in Javascript.&lt;br /&gt;
&lt;br /&gt;
=== Can/should I use PHP in this module? ===&lt;br /&gt;
PHP should be used to access the MySQL database for this module, but you should use Javascript for most other functionality. The focus of this module is for you to learn more about Javascript and the DOM, so do not use PHP to redirect to other pages or refresh the current one.&lt;br /&gt;
&lt;br /&gt;
== CSRF Tokens ==&lt;br /&gt;
&lt;br /&gt;
=== How do I pass CSRF tokens between PHP and Javascript? ===&lt;br /&gt;
At the end of your PHP script execution, you can send values back to where you initially called the script from. Think about how you can use this to then store the token in Javascript.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== HTML Validator ==&lt;br /&gt;
&lt;br /&gt;
=== I'm getting a validation warning about missing an src attribute for my weather widget, what should I do about this? ===&lt;br /&gt;
Before you fetch the data in the weather widget, you may not have a src attribute for your img tags. Your warning will likely look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
Element img is missing required attribute src&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An easy way to avoid this warning is to simply put a temporary image on the screen before you load in the weather data.&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_3&amp;diff=2757</id>
		<title>FAQ - Mod 3</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_3&amp;diff=2757"/>
		<updated>2020-12-21T01:16:21Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 3. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== Primary Keys ==&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting an error when adding a foreign key? ===&lt;br /&gt;
&lt;br /&gt;
==== Non-Unique Primary Key ====&lt;br /&gt;
&lt;br /&gt;
This issue can be a result of a non-unique primary key. Take the courses table in this module, for example. Multiple courses can have the same course code if they are in different departments, so generating a primary key in reference to only course code is not enough. Think about what other fields to include to make a primary key truly unique, as you cannot have repeating primary keys.&lt;br /&gt;
&lt;br /&gt;
==== Primary Key and Foreign Key Parameters ====&lt;br /&gt;
&lt;br /&gt;
Another reason that adding a foreign key can result in an error is if it does not reference the entire primary key. For a foreign key to be properly generated, it needs to reference the entire primary key, even if that means including multiple parameters.&lt;br /&gt;
&lt;br /&gt;
==== Type Mismatch ====&lt;br /&gt;
&lt;br /&gt;
A third common reason that a foreign key cannot be properly generated is that the parameters included when generating the key are different types. For example, of one of the parameters is of type TINYINT and another is of type SMALLINT, the key cannot be generated properly. When generating the key, make sure the parameters are of matching type.&lt;br /&gt;
&lt;br /&gt;
== Modifying Tables ==&lt;br /&gt;
&lt;br /&gt;
=== Why can't I modify my table? ===&lt;br /&gt;
&lt;br /&gt;
You will run into an issue if you try to modify your table after adding a foreign key. Anything from adding to the table, to changing types, to modifying/adding charsets will not be possible once the foreign key has been added. If you do need to edit the table after having added a foreign key, you will need to drop the key before making edits to the table. The error will likely look something like this, especially if you are trying to add or delete elements:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
Error adding entry: Cannot add or update a child row: a foreign key constraint fails&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CSRF Tokens ==&lt;br /&gt;
&lt;br /&gt;
=== When should I generate my CSRF Token? ===&lt;br /&gt;
You should initially generate a CSRF token on '''login'''. However, you will want to '''verify''' this token when completing all POST requests.&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 3]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_3&amp;diff=2756</id>
		<title>FAQ - Mod 3</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_3&amp;diff=2756"/>
		<updated>2020-12-21T00:35:12Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 3. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== Primary Keys ==&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting an error when adding a foreign key? ===&lt;br /&gt;
&lt;br /&gt;
==== Non-Unique Primary Key ====&lt;br /&gt;
&lt;br /&gt;
This issue can be a result of a non-unique primary key. Take the courses table in this module, for example. Multiple courses can have the same course code if they are in different departments, so generating a primary key in reference to only course code is not enough. Think about what other fields to include to make a primary key truly unique, as you cannot have repeating primary keys.&lt;br /&gt;
&lt;br /&gt;
==== Primary Key and Foreign Key Parameters ====&lt;br /&gt;
&lt;br /&gt;
Another reason that adding a foreign key can result in an error is if it does not reference the entire primary key. For a foreign key to be properly generated, it needs to reference the entire primary key, even if that means including multiple parameters.&lt;br /&gt;
&lt;br /&gt;
==== Type Mismatch ====&lt;br /&gt;
&lt;br /&gt;
A third common reason that a foreign key cannot be properly generated is that the parameters included when generating the key are different types. For example, of one of the parameters is of type TINYINT and another is of type SMALLINT, the key cannot be generated properly. When generating the key, make sure the parameters are of matching type.&lt;br /&gt;
&lt;br /&gt;
== Modifying Tables ==&lt;br /&gt;
&lt;br /&gt;
=== Why can't I modify my table? ===&lt;br /&gt;
&lt;br /&gt;
You will run into an issue if you try to modify your table after adding a foreign key. Anything from adding to the table, to changing types, to modifying/adding charsets will not be possible once the foreign key has been added. If you do need to edit the table after having added a foreign key, you will need to drop the key before making edits to the table. The error will likely look something like this, especially if you are trying to add or delete elements:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
Error adding entry: Cannot add or update a child row: a foreign key constraint fails&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 3]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2755</id>
		<title>CSE 330 Online Textbook - Table of Contents</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2755"/>
		<updated>2020-12-20T23:55:16Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;text-align:center;&amp;quot;&amp;gt;[[File:CSE330Banner.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
&amp;lt;div style=&amp;quot;column-width: 300px; -moz-column-width: 300px; -webkit-column-width: 300px;&amp;quot;&amp;gt;&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=1&lt;br /&gt;
|subject=HTML and CSS Fundamentals&lt;br /&gt;
|links=&lt;br /&gt;
* [[HTML and CSS]]&lt;br /&gt;
* [[HTML Forms]]&lt;br /&gt;
* [[Git]]&lt;br /&gt;
* [[FAQ - Mod 1]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=2&lt;br /&gt;
|subject=Linux, Apache, and PHP&lt;br /&gt;
|links=&lt;br /&gt;
* [[Linux]]&lt;br /&gt;
* [[Bash]]&lt;br /&gt;
* [[Amazon Web Services]]&lt;br /&gt;
* [[SSH]]&lt;br /&gt;
* [[Apache]]&lt;br /&gt;
* [[PHP]]&lt;br /&gt;
* [[Workflow]]&lt;br /&gt;
* [[Web Application Security, Part 1]]&lt;br /&gt;
* [[FAQ - Mod 2]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=3&lt;br /&gt;
|subject=SQL Databases&lt;br /&gt;
|links=&lt;br /&gt;
* [[Introduction to MySQL]] (installation)&lt;br /&gt;
* [[MySQL Schema and State]] (queries)&lt;br /&gt;
* [[PHP and MySQL]] (using MySQL from PHP)&lt;br /&gt;
* [[Web Application Security, Part 2]]&lt;br /&gt;
* [[FAQ - Mod 3]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=4&lt;br /&gt;
|subject=Scripting for Rapid Prototyping&lt;br /&gt;
|links=&lt;br /&gt;
* [[Python]]&lt;br /&gt;
* [[Regular Expressions]]&lt;br /&gt;
* [[FAQ - Mod 4]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=5&lt;br /&gt;
|subject=JavaScript and APIs&lt;br /&gt;
|links=&lt;br /&gt;
* [[JavaScript]]&lt;br /&gt;
* [[AJAX and JSON]]&lt;br /&gt;
* [[Web Application Security, Part 3]]&lt;br /&gt;
* [[FAQ - Mod 5]]&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=6&lt;br /&gt;
|subject=Real-Time Web Applications&lt;br /&gt;
|links=&lt;br /&gt;
* [[Node.JS]]&lt;br /&gt;
* [[Socket.IO]]&lt;br /&gt;
* [[FAQ - Mod 6]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=7&lt;br /&gt;
|subject=Creative Project&lt;br /&gt;
|links=&lt;br /&gt;
* [[Choosing a Platform]]&lt;br /&gt;
* [[Web Frameworks]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Use this wiki as a starting place for your projects in CSE 330.  However, web development is a large field, so it is impossible for us to document everything you might need to know.  Here are some other places you should look when you need to find something:&lt;br /&gt;
&lt;br /&gt;
* [https://developer.mozilla.org/en-US/ The Mozilla Development Network (MDN)], a community-driven source containing documentation and tutorials for Web technologies&lt;br /&gt;
* [http://reference.sitepoint.com/html SitePoint], which has a reference page as well as quality articles and tutorials&lt;br /&gt;
&lt;br /&gt;
If you can't find what you need in any of these places, try using your favorite search engine.  '''Be wary of sites that come up on search engines.'''  Many HTML reference sites document bad practices and dated techniques.  If you're unsure whether a reference site you find is legitimate, ask a TA.&lt;br /&gt;
&lt;br /&gt;
== Want to Learn More? ==&lt;br /&gt;
&lt;br /&gt;
The limited amount of time in CSE 330 means that we can cover only a subset of the wide range of possible topics in the field of rapid prototyping and web development.  Indeed, the exact topics covered in CSE 330 change from year to year.&lt;br /&gt;
&lt;br /&gt;
Feel free to browse some of the topics that have previously been covered in CSE 330: [[:Category:Former Content|CSE 330 Former Content]]&lt;br /&gt;
&lt;br /&gt;
You should also consider following blogs like [http://www.sitepoint.com/ SitePoint] to keep up-to-date on the latest developments in the field of web development.&lt;br /&gt;
&lt;br /&gt;
== Content License ==&lt;br /&gt;
&lt;br /&gt;
The content of this wiki is copyright (c) 2013, Washington University in St. Louis, Department of Computer Science.  All rights reserved.&lt;br /&gt;
&lt;br /&gt;
=== Modified BSD License ===&lt;br /&gt;
&lt;br /&gt;
Redistribution and use in source and binary forms, with or without modification, by a Third Party who has not completed and is not in the process of completing CSE 330, of the code examples or concepts on this wiki, are permitted, provided that the following conditions are met:&lt;br /&gt;
&lt;br /&gt;
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.&lt;br /&gt;
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.&lt;br /&gt;
* Neither the name of the Washington University School of Engineering and Applied Science nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.&lt;br /&gt;
&lt;br /&gt;
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS TO ALL PARTIES &amp;quot;AS IS&amp;quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
&lt;br /&gt;
=== What it Means ===&lt;br /&gt;
&lt;br /&gt;
If you are a student in CSE 330, you may use the code from this wiki freely in your projects without the need for attribution.  If you are not a student in CSE 330, you may use the code from this wiki freely in your projects with attribution.  Either way, the code examples are provided &amp;quot;as is&amp;quot;, without any warranty, and Washington University holds no liability for problems arising from the use of the content in this wiki.&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_4&amp;diff=2754</id>
		<title>FAQ - Mod 4</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_4&amp;diff=2754"/>
		<updated>2020-12-20T23:54:02Z</updated>

		<summary type="html">&lt;p&gt;Mitch: Created page with &amp;quot;Welcome to the frequently asked questions page for Module 4. As many common questions can come up on Piazza, some of those questions are consolidated here.  == Regular Express...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 4. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions Cases ==&lt;br /&gt;
&lt;br /&gt;
=== When parsing for a string, should I look for that string exclusively or that string concatenated with other characters? ===&lt;br /&gt;
If you are looking for a string, you should be looking for any exact occurrences of that string. This is the case regardless of what characters are appended to the beginning or the end of said string.&lt;br /&gt;
&lt;br /&gt;
'''Example:''' Parsing for &amp;quot;hello world&amp;quot;&lt;br /&gt;
&lt;br /&gt;
'''What Should Work'''&lt;br /&gt;
&lt;br /&gt;
hello world, hi hello world, hello worldwide, hhhello worlddd&lt;br /&gt;
&lt;br /&gt;
'''What Shouldn't Work'''&lt;br /&gt;
&lt;br /&gt;
hello weorld, hello to the world&lt;br /&gt;
&lt;br /&gt;
=== In RegEx exercise 2, should I accept strings that have more than three consecutive vowels? ===&lt;br /&gt;
In this exercise, strings with three ''or more'' vowels should be accepted.&lt;br /&gt;
&lt;br /&gt;
'''What Should Work'''&lt;br /&gt;
&lt;br /&gt;
beautiful, queue, coooool!&lt;br /&gt;
&lt;br /&gt;
=== In RegEx exercise 3, is each line a separate input? ===&lt;br /&gt;
Yes. Each line with a potential flight code is a separate input. Your expression does not need to account for separating each potential code.&lt;br /&gt;
&lt;br /&gt;
=== If a batting average ends in a 0, can I round to two decimal places? ===&lt;br /&gt;
A batting average must always be rounded to 3 decimal places, regardless of if it ends in one (or more) zero(s).&lt;br /&gt;
&lt;br /&gt;
'''Expected Batting Average Outputs'''&lt;br /&gt;
&lt;br /&gt;
.270, .300, .050&lt;br /&gt;
&lt;br /&gt;
'''Unacceptable Batting Average Outputs'''&lt;br /&gt;
&lt;br /&gt;
.27, .3, .05&lt;br /&gt;
&lt;br /&gt;
== Logistics == &lt;br /&gt;
&lt;br /&gt;
=== Should I complete this module on my local machine or on my instance? ===&lt;br /&gt;
Unlike other modules, this one can be completed on your local machine!&lt;br /&gt;
&lt;br /&gt;
=== Do I have to save the output of our python script to a .txt file or can I just print it out? ===&lt;br /&gt;
You can just print the output of your script. No need to save it to a .txt file&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=Module_4&amp;diff=2753</id>
		<title>Module 4</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Module_4&amp;diff=2753"/>
		<updated>2020-12-20T22:50:49Z</updated>

		<summary type="html">&lt;p&gt;Mitch: /* Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
In Module 4, you will learn the fundamentals of Python, a popular scripting language, and Regular Expressions, which give you power in text processing.&lt;br /&gt;
&lt;br /&gt;
This article contains your assignments for Module 4.&lt;br /&gt;
&lt;br /&gt;
== Reading ==&lt;br /&gt;
&lt;br /&gt;
The following articles on the online class wiki textbook contain information that will help you complete the assignments.&lt;br /&gt;
&lt;br /&gt;
* [[Python]]&lt;br /&gt;
* [[Regular Expressions]]&lt;br /&gt;
* [[FAQ - Mod 4]]&lt;br /&gt;
&lt;br /&gt;
== Individual Assignments ==&lt;br /&gt;
&lt;br /&gt;
=== Learn Python and Regular Expressions ===&lt;br /&gt;
&lt;br /&gt;
Up to this point in CSE 330, you have used only one programming language: PHP.  In Module 4, you will learn a new language: Python.  Before starting this assignment, you should look over the [[Python|online textbook article about Python]].  You should be using version 3 (or greater) of Python. Additionally, you may find it helpful to look over the [[Regular Expressions|online textbook article about Regular Expressions]].&lt;br /&gt;
&lt;br /&gt;
=== Write some Regular Expressions ===&lt;br /&gt;
&lt;br /&gt;
Please write regular expressions that do each the following:&lt;br /&gt;
&lt;br /&gt;
# Match the substring &amp;quot;hello world&amp;quot; in a string.&lt;br /&gt;
# Find all words in an input string that contains three consecutive vowels, regardless of case.&lt;br /&gt;
# Match an input string that is '''entirely''' a flight code, of the format AA####, where '''AA''' is a two-letter uppercase airline code, and '''####''' is a three- or four-digit flight number.&lt;br /&gt;
Examples:&lt;br /&gt;
   Note: text in ''[[red]]'' is matched by the regular expression. Each line is a separate test input string.&lt;br /&gt;
   Regex 1:  Programmers will often write ''[[hello world]]'' as their first project with a programming language.&lt;br /&gt;
   Regex 2:  The ''[[gooey]]'' peanut butter and jelly sandwich was a ''[[beauty]]''.&lt;br /&gt;
   Regex 3:  ''[[AA312]]''&lt;br /&gt;
             ''[[AA1298]]''&lt;br /&gt;
             ''[[NW1234]]''&lt;br /&gt;
             ''[[US443]]''&lt;br /&gt;
             US31344&lt;br /&gt;
             AA123 extratext&lt;br /&gt;
&lt;br /&gt;
            &lt;br /&gt;
&lt;br /&gt;
Save your regexes to text files – one each.&lt;br /&gt;
&lt;br /&gt;
=== Baseball Stats Counter ===&lt;br /&gt;
&lt;br /&gt;
The St. Louis Cardinals are the most legendary baseball team in the national league.  In this exercise, you will be creating a Python script that reads box scores from a file and computes the Cardinals' players' batting averages in a particular season.&lt;br /&gt;
&lt;br /&gt;
==== Tips and Instructions ====&lt;br /&gt;
&lt;br /&gt;
* You should write a Python script file to solve this problem.&lt;br /&gt;
* You should use a regular expression to parse players' names, at-bats, hits, and runs from the input file.&lt;br /&gt;
* You may want to create a class to hold and compute information about each player.&lt;br /&gt;
* Your file should take one command-line argument: the path to an input file.  If no path is given, your program should print a usage message.&lt;br /&gt;
&lt;br /&gt;
==== Input ====&lt;br /&gt;
&lt;br /&gt;
Sample input files may be found here: http://classes.engineering.wustl.edu/cse330/content/cardinals/&lt;br /&gt;
&lt;br /&gt;
The top of the file contains a citation, and what follows is an entire season of Cardinals Baseball box scores.  Each game starts with a title; for example:&lt;br /&gt;
&lt;br /&gt;
 === St.Louis Cardinals vs. Chicago Cubs, 1940-04-19 ===&lt;br /&gt;
&lt;br /&gt;
What follows are the performance of each player in that game.  The format of each line is as follows:&lt;br /&gt;
&lt;br /&gt;
 XXX batted # times with # hits and # runs&lt;br /&gt;
&lt;br /&gt;
where '''XXX''' is the player's name (you may assume that the name is unique), and each '''#''' are integers representing the number of &amp;quot;at bats&amp;quot;, the number of &amp;quot;hits&amp;quot;, and the number of &amp;quot;runs&amp;quot;, respectively.&lt;br /&gt;
&lt;br /&gt;
==== Output ====&lt;br /&gt;
&lt;br /&gt;
Your script needs to output all players' batting average across the season.  A player's batting average is that player's total hits divided by that player's total at-bats throughout the entire season.  For example, Johnny Hopp was at bat 149 times in 1940, and he had 41 hits, so his batting average was 0.275.&lt;br /&gt;
&lt;br /&gt;
Each line in the output should have the format:&lt;br /&gt;
&lt;br /&gt;
 XXX: #.###&lt;br /&gt;
&lt;br /&gt;
where '''XXX''' is the player's name, and '''#.###''' is the player's batting average, '''rounded''' (not truncated) to three decimal places.&lt;br /&gt;
&lt;br /&gt;
The players should be sorted by batting average, with the highest batting average on top.  If two players have the exact same batting average (before rounding occurs), the order between those two players is unimportant.&lt;br /&gt;
&lt;br /&gt;
For example, the correct output for the 1940 season is:&lt;br /&gt;
&amp;lt;!-- Jimmy Brown was 0.280 and Ira Hutchinson was 0.125 --&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Pepper Martin: 0.316&lt;br /&gt;
Walker Cooper: 0.316&lt;br /&gt;
Johnny Mize: 0.314&lt;br /&gt;
Ernie Koy: 0.310&lt;br /&gt;
Enos Slaughter: 0.306&lt;br /&gt;
Joe Medwick: 0.304&lt;br /&gt;
Terry Moore: 0.304&lt;br /&gt;
Joe Orengo: 0.286&lt;br /&gt;
Jimmy Brown: 0.280&lt;br /&gt;
Marty Marion: 0.279&lt;br /&gt;
Don Gutteridge: 0.276&lt;br /&gt;
Johnny Hopp: 0.275&lt;br /&gt;
Creepy Crespi: 0.273&lt;br /&gt;
Mickey Owen: 0.265&lt;br /&gt;
Bill DeLancey: 0.250&lt;br /&gt;
Don Padgett: 0.242&lt;br /&gt;
Stu Martin: 0.238&lt;br /&gt;
Eddie Lake: 0.222&lt;br /&gt;
Hal Epps: 0.214&lt;br /&gt;
Lon Warneke: 0.209&lt;br /&gt;
Harry Walker: 0.185&lt;br /&gt;
Max Lanier: 0.179&lt;br /&gt;
Bill McGee: 0.178&lt;br /&gt;
Carl Doyle: 0.174&lt;br /&gt;
Mort Cooper: 0.157&lt;br /&gt;
Clyde Shoun: 0.145&lt;br /&gt;
Carden Gillenwater: 0.130&lt;br /&gt;
Bob Bowman: 0.067&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Grading ==&lt;br /&gt;
&lt;br /&gt;
We will be grading the following aspects of your work.  There are 50 points total.&lt;br /&gt;
&lt;br /&gt;
'''Assignments (including code) must be committed to Github by the end of class on the due date (commit early and often). Failing to commit by the end of class on the due date will result in a 0. ''' &lt;br /&gt;
&lt;br /&gt;
Upload your baseball code and a file with your Regular expressions.&lt;br /&gt;
&lt;br /&gt;
# '''Regular Expressions (15 Points):'''&lt;br /&gt;
#* '''Your regex files should contain your regex (with no delimiters or flags) and nothing else.'''&lt;br /&gt;
#* Regular Expression 1 Correct and saved in a file named &amp;lt;code&amp;gt;regex1.txt&amp;lt;/code&amp;gt; (5 points)&lt;br /&gt;
#* Regular Expression 2 Correct and saved in a file named &amp;lt;code&amp;gt;regex2.txt&amp;lt;/code&amp;gt;(5 points)&lt;br /&gt;
#* Regular Expression 3 Correct and saved in a file named &amp;lt;code&amp;gt;regex3.txt&amp;lt;/code&amp;gt;(5 points)&lt;br /&gt;
# '''Baseball Stats Counter (35 Points):'''&lt;br /&gt;
#* Solution is written entirely in Python and saved in a file named &amp;lt;code&amp;gt;baseball.py&amp;lt;/code&amp;gt; (8 points)&lt;br /&gt;
#*: ''Note: Failing to write your code in Python 3 will result in losing, at a minimum, points for this category.''&lt;br /&gt;
#* Correct usage of one or more regular expressions to parse and extract data from each line of the input file (8 points)&lt;br /&gt;
#*: ''Note: You should not be using &amp;lt;code&amp;gt;str.split&amp;lt;/code&amp;gt; to extract data.''&lt;br /&gt;
#* Script prints a usage message if a command line argument is not present (4 points)&lt;br /&gt;
#*: ''Note: For an example of a usage message, see [https://en.wikipedia.org/wiki/Usage_message#Examples this link.]''&lt;br /&gt;
#* Output is correct for all test cases (15 points)&lt;br /&gt;
#*: ''This includes sorting and rounding.''&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 4]]&lt;br /&gt;
[[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2752</id>
		<title>CSE 330 Online Textbook - Table of Contents</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2752"/>
		<updated>2020-12-20T22:50:33Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;text-align:center;&amp;quot;&amp;gt;[[File:CSE330Banner.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
&amp;lt;div style=&amp;quot;column-width: 300px; -moz-column-width: 300px; -webkit-column-width: 300px;&amp;quot;&amp;gt;&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=1&lt;br /&gt;
|subject=HTML and CSS Fundamentals&lt;br /&gt;
|links=&lt;br /&gt;
* [[HTML and CSS]]&lt;br /&gt;
* [[HTML Forms]]&lt;br /&gt;
* [[Git]]&lt;br /&gt;
* [[FAQ - Mod 1]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=2&lt;br /&gt;
|subject=Linux, Apache, and PHP&lt;br /&gt;
|links=&lt;br /&gt;
* [[Linux]]&lt;br /&gt;
* [[Bash]]&lt;br /&gt;
* [[Amazon Web Services]]&lt;br /&gt;
* [[SSH]]&lt;br /&gt;
* [[Apache]]&lt;br /&gt;
* [[PHP]]&lt;br /&gt;
* [[Workflow]]&lt;br /&gt;
* [[Web Application Security, Part 1]]&lt;br /&gt;
* [[FAQ - Mod 2]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=3&lt;br /&gt;
|subject=SQL Databases&lt;br /&gt;
|links=&lt;br /&gt;
* [[Introduction to MySQL]] (installation)&lt;br /&gt;
* [[MySQL Schema and State]] (queries)&lt;br /&gt;
* [[PHP and MySQL]] (using MySQL from PHP)&lt;br /&gt;
* [[Web Application Security, Part 2]]&lt;br /&gt;
* [[FAQ - Mod 3]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=4&lt;br /&gt;
|subject=Scripting for Rapid Prototyping&lt;br /&gt;
|links=&lt;br /&gt;
* [[Python]]&lt;br /&gt;
* [[Regular Expressions]]&lt;br /&gt;
* [[FAQ - Mod 4]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=5&lt;br /&gt;
|subject=JavaScript and APIs&lt;br /&gt;
|links=&lt;br /&gt;
* [[JavaScript]]&lt;br /&gt;
* [[AJAX and JSON]]&lt;br /&gt;
* [[Web Application Security, Part 3]]&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=6&lt;br /&gt;
|subject=Real-Time Web Applications&lt;br /&gt;
|links=&lt;br /&gt;
* [[Node.JS]]&lt;br /&gt;
* [[Socket.IO]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=7&lt;br /&gt;
|subject=Creative Project&lt;br /&gt;
|links=&lt;br /&gt;
* [[Choosing a Platform]]&lt;br /&gt;
* [[Web Frameworks]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Use this wiki as a starting place for your projects in CSE 330.  However, web development is a large field, so it is impossible for us to document everything you might need to know.  Here are some other places you should look when you need to find something:&lt;br /&gt;
&lt;br /&gt;
* [https://developer.mozilla.org/en-US/ The Mozilla Development Network (MDN)], a community-driven source containing documentation and tutorials for Web technologies&lt;br /&gt;
* [http://reference.sitepoint.com/html SitePoint], which has a reference page as well as quality articles and tutorials&lt;br /&gt;
&lt;br /&gt;
If you can't find what you need in any of these places, try using your favorite search engine.  '''Be wary of sites that come up on search engines.'''  Many HTML reference sites document bad practices and dated techniques.  If you're unsure whether a reference site you find is legitimate, ask a TA.&lt;br /&gt;
&lt;br /&gt;
== Want to Learn More? ==&lt;br /&gt;
&lt;br /&gt;
The limited amount of time in CSE 330 means that we can cover only a subset of the wide range of possible topics in the field of rapid prototyping and web development.  Indeed, the exact topics covered in CSE 330 change from year to year.&lt;br /&gt;
&lt;br /&gt;
Feel free to browse some of the topics that have previously been covered in CSE 330: [[:Category:Former Content|CSE 330 Former Content]]&lt;br /&gt;
&lt;br /&gt;
You should also consider following blogs like [http://www.sitepoint.com/ SitePoint] to keep up-to-date on the latest developments in the field of web development.&lt;br /&gt;
&lt;br /&gt;
== Content License ==&lt;br /&gt;
&lt;br /&gt;
The content of this wiki is copyright (c) 2013, Washington University in St. Louis, Department of Computer Science.  All rights reserved.&lt;br /&gt;
&lt;br /&gt;
=== Modified BSD License ===&lt;br /&gt;
&lt;br /&gt;
Redistribution and use in source and binary forms, with or without modification, by a Third Party who has not completed and is not in the process of completing CSE 330, of the code examples or concepts on this wiki, are permitted, provided that the following conditions are met:&lt;br /&gt;
&lt;br /&gt;
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.&lt;br /&gt;
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.&lt;br /&gt;
* Neither the name of the Washington University School of Engineering and Applied Science nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.&lt;br /&gt;
&lt;br /&gt;
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS TO ALL PARTIES &amp;quot;AS IS&amp;quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
&lt;br /&gt;
=== What it Means ===&lt;br /&gt;
&lt;br /&gt;
If you are a student in CSE 330, you may use the code from this wiki freely in your projects without the need for attribution.  If you are not a student in CSE 330, you may use the code from this wiki freely in your projects with attribution.  Either way, the code examples are provided &amp;quot;as is&amp;quot;, without any warranty, and Washington University holds no liability for problems arising from the use of the content in this wiki.&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_3&amp;diff=2751</id>
		<title>FAQ - Mod 3</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_3&amp;diff=2751"/>
		<updated>2020-12-20T22:49:25Z</updated>

		<summary type="html">&lt;p&gt;Mitch: /* Modifying Tables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 3x. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== Primary Keys ==&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting an error when adding a foreign key? ===&lt;br /&gt;
&lt;br /&gt;
==== Non-Unique Primary Key ====&lt;br /&gt;
&lt;br /&gt;
This issue can be a result of a non-unique primary key. Take the courses table in this module, for example. Multiple courses can have the same course code if they are in different departments, so generating a primary key in reference to only course code is not enough. Think about what other fields to include to make a primary key truly unique, as you cannot have repeating primary keys.&lt;br /&gt;
&lt;br /&gt;
==== Primary Key and Foreign Key Parameters ====&lt;br /&gt;
&lt;br /&gt;
Another reason that adding a foreign key can result in an error is if it does not reference the entire primary key. For a foreign key to be properly generated, it needs to reference the entire primary key, even if that means including multiple parameters.&lt;br /&gt;
&lt;br /&gt;
==== Type Mismatch ====&lt;br /&gt;
&lt;br /&gt;
A third common reason that a foreign key cannot be properly generated is that the parameters included when generating the key are different types. For example, of one of the parameters is of type TINYINT and another is of type SMALLINT, the key cannot be generated properly. When generating the key, make sure the parameters are of matching type.&lt;br /&gt;
&lt;br /&gt;
== Modifying Tables ==&lt;br /&gt;
&lt;br /&gt;
=== Why can't I modify my table? ===&lt;br /&gt;
&lt;br /&gt;
You will run into an issue if you try to modify your table after adding a foreign key. Anything from adding to the table, to changing types, to modifying/adding charsets will not be possible once the foreign key has been added. If you do need to edit the table after having added a foreign key, you will need to drop the key before making edits to the table. The error will likely look something like this, especially if you are trying to add or delete elements:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
Error adding entry: Cannot add or update a child row: a foreign key constraint fails&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 3]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=Module_3&amp;diff=2750</id>
		<title>Module 3</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Module_3&amp;diff=2750"/>
		<updated>2020-12-20T22:40:30Z</updated>

		<summary type="html">&lt;p&gt;Mitch: /* Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
In Module 3, you will learn about MySQL, a web application database.&lt;br /&gt;
&lt;br /&gt;
This article contains your assignments for Module 3.&lt;br /&gt;
&lt;br /&gt;
== Reading ==&lt;br /&gt;
&lt;br /&gt;
The following articles on the online class wiki textbook contain information that will help you complete the assignments.&lt;br /&gt;
&lt;br /&gt;
* [[Introduction to MySQL]]&lt;br /&gt;
* [[MySQL Schema and State]]&lt;br /&gt;
* [[PHP and MySQL]]&lt;br /&gt;
* [[Web Application Security, Part 2]]&lt;br /&gt;
* [[FAQ - Mod 3]]&lt;br /&gt;
&lt;br /&gt;
== Individual Assignments ==&lt;br /&gt;
&lt;br /&gt;
You will create a simple grades database containing four tables.&lt;br /&gt;
&lt;br /&gt;
'''IMPORTANT:''' The individual assignment is to be done by writing queries by hand.  (You can use phpMyAdmin to run the queries, but '''do not let phpMyAdmin write your queries for you!''')  Writing your own queries gives you a greater understanding of the underlying mechanisms and databases in general.  Additionally, having SQL knowledge and experience is a very marketable trait.&lt;br /&gt;
&lt;br /&gt;
=== Install MySQL and phpMyAdmin ===&lt;br /&gt;
&lt;br /&gt;
Before you start, '''you need to install MySQL''' on your EC2 instance.  You may also install phpMyAdmin, a web frontend to MySQL, if you choose to do so.&lt;br /&gt;
&lt;br /&gt;
=== Set Up a Database ===&lt;br /&gt;
&lt;br /&gt;
You may find the following article to be very helpful: [[Introduction to MySQL]]&lt;br /&gt;
&lt;br /&gt;
# Create a database named '''wustl''' &lt;br /&gt;
# Create a user named '''wustl_inst''' and give them the password '''wustl_pass'''&lt;br /&gt;
&lt;br /&gt;
=== Create Tables ===&lt;br /&gt;
&lt;br /&gt;
You may find the following article to be very helpful: [[MySQL Schema and State]]&lt;br /&gt;
&lt;br /&gt;
When creating tables, keep the following items in mind:&lt;br /&gt;
&lt;br /&gt;
* You should create all tables such that they use the InnoDB storage engine, since we wish to make use of its support of foreign keys. In other database engines, foreign key constraints are not enforced.  (If you mess up, you can use ALTER TABLE to change the storage engine.)&lt;br /&gt;
* Where it is appropriate, you should take advantage of the ability to define fields NOT NULL so that you do not inadvertently insert incomplete data for a row.&lt;br /&gt;
&lt;br /&gt;
Create the following tables:&lt;br /&gt;
&lt;br /&gt;
# Create a table named '''students''' with the following fields:&lt;br /&gt;
#* '''id''' of an appropriately-sized unsigned integer type (we will never need to process more than a million students)&lt;br /&gt;
#* '''first_name''' of type '''VARCHAR(50)'''&lt;br /&gt;
#* '''last_name''' of type '''VARCHAR(50)'''&lt;br /&gt;
#* '''email_address''' of type '''VARCHAR(50)'''&lt;br /&gt;
#: The primary key should be on the '''id''' field.&lt;br /&gt;
# Create a table named '''departments''' with the following fields:&lt;br /&gt;
#* '''school_code''' of type '''ENUM''' (e.g. &amp;quot;L&amp;quot; for ArtSci and &amp;quot;E&amp;quot; for Engineering).  The options are as follows:&lt;br /&gt;
#*: 'L', 'B', 'A', 'F', 'E', 'T', 'I', 'W', 'S', 'U', 'M'&lt;br /&gt;
#* '''dept_id''' of an appropriately-sized unsigned integer type (in the foreseeable future there will never be more than 200 departments in a school)&lt;br /&gt;
#* '''abbreviation''' of type '''VARCHAR(9)''' (e.g. CSE, ChemE, etc)&lt;br /&gt;
#* '''dept_name''' of type '''VARCHAR(200)''' (e.g. Computer Science and Engineering)&lt;br /&gt;
#: The primary key should be on two fields: '''school_code''' and '''dept_id'''&lt;br /&gt;
#: '''Note:''' Why not just use the department ID for the primary key? The ID numbers are sometimes reused across schools. For instance, department 33 in The College of Arts and Sciences is Psychology while department 33 in The School of Engineering and Applied Sciences is Energy, Environmental and Chemical Engineering. Thus we must also include the school code to differentiate them  such that the record for  E33 is distinct from that of L33.&lt;br /&gt;
# Create a table named '''courses''' with the following fields:&lt;br /&gt;
#* '''school_code''' of type '''ENUM'''&lt;br /&gt;
#*: This should have the same letters in the same order as the '''school_code''' '''ENUM''' field in the '''departments''' table.&lt;br /&gt;
#* '''dept_id''' of the same size of integer as in the '''departments''' table&lt;br /&gt;
#* '''course_code''' of type '''CHAR(5)''' (this will hold course codes; e.g., '330S', '131', '2960')&lt;br /&gt;
#* '''name''' of type '''VARCHAR(150)'''&lt;br /&gt;
#: The appropriate fields in this table should make a foreign key reference to the corresponding fields in '''department'''.&lt;br /&gt;
#: In addition, it is up to you to determine the field(s) for the primary key.&lt;br /&gt;
#: '''Note:''' If you are unsure which fields to make the foreign keys and feel the need to beg your friends or the TAs to give you the answer, bang your head on your desk whilst repeating &amp;quot;I WILL EXERCISE REASON AND COMMON SENSE AND I WILL CURTAIL MY DESIRE TO BLINDLY FOLLOW DIRECTIONS&amp;quot;&lt;br /&gt;
#: ''Disclaimer: don't actually bang your head on your desk, the resulting head trauma may in fact make it harder for you to determine which fields should have associated foreign keys.''&lt;br /&gt;
# Create a table named '''grades''' with the following fields:&lt;br /&gt;
#* '''pk_grade_ID''' of an appropriately-sized unsigned integer type (should be larger than the one you chose for the '''students''' table). There will never be more than 1,000 grades per student.&lt;br /&gt;
#*: You should declare this field to be '''auto_increment''' and make it the primary key.&lt;br /&gt;
#*: This is called a ''surrogate key'' as opposed to a ''natural key'' because it doesn't arise &amp;quot;naturally&amp;quot; from the data; that is to say that it is not derived from application data. The use of surrogate keys vs. natural keys is a polemic issue amongst database designers.  For a decently unbiased take on the issue, see this page: http://www.agiledata.org/essays/keys.html#Comparison&lt;br /&gt;
#*: '''Food for thought:''' Aside from simply exposing you to the concept, can you think of any reasons why a surrogate key might be preferable for this table?  Alternatively, what attributes, if any, could you use as a natural key, and what might be the drawbacks of doing so?&lt;br /&gt;
#* '''student_id''' of the same integer (unsigned) type that you chose in the '''students''' table&lt;br /&gt;
#* '''grade''' of type '''decimal(5,2)'''&lt;br /&gt;
#* '''school_code''' of type '''ENUM'''&lt;br /&gt;
#*: Can you guess what entries to use for the enum?&lt;br /&gt;
#* '''dept_id''' of the same integer type that you've used for this field in other tables&lt;br /&gt;
#* '''course_code''' of the same type you chose for the course code in the '''courses''' table&lt;br /&gt;
#: The '''grades''' table should have foreign keys to both the '''students''' table and the '''courses''' table.&lt;br /&gt;
&lt;br /&gt;
=== Populate Tables ===&lt;br /&gt;
&lt;br /&gt;
Now, populate the tables by downloading the text files given below and loading them into the appropriate tables.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Do not insert all the values manually; instead, use the MySQL's ability to load in data from text files.&lt;br /&gt;
&lt;br /&gt;
You may find the following article to be very helpful: [[MySQL Schema and State]]&lt;br /&gt;
&lt;br /&gt;
The files containing the data are:&lt;br /&gt;
* students: https://classes.engineering.wustl.edu/cse330/content/students_data.txt&lt;br /&gt;
* courses: https://classes.engineering.wustl.edu/cse330/content/courses.txt&lt;br /&gt;
* departments: https://classes.engineering.wustl.edu/cse330/content/departments_data.txt&lt;br /&gt;
* grades: https://classes.engineering.wustl.edu/cse330/content/grades_data.txt&lt;br /&gt;
&lt;br /&gt;
=== Insert More Data ===&lt;br /&gt;
&lt;br /&gt;
Insert the following data into the tables that you have created and populated:&lt;br /&gt;
&lt;br /&gt;
# Insert entries for CSE 330S, CSE 131, and CSE 260M.&lt;br /&gt;
#: ''If you don't know CSE's department code, how can you find out using the tables in the database?''&lt;br /&gt;
# Insert the grades given for the students named below. &lt;br /&gt;
#* '''Ben Harper'''&lt;br /&gt;
#** E-mail: '''bharper@ffym.com'''&lt;br /&gt;
#** Student ID: '''88'''&lt;br /&gt;
#** Grades:&lt;br /&gt;
#*** 35.5 in CSE 330S&lt;br /&gt;
#*** 0 in CSE 131&lt;br /&gt;
#*** 95 in CSE 260M&lt;br /&gt;
#* '''Matt Freeman'''&lt;br /&gt;
#** E-mail: '''mfreeman@kickinbassist.net'''&lt;br /&gt;
#** Student ID: '''202'''&lt;br /&gt;
#** Grades:&lt;br /&gt;
#*** 100 in CSE 330S&lt;br /&gt;
#*** 90.5 in CSE 131&lt;br /&gt;
#*** 94.8 in CSE 260M&lt;br /&gt;
#* '''Marc Roberge'''&lt;br /&gt;
#** E-mail: '''mroberge@ofarevolution.us'''&lt;br /&gt;
#** Student ID: '''115'''&lt;br /&gt;
#** Grades:&lt;br /&gt;
#*** 75 in CSE 330S&lt;br /&gt;
#*** 37 in CSE 131&lt;br /&gt;
#*** 45.5 in CSE 260M&lt;br /&gt;
&lt;br /&gt;
=== Querying Your Database ===&lt;br /&gt;
&lt;br /&gt;
Now that you have a fully-functional, populated database, let's do some queries on it!&lt;br /&gt;
&lt;br /&gt;
Please Running the following &amp;lt;code&amp;gt;SELECT&amp;lt;/code&amp;gt; queries, then copy the output to a text file of the form &amp;lt;code&amp;gt;query1.txt&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;query2.txt&amp;lt;/code&amp;gt;, and so on, and commit them with the rest of your repository (be sure to include your query command and the entire response, including the number of results found). For each query, only the requested columns should be present. You will receive 0 points for any query that includes additional columns.&lt;br /&gt;
&lt;br /&gt;
# Select the entire grades table.&lt;br /&gt;
# Select all fields describing the courses offered in the College of Arts &amp;amp; Sciences (school code &amp;lt;code&amp;gt;L&amp;lt;/code&amp;gt;).&lt;br /&gt;
# The names, student IDs, and CSE330 grades of all students who are in CSE330S.&lt;br /&gt;
#: '''Note:''' This query should involve joins.  You don't need to use any aggregation functions.&lt;br /&gt;
# The names, e-mails, and average grades of any student with an average below 50 so that the dean can send them an email notification that they are now on academic probation.&lt;br /&gt;
#: ''You should be able to do this in only one query, without making any temporary tables.  You will need to use aggregation functions and the &amp;lt;code&amp;gt;HAVING&amp;lt;/code&amp;gt; keyword.''&lt;br /&gt;
# An individual report card for Jack Johnson, consisting of only his student ID, e-mail address, and average grade.&lt;br /&gt;
#: ''Again, you should be able to do this in just one query, using the correct combination of aggregation functions and joins.''&lt;br /&gt;
#: '''Note:''' Your query must look for students with the name &amp;quot;Jack Johnson&amp;quot; instead of hard-coding the student ID.&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
You will work in pairs on this project.  You may work with the same partner from Module 2, or change to someone else.&lt;br /&gt;
&lt;br /&gt;
'''Important Reminder:''' frequently commit your work to your Git repository as a backup!&lt;br /&gt;
&lt;br /&gt;
=== Simple News Web Site ===&lt;br /&gt;
&lt;br /&gt;
'''Examples:'''&lt;br /&gt;
* http://digg.com/&lt;br /&gt;
* http://slashdot.org/&lt;br /&gt;
* https://news.ycombinator.com/&lt;br /&gt;
&lt;br /&gt;
You should use '''PHP''' unless you get permission to use another web technology from the instructor.  You may also use phpMyAdmin to help set up databases.&lt;br /&gt;
&lt;br /&gt;
You may find this wiki article helpful: [[PHP and MySQL]]&lt;br /&gt;
&lt;br /&gt;
==== Requirements ====&lt;br /&gt;
&lt;br /&gt;
* Users can register for accounts and then log in to the website.&lt;br /&gt;
* Accounts should have both a username and a ''secure'' password.  '''NEVER store plaintext passwords in a database!'''&lt;br /&gt;
*: For more information on password security, refer to [[Web Application Security, Part 2#Password Security|the Web Application Security guide]].&lt;br /&gt;
* Registered users can submit story commentary.&lt;br /&gt;
*: A link can be associated with each story, and they should be stored in a separate database field from the story&lt;br /&gt;
* Registered users can comment on any story.&lt;br /&gt;
* Unregistered users can only view stories and comments.&lt;br /&gt;
* Registered users can edit and delete their stories and comments.&lt;br /&gt;
* All data must be kept in a MySQL database (user information, stories, comments, and links).&lt;br /&gt;
* Creative Portion&lt;br /&gt;
&lt;br /&gt;
=== Web Security and Validation ===&lt;br /&gt;
&lt;br /&gt;
No application is finished until much thought is put into web security and best practice.  Throughout this course, we heavily emphasize the dogma of [https://mirrors.meiert.org/coderesponsibly.org/ responsible] coding.&lt;br /&gt;
&lt;br /&gt;
Read this week's Web Application Security guide: [[Web Application Security, Part 2]].  In particular, your project needs to:&lt;br /&gt;
&lt;br /&gt;
* '''Your application needs to be secure against SQL injection attacks'''. If you are using prepared queries, you should already be safe on this front.&lt;br /&gt;
* '''Your passwords need to be securely hashed salted''' to prevent rainbow table attacks.&lt;br /&gt;
* '''You should pass tokens in forms''' to prevent CSRF attacks.&lt;br /&gt;
* '''You should check all preconditions on the server side''' to prevent Abuse of Functionality attacks.&lt;br /&gt;
&lt;br /&gt;
You shouldn't forget the practices you learned last week:&lt;br /&gt;
&lt;br /&gt;
* '''Your page should validate''' with no errors or warnings through the W3C validator.&lt;br /&gt;
* '''Filter Input and Escape Output''', but not the other way around.&lt;br /&gt;
&lt;br /&gt;
== Grading ==&lt;br /&gt;
&lt;br /&gt;
We will be grading the following aspects of your work.  There are 100 points total.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Assignments (including code) must be committed to Github by the end of class on the due date (commit early and often). Failing to commit by the end of class on the due date will result in a 0. ''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''If you do not include a link to your group portion running on your instance in your group portion README.md, you will receive a 0 for the group portion.''' &lt;br /&gt;
________&lt;br /&gt;
&lt;br /&gt;
# '''MySQL Queries (25 Points):'''&lt;br /&gt;
#* A MySQL server is running on your instance. Put a screenshot in your repository of your terminal connected to your MySQL server. ( (2 points)&lt;br /&gt;
#* Tables' fields, including data types and foreign keys, are correct (8 points)&lt;br /&gt;
#*: ''Note: To demonstrate the structure of your tables, you should commit a text file containing the output of the &amp;lt;code&amp;gt;SHOW CREATE TABLE&amp;lt;/code&amp;gt; command '''for each table.''' Each table's file should have a name of the form &amp;lt;code&amp;gt;tablename.sql&amp;lt;/code&amp;gt; (e.g. &amp;lt;code&amp;gt;students.sql&amp;lt;/code&amp;gt;).''&lt;br /&gt;
#* The output of each of the five queries is correct. (3 points each)&lt;br /&gt;
#*: ''Note: To demonstrate the output of your queries, text files containing the 'entire' result (including the query and number of records found) of running each query should committed to Github. The file for query 1 should be named &amp;lt;code&amp;gt;query1.txt&amp;lt;/code&amp;gt;, the file for query 2 should be named &amp;lt;code&amp;gt;query2.txt&amp;lt;/code&amp;gt;, and so on.''&lt;br /&gt;
# '''News Site (60 Points):'''&lt;br /&gt;
#* '''''User Management (20 Points):'''''&lt;br /&gt;
#** A session is created when a user logs in (3 points)&lt;br /&gt;
#** New users can register (3 points)&lt;br /&gt;
#** Passwords are hashed, salted, and checked securely (3 points)&lt;br /&gt;
#**: ''Note: You will receive 0 points for this section if you use the &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;===&amp;lt;/code&amp;gt; operators to compare password hashes, or if you use the &amp;lt;code&amp;gt;crypt&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;md5&amp;lt;/code&amp;gt; functions at any point.''&lt;br /&gt;
#** Users can log out (3 points)&lt;br /&gt;
#** A user can edit and delete his/her own stories and comments but cannot edit or delete the stories or comments of another user (8 points)&lt;br /&gt;
#* '''''Story and Comment Management (20 Points):'''''&lt;br /&gt;
#** Relational database is configured with correct data types and foreign keys (4 points)&lt;br /&gt;
#*: ''Note: To demonstrate the structure of your database, you should commit a 'single' text file containing the output of the &amp;lt;code&amp;gt;SHOW CREATE TABLE&amp;lt;/code&amp;gt; command '''for all tables in your database,''' called &amp;lt;code&amp;gt;tables.sql&amp;lt;/code&amp;gt;. This one file should contain the output for all of your tables.&lt;br /&gt;
#** Stories can be posted (3 points)&lt;br /&gt;
#** A link can be associated with each story, and is stored in a separate database field from the story (3 points)&lt;br /&gt;
#** Comments can be posted in association with a story (4 points)&lt;br /&gt;
#** Stories can be edited and deleted (3 points)&lt;br /&gt;
#** Comments can be edited and deleted (3 points)&lt;br /&gt;
#**: ''Note: Although there are only 6 points allocated for editing/deleting in this section, there are 8 more points at stake in the User Management section that cannot be earned unless editing/deleting is implemented.  Implementing editing but not deleting, or vice-versa, will result in earning half the points.''&lt;br /&gt;
#* '''''Best Practices (15 Points):'''''&lt;br /&gt;
#** Code is well formatted and easy to read, with proper commenting (3 points)&lt;br /&gt;
#** Safe from SQL Injection attacks (2 points)&lt;br /&gt;
#** Site follows the FIEO philosophy (3 points)&lt;br /&gt;
#** All pages pass the W3C HTML and CSS validators (2 points)&lt;br /&gt;
#** CSRF tokens are passed when creating, editing, and deleting comments and stories (5 points)&lt;br /&gt;
#* '''''Usability (5 Points):'''''&lt;br /&gt;
#** Site is intuitive to use and navigate (4 points)&lt;br /&gt;
#** Site is visually appealing (1 point)&lt;br /&gt;
# '''Creative Portion (15 Points)''' (see below)&lt;br /&gt;
#* '''''Make sure you have a README.md file in your group repo with the following:'''''&lt;br /&gt;
#** Names and Student IDs of all the group members&lt;br /&gt;
#** A link to your homepage of the site&lt;br /&gt;
#** A brief description of what you did for your creative portion&lt;br /&gt;
#** Any additional login details needed for the TA&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 3]]&lt;br /&gt;
[[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=Module_2&amp;diff=2749</id>
		<title>Module 2</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Module_2&amp;diff=2749"/>
		<updated>2020-12-20T22:40:04Z</updated>

		<summary type="html">&lt;p&gt;Mitch: /* Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
Module 2 introduces you to Linux, a command-line environment, the Apache web server, and PHP.  You will create and configure your own cloud instance, install Apache and related software, and then form groups to make a simple file sharing site.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:1.3em; line-height:1.2em; color:blue;&amp;quot;&amp;gt;'''DO NOT WAIT UNTIL THE LAST MINUTE TO START ON THIS (or any) MODULE!'''  The most common reason students perform poorly in this class is procrastination.  You have been warned.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reading ==&lt;br /&gt;
&lt;br /&gt;
The following articles on the online class wiki textbook contain information that will help you complete the assignments.&lt;br /&gt;
&lt;br /&gt;
* [[Linux]]&lt;br /&gt;
* [[Bash]]&lt;br /&gt;
* [[Amazon Web Services]]&lt;br /&gt;
* [[SSH]]&lt;br /&gt;
* [[Apache]]&lt;br /&gt;
* [[PHP]]&lt;br /&gt;
* [[Workflow]]&lt;br /&gt;
* [[VS Code]]&lt;br /&gt;
* [[Web Application Security, Part 1]]&lt;br /&gt;
* [[FAQ - Mod 2]]&lt;br /&gt;
&lt;br /&gt;
== Individual Assignments ==&lt;br /&gt;
&lt;br /&gt;
{{RequiredInstructions|content=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;There are a lot of wiki pages that you need to read in order to complete the individual portion of Module 2.  The wiki pages contain an assortment of required steps, optional steps, and information.  To make things easier, we have highlighted the ''required steps'' with a red bar, like you see on the left of this message.  Do not skip anything marked with a red bar, or else you will not have a perfectly configured instance.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Learn About Linux ===&lt;br /&gt;
&lt;br /&gt;
Linux is an open-source operating system based on UNIX. Linux is highly versatile and is used in a wide range of applications.&lt;br /&gt;
&lt;br /&gt;
If you are not a Linux guru, read the Linux guide to get started: [[Linux]]&lt;br /&gt;
&lt;br /&gt;
=== Windows Users Only: Enable Windows Subsystem for Linux (WSL) or Install Cygwin ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will need WSL or Cygwin in order to log into and configure your EC2 instance. Cygwin is already installed on the CEC machines. If you're using Windows 10, you can use WSL, which is an officially-supported way of accessing a Linux terminal on Windows. If not, you'll have to use Cygwin. Instructions for installing either on your personal machine are located in [[Workflow#Cygwin|the Workflow guide]].&lt;br /&gt;
&lt;br /&gt;
Mac OS X users should located the &amp;quot;Terminal&amp;quot; application, which is installed by default; you will need this in the coming steps.&lt;br /&gt;
&lt;br /&gt;
=== Create an AWS EC2 Instance ===&lt;br /&gt;
&lt;br /&gt;
Once you understand [[Linux]], you need to set up your Amazon EC2 Instance.  Use the AWS article to guide you through the process: [[Amazon Web Services]]&lt;br /&gt;
&lt;br /&gt;
=== Configure SSH ===&lt;br /&gt;
&lt;br /&gt;
Follow the instructions in [[SSH#SSH Configuration|the SSH guide]] to do the following:&lt;br /&gt;
&lt;br /&gt;
# Create your own SSH key pair&lt;br /&gt;
# Log in as the default user to your EC2 instance&lt;br /&gt;
# Create a new user&lt;br /&gt;
# Give the new user your SSH public key&lt;br /&gt;
&lt;br /&gt;
From now on, when you need to log into your EC2 instance as an administrator, just pop up a terminal and run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ ssh your-username@ec2-xx-xx-xx-xx.compute-1.amazonaws.com&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To save from typing this command in every time you want to access your server, you can set an '''alias''' in your terminal.&lt;br /&gt;
&lt;br /&gt;
In the '''Mac''' terminal, vim ~/.bash_profile and input the following command:&lt;br /&gt;
 $ alias aws='ssh your-username@ec2.xx-xx-xx-xx.compute-1.amazonaws.com'&lt;br /&gt;
Now, whenever you type aws in your terminal, it will type your ssh command.&lt;br /&gt;
&lt;br /&gt;
In '''Cygwin''', vim ~/.bash_profile and input the following:&lt;br /&gt;
 export aws=&amp;quot;ssh your-username@ec2.xx-xx-xx-xx.compute-1.amazonaws.com&amp;quot;&lt;br /&gt;
And you run this command by typing '''$aws'''&lt;br /&gt;
Also note that you may have to restart your terminal for this to take effect, or put the command in your ~/.bashrc file&lt;br /&gt;
&lt;br /&gt;
=== Install Essential Packages ===&lt;br /&gt;
&lt;br /&gt;
Recall that software installation in Linux instances is usually handled through a package manager, like '''yum'''.  For more information, refer to [[Linux#Repository-Based Package Managers|the Linux guide]].&lt;br /&gt;
&lt;br /&gt;
To make sure everything is working properly, '''install your first package(s) according to the ''Essential Packages'' subsection in the Linux guide.'''&lt;br /&gt;
&lt;br /&gt;
=== Set the Timezone ===&lt;br /&gt;
&lt;br /&gt;
'''Set your server to use US Central time (America/Chicago).'''  Instructions are in the Linux guide: [[Linux#Synchronizing Date and Time]]&lt;br /&gt;
&lt;br /&gt;
=== Set Up the Apache Web Server ===&lt;br /&gt;
&lt;br /&gt;
You need to '''install the Apache web server on your EC2 instance'''.  Refer to [[Apache|the Apache guide]].&lt;br /&gt;
&lt;br /&gt;
In order for your web server to be accessible, you need to '''open up Port 80 on your EC2 instance'''.  Instructions are in the AWS guide: [[Amazon Web Services#Enabling Web Access to your EC2 Instance]]&lt;br /&gt;
&lt;br /&gt;
'''Enable the UserDir module in Apache.'''  Instructions are in the Apache guide: [[Apache#The UserDir Module]]&lt;br /&gt;
&lt;br /&gt;
=== Install PHP ===&lt;br /&gt;
&lt;br /&gt;
You need to '''install PHP on your EC2 server'''.  Instructions are at the top of the PHP guide: [[PHP]]&lt;br /&gt;
&lt;br /&gt;
You need to '''configure PHP to show errors'''.  Instructions are immediately below installation in the PHP guide.&lt;br /&gt;
&lt;br /&gt;
=== Learn about the PHP Language ===&lt;br /&gt;
&lt;br /&gt;
Before you can continue, you will need to make yourself acquainted with PHP language components.  Read the PHP guide for an overview: [[PHP#PHP Language Components]]&lt;br /&gt;
&lt;br /&gt;
=== Set Up your Workspace ===&lt;br /&gt;
&lt;br /&gt;
You are now ready to set up the workspace that you will be using for the rest of the semester.  Follow the instructions in [[Workflow]] to:&lt;br /&gt;
&lt;br /&gt;
# Make an account on GitHub&lt;br /&gt;
# Setup a repo using GitHub Classroom&lt;br /&gt;
# Clone your CSE 330 repo from GitHub&lt;br /&gt;
# Install a text editor such as '''VSCode''' to write your assignments with&lt;br /&gt;
# Either install an FTP client, or use SFTP through command line, to transfer files from your local machine to your instance&lt;br /&gt;
&lt;br /&gt;
=== Calculator ===&lt;br /&gt;
&lt;br /&gt;
'''Make a calculator using PHP and an HTML form.'''  The form should have two inputs.  The form should submit a GET request either back to the same page or to a different results page.  The calculator should support addition, subtraction, multiplication, and division by means of a radio button group on the page.  (Consider edge cases!)&lt;br /&gt;
&lt;br /&gt;
=== Git Tutorial ===&lt;br /&gt;
Complete all of the levels of the Main and Remote sections of [https://learngitbranching.js.org/ this Git tutorial]. After you finish the tutorial, take two screenshots showing completion of all of the levels of the Main and Remote sections. Place these two screenshots in your Module 2 Individual repo.&lt;br /&gt;
&lt;br /&gt;
== Group Project ==&lt;br /&gt;
&lt;br /&gt;
You will work in pairs (that means you and one other person) on this project.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:1.3em; line-height:1.2em; color:blue;&amp;quot;&amp;gt;In this module, and all future modules, the group portion builds off of material you learn in the individual portion.  You should therefore complete the individual portions prior to working on the group portions.  (Trust us: it will make your life easier!)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Important Reminder:''' frequently commit your work to your repository as a backup!&lt;br /&gt;
&lt;br /&gt;
=== Simple File Sharing Site ===&lt;br /&gt;
&lt;br /&gt;
You will be making a simple file sharing site that supports uploading, viewing, and deleting files associated with various users.  Details:&lt;br /&gt;
&lt;br /&gt;
* You should have a file named '''users.txt''' stored in a secure place on your filesystem.  It should have at least three usernames, with one username per line.&lt;br /&gt;
*: Passwords add an extra layer of complexity (encryption) that we will cover in Module 3.  You will not earn credit for implementing passwords as your creative portion for this module.&lt;br /&gt;
* Users of the file sharing site should be able to enter their username and then log in.&lt;br /&gt;
*: You may implement logins using session variables, or you may implement them using a GET parameter that is passed between pages.  You will need to always use sessions starting in Module 3.&lt;br /&gt;
* Users should see a list of all files associated with their username after the log in.&lt;br /&gt;
* Users should be able to view, upload, and delete files associated with their username.&lt;br /&gt;
* The URI should NOT reveal the internal file structure of your web site.&lt;br /&gt;
** Example of what not to do:  http://www.example.com/download.php?file=/home/paul/file.txt&lt;br /&gt;
** Another bad example:  http://www.example.com/~user/file.txt&lt;br /&gt;
** Good example: http://www.example.com/view.php?user=music&amp;amp;name=file.txt&lt;br /&gt;
*: In general, don't reveal any internal information about the site.&lt;br /&gt;
*: '''Food for thought:''' Given that Apache processes (with the exception of the main process) do not run as root, but rather as the user apache, how can you allow both your user account and the php scripts to read and write the &lt;br /&gt;
*:necessary files?&lt;br /&gt;
*:: ''Hint:'' You shouldn't be storing the user-uploaded files in public_html (that is only the place for your own web-page files), &lt;br /&gt;
*::''Hint number 2:''  you will need to use chown to change permissions to let user apache have permissions on the user-files (that '''are not''' in the public_html folder). If you don't know what this does or how to do this, look at the [[Apache]] page&lt;br /&gt;
* You should customize your file sharing site by implementing an additional feature or two as part of the '''creative portion'''.&lt;br /&gt;
&lt;br /&gt;
You will probably find the PHP guide on this wiki to be helpful: [[PHP#Other PHP Tips]]&lt;br /&gt;
&lt;br /&gt;
=== Web Security and Validation ===&lt;br /&gt;
&lt;br /&gt;
Your project needs to demonstrate that thought was put into web security and best practice.  For more information, see this week's Web Application Security guide: [[Web Application Security, Part 1]]&lt;br /&gt;
&lt;br /&gt;
In particular:&lt;br /&gt;
&lt;br /&gt;
* '''Your application needs to follow the conventions of FIEO (Filter Input and Escape Output)'''.  Things you should filter include file names, usernames, and so on.&lt;br /&gt;
* '''Your project must pass the W3C Validator with no errors or warnings'''.  For more information, see the HTML and CSS guide: [[HTML and CSS#Validation]]&lt;br /&gt;
&lt;br /&gt;
== Grading ==&lt;br /&gt;
&lt;br /&gt;
We will be grading the following aspects of your work.  There are 120 points total. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Assignments (including code) must be committed to GitHub by the end of class on the due date. Commit early and often. Failing to commit by the end of class on the due date will result in a 0. &lt;br /&gt;
&lt;br /&gt;
_____________&lt;br /&gt;
&lt;br /&gt;
# '''Cloud Instance and Web Server (30 Points):'''&lt;br /&gt;
#* You can SSH into your instance using your own custom username and SSH key. Put a screenshot in your repository of your terminal SSH-ing into your instance (15 points)&lt;br /&gt;
#* Your custom username is able to perform SUDO commands. Put a screenshot in your repository of you successfully executing a command with sudo (5 points)&lt;br /&gt;
#* The time zone is correct on your instance. Put a screenshot in your repository of the results of the `date` command (5 points)&lt;br /&gt;
#* The UserDir Apache module is working. Place a file in /home/&amp;lt;username&amp;gt;/public_html and link to the file in your README.md (5 points)&lt;br /&gt;
# '''PHP Calculator (15 Points):'''&lt;br /&gt;
#* The calculator is able to perform all four functions with floating point numbers (2 points each, 8 points in total)&lt;br /&gt;
#* Each function is given as a radio button choice (4 points)&lt;br /&gt;
#* The calculator page passes the W3C HTML validator (3 points)&lt;br /&gt;
#* '''''Make sure you have a README.md file in your individual repo with the the link to your calculator.''''' See the Creative Portion section for more information about .md files.&lt;br /&gt;
# '''Git Tutorial (20 Points):'''&lt;br /&gt;
#* Place the two screenshots displaying the completed levels of the Main and Remote sections in your Individual repo&lt;br /&gt;
# '''File Sharing Site (40 Points):'''&lt;br /&gt;
#* '''''File Management (25 Points):'''''&lt;br /&gt;
#** Users should not be able to see any files until they enter a username and log in (4 points)&lt;br /&gt;
#**: ''Remember that users.txt should be stored in a secure location on your filesystem.  That is, '''you should not be able to type any URL into your browser and see the raw users.txt file!'''''&lt;br /&gt;
#** Users can see a list of all files they have uploaded (4 points)&lt;br /&gt;
#** Users can open files they have previously uploaded (5 points)&lt;br /&gt;
#**: ''Note: Users should be able to open not only plain text files but also other file formats: images, spreadsheets, etc.''&lt;br /&gt;
#** Users can upload files (4 points)&lt;br /&gt;
#**: ''Note: Like users.txt, uploaded files should be stored in a secure location on your filesystem.  That is, '''do not keep your uploads directory underneath a directory served by Apache!'''''&lt;br /&gt;
#** Users can delete files.  If a file is &amp;quot;deleted&amp;quot;, it should actually be removed from the filesystem (4 points)&lt;br /&gt;
#** The directory structure is hidden. Users should not be able to access or view files by manipulating a URL. (2 points)&lt;br /&gt;
#** Users can log out (2 points)&lt;br /&gt;
#**: ''Note: If using session variables, you must ''actually'' log out the user by destroying their session; i.e., don't just redirect them to the login screen.''&lt;br /&gt;
#* '''''Best Practices (10 Points):'''''&lt;br /&gt;
#** Code is well formatted and easy to read, with proper commenting (4 points)&lt;br /&gt;
#** The site follows the FIEO philosophy (3 points)&lt;br /&gt;
#** All pages pass the W3C validator (3 points)&lt;br /&gt;
#* '''''Usability (5 Points):'''''&lt;br /&gt;
#** Site is intuitive to use and navigate (4 points)&lt;br /&gt;
#** Site is visually appealing (1 point)&lt;br /&gt;
# '''Creative Portion (15 Points)''' (see below)&lt;br /&gt;
#* '''''Make sure you have a README.md file in your group repo with the following:'''''&lt;br /&gt;
#** An .md file is a plain text file called a markdown file  [https://guides.github.com/features/mastering-markdown/ ] .  &lt;br /&gt;
#***The contents of your README.md file are shown on your repo, making it easier for us to grade&lt;br /&gt;
#*** You may style the page with bolding, hyperlings, images, block quotes and lists&lt;br /&gt;
#*** [http://dillinger.io/ This online markdown editor] makes it easy to learn this format  &lt;br /&gt;
#** The link to your file sharing site. '''''We need this to grade your work.'''''&lt;br /&gt;
#** A brief description of what you did for your creative portion&lt;br /&gt;
#** Any additional login details needed for the TA&lt;br /&gt;
&lt;br /&gt;
=== Creative Portion ===&lt;br /&gt;
&lt;br /&gt;
This module and all future modules will require that you invest some time into creating additional features for your group project.  Plan to invest at least 60 minutes of your time into the creative portion.&lt;br /&gt;
&lt;br /&gt;
* The creative portion is an opportunity for you to learn the material of your own interest.&lt;br /&gt;
* You will not earn credit for a creative-portion feature that simply rehashes something you've already done in a previous module.&lt;br /&gt;
&lt;br /&gt;
If you need ideas for a creative portion, or if you want to know whether or not your creative portion idea is &amp;quot;hard enough&amp;quot;, ask a TA.&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 2]]&lt;br /&gt;
[[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=Module_1&amp;diff=2748</id>
		<title>Module 1</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=Module_1&amp;diff=2748"/>
		<updated>2020-12-20T22:39:34Z</updated>

		<summary type="html">&lt;p&gt;Mitch: /* Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
Module 1 introduces the fundamentals of HTML and CSS.  You will first make a static document using HTML and CSS, and then you will make a portal to a DuckDuckGo search.  This module is worth 50 points.&lt;br /&gt;
&lt;br /&gt;
== Reading ==&lt;br /&gt;
&lt;br /&gt;
The following articles on the online class wiki textbook contain information that will help you complete the assignment.&lt;br /&gt;
&lt;br /&gt;
* [[Git]]&lt;br /&gt;
* [[HTML and CSS]]&lt;br /&gt;
* [[HTML Forms]]&lt;br /&gt;
* [[VS Code]]&lt;br /&gt;
* [[FAQ - Mod 1]]&lt;br /&gt;
&lt;br /&gt;
== Assignments ==&lt;br /&gt;
&lt;br /&gt;
=== Write a Birthday Card ===&lt;br /&gt;
&lt;br /&gt;
'''Write a birthday card to a friend or family member using HTML and CSS.'''  Use HTML to define the content of the card (like the headings and the paragraphs), and use CSS to define the appearance.  Some ideas:&lt;br /&gt;
&lt;br /&gt;
* Make the background-color of the page baby blue and use purple ink to write a card to a little boy&lt;br /&gt;
* Make the text big and include pictures of hearts&lt;br /&gt;
* Use a font with text shadows (more advanced)&lt;br /&gt;
&lt;br /&gt;
Use this opportunity to experiment with the plethora of CSS properties.  Remember that you're in a computer science class (not an art class), so we don't care if your card looks ugly.  The main thing is that you learn HTML and CSS and use them appropriately.&lt;br /&gt;
&lt;br /&gt;
==== How to Edit Your File ====&lt;br /&gt;
&lt;br /&gt;
Throughout this course we '''highly''' recommend using VS Code https://code.visualstudio.com/download, and have included tips for each module specific to VS Code.&lt;br /&gt;
Visit the wiki page [[VS Code]] and check out the Module 1 section&lt;br /&gt;
&lt;br /&gt;
'''Important Note:''' Writing your web page in a word processor like Microsoft Word or even WordPad or TextEdit will ''not'' work.  You need a plain text editor.&lt;br /&gt;
&lt;br /&gt;
==== How to View Your HTML Document ====&lt;br /&gt;
&lt;br /&gt;
Once you have ''birthday.html'', you can open it using your favorite web browser (like Firefox).  For the purposes of this exercise, it suffices to right-click the file and tell it to &amp;quot;open with&amp;quot; Firefox.  When the file opens, it should be under the file:/// protocol.&lt;br /&gt;
&lt;br /&gt;
In Module 2, we will install a web server that serves up pages on the http:// and https:// protocols.&lt;br /&gt;
&lt;br /&gt;
==== Validation ====&lt;br /&gt;
&lt;br /&gt;
'''Your birthday card must pass the W3C Validators for both HTML and CSS with no errors or warnings.'''  You can upload your HTML to [https://validator.w3.org/ the HTML validator] and your CSS to [https://jigsaw.w3.org/css-validator/ the CSS validator].&lt;br /&gt;
&lt;br /&gt;
For more information on validation, see the HTML and CSS guide: [[HTML and CSS#Validation]]&lt;br /&gt;
&lt;br /&gt;
=== Make a Portal to a DuckDuckGo Search ===&lt;br /&gt;
&lt;br /&gt;
'''Write an HTML document containing a form that searches DuckDuckGo's web site.'''  You should be able to type in a search term and have your form load the DuckDuckGo search page. In this HTML document you must also include this course's regrade policy to ensure that you have read it and understand it. [https://www.arl.wustl.edu/~todd/cse330/info.html Regrade Policy]&lt;br /&gt;
&lt;br /&gt;
# Visit [https://www.duckduckgo.com/ www.duckduckgo.com].  Search for something easy to spot in the URL, like &amp;quot;QUERY&amp;quot;.&lt;br /&gt;
# Look at the URL of the search page.  What is the script URL?  What is the query variable?&lt;br /&gt;
# Make an HTML document containing a text field and a submit button.  Typing a search query into the text field and pressing the submit button should load the DuckDuckGo search page.&lt;br /&gt;
&lt;br /&gt;
- Additionally, we want you to copy/paste this course's regrade policy somewhere into this html document to ensure your familiarity.&lt;br /&gt;
&lt;br /&gt;
== Grading ==&lt;br /&gt;
&lt;br /&gt;
We will be grading the following aspects of your work.  There are 50 points total.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Assignments (including code) must be committed to GitHub by the end of class on the due date. Commit early and often. Failing to commit by the end of class on the due date will result in a 0. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# '''Birthday Card (30 Points):'''&lt;br /&gt;
#* Correct usage of HTML and CSS in your birthday card (10 points).&lt;br /&gt;
#*: ''Make sure that you use HTML for &amp;quot;content&amp;quot; and CSS for &amp;quot;appearance.&amp;quot;  Don't write inline styles: use a separate stylesheet and link your HTML file to it.''&lt;br /&gt;
#* Experimenting with at least 5 different CSS properties in your birthday card (10 points).&lt;br /&gt;
#* Birthday card passes the W3C validation for HTML 5 and CSS. (10 points).&lt;br /&gt;
# '''Search Portal (10 Points):'''&lt;br /&gt;
#* DuckDuckGo search portal is functional (9 points).&lt;br /&gt;
#* Your search portal page includes the text of this course's regrade policy (1 point).&lt;br /&gt;
# '''Account Creation and Version Control (10 Points):'''&lt;br /&gt;
#* GitHub account created (2 Points)&lt;br /&gt;
#* Module 1 repo created using the link provided on Piazza (2 Points)&lt;br /&gt;
#* Account created on Amazon Web Services and an image file containing a screenshot of your account page pushed to GitHub. (4 Points)&lt;br /&gt;
#* Files pushed to repo on GitHub using Git (2 Points)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 1]]&lt;br /&gt;
[[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_3&amp;diff=2747</id>
		<title>FAQ - Mod 3</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_3&amp;diff=2747"/>
		<updated>2020-12-14T15:40:14Z</updated>

		<summary type="html">&lt;p&gt;Mitch: /* Why can't I modify my table? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 3x. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== Primary Keys ==&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting an error when adding a foreign key? ===&lt;br /&gt;
&lt;br /&gt;
==== Non-Unique Primary Key ====&lt;br /&gt;
&lt;br /&gt;
This issue can be a result of a non-unique primary key. Take the courses table in this module, for example. Multiple courses can have the same course code if they are in different departments, so generating a primary key in reference to only course code is not enough. Think about what other fields to include to make a primary key truly unique, as you cannot have repeating primary keys.&lt;br /&gt;
&lt;br /&gt;
==== Primary Key and Foreign Key Parameters ====&lt;br /&gt;
&lt;br /&gt;
Another reason that adding a foreign key can result in an error is if it does not reference the entire primary key. For a foreign key to be properly generated, it needs to reference the entire primary key, even if that means including multiple parameters.&lt;br /&gt;
&lt;br /&gt;
==== Type Mismatch ====&lt;br /&gt;
&lt;br /&gt;
A third common reason that a foreign key cannot be properly generated is that the parameters included when generating the key are different types. For example, of one of the parameters is of type TINYINT and another is of type SMALLINT, the key cannot be generated properly. When generating the key, make sure the parameters are of matching type.&lt;br /&gt;
&lt;br /&gt;
== Modifying Tables ==&lt;br /&gt;
&lt;br /&gt;
=== Why can't I modify my table? ===&lt;br /&gt;
&lt;br /&gt;
You will run into an issue if you try to modify your table after adding a foreign key. Anything from adding to the table, to changing types, to modifying/adding charsets will not be possible once the foreign key has been added. If you do need to edit the table after having added a foreign key, you will need to drop the key before making edits to the table.&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 3]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_3&amp;diff=2746</id>
		<title>FAQ - Mod 3</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_3&amp;diff=2746"/>
		<updated>2020-12-14T15:30:45Z</updated>

		<summary type="html">&lt;p&gt;Mitch: Created page with &amp;quot;Welcome to the frequently asked questions page for Module 3x. As many common questions can come up on Piazza, some of those questions are consolidated here.  == Primary Keys =...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 3x. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== Primary Keys ==&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting an error when adding a foreign key? ===&lt;br /&gt;
&lt;br /&gt;
==== Non-Unique Primary Key ====&lt;br /&gt;
&lt;br /&gt;
This issue can be a result of a non-unique primary key. Take the courses table in this module, for example. Multiple courses can have the same course code if they are in different departments, so generating a primary key in reference to only course code is not enough. Think about what other fields to include to make a primary key truly unique, as you cannot have repeating primary keys.&lt;br /&gt;
&lt;br /&gt;
==== Primary Key and Foreign Key Parameters ====&lt;br /&gt;
&lt;br /&gt;
Another reason that adding a foreign key can result in an error is if it does not reference the entire primary key. For a foreign key to be properly generated, it needs to reference the entire primary key, even if that means including multiple parameters.&lt;br /&gt;
&lt;br /&gt;
==== Type Mismatch ====&lt;br /&gt;
&lt;br /&gt;
A third common reason that a foreign key cannot be properly generated is that the parameters included when generating the key are different types. For example, of one of the parameters is of type TINYINT and another is of type SMALLINT, the key cannot be generated properly. When generating the key, make sure the parameters are of matching type.&lt;br /&gt;
&lt;br /&gt;
== Modifying Tables ==&lt;br /&gt;
&lt;br /&gt;
=== Why can't I modify my table? ===&lt;br /&gt;
&lt;br /&gt;
You will run into an issue if you try to modify your table after adding a foreign key. If you do run into this, you will need to drop the key before making edits to the table.&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 3]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2745</id>
		<title>CSE 330 Online Textbook - Table of Contents</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2745"/>
		<updated>2020-12-14T15:12:56Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;text-align:center;&amp;quot;&amp;gt;[[File:CSE330Banner.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
&amp;lt;div style=&amp;quot;column-width: 300px; -moz-column-width: 300px; -webkit-column-width: 300px;&amp;quot;&amp;gt;&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=1&lt;br /&gt;
|subject=HTML and CSS Fundamentals&lt;br /&gt;
|links=&lt;br /&gt;
* [[HTML and CSS]]&lt;br /&gt;
* [[HTML Forms]]&lt;br /&gt;
* [[Git]]&lt;br /&gt;
* [[FAQ - Mod 1]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=2&lt;br /&gt;
|subject=Linux, Apache, and PHP&lt;br /&gt;
|links=&lt;br /&gt;
* [[Linux]]&lt;br /&gt;
* [[Bash]]&lt;br /&gt;
* [[Amazon Web Services]]&lt;br /&gt;
* [[SSH]]&lt;br /&gt;
* [[Apache]]&lt;br /&gt;
* [[PHP]]&lt;br /&gt;
* [[Workflow]]&lt;br /&gt;
* [[Web Application Security, Part 1]]&lt;br /&gt;
* [[FAQ - Mod 2]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=3&lt;br /&gt;
|subject=SQL Databases&lt;br /&gt;
|links=&lt;br /&gt;
* [[Introduction to MySQL]] (installation)&lt;br /&gt;
* [[MySQL Schema and State]] (queries)&lt;br /&gt;
* [[PHP and MySQL]] (using MySQL from PHP)&lt;br /&gt;
* [[Web Application Security, Part 2]]&lt;br /&gt;
* [[FAQ - Mod 3]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=4&lt;br /&gt;
|subject=Scripting for Rapid Prototyping&lt;br /&gt;
|links=&lt;br /&gt;
* [[Python]]&lt;br /&gt;
* [[Regular Expressions]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=5&lt;br /&gt;
|subject=JavaScript and APIs&lt;br /&gt;
|links=&lt;br /&gt;
* [[JavaScript]]&lt;br /&gt;
* [[AJAX and JSON]]&lt;br /&gt;
* [[Web Application Security, Part 3]]&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=6&lt;br /&gt;
|subject=Real-Time Web Applications&lt;br /&gt;
|links=&lt;br /&gt;
* [[Node.JS]]&lt;br /&gt;
* [[Socket.IO]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=7&lt;br /&gt;
|subject=Creative Project&lt;br /&gt;
|links=&lt;br /&gt;
* [[Choosing a Platform]]&lt;br /&gt;
* [[Web Frameworks]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Use this wiki as a starting place for your projects in CSE 330.  However, web development is a large field, so it is impossible for us to document everything you might need to know.  Here are some other places you should look when you need to find something:&lt;br /&gt;
&lt;br /&gt;
* [https://developer.mozilla.org/en-US/ The Mozilla Development Network (MDN)], a community-driven source containing documentation and tutorials for Web technologies&lt;br /&gt;
* [http://reference.sitepoint.com/html SitePoint], which has a reference page as well as quality articles and tutorials&lt;br /&gt;
&lt;br /&gt;
If you can't find what you need in any of these places, try using your favorite search engine.  '''Be wary of sites that come up on search engines.'''  Many HTML reference sites document bad practices and dated techniques.  If you're unsure whether a reference site you find is legitimate, ask a TA.&lt;br /&gt;
&lt;br /&gt;
== Want to Learn More? ==&lt;br /&gt;
&lt;br /&gt;
The limited amount of time in CSE 330 means that we can cover only a subset of the wide range of possible topics in the field of rapid prototyping and web development.  Indeed, the exact topics covered in CSE 330 change from year to year.&lt;br /&gt;
&lt;br /&gt;
Feel free to browse some of the topics that have previously been covered in CSE 330: [[:Category:Former Content|CSE 330 Former Content]]&lt;br /&gt;
&lt;br /&gt;
You should also consider following blogs like [http://www.sitepoint.com/ SitePoint] to keep up-to-date on the latest developments in the field of web development.&lt;br /&gt;
&lt;br /&gt;
== Content License ==&lt;br /&gt;
&lt;br /&gt;
The content of this wiki is copyright (c) 2013, Washington University in St. Louis, Department of Computer Science.  All rights reserved.&lt;br /&gt;
&lt;br /&gt;
=== Modified BSD License ===&lt;br /&gt;
&lt;br /&gt;
Redistribution and use in source and binary forms, with or without modification, by a Third Party who has not completed and is not in the process of completing CSE 330, of the code examples or concepts on this wiki, are permitted, provided that the following conditions are met:&lt;br /&gt;
&lt;br /&gt;
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.&lt;br /&gt;
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.&lt;br /&gt;
* Neither the name of the Washington University School of Engineering and Applied Science nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.&lt;br /&gt;
&lt;br /&gt;
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS TO ALL PARTIES &amp;quot;AS IS&amp;quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
&lt;br /&gt;
=== What it Means ===&lt;br /&gt;
&lt;br /&gt;
If you are a student in CSE 330, you may use the code from this wiki freely in your projects without the need for attribution.  If you are not a student in CSE 330, you may use the code from this wiki freely in your projects with attribution.  Either way, the code examples are provided &amp;quot;as is&amp;quot;, without any warranty, and Washington University holds no liability for problems arising from the use of the content in this wiki.&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_2&amp;diff=2744</id>
		<title>FAQ - Mod 2</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_2&amp;diff=2744"/>
		<updated>2020-12-14T15:10:53Z</updated>

		<summary type="html">&lt;p&gt;Mitch: Created page with &amp;quot;Welcome to the frequently asked questions page for Module 2. As many common questions can come up on Piazza, some of those questions are consolidated here.  == Permissions ==...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 2. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== Permissions ==&lt;br /&gt;
&lt;br /&gt;
=== Help: I need to edit a readonly file! ===&lt;br /&gt;
&lt;br /&gt;
When attempting to edit a readonly file, the terminal will throw the following warning message.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
W10: Warning: Changing a readonly file&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This error often surfaces for the first time when attempting to edit UserDir for the first time, as is instructed for setting up Apache. If you have set the correct permissions (as designated by the wiki) and are still running into an error, you likely need to edit the file with the &amp;quot;sudo&amp;quot; command, as shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
$ sudo vi &amp;lt;filename&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
as opposed to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
$ vi &amp;lt;filename&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Placing sudo before a command allows you to run the command with the permissions of the root user. The root user is able to access any file, so running as sudo should allow you to write to a readonly file. '''Before using sudo to run a command, always check that you have set the correct permissions as stated by the wiki. If you do not, using sudo once will not fix permissions issues down the line.''' We see plenty of permissions questions on piazza every year; 90% of the time these are due to students not reading the wiki in full when configuring Apache, SFTP, etc.&lt;br /&gt;
&lt;br /&gt;
=== What is the password to login to the root user on my EC2 instance? ===&lt;br /&gt;
&lt;br /&gt;
When attempting to login to the root user using &amp;quot;su,&amp;quot; you might find yourself prompted to enter a password. Similarly to the previous issue, this can be solved by running the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
$ sudo su&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using sudo allows you to access the permissions of the root user without using the password.&lt;br /&gt;
&lt;br /&gt;
=== I'm trying to push files using SFTP but it isn't working ===&lt;br /&gt;
&lt;br /&gt;
You may run into an error when trying to push files via SFTP, where you see the following message followed by several lines of error tracing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
Error: Permissions Denied&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you run into this, it's likely the case that the permissions were set incorrectly for either your private key or public_html. If you make sure that you have set permissions correctly for '''both''' of these, you likely will not have an error.&lt;br /&gt;
&lt;br /&gt;
== One vs Multiple HTML Files ==&lt;br /&gt;
&lt;br /&gt;
=== Should I include both parts of the assignment in the same HTML file? ===&lt;br /&gt;
&lt;br /&gt;
Students often wonder whether they should include both the birthday card and search engine in the same HTML file or separate them into different files. While there is no grading requirement for this and they can be included in the same file, we recommend putting them in different files to get you more comfortable with the process of creating HTML files from scratch. In the end, though, this is up to you.&lt;br /&gt;
&lt;br /&gt;
== Instance Storage Space ==&lt;br /&gt;
&lt;br /&gt;
=== What do I do if I run out of space on my EC2 instance? ===&lt;br /&gt;
&lt;br /&gt;
While this may seem like a big deal, this is often simply due to an issue in a PHP file that causes errors to pile up in the Apache log folder. Follow the following steps to fix this. First, check to make sure this is the issue. Run the following command. If any of the file systems show 100% for use, you may be out of space.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
$ df -h&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this is the case, log into the root user.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
$ sudo su&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Direct yourself to the Apache log folder.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
$ cd /var/log/httpd&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the following command to see the files in this directory. If you see an abundance of error_log files, or error_log files with large sizes, a PHP file is likely the source of the problem.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
$ ls -l&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the next command to find the PHP file that was the source of the errors. You will need to fix whatever errors you have in your PHP file so that your instance does not fill up again.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
$ tail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, use the following command to remove the error_log files that are taking up all of the space.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
$ rm&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restart Apache after having completed this process and you should have regained space on your instance!&lt;br /&gt;
&lt;br /&gt;
== SFTP Errors/Trouble Connecting to Apache via VSCode ==&lt;br /&gt;
&lt;br /&gt;
=== Why won't my SFTP work from vscode? ===&lt;br /&gt;
&lt;br /&gt;
This is often due to an incorrect private key path, which will result in the following error.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
ENOENT: No such file or directory, open '&amp;lt;file path&amp;gt;'&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This nearly always means that your privateKeyPath field in your sftp.json file is incorrect. Double check this path; it should be the file path to your id-rsa file on your local machine.&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 2]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_1&amp;diff=2743</id>
		<title>FAQ - Mod 1</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ_-_Mod_1&amp;diff=2743"/>
		<updated>2020-12-14T14:17:39Z</updated>

		<summary type="html">&lt;p&gt;Mitch: Created page with &amp;quot;Welcome to the frequently asked questions page for Module 1. As many common questions can come up on Piazza, some of those questions are consolidated here.  == HTML Validator...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 1. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== HTML Validator ==&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting a character encoding error in the HTML validator? ===&lt;br /&gt;
&lt;br /&gt;
Students frequently see the following error message when putting their code through the W3C Validator.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
The character encoding was not declared. Proceed using Windows-1252&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When writing html, you need to include a method of [http://net-informations.com/q/faq/encoding.html#:~:text=A%20character%20encoding%20tells%20the,grouped%20into%20a%20character%20set. character encoding] so the computer knows exactly how you want your data to be interpreted. There are multiple character encoding schemes, but perhaps the most common for modern web and application development is Unicode Transformation Format (UTF) 8.&lt;br /&gt;
This error can be easily solved by including the following line in your HTML header:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== One vs Multiple HTML Files ==&lt;br /&gt;
&lt;br /&gt;
=== Should I include both parts of the assignment in the same HTML file? ===&lt;br /&gt;
&lt;br /&gt;
Students often wonder whether they should include both the birthday card and search engine in the same HTML file or separate them into different files. While there is no grading requirement for this and they can be included in the same file, we recommend putting them in different files to get you more comfortable with the process of creating HTML files from scratch. In the end, though, this is up to you.&lt;br /&gt;
&lt;br /&gt;
== HTML Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
=== Do my HTML files need to have specific names? ===&lt;br /&gt;
&lt;br /&gt;
A common question is whether or not there are naming questions for HTML files, or whether or not they need to be named something specific for grading purposes. Unless we specify exactly what we want the file to be (a rare occurrence), you can use your discretion as to what a good file name would be. Needless to say, it should at least be related to the content of the file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 1]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2742</id>
		<title>CSE 330 Online Textbook - Table of Contents</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2742"/>
		<updated>2020-12-14T14:17:25Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;text-align:center;&amp;quot;&amp;gt;[[File:CSE330Banner.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
&amp;lt;div style=&amp;quot;column-width: 300px; -moz-column-width: 300px; -webkit-column-width: 300px;&amp;quot;&amp;gt;&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=1&lt;br /&gt;
|subject=HTML and CSS Fundamentals&lt;br /&gt;
|links=&lt;br /&gt;
* [[HTML and CSS]]&lt;br /&gt;
* [[HTML Forms]]&lt;br /&gt;
* [[Git]]&lt;br /&gt;
* [[FAQ - Mod 1]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=2&lt;br /&gt;
|subject=Linux, Apache, and PHP&lt;br /&gt;
|links=&lt;br /&gt;
* [[Linux]]&lt;br /&gt;
* [[Bash]]&lt;br /&gt;
* [[Amazon Web Services]]&lt;br /&gt;
* [[SSH]]&lt;br /&gt;
* [[Apache]]&lt;br /&gt;
* [[PHP]]&lt;br /&gt;
* [[Workflow]]&lt;br /&gt;
* [[Web Application Security, Part 1]]&lt;br /&gt;
* [[FAQ - Mod 2]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=3&lt;br /&gt;
|subject=SQL Databases&lt;br /&gt;
|links=&lt;br /&gt;
* [[Introduction to MySQL]] (installation)&lt;br /&gt;
* [[MySQL Schema and State]] (queries)&lt;br /&gt;
* [[PHP and MySQL]] (using MySQL from PHP)&lt;br /&gt;
* [[Web Application Security, Part 2]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=4&lt;br /&gt;
|subject=Scripting for Rapid Prototyping&lt;br /&gt;
|links=&lt;br /&gt;
* [[Python]]&lt;br /&gt;
* [[Regular Expressions]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=5&lt;br /&gt;
|subject=JavaScript and APIs&lt;br /&gt;
|links=&lt;br /&gt;
* [[JavaScript]]&lt;br /&gt;
* [[AJAX and JSON]]&lt;br /&gt;
* [[Web Application Security, Part 3]]&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=6&lt;br /&gt;
|subject=Real-Time Web Applications&lt;br /&gt;
|links=&lt;br /&gt;
* [[Node.JS]]&lt;br /&gt;
* [[Socket.IO]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=7&lt;br /&gt;
|subject=Creative Project&lt;br /&gt;
|links=&lt;br /&gt;
* [[Choosing a Platform]]&lt;br /&gt;
* [[Web Frameworks]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Use this wiki as a starting place for your projects in CSE 330.  However, web development is a large field, so it is impossible for us to document everything you might need to know.  Here are some other places you should look when you need to find something:&lt;br /&gt;
&lt;br /&gt;
* [https://developer.mozilla.org/en-US/ The Mozilla Development Network (MDN)], a community-driven source containing documentation and tutorials for Web technologies&lt;br /&gt;
* [http://reference.sitepoint.com/html SitePoint], which has a reference page as well as quality articles and tutorials&lt;br /&gt;
&lt;br /&gt;
If you can't find what you need in any of these places, try using your favorite search engine.  '''Be wary of sites that come up on search engines.'''  Many HTML reference sites document bad practices and dated techniques.  If you're unsure whether a reference site you find is legitimate, ask a TA.&lt;br /&gt;
&lt;br /&gt;
== Want to Learn More? ==&lt;br /&gt;
&lt;br /&gt;
The limited amount of time in CSE 330 means that we can cover only a subset of the wide range of possible topics in the field of rapid prototyping and web development.  Indeed, the exact topics covered in CSE 330 change from year to year.&lt;br /&gt;
&lt;br /&gt;
Feel free to browse some of the topics that have previously been covered in CSE 330: [[:Category:Former Content|CSE 330 Former Content]]&lt;br /&gt;
&lt;br /&gt;
You should also consider following blogs like [http://www.sitepoint.com/ SitePoint] to keep up-to-date on the latest developments in the field of web development.&lt;br /&gt;
&lt;br /&gt;
== Content License ==&lt;br /&gt;
&lt;br /&gt;
The content of this wiki is copyright (c) 2013, Washington University in St. Louis, Department of Computer Science.  All rights reserved.&lt;br /&gt;
&lt;br /&gt;
=== Modified BSD License ===&lt;br /&gt;
&lt;br /&gt;
Redistribution and use in source and binary forms, with or without modification, by a Third Party who has not completed and is not in the process of completing CSE 330, of the code examples or concepts on this wiki, are permitted, provided that the following conditions are met:&lt;br /&gt;
&lt;br /&gt;
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.&lt;br /&gt;
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.&lt;br /&gt;
* Neither the name of the Washington University School of Engineering and Applied Science nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.&lt;br /&gt;
&lt;br /&gt;
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS TO ALL PARTIES &amp;quot;AS IS&amp;quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
&lt;br /&gt;
=== What it Means ===&lt;br /&gt;
&lt;br /&gt;
If you are a student in CSE 330, you may use the code from this wiki freely in your projects without the need for attribution.  If you are not a student in CSE 330, you may use the code from this wiki freely in your projects with attribution.  Either way, the code examples are provided &amp;quot;as is&amp;quot;, without any warranty, and Washington University holds no liability for problems arising from the use of the content in this wiki.&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2741</id>
		<title>CSE 330 Online Textbook - Table of Contents</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2741"/>
		<updated>2020-12-14T14:17:01Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;text-align:center;&amp;quot;&amp;gt;[[File:CSE330Banner.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
&amp;lt;div style=&amp;quot;column-width: 300px; -moz-column-width: 300px; -webkit-column-width: 300px;&amp;quot;&amp;gt;&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=1&lt;br /&gt;
|subject=HTML and CSS Fundamentals&lt;br /&gt;
|links=&lt;br /&gt;
* [[HTML and CSS]]&lt;br /&gt;
* [[HTML Forms]]&lt;br /&gt;
* [[Git]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=2&lt;br /&gt;
|subject=Linux, Apache, and PHP&lt;br /&gt;
|links=&lt;br /&gt;
* [[Linux]]&lt;br /&gt;
* [[Bash]]&lt;br /&gt;
* [[Amazon Web Services]]&lt;br /&gt;
* [[SSH]]&lt;br /&gt;
* [[Apache]]&lt;br /&gt;
* [[PHP]]&lt;br /&gt;
* [[Workflow]]&lt;br /&gt;
* [[Web Application Security, Part 1]]&lt;br /&gt;
* [[FAQ - Mod 2]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=3&lt;br /&gt;
|subject=SQL Databases&lt;br /&gt;
|links=&lt;br /&gt;
* [[Introduction to MySQL]] (installation)&lt;br /&gt;
* [[MySQL Schema and State]] (queries)&lt;br /&gt;
* [[PHP and MySQL]] (using MySQL from PHP)&lt;br /&gt;
* [[Web Application Security, Part 2]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=4&lt;br /&gt;
|subject=Scripting for Rapid Prototyping&lt;br /&gt;
|links=&lt;br /&gt;
* [[Python]]&lt;br /&gt;
* [[Regular Expressions]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=5&lt;br /&gt;
|subject=JavaScript and APIs&lt;br /&gt;
|links=&lt;br /&gt;
* [[JavaScript]]&lt;br /&gt;
* [[AJAX and JSON]]&lt;br /&gt;
* [[Web Application Security, Part 3]]&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=6&lt;br /&gt;
|subject=Real-Time Web Applications&lt;br /&gt;
|links=&lt;br /&gt;
* [[Node.JS]]&lt;br /&gt;
* [[Socket.IO]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=7&lt;br /&gt;
|subject=Creative Project&lt;br /&gt;
|links=&lt;br /&gt;
* [[Choosing a Platform]]&lt;br /&gt;
* [[Web Frameworks]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Use this wiki as a starting place for your projects in CSE 330.  However, web development is a large field, so it is impossible for us to document everything you might need to know.  Here are some other places you should look when you need to find something:&lt;br /&gt;
&lt;br /&gt;
* [https://developer.mozilla.org/en-US/ The Mozilla Development Network (MDN)], a community-driven source containing documentation and tutorials for Web technologies&lt;br /&gt;
* [http://reference.sitepoint.com/html SitePoint], which has a reference page as well as quality articles and tutorials&lt;br /&gt;
&lt;br /&gt;
If you can't find what you need in any of these places, try using your favorite search engine.  '''Be wary of sites that come up on search engines.'''  Many HTML reference sites document bad practices and dated techniques.  If you're unsure whether a reference site you find is legitimate, ask a TA.&lt;br /&gt;
&lt;br /&gt;
== Want to Learn More? ==&lt;br /&gt;
&lt;br /&gt;
The limited amount of time in CSE 330 means that we can cover only a subset of the wide range of possible topics in the field of rapid prototyping and web development.  Indeed, the exact topics covered in CSE 330 change from year to year.&lt;br /&gt;
&lt;br /&gt;
Feel free to browse some of the topics that have previously been covered in CSE 330: [[:Category:Former Content|CSE 330 Former Content]]&lt;br /&gt;
&lt;br /&gt;
You should also consider following blogs like [http://www.sitepoint.com/ SitePoint] to keep up-to-date on the latest developments in the field of web development.&lt;br /&gt;
&lt;br /&gt;
== Content License ==&lt;br /&gt;
&lt;br /&gt;
The content of this wiki is copyright (c) 2013, Washington University in St. Louis, Department of Computer Science.  All rights reserved.&lt;br /&gt;
&lt;br /&gt;
=== Modified BSD License ===&lt;br /&gt;
&lt;br /&gt;
Redistribution and use in source and binary forms, with or without modification, by a Third Party who has not completed and is not in the process of completing CSE 330, of the code examples or concepts on this wiki, are permitted, provided that the following conditions are met:&lt;br /&gt;
&lt;br /&gt;
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.&lt;br /&gt;
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.&lt;br /&gt;
* Neither the name of the Washington University School of Engineering and Applied Science nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.&lt;br /&gt;
&lt;br /&gt;
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS TO ALL PARTIES &amp;quot;AS IS&amp;quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
&lt;br /&gt;
=== What it Means ===&lt;br /&gt;
&lt;br /&gt;
If you are a student in CSE 330, you may use the code from this wiki freely in your projects without the need for attribution.  If you are not a student in CSE 330, you may use the code from this wiki freely in your projects with attribution.  Either way, the code examples are provided &amp;quot;as is&amp;quot;, without any warranty, and Washington University holds no liability for problems arising from the use of the content in this wiki.&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2740</id>
		<title>CSE 330 Online Textbook - Table of Contents</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2740"/>
		<updated>2020-12-14T14:16:46Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;text-align:center;&amp;quot;&amp;gt;[[File:CSE330Banner.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
&amp;lt;div style=&amp;quot;column-width: 300px; -moz-column-width: 300px; -webkit-column-width: 300px;&amp;quot;&amp;gt;&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=1&lt;br /&gt;
|subject=HTML and CSS Fundamentals&lt;br /&gt;
|links=&lt;br /&gt;
* [[HTML and CSS]]&lt;br /&gt;
* [[HTML Forms]]&lt;br /&gt;
* [[Git]]&lt;br /&gt;
* [[FAQ - Mod 1]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=2&lt;br /&gt;
|subject=Linux, Apache, and PHP&lt;br /&gt;
|links=&lt;br /&gt;
* [[Linux]]&lt;br /&gt;
* [[Bash]]&lt;br /&gt;
* [[Amazon Web Services]]&lt;br /&gt;
* [[SSH]]&lt;br /&gt;
* [[Apache]]&lt;br /&gt;
* [[PHP]]&lt;br /&gt;
* [[Workflow]]&lt;br /&gt;
* [[Web Application Security, Part 1]]&lt;br /&gt;
* [[FAQ - Mod 2]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=3&lt;br /&gt;
|subject=SQL Databases&lt;br /&gt;
|links=&lt;br /&gt;
* [[Introduction to MySQL]] (installation)&lt;br /&gt;
* [[MySQL Schema and State]] (queries)&lt;br /&gt;
* [[PHP and MySQL]] (using MySQL from PHP)&lt;br /&gt;
* [[Web Application Security, Part 2]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=4&lt;br /&gt;
|subject=Scripting for Rapid Prototyping&lt;br /&gt;
|links=&lt;br /&gt;
* [[Python]]&lt;br /&gt;
* [[Regular Expressions]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=5&lt;br /&gt;
|subject=JavaScript and APIs&lt;br /&gt;
|links=&lt;br /&gt;
* [[JavaScript]]&lt;br /&gt;
* [[AJAX and JSON]]&lt;br /&gt;
* [[Web Application Security, Part 3]]&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=6&lt;br /&gt;
|subject=Real-Time Web Applications&lt;br /&gt;
|links=&lt;br /&gt;
* [[Node.JS]]&lt;br /&gt;
* [[Socket.IO]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=7&lt;br /&gt;
|subject=Creative Project&lt;br /&gt;
|links=&lt;br /&gt;
* [[Choosing a Platform]]&lt;br /&gt;
* [[Web Frameworks]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Use this wiki as a starting place for your projects in CSE 330.  However, web development is a large field, so it is impossible for us to document everything you might need to know.  Here are some other places you should look when you need to find something:&lt;br /&gt;
&lt;br /&gt;
* [https://developer.mozilla.org/en-US/ The Mozilla Development Network (MDN)], a community-driven source containing documentation and tutorials for Web technologies&lt;br /&gt;
* [http://reference.sitepoint.com/html SitePoint], which has a reference page as well as quality articles and tutorials&lt;br /&gt;
&lt;br /&gt;
If you can't find what you need in any of these places, try using your favorite search engine.  '''Be wary of sites that come up on search engines.'''  Many HTML reference sites document bad practices and dated techniques.  If you're unsure whether a reference site you find is legitimate, ask a TA.&lt;br /&gt;
&lt;br /&gt;
== Want to Learn More? ==&lt;br /&gt;
&lt;br /&gt;
The limited amount of time in CSE 330 means that we can cover only a subset of the wide range of possible topics in the field of rapid prototyping and web development.  Indeed, the exact topics covered in CSE 330 change from year to year.&lt;br /&gt;
&lt;br /&gt;
Feel free to browse some of the topics that have previously been covered in CSE 330: [[:Category:Former Content|CSE 330 Former Content]]&lt;br /&gt;
&lt;br /&gt;
You should also consider following blogs like [http://www.sitepoint.com/ SitePoint] to keep up-to-date on the latest developments in the field of web development.&lt;br /&gt;
&lt;br /&gt;
== Content License ==&lt;br /&gt;
&lt;br /&gt;
The content of this wiki is copyright (c) 2013, Washington University in St. Louis, Department of Computer Science.  All rights reserved.&lt;br /&gt;
&lt;br /&gt;
=== Modified BSD License ===&lt;br /&gt;
&lt;br /&gt;
Redistribution and use in source and binary forms, with or without modification, by a Third Party who has not completed and is not in the process of completing CSE 330, of the code examples or concepts on this wiki, are permitted, provided that the following conditions are met:&lt;br /&gt;
&lt;br /&gt;
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.&lt;br /&gt;
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.&lt;br /&gt;
* Neither the name of the Washington University School of Engineering and Applied Science nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.&lt;br /&gt;
&lt;br /&gt;
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS TO ALL PARTIES &amp;quot;AS IS&amp;quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
&lt;br /&gt;
=== What it Means ===&lt;br /&gt;
&lt;br /&gt;
If you are a student in CSE 330, you may use the code from this wiki freely in your projects without the need for attribution.  If you are not a student in CSE 330, you may use the code from this wiki freely in your projects with attribution.  Either way, the code examples are provided &amp;quot;as is&amp;quot;, without any warranty, and Washington University holds no liability for problems arising from the use of the content in this wiki.&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2739</id>
		<title>CSE 330 Online Textbook - Table of Contents</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2739"/>
		<updated>2020-12-14T14:16:20Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;text-align:center;&amp;quot;&amp;gt;[[File:CSE330Banner.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
&amp;lt;div style=&amp;quot;column-width: 300px; -moz-column-width: 300px; -webkit-column-width: 300px;&amp;quot;&amp;gt;&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=1&lt;br /&gt;
|subject=HTML and CSS Fundamentals&lt;br /&gt;
|links=&lt;br /&gt;
* [[HTML and CSS]]&lt;br /&gt;
* [[HTML Forms]]&lt;br /&gt;
* [[Git]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=2&lt;br /&gt;
|subject=Linux, Apache, and PHP&lt;br /&gt;
|links=&lt;br /&gt;
* [[Linux]]&lt;br /&gt;
* [[Bash]]&lt;br /&gt;
* [[Amazon Web Services]]&lt;br /&gt;
* [[SSH]]&lt;br /&gt;
* [[Apache]]&lt;br /&gt;
* [[PHP]]&lt;br /&gt;
* [[Workflow]]&lt;br /&gt;
* [[Web Application Security, Part 1]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=3&lt;br /&gt;
|subject=SQL Databases&lt;br /&gt;
|links=&lt;br /&gt;
* [[Introduction to MySQL]] (installation)&lt;br /&gt;
* [[MySQL Schema and State]] (queries)&lt;br /&gt;
* [[PHP and MySQL]] (using MySQL from PHP)&lt;br /&gt;
* [[Web Application Security, Part 2]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=4&lt;br /&gt;
|subject=Scripting for Rapid Prototyping&lt;br /&gt;
|links=&lt;br /&gt;
* [[Python]]&lt;br /&gt;
* [[Regular Expressions]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=5&lt;br /&gt;
|subject=JavaScript and APIs&lt;br /&gt;
|links=&lt;br /&gt;
* [[JavaScript]]&lt;br /&gt;
* [[AJAX and JSON]]&lt;br /&gt;
* [[Web Application Security, Part 3]]&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=6&lt;br /&gt;
|subject=Real-Time Web Applications&lt;br /&gt;
|links=&lt;br /&gt;
* [[Node.JS]]&lt;br /&gt;
* [[Socket.IO]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=7&lt;br /&gt;
|subject=Creative Project&lt;br /&gt;
|links=&lt;br /&gt;
* [[Choosing a Platform]]&lt;br /&gt;
* [[Web Frameworks]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Use this wiki as a starting place for your projects in CSE 330.  However, web development is a large field, so it is impossible for us to document everything you might need to know.  Here are some other places you should look when you need to find something:&lt;br /&gt;
&lt;br /&gt;
* [https://developer.mozilla.org/en-US/ The Mozilla Development Network (MDN)], a community-driven source containing documentation and tutorials for Web technologies&lt;br /&gt;
* [http://reference.sitepoint.com/html SitePoint], which has a reference page as well as quality articles and tutorials&lt;br /&gt;
&lt;br /&gt;
If you can't find what you need in any of these places, try using your favorite search engine.  '''Be wary of sites that come up on search engines.'''  Many HTML reference sites document bad practices and dated techniques.  If you're unsure whether a reference site you find is legitimate, ask a TA.&lt;br /&gt;
&lt;br /&gt;
== Want to Learn More? ==&lt;br /&gt;
&lt;br /&gt;
The limited amount of time in CSE 330 means that we can cover only a subset of the wide range of possible topics in the field of rapid prototyping and web development.  Indeed, the exact topics covered in CSE 330 change from year to year.&lt;br /&gt;
&lt;br /&gt;
Feel free to browse some of the topics that have previously been covered in CSE 330: [[:Category:Former Content|CSE 330 Former Content]]&lt;br /&gt;
&lt;br /&gt;
You should also consider following blogs like [http://www.sitepoint.com/ SitePoint] to keep up-to-date on the latest developments in the field of web development.&lt;br /&gt;
&lt;br /&gt;
== Content License ==&lt;br /&gt;
&lt;br /&gt;
The content of this wiki is copyright (c) 2013, Washington University in St. Louis, Department of Computer Science.  All rights reserved.&lt;br /&gt;
&lt;br /&gt;
=== Modified BSD License ===&lt;br /&gt;
&lt;br /&gt;
Redistribution and use in source and binary forms, with or without modification, by a Third Party who has not completed and is not in the process of completing CSE 330, of the code examples or concepts on this wiki, are permitted, provided that the following conditions are met:&lt;br /&gt;
&lt;br /&gt;
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.&lt;br /&gt;
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.&lt;br /&gt;
* Neither the name of the Washington University School of Engineering and Applied Science nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.&lt;br /&gt;
&lt;br /&gt;
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS TO ALL PARTIES &amp;quot;AS IS&amp;quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
&lt;br /&gt;
=== What it Means ===&lt;br /&gt;
&lt;br /&gt;
If you are a student in CSE 330, you may use the code from this wiki freely in your projects without the need for attribution.  If you are not a student in CSE 330, you may use the code from this wiki freely in your projects with attribution.  Either way, the code examples are provided &amp;quot;as is&amp;quot;, without any warranty, and Washington University holds no liability for problems arising from the use of the content in this wiki.&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ&amp;diff=2738</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ&amp;diff=2738"/>
		<updated>2020-12-14T14:15:49Z</updated>

		<summary type="html">&lt;p&gt;Mitch: /* HTML Naming Conventions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 1. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== HTML Validator ==&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting a character encoding error in the HTML validator? ===&lt;br /&gt;
&lt;br /&gt;
Students frequently see the following error message when putting their code through the W3C Validator.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
The character encoding was not declared. Proceed using Windows-1252&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When writing html, you need to include a method of [http://net-informations.com/q/faq/encoding.html#:~:text=A%20character%20encoding%20tells%20the,grouped%20into%20a%20character%20set. character encoding] so the computer knows exactly how you want your data to be interpreted. There are multiple character encoding schemes, but perhaps the most common for modern web and application development is Unicode Transformation Format (UTF) 8.&lt;br /&gt;
This error can be easily solved by including the following line in your HTML header:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== One vs Multiple HTML Files ==&lt;br /&gt;
&lt;br /&gt;
=== Should I include both parts of the assignment in the same HTML file? ===&lt;br /&gt;
&lt;br /&gt;
Students often wonder whether they should include both the birthday card and search engine in the same HTML file or separate them into different files. While there is no grading requirement for this and they can be included in the same file, we recommend putting them in different files to get you more comfortable with the process of creating HTML files from scratch. In the end, though, this is up to you.&lt;br /&gt;
&lt;br /&gt;
== HTML Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
=== Do my HTML files need to have specific names? ===&lt;br /&gt;
&lt;br /&gt;
A common question is whether or not there are naming questions for HTML files, or whether or not they need to be named something specific for grading purposes. Unless we specify exactly what we want the file to be (a rare occurrence), you can use your discretion as to what a good file name would be. Needless to say, it should at least be related to the content of the file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 1]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ&amp;diff=2737</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ&amp;diff=2737"/>
		<updated>2020-12-14T14:15:14Z</updated>

		<summary type="html">&lt;p&gt;Mitch: /* HTML Validator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 1. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== HTML Validator ==&lt;br /&gt;
&lt;br /&gt;
=== Why am I getting a character encoding error in the HTML validator? ===&lt;br /&gt;
&lt;br /&gt;
Students frequently see the following error message when putting their code through the W3C Validator.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
The character encoding was not declared. Proceed using Windows-1252&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When writing html, you need to include a method of [http://net-informations.com/q/faq/encoding.html#:~:text=A%20character%20encoding%20tells%20the,grouped%20into%20a%20character%20set. character encoding] so the computer knows exactly how you want your data to be interpreted. There are multiple character encoding schemes, but perhaps the most common for modern web and application development is Unicode Transformation Format (UTF) 8.&lt;br /&gt;
This error can be easily solved by including the following line in your HTML header:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== One vs Multiple HTML Files ==&lt;br /&gt;
&lt;br /&gt;
=== Should I include both parts of the assignment in the same HTML file? ===&lt;br /&gt;
&lt;br /&gt;
Students often wonder whether they should include both the birthday card and search engine in the same HTML file or separate them into different files. While there is no grading requirement for this and they can be included in the same file, we recommend putting them in different files to get you more comfortable with the process of creating HTML files from scratch. In the end, though, this is up to you.&lt;br /&gt;
&lt;br /&gt;
== HTML Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
A common question is whether or not there are naming questions for HTML files, or whether or not they need to be named something specific for grading purposes. Unless we specify exactly what we want the file to be (a rare occurrence), you can use your discretion as to what a good file name would be. Needless to say, it should at least be related to the content of the file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 1]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ&amp;diff=2736</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ&amp;diff=2736"/>
		<updated>2020-12-14T14:14:32Z</updated>

		<summary type="html">&lt;p&gt;Mitch: /* One vs Multiple HTML Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 1. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== HTML Validator ==&lt;br /&gt;
&lt;br /&gt;
Students frequently see the following error message when putting their code through the W3C Validator.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
The character encoding was not declared. Proceed using Windows-1252&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When writing html, you need to include a method of [http://net-informations.com/q/faq/encoding.html#:~:text=A%20character%20encoding%20tells%20the,grouped%20into%20a%20character%20set. character encoding] so the computer knows exactly how you want your data to be interpreted. There are multiple character encoding schemes, but perhaps the most common for modern web and application development is Unicode Transformation Format (UTF) 8.&lt;br /&gt;
This error can be easily solved by including the following line in your HTML header:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== One vs Multiple HTML Files ==&lt;br /&gt;
&lt;br /&gt;
=== Should I include both parts of the assignment in the same HTML file? ===&lt;br /&gt;
&lt;br /&gt;
Students often wonder whether they should include both the birthday card and search engine in the same HTML file or separate them into different files. While there is no grading requirement for this and they can be included in the same file, we recommend putting them in different files to get you more comfortable with the process of creating HTML files from scratch. In the end, though, this is up to you.&lt;br /&gt;
&lt;br /&gt;
== HTML Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
A common question is whether or not there are naming questions for HTML files, or whether or not they need to be named something specific for grading purposes. Unless we specify exactly what we want the file to be (a rare occurrence), you can use your discretion as to what a good file name would be. Needless to say, it should at least be related to the content of the file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 1]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ&amp;diff=2735</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ&amp;diff=2735"/>
		<updated>2020-12-14T14:13:25Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 1. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== HTML Validator ==&lt;br /&gt;
&lt;br /&gt;
Students frequently see the following error message when putting their code through the W3C Validator.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
The character encoding was not declared. Proceed using Windows-1252&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When writing html, you need to include a method of [http://net-informations.com/q/faq/encoding.html#:~:text=A%20character%20encoding%20tells%20the,grouped%20into%20a%20character%20set. character encoding] so the computer knows exactly how you want your data to be interpreted. There are multiple character encoding schemes, but perhaps the most common for modern web and application development is Unicode Transformation Format (UTF) 8.&lt;br /&gt;
This error can be easily solved by including the following line in your HTML header:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== One vs Multiple HTML Files ==&lt;br /&gt;
&lt;br /&gt;
Students often wonder whether they should include both the birthday card and search engine in the same HTML file or separate them into different files. While there is no grading requirement for this and they can be included in the same file, we recommend putting them in different files to get you more comfortable with the process of creating HTML files from scratch. In the end, though, this is up to you.&lt;br /&gt;
&lt;br /&gt;
== HTML Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
A common question is whether or not there are naming questions for HTML files, or whether or not they need to be named something specific for grading purposes. Unless we specify exactly what we want the file to be (a rare occurrence), you can use your discretion as to what a good file name would be. Needless to say, it should at least be related to the content of the file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 1]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ&amp;diff=2734</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ&amp;diff=2734"/>
		<updated>2020-12-14T13:58:05Z</updated>

		<summary type="html">&lt;p&gt;Mitch: /* Second Question */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 1. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== HTML Validator ==&lt;br /&gt;
&lt;br /&gt;
Students frequently see the following error message when putting their code through the W3C Validator.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
The character encoding was not declared. Proceed using Windows-1252&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When writing html, you need to include a method of [http://net-informations.com/q/faq/encoding.html#:~:text=A%20character%20encoding%20tells%20the,grouped%20into%20a%20character%20set. character encoding] so the computer knows exactly how you want your data to be interpreted. There are multiple character encoding schemes, but perhaps the most common for modern web and application development is Unicode Transformation Format (UTF) 8.&lt;br /&gt;
This error can be easily solved by including the following line in your HTML header:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== One vs Multiple HTML Files ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 1]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ&amp;diff=2733</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ&amp;diff=2733"/>
		<updated>2020-12-14T13:57:15Z</updated>

		<summary type="html">&lt;p&gt;Mitch: /* HTML Validator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 1. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== HTML Validator ==&lt;br /&gt;
&lt;br /&gt;
Students frequently see the following error message when putting their code through the W3C Validator.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
The character encoding was not declared. Proceed using Windows-1252&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
When writing html, you need to include a method of [http://net-informations.com/q/faq/encoding.html#:~:text=A%20character%20encoding%20tells%20the,grouped%20into%20a%20character%20set. character encoding] so the computer knows exactly how you want your data to be interpreted. There are multiple character encoding schemes, but perhaps the most common for modern web and application development is Unicode Transformation Format (UTF) 8.&lt;br /&gt;
This error can be easily solved by including the following line in your HTML header:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Second Question ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 1]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ&amp;diff=2732</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=FAQ&amp;diff=2732"/>
		<updated>2020-12-07T15:27:48Z</updated>

		<summary type="html">&lt;p&gt;Mitch: Created page with &amp;quot;Welcome to the frequently asked questions page for Module 1. As many common questions can come up on Piazza, some of those questions are consolidated here.  == HTML Validator...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the frequently asked questions page for Module 1. As many common questions can come up on Piazza, some of those questions are consolidated here.&lt;br /&gt;
&lt;br /&gt;
== HTML Validator ==&lt;br /&gt;
&lt;br /&gt;
Students frequently see the following error message when putting their code through the W3C Validator.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;gt;&lt;br /&gt;
The character encoding was not declared. Proceed using Windows-1252&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
''Brief explanation of character encoding.''&lt;br /&gt;
This error can be easily solved by including the following line in your HTML header:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html4strict&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;meta charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Second Question ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Module 1]]&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
	<entry>
		<id>http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2731</id>
		<title>CSE 330 Online Textbook - Table of Contents</title>
		<link rel="alternate" type="text/html" href="http://classes.engineering.wustl.edu/cse330/index.php?title=CSE_330_Online_Textbook_-_Table_of_Contents&amp;diff=2731"/>
		<updated>2020-12-07T15:11:02Z</updated>

		<summary type="html">&lt;p&gt;Mitch: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;text-align:center;&amp;quot;&amp;gt;[[File:CSE330Banner.png]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
&amp;lt;div style=&amp;quot;column-width: 300px; -moz-column-width: 300px; -webkit-column-width: 300px;&amp;quot;&amp;gt;&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=1&lt;br /&gt;
|subject=HTML and CSS Fundamentals&lt;br /&gt;
|links=&lt;br /&gt;
* [[HTML and CSS]]&lt;br /&gt;
* [[HTML Forms]]&lt;br /&gt;
* [[Git]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=2&lt;br /&gt;
|subject=Linux, Apache, and PHP&lt;br /&gt;
|links=&lt;br /&gt;
* [[Linux]]&lt;br /&gt;
* [[Bash]]&lt;br /&gt;
* [[Amazon Web Services]]&lt;br /&gt;
* [[SSH]]&lt;br /&gt;
* [[Apache]]&lt;br /&gt;
* [[PHP]]&lt;br /&gt;
* [[Workflow]]&lt;br /&gt;
* [[Web Application Security, Part 1]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=3&lt;br /&gt;
|subject=SQL Databases&lt;br /&gt;
|links=&lt;br /&gt;
* [[Introduction to MySQL]] (installation)&lt;br /&gt;
* [[MySQL Schema and State]] (queries)&lt;br /&gt;
* [[PHP and MySQL]] (using MySQL from PHP)&lt;br /&gt;
* [[Web Application Security, Part 2]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=4&lt;br /&gt;
|subject=Scripting for Rapid Prototyping&lt;br /&gt;
|links=&lt;br /&gt;
* [[Python]]&lt;br /&gt;
* [[Regular Expressions]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=5&lt;br /&gt;
|subject=JavaScript and APIs&lt;br /&gt;
|links=&lt;br /&gt;
* [[JavaScript]]&lt;br /&gt;
* [[AJAX and JSON]]&lt;br /&gt;
* [[Web Application Security, Part 3]]&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=6&lt;br /&gt;
|subject=Real-Time Web Applications&lt;br /&gt;
|links=&lt;br /&gt;
* [[Node.JS]]&lt;br /&gt;
* [[Socket.IO]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{FrontPageModule&lt;br /&gt;
|num=7&lt;br /&gt;
|subject=Creative Project&lt;br /&gt;
|links=&lt;br /&gt;
* [[Choosing a Platform]]&lt;br /&gt;
* [[Web Frameworks]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
Use this wiki as a starting place for your projects in CSE 330.  However, web development is a large field, so it is impossible for us to document everything you might need to know.  Here are some other places you should look when you need to find something:&lt;br /&gt;
&lt;br /&gt;
* [https://developer.mozilla.org/en-US/ The Mozilla Development Network (MDN)], a community-driven source containing documentation and tutorials for Web technologies&lt;br /&gt;
* [http://reference.sitepoint.com/html SitePoint], which has a reference page as well as quality articles and tutorials&lt;br /&gt;
&lt;br /&gt;
If you can't find what you need in any of these places, try using your favorite search engine.  '''Be wary of sites that come up on search engines.'''  Many HTML reference sites document bad practices and dated techniques.  If you're unsure whether a reference site you find is legitimate, ask a TA.&lt;br /&gt;
&lt;br /&gt;
== Want to Learn More? ==&lt;br /&gt;
&lt;br /&gt;
The limited amount of time in CSE 330 means that we can cover only a subset of the wide range of possible topics in the field of rapid prototyping and web development.  Indeed, the exact topics covered in CSE 330 change from year to year.&lt;br /&gt;
&lt;br /&gt;
Feel free to browse some of the topics that have previously been covered in CSE 330: [[:Category:Former Content|CSE 330 Former Content]]&lt;br /&gt;
&lt;br /&gt;
You should also consider following blogs like [http://www.sitepoint.com/ SitePoint] to keep up-to-date on the latest developments in the field of web development.&lt;br /&gt;
&lt;br /&gt;
== Content License ==&lt;br /&gt;
&lt;br /&gt;
The content of this wiki is copyright (c) 2013, Washington University in St. Louis, Department of Computer Science.  All rights reserved.&lt;br /&gt;
&lt;br /&gt;
=== Modified BSD License ===&lt;br /&gt;
&lt;br /&gt;
Redistribution and use in source and binary forms, with or without modification, by a Third Party who has not completed and is not in the process of completing CSE 330, of the code examples or concepts on this wiki, are permitted, provided that the following conditions are met:&lt;br /&gt;
&lt;br /&gt;
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.&lt;br /&gt;
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.&lt;br /&gt;
* Neither the name of the Washington University School of Engineering and Applied Science nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.&lt;br /&gt;
&lt;br /&gt;
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS TO ALL PARTIES &amp;quot;AS IS&amp;quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
&lt;br /&gt;
=== What it Means ===&lt;br /&gt;
&lt;br /&gt;
If you are a student in CSE 330, you may use the code from this wiki freely in your projects without the need for attribution.  If you are not a student in CSE 330, you may use the code from this wiki freely in your projects with attribution.  Either way, the code examples are provided &amp;quot;as is&amp;quot;, without any warranty, and Washington University holds no liability for problems arising from the use of the content in this wiki.&lt;/div&gt;</summary>
		<author><name>Mitch</name></author>
		
	</entry>
</feed>