<commit_before><?php
require_once("../assn_util.php");
$json = loadPeer("peer.json");
?>
<!DOCTYPE html>
<html>
<head>
<title>Assignment: <?= $json->title ?></title>
<style>
li { padding: 5px; }
</style>
</head>
<body style="margin-left:5%; margin-bottom: 60px; margin-right: 5%; font-family: sans-serif;">
<h1>Assignment: <?= $json->title ?></h1>
<p>
<?= $json->description ?>
</p>
<p>
<ul>
<li>Your name must be in the title bar like '<NAME> Request/Response'</li>
<li>There should be an &lt;h1&gt; tag with your name and text like '<NAME> Request/Response'</li>
<li>You should use a &lt;pre&gt; tag to create ASCII art of the first letter of your 
name four spaces in from the left margin</li>
<li>Your code should use PHP to compute the SHA256 of your name and print it 
out like the sample application.  You must compute this in PHP.  The PHP code 
to achieve this for '<NAME>' is: 
<pre> 
print hash('sha256', '<NAME>'); 
</pre> </li>
<li>Your name must be in a JavaScript alert() box with text like 
'<NAME> in an alert box' </li>
<li>Your name must be in the console log with text like '<NAME> in the log' </li></li>
<li>Save <a href="fail.txt" target="_blank">this file</a> as <b>fail.php</b> in the 
application folder.  Do not alter this file - do <b>not</b> fix 
the mistake in the code 
in this file.  The goal is to trigger an error to verify that 
we see errors in the browser.</li>
<li>Save <a href="check.txt" target="_blank">this file</a> as <b>check.php</b> in the 
application folder.</li>
</ul>
You must run these files in your PHP server.  Make a folder under your
<strong>DOCUMENT_ROOT</strong> and then make sure your files are in that file.
Sample DOCUMENT_ROOT values for some servers:
<pre>
DOCUMENT_ROOT: c:\xampp\htdocs
DOCUMENT_ROOT: /Applications/MAMP/htdocs
</pre>
You can check the DOCUMENT_ROOT value for your server by scrolling 
down in your PHPInfo output.  You may have changed a setting in your PHP 
server to move the DOCUMENT_ROOT and that is OK as well.
</p>
<p><commit_msg>More improvements<commit_after><?php
require_once("../assn_util.php");
$json = loadPeer("peer.json");
?>
<!DOCTYPE html>
<html>
<head>
<title>Assignment: <?= $json->title ?></title>
<style>
li { padding: 5px; }
</style>
</head>
<body style="margin-left:5%; margin-bottom: 60px; margin-right: 5%; font-family: sans-serif;">
<h1>Assignment: <?= $json->title ?></h1>
<p>
<?= $json->description ?>
</p>
<p>
<ul>
<li>Your name must be in the title bar like 'Charles Severance Request/Response'</li>
<li>There should be an &lt;h1&gt; tag with your name and text like 'Charles Severance Request/Response'</li>
<li>You should use a &lt;pre&gt; tag to create ASCII art of the first letter of your 
name four spaces in from the left margin</li>
<li>Your code should use PHP to compute the SHA256 of your name and print it 
out like the sample application.  You must compute this in your index.php file.  The PHP code 
to achieve this for 'Charles Severance' is: 
<pre> 
print hash('sha256', 'Charles Severance'); 
</pre> </li>
<li>Your name must be in a JavaScript alert() box with text like 
'<NAME> in an alert box' </li>
<li>Your name must be in the console log with text like '<NAME> in the log' </li></li>
<li>Save <a href="fail.txt" target="_blank">this file</a> as <b>fail.php</b> in the 
application folder.  Do not alter this file - do <b>not</b> fix 
the mistake in the code 
in this file.  The goal is to trigger an error to verify that 
we see errors in the browser.</li>
<li>Save <a href="check.txt" target="_blank">this file</a> as <b>check.php</b> in the 
application folder.</li>
</ul>
You must run these files in your PHP server.  Make a folder under your
<strong>DOCUMENT_ROOT</strong> and then make sure your files are in that file.
Sample DOCUMENT_ROOT values for some servers:
<pre>
DOCUMENT_ROOT: c:\xampp\htdocs
DOCUMENT_ROOT: /Applications/MAMP/htdocs
</pre>
You can check the DOCUMENT_ROOT value for your server by scrolling 
down in your PHPInfo output.  You may have changed a setting in your PHP 
server to move the DOCUMENT_ROOT and that is OK as well.
</p>
<p>
{'fraction_non_alphanumeric': 0.134033203125, 'fraction_numerical': 0.0068359375, 'mean_word_length': 4.41215323645971, 'pattern_counts': {'":': 0, '<': 121, '<?xml version=': 0, '>': 127, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5902399', 'n_tokens_mistral': 1392, 'n_tokens_neox': 1351, 'n_words': 580}