diff --git a/.gitignore b/.gitignore index a8ecf02..4d8a997 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ >>>>>>> Stashed changes /Assignments/JavaScript/lab15js_CalebFontenot/nbproject/private/ /Assignments/JavaScript/MP11_CalebFontenot/nbproject/private/ +/Assignments/JavaScript/lab16js_CalebFontenot/nbproject/private/ diff --git a/Assignments/JavaScript/lab16js_CalebFontenot/.bowerrc b/Assignments/JavaScript/lab16js_CalebFontenot/.bowerrc new file mode 100644 index 0000000..0ba26f2 --- /dev/null +++ b/Assignments/JavaScript/lab16js_CalebFontenot/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory": "public_html/bower_components" +} diff --git a/Assignments/JavaScript/lab16js_CalebFontenot/7-1.pdf b/Assignments/JavaScript/lab16js_CalebFontenot/7-1.pdf new file mode 100644 index 0000000..35f748b Binary files /dev/null and b/Assignments/JavaScript/lab16js_CalebFontenot/7-1.pdf differ diff --git a/Assignments/JavaScript/lab16js_CalebFontenot/Gruntfile.js b/Assignments/JavaScript/lab16js_CalebFontenot/Gruntfile.js new file mode 100644 index 0000000..496183b --- /dev/null +++ b/Assignments/JavaScript/lab16js_CalebFontenot/Gruntfile.js @@ -0,0 +1,9 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/ClientSide/Gruntfile.js to edit this template + */ +module.exports = function (grunt) { + // Project configuration. + grunt.initConfig({ + }); +}; diff --git a/Assignments/JavaScript/lab16js_CalebFontenot/bower.json b/Assignments/JavaScript/lab16js_CalebFontenot/bower.json new file mode 100644 index 0000000..fc1a8e9 --- /dev/null +++ b/Assignments/JavaScript/lab16js_CalebFontenot/bower.json @@ -0,0 +1,13 @@ +{ + "name": "lab16js_CalebFontenot", + "version": "1.0.0", + "main": "path/to/main.css", + "ignore": [ + ".jshintrc", + "**/*.txt" + ], + "dependencies": { + }, + "devDependencies": { + } +} diff --git a/Assignments/JavaScript/lab16js_CalebFontenot/gulpfile.js b/Assignments/JavaScript/lab16js_CalebFontenot/gulpfile.js new file mode 100644 index 0000000..eccfb02 --- /dev/null +++ b/Assignments/JavaScript/lab16js_CalebFontenot/gulpfile.js @@ -0,0 +1,10 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/ClientSide/gulpfile.js to edit this template + */ + +var gulp = require('gulp'); + +gulp.task('default', function () { + // place code for your default task here +}); diff --git a/Assignments/JavaScript/lab16js_CalebFontenot/nbproject/project.properties b/Assignments/JavaScript/lab16js_CalebFontenot/nbproject/project.properties new file mode 100644 index 0000000..1a6f722 --- /dev/null +++ b/Assignments/JavaScript/lab16js_CalebFontenot/nbproject/project.properties @@ -0,0 +1,5 @@ +file.reference.lab16js_CalebFontenot-public_html=public_html +file.reference.lab16js_CalebFontenot-test=test +files.encoding=UTF-8 +site.root.folder=${file.reference.lab16js_CalebFontenot-public_html} +test.folder=${file.reference.lab16js_CalebFontenot-test} diff --git a/Assignments/JavaScript/lab16js_CalebFontenot/nbproject/project.xml b/Assignments/JavaScript/lab16js_CalebFontenot/nbproject/project.xml new file mode 100644 index 0000000..29d5705 --- /dev/null +++ b/Assignments/JavaScript/lab16js_CalebFontenot/nbproject/project.xml @@ -0,0 +1,9 @@ + + + org.netbeans.modules.web.clientproject + + + lab16js_CalebFontenot + + + diff --git a/Assignments/JavaScript/lab16js_CalebFontenot/package.json b/Assignments/JavaScript/lab16js_CalebFontenot/package.json new file mode 100644 index 0000000..1247410 --- /dev/null +++ b/Assignments/JavaScript/lab16js_CalebFontenot/package.json @@ -0,0 +1,8 @@ +{ + "name": "lab16js_CalebFontenot", + "version": "1.0.0", + "keywords": ["util", "functional", "server", "client", "browser"], + "author": "caleb", + "contributors": [], + "dependencies": {} +} diff --git a/Assignments/JavaScript/lab16js_CalebFontenot/public_html/index.html b/Assignments/JavaScript/lab16js_CalebFontenot/public_html/index.html new file mode 100644 index 0000000..10386ef --- /dev/null +++ b/Assignments/JavaScript/lab16js_CalebFontenot/public_html/index.html @@ -0,0 +1,62 @@ + + + + + Point Finder + + + + + +
+
+ + +
+
+ + + diff --git a/Chapter ZIPs/JavaScript/ch7/.DS_Store b/Chapter ZIPs/JavaScript/ch7/.DS_Store new file mode 100644 index 0000000..48d62e0 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/.DS_Store differ diff --git a/Chapter ZIPs/JavaScript/ch7/carla.css b/Chapter ZIPs/JavaScript/ch7/carla.css new file mode 100755 index 0000000..ff46595 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/carla.css @@ -0,0 +1,146 @@ +body { + background-color: #FFFFFF; + background-image: url(background.gif); + color: #0000FF; + font-family: Geneva, Arial, Helvetica, sans-serif; + font-size: 14px; +} +#container { margin-left: auto; + margin-right: auto; + width:85%; + min-width:700px; + } + + +#logo { + text-align:center; + margin: 0; + font-family: Verdana, Arial, Helvetica, sans-serif; + padding-top: 30px; + padding-bottom: 20px; + +} +#nav { + float: left; + width: 200px; + padding-top: 10px; + text-align:left; + color: #FF0000; + font-size: 14px; +} +#nav a { + text-decoration:none; + margin: 15px; + display: block; + color: #FF0000; + font-size: 14px; + font-weight: bold; +} +#content { + margin-left: 150px; + padding: 30px; + overflow:auto; + border: medium groove #0000FF; + line-height: 135%; + +} + +.floatright {padding-left:20px; + float:right; + } +.floatleft { + float:left; + padding: 2px 30px 20px; +} +#footer { + font-size: 16px; + font-style: normal; + text-align: justify; + border-top: thin none; + padding-top: 20px; + padding-bottom: 20px; + color: #FF0000; + font-family: Georgia, "Times New Roman", Times, serif; + font-weight: bold; +} + +h2 { text-transform: uppercase; + color: #0000FF; + font-size: 36px; + border-bottom: 1px none; + margin-right: 20px; +} +h3 { + color: #0000FF; + font-size: 1em; + border-bottom: thin none; + margin-right: auto; + text-align: left; + padding-top: 20px; + padding-right: 150px; + padding-bottom: 20px; + padding-left: 150px; + line-height: 130%; + border-top-style: none; + border-right-style: none; + border-left-style: none; +} +.details { padding-left:20%; + padding-right:20%; +} + + +img {border:0 none; } + + +.content { + margin: 20px; + padding: 20px; + height: 3700px; + width: 500px; +} +a { + color: #FF0000; + text-decoration: none; + margin: 15px; + color: #FF0000; + font-size: 14px; + font-weight: bold; +} +a:hover { + color: #FFFF00; + background-color: #0000FF; +} +h4 { + line-height: 150%; + margin-right: 20%; + margin-left: 15%; + text-align: center; +} +h1 { + font-family: Geneva, Arial, Helvetica, sans-serif; + font-size: 36pt; + text-align: center; + margin-right: 15%; + margin-left: 20%; +} +p { + font-family: Georgia, "Times New Roman", Times, serif; + font-size: 16px; + line-height: 130%; + font-weight: bold; + color: #0000FF; +} +.flt_img { + float: none; + padding-top: 3px; + padding-right: 20px; + padding-bottom: 3px; + padding-left: 20px; +} +specialh4 { + line-height: 150%; + margin-right: 20%; + margin-left: 15%; + text-align: center; +} diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_1.html b/Chapter ZIPs/JavaScript/ch7/ex_7_1.html new file mode 100755 index 0000000..66a5f2d --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_1.html @@ -0,0 +1,23 @@ + + +Example 7.1 + + + + + + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_10.html b/Chapter ZIPs/JavaScript/ch7/ex_7_10.html new file mode 100755 index 0000000..59ee0a2 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_10.html @@ -0,0 +1,29 @@ + + +Example 7.10 + + +

+
+

The value of numMice is:  

+

The value of x, in the changeValue() function is:  

+

The value of numMice after calling the changeValue() function is:  

+
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_11.html b/Chapter ZIPs/JavaScript/ch7/ex_7_11.html new file mode 100755 index 0000000..9fe392a --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_11.html @@ -0,0 +1,49 @@ + + +Example 7.11 + + +

+
+

Your name is:  

+

Your email address is:  

+
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_12.html b/Chapter ZIPs/JavaScript/ch7/ex_7_12.html new file mode 100755 index 0000000..fd092a7 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_12.html @@ -0,0 +1,27 @@ + + +Example 7.12 + + +

+
+

 

+

 

+

 

+

 

+
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_13.html b/Chapter ZIPs/JavaScript/ch7/ex_7_13.html new file mode 100755 index 0000000..cd9c621 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_13.html @@ -0,0 +1,22 @@ + + +Example 7.13 + + +

+
+

 

+

 

+

 

+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_14.html b/Chapter ZIPs/JavaScript/ch7/ex_7_14.html new file mode 100755 index 0000000..d53fe88 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_14.html @@ -0,0 +1,28 @@ + + +Example 7.14 + + +

+
+

 

+

 

+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_15.html b/Chapter ZIPs/JavaScript/ch7/ex_7_15.html new file mode 100755 index 0000000..af9e2a2 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_15.html @@ -0,0 +1,21 @@ + + +Example 7.15 + + + +

+
+

 

+ + \ No newline at end of file diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_15.js b/Chapter ZIPs/JavaScript/ch7/ex_7_15.js new file mode 100755 index 0000000..5ed731f --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_15.js @@ -0,0 +1,7 @@ +function checkWord(x,y) +{ + var x; var y; var spell = true; + if (x != y) + spell = false; + return spell; +} \ No newline at end of file diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_16.html b/Chapter ZIPs/JavaScript/ch7/ex_7_16.html new file mode 100755 index 0000000..0002651 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_16.html @@ -0,0 +1,37 @@ + + +Example 7.16 + + + +

+
+

 

+ + \ No newline at end of file diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_17.html b/Chapter ZIPs/JavaScript/ch7/ex_7_17.html new file mode 100755 index 0000000..e8fef9f --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_17.html @@ -0,0 +1,35 @@ + + +Example 7.17 + + + + + +
+

Table Builder

+

+
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_18a.html b/Chapter ZIPs/JavaScript/ch7/ex_7_18a.html new file mode 100755 index 0000000..8436f54 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_18a.html @@ -0,0 +1,35 @@ + + +Example 7.18a + + + + + +
+

 

+

Get Range Function

+

Click to check a range

+

+
 
+
 
+
 
+
 
+
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_18b.html b/Chapter ZIPs/JavaScript/ch7/ex_7_18b.html new file mode 100755 index 0000000..b558836 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_18b.html @@ -0,0 +1,115 @@ + + +Example 7.18b + + + + + +
+
+

Get Range Function

+

Click to check a range

+

+
 
+
 
+
 
+
 
+
+
+

Get Percent Function

+

Click to get a percent of a number

+

+
 
+
 
+
 
+
 
+
+
+
+ +
+ +
+
+

Get One Character Check Function

+

Click to check if a character is in a spot in a string

+

+
 
+
 
+
 
+
 
+
+
+

Get Another Character Check Function

+

Click to check if a character is in a string

+

+
 
+
 
+
 
+
+
+
+ + + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_2.html b/Chapter ZIPs/JavaScript/ch7/ex_7_2.html new file mode 100755 index 0000000..e7c33f2 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_2.html @@ -0,0 +1,34 @@ + + +Example 7.2 + + + + +

 

+

The result is:  

+ + \ No newline at end of file diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_3.html b/Chapter ZIPs/JavaScript/ch7/ex_7_3.html new file mode 100755 index 0000000..1a81253 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_3.html @@ -0,0 +1,91 @@ + + +Example 7.3 + + + + +

Using the quotient() function

+
+
Division Problem + +

 

+

The result is:  

+
Gas Mileage + +

 

+
+
+
BMI (Body Mass Index) Calculator +

The formula to calculate your BMI is your weight in pounds (lbs) divided by your height in inches (in) squared and multiplied by a conversion factor of 703. But don't worry about doing the math! If you enter your weight (lbs) and height (in feet and inches), the program will calculate your BMI.

+ +

Your height (in inches):  

+

Your weight (in pounds):  

+

Your BMI:  

+
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_4.html b/Chapter ZIPs/JavaScript/ch7/ex_7_4.html new file mode 100755 index 0000000..f1590a2 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_4.html @@ -0,0 +1,25 @@ + + +Example 7.4 + + +

+
+

Your granny's age in 10 years:  

+

Your puppy's age in 10 years:  

+
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_5.html b/Chapter ZIPs/JavaScript/ch7/ex_7_5.html new file mode 100755 index 0000000..c35ea83 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_5.html @@ -0,0 +1,26 @@ + + +Example 7.5 + + +

+
+

Your granny's age in 10 years:  

+

Your puppy's age in 10 years:  

+
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_5a.html b/Chapter ZIPs/JavaScript/ch7/ex_7_5a.html new file mode 100755 index 0000000..46fa120 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_5a.html @@ -0,0 +1,26 @@ + + +Example 7.5 + + +

+
+

Your granny's age in 10 years:  

+

Your puppy's age in 10 years:  

+
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_5b.html b/Chapter ZIPs/JavaScript/ch7/ex_7_5b.html new file mode 100755 index 0000000..5f92894 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_5b.html @@ -0,0 +1,26 @@ + + +Example 7.5 + + +

+
+

Your granny's age in 10 years:  

+

Your puppy's age in 10 years:  

+
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_5c.html b/Chapter ZIPs/JavaScript/ch7/ex_7_5c.html new file mode 100755 index 0000000..c80694c --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_5c.html @@ -0,0 +1,26 @@ + + +Example 7.5 + + +

+
+

Your granny's age in 10 years:  

+

Your puppy's age in 10 years:  

+
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_6.html b/Chapter ZIPs/JavaScript/ch7/ex_7_6.html new file mode 100755 index 0000000..c339e12 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_6.html @@ -0,0 +1,25 @@ + + +Example 7.6 + + +

+
+

Your granny's age in 10 years:  

+

Your puppy's age in 10 years:  

+
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_7.html b/Chapter ZIPs/JavaScript/ch7/ex_7_7.html new file mode 100755 index 0000000..7fb9790 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_7.html @@ -0,0 +1,48 @@ + + +Example 7.7 + + +

+
+

You plan to purchase:  

+

The original cost is:  

+

The discount rate is:  

+

You pay:  

+
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_8.html b/Chapter ZIPs/JavaScript/ch7/ex_7_8.html new file mode 100755 index 0000000..3749626 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_8.html @@ -0,0 +1,58 @@ + + +Example 7.8 + + +

+
+

You plan to purchase:  

+

The original cost is:  

+

The discount rate is:  

+

You pay:  

+
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/ex_7_9.html b/Chapter ZIPs/JavaScript/ch7/ex_7_9.html new file mode 100755 index 0000000..27e5d05 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/ex_7_9.html @@ -0,0 +1,28 @@ + + +Example 7.9 + + +

+
+

The value of numMice is:  

+

The value of x, in the changeValue() function is:  

+

The value of numMice after calling the changeValue() function is:  

+
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/greg.css b/Chapter ZIPs/JavaScript/ch7/greg.css new file mode 100755 index 0000000..60e765e --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/greg.css @@ -0,0 +1,118 @@ +body { background-color: #000040; + background-image: url(background.gif); + color: #88ffff; + font-family: Verdana, Arial, sans-serif; +} +#container { margin-left: auto; + margin-right: auto; + width:100%; + min-width:700px; + } + + +#logo { + text-align:center; + margin: 0; + font-family: Geneva, Arial, Helvetica, sans-serif; + padding-top: 30px; + padding-bottom: 20px; + +} +#nav { + float: left; + width: 200px; + padding-top: 10px; + text-align:left; + color: #88FFFF; + font-size: 14px; +} +#nav a {text-decoration:none; + margin: 15px; + display: block; + color: #88FFFF; + font-size: 14px; +} +#content { + margin-left: auto; + margin-right: auto; + padding: 10px; + overflow:auto; + border: medium groove #88FFFF; + line-height: 135%; +} + +.floatright {padding-left:20px; padding-right:50px; + float:right; + } +.floatleft { + float:left; + padding: 30px 0px 20px; +} +#footer { font-size: .60em; + font-style: italic; + text-align: center; + border-top: 2px double #000040; + padding-top: 20px; + padding-bottom: 20px; +} + +h2 { text-transform: uppercase; + color: #88ffff; + font-size: 1.2em; + border-bottom: 1px none; + margin-right: 20px; +} +h3 { + color: #88ffff; + font-size: 1em; + border-bottom: 1px solid #000000; + margin-right: auto; + text-align: left; + padding-top: 20px; + padding-right: 150px; + padding-bottom: 20px; + padding-left: 150px; + line-height: 130%; +} +.details { padding-left:20%; + padding-right:20%; +} + + +img {border:0; } + + +.content { + margin-left: auto; + margin-right: auto; + padding: 5px; + height: 3700px; + width: 500px; +} +a {text-decoration:none; + margin: 15px; + display: block; + color: #88FFFF; + font-size: 16px; +} +a:hover { + color: #000040; + background-color: #88ffff; +} +span { + font-size: 36px; + font-weight: bold; + font-family: "Courier New", Courier, mono; + color: #88ffff; + background-position: center center; + text-align: center; + vertical-align: middle; +} +table { + border-collapse: collapse +} +td { + font-family: "Courier New", Courier, mono; + font-size: 14px; + color: #88ffff; +} diff --git a/Chapter ZIPs/JavaScript/ch7/greg/greg.css b/Chapter ZIPs/JavaScript/ch7/greg/greg.css new file mode 100755 index 0000000..eefbd08 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/greg/greg.css @@ -0,0 +1,121 @@ +body { background-color: #000040; + background-image: url(background.gif); + color: #88ffff; + font-family: Verdana, Arial, sans-serif; +} +#container { margin-left: auto; + margin-right: auto; + width:80%; + min-width:700px; + } + + +#logo { + text-align:center; + margin: 0; + font-family: Geneva, Arial, Helvetica, sans-serif; + padding-top: 30px; + padding-bottom: 20px; + +} +#nav { + float: left; + width: 200px; + padding-top: 10px; + text-align:left; + color: #88FFFF; + font-size: 12px; +} +#nav a {text-decoration:none; + margin: 15px; + display: block; + color: #88FFFF; + font-size: 12px; +} +#content { + margin-left: 150px; + padding: 30px; + overflow:auto; + border: medium groove #88FFFF; + line-height: 135%; + +} + +.floatright {padding-left:20px; + float:right; + } +.floatleft { + float:left; + padding: 30px 0px 20px; +} +#footer { font-size: .60em; + font-style: italic; + text-align: center; + border-top: 2px double #000040; + padding-top: 20px; + padding-bottom: 20px; +} + +h2 { text-transform: uppercase; + color: #88ffff; + font-size: 1.2em; + border-bottom: 1px none; + margin-right: 20px; +} +h3 { + color: #88ffff; + font-size: 1.2em; + border-bottom: 1px solid #000000; + margin-right: auto; + text-align: left; + padding-top: 10px; + padding-right: 20px; + padding-bottom: 10px; + padding-left: 20px; + line-height: 120%; +} +.details { padding-left:20%; + padding-right:20%; +} + + +img {border:0; } + + +.content { + margin: 20px; + padding: 20px; + height: 3700px; + width: 500px; +} +a {text-decoration:none; + margin: 15px; + display: block; + color: #88FFFF; + font-size: 12px; +} +a:hover { + color: #000040; + background-color: #88ffff; +} +span { + font-size: 20px; + font-weight: bold; + font-family: "Courier New", Courier, mono; + color: #88ffff; + background-position: center center; + text-align: center; + vertical-align: middle; +} +table { + border-collapse: collapse +} +td { + border: 2px solid #88ffff; + width: 5em; + color: #88ffff; +} +.nobdr { + border: none; + cell-padding: 5px; +} diff --git a/Chapter ZIPs/JavaScript/ch7/greg/gregs_hangman.html b/Chapter ZIPs/JavaScript/ch7/greg/gregs_hangman.html new file mode 100755 index 0000000..1cdc82a --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/greg/gregs_hangman.html @@ -0,0 +1,110 @@ + + +Greg's Gambits | Hangman + + + + + +
+ +

The Game of Hangman

+

Greg Challenges You to a Game of Hangman

+

 

+ +
+

+
+

 

+

 

+
+ +
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/hangman0.gif b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman0.gif new file mode 100755 index 0000000..92a9041 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman0.gif differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/hangman1.gif b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman1.gif new file mode 100755 index 0000000..ee91932 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman1.gif differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/hangman10.gif b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman10.gif new file mode 100755 index 0000000..b33e388 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman10.gif differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/hangman2.gif b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman2.gif new file mode 100755 index 0000000..3ce036c Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman2.gif differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/hangman3.gif b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman3.gif new file mode 100755 index 0000000..d185244 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman3.gif differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/hangman4.gif b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman4.gif new file mode 100755 index 0000000..db9f2ab Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman4.gif differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/hangman5.gif b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman5.gif new file mode 100755 index 0000000..b1cadb8 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman5.gif differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/hangman6.gif b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman6.gif new file mode 100755 index 0000000..eb2bb6a Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman6.gif differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/hangman7.gif b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman7.gif new file mode 100755 index 0000000..65cf63d Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman7.gif differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/hangman8.gif b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman8.gif new file mode 100755 index 0000000..c36c57e Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman8.gif differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/hangman9.gif b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman9.gif new file mode 100755 index 0000000..305443b Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/hangman9.gif differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/pic1.jpg b/Chapter ZIPs/JavaScript/ch7/greg/images/pic1.jpg new file mode 100755 index 0000000..923c9dd Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/pic1.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/pic2.jpg b/Chapter ZIPs/JavaScript/ch7/greg/images/pic2.jpg new file mode 100755 index 0000000..6ccf822 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/pic2.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/pic3.jpg b/Chapter ZIPs/JavaScript/ch7/greg/images/pic3.jpg new file mode 100755 index 0000000..b703a4a Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/pic3.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/pic4.jpg b/Chapter ZIPs/JavaScript/ch7/greg/images/pic4.jpg new file mode 100755 index 0000000..b169a31 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/pic4.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/pic5.jpg b/Chapter ZIPs/JavaScript/ch7/greg/images/pic5.jpg new file mode 100755 index 0000000..eee4e03 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/pic5.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/pic6.jpg b/Chapter ZIPs/JavaScript/ch7/greg/images/pic6.jpg new file mode 100755 index 0000000..8f906c6 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/pic6.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/pic7.jpg b/Chapter ZIPs/JavaScript/ch7/greg/images/pic7.jpg new file mode 100755 index 0000000..c3b9753 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/pic7.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/pic8.jpg b/Chapter ZIPs/JavaScript/ch7/greg/images/pic8.jpg new file mode 100755 index 0000000..d284293 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/pic8.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/pic9.jpg b/Chapter ZIPs/JavaScript/ch7/greg/images/pic9.jpg new file mode 100755 index 0000000..1f5e218 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/pic9.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/images/superhero.jpg b/Chapter ZIPs/JavaScript/ch7/greg/images/superhero.jpg new file mode 100755 index 0000000..72f5f62 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/images/superhero.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/mySource.js b/Chapter ZIPs/JavaScript/ch7/greg/mySource.js new file mode 100755 index 0000000..21c88b9 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/greg/mySource.js @@ -0,0 +1,72 @@ +function checkRange(x,low,high) +{ + var x; var low; var high; + var result = true; + if (x < low || x > high) + result = false; + return result; +} +function charAtPlace(x, y, z) +{ + var x; var y; var z; var result = false; + if (x.charAt(y-1) == z) + result = true; + return result; +} +function checkForChar(x, y) +{ + var x; var y; var i; var lgth; var result = false; + lgth = x.length; + for (i=0; i < lgth; i++) + { + if (x.charAt(i) == y) + result = true; + } + return result; +} +function checkPercent(x, y, z) +{ + var x; var y; var z; var percent; + percent = (y/100)*x; + if (z == "y") + return (x - percent); + else + return percent; +} +function checkWord(x,y) +{ + var x; var y; var spell = true; + if (x != y) + spell = false; + return spell; +} +function buildTable(rows, cols, fill, style) +{ + var rows; var cols; var fill; var ranNum; + var i; var j; var style; + document.write(""); + document.write("

 

"); + document.write(""); + ranNum = (rows + 1) * (cols + 1); + for (i = 0; i < rows; i++) + { + document.write(""); + for (j = 0; j < cols; j++) + { + if (fill == "empty") + document.write(""); + if (fill == "random") + { + entry = parseInt(Math.random()*ranNum)+1; + document.write(""); + } + if (fill == "prompt") + { + entry = prompt("Enter a value for the cell in row " + (i + 1) + ", column " + (j + 1)); + document.write(""); + } + } + document.write(""); + } + document.write("

 

" + entry + "

" + entry + "

"); +} \ No newline at end of file diff --git a/Chapter ZIPs/JavaScript/ch7/greg/pic1.jpg b/Chapter ZIPs/JavaScript/ch7/greg/pic1.jpg new file mode 100755 index 0000000..923c9dd Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/pic1.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/pic2.jpg b/Chapter ZIPs/JavaScript/ch7/greg/pic2.jpg new file mode 100755 index 0000000..6ccf822 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/pic2.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/pic3.jpg b/Chapter ZIPs/JavaScript/ch7/greg/pic3.jpg new file mode 100755 index 0000000..b703a4a Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/pic3.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/pic4.jpg b/Chapter ZIPs/JavaScript/ch7/greg/pic4.jpg new file mode 100755 index 0000000..b169a31 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/pic4.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/pic5.jpg b/Chapter ZIPs/JavaScript/ch7/greg/pic5.jpg new file mode 100755 index 0000000..eee4e03 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/pic5.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/pic6.jpg b/Chapter ZIPs/JavaScript/ch7/greg/pic6.jpg new file mode 100755 index 0000000..8f906c6 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/pic6.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/pic7.jpg b/Chapter ZIPs/JavaScript/ch7/greg/pic7.jpg new file mode 100755 index 0000000..c3b9753 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/pic7.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/pic8.jpg b/Chapter ZIPs/JavaScript/ch7/greg/pic8.jpg new file mode 100755 index 0000000..d284293 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/pic8.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/pic9.jpg b/Chapter ZIPs/JavaScript/ch7/greg/pic9.jpg new file mode 100755 index 0000000..1f5e218 Binary files /dev/null and b/Chapter ZIPs/JavaScript/ch7/greg/pic9.jpg differ diff --git a/Chapter ZIPs/JavaScript/ch7/greg/play_games.html b/Chapter ZIPs/JavaScript/ch7/greg/play_games.html new file mode 100755 index 0000000..6e3b1b9 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/greg/play_games.html @@ -0,0 +1,44 @@ + + + +Greg's Gambits | Games Menu + + + + + +
+ + +

Play A Game

+
+ +
+

Menu of Available Games

+ + + + + + + + + + + + + +
Greg's Tales Madame Vadoma Sees All
The Secret Message Encoder Battle the Evil Troll
Play Hangman  
+

 

+
+ +
+ + diff --git a/Chapter ZIPs/JavaScript/ch7/jackie.css b/Chapter ZIPs/JavaScript/ch7/jackie.css new file mode 100755 index 0000000..26cc538 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/jackie.css @@ -0,0 +1,21 @@ +body { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 24px; + color: #660000; + background-color: #FFEFE8; +} +h1, h2, h3 { + background-position: center; + text-align: center; +} +.floatleft { + float: left; +} +.floatright { + float: right; +} +p { + font-family: Georgia, "Times New Roman", Times, serif; + font-size: 16px; + color: #660000; +} diff --git a/Chapter ZIPs/JavaScript/ch7/mySource.js b/Chapter ZIPs/JavaScript/ch7/mySource.js new file mode 100755 index 0000000..21c88b9 --- /dev/null +++ b/Chapter ZIPs/JavaScript/ch7/mySource.js @@ -0,0 +1,72 @@ +function checkRange(x,low,high) +{ + var x; var low; var high; + var result = true; + if (x < low || x > high) + result = false; + return result; +} +function charAtPlace(x, y, z) +{ + var x; var y; var z; var result = false; + if (x.charAt(y-1) == z) + result = true; + return result; +} +function checkForChar(x, y) +{ + var x; var y; var i; var lgth; var result = false; + lgth = x.length; + for (i=0; i < lgth; i++) + { + if (x.charAt(i) == y) + result = true; + } + return result; +} +function checkPercent(x, y, z) +{ + var x; var y; var z; var percent; + percent = (y/100)*x; + if (z == "y") + return (x - percent); + else + return percent; +} +function checkWord(x,y) +{ + var x; var y; var spell = true; + if (x != y) + spell = false; + return spell; +} +function buildTable(rows, cols, fill, style) +{ + var rows; var cols; var fill; var ranNum; + var i; var j; var style; + document.write(""); + document.write("

 

"); + document.write(""); + ranNum = (rows + 1) * (cols + 1); + for (i = 0; i < rows; i++) + { + document.write(""); + for (j = 0; j < cols; j++) + { + if (fill == "empty") + document.write(""); + if (fill == "random") + { + entry = parseInt(Math.random()*ranNum)+1; + document.write(""); + } + if (fill == "prompt") + { + entry = prompt("Enter a value for the cell in row " + (i + 1) + ", column " + (j + 1)); + document.write(""); + } + } + document.write(""); + } + document.write("

 

" + entry + "

" + entry + "

"); +} \ No newline at end of file