Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Apress committed Oct 16, 2016
0 parents commit 0a942a8
Show file tree
Hide file tree
Showing 1,641 changed files with 305,830 additions and 0 deletions.
Binary file added 9781430240952.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,27 @@
Freeware License, some rights reserved

Copyright (c) 2012 Adam Freeman

Permission is hereby granted, free of charge, to anyone obtaining a copy
of this software and associated documentation files (the "Software"),
to work with the Software within the limits of freeware distribution and fair use.
This includes the rights to use, copy, and modify the Software for personal use.
Users are also allowed and encouraged to submit corrections and modifications
to the Software for the benefit of other users.

It is not allowed to reuse, modify, or redistribute the Software for
commercial use in any way, or for a user�s educational materials such as books
or blog articles without prior permission from the copyright holder.

The above copyright notice and this permission notice need to be included
in all copies or substantial portions of the software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


57 changes: 57 additions & 0 deletions Part I/Listing 01-01.html
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
<script src="jquery-1.7.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="styles.css"/>
<script type="text/javascript">
$(document).ready(function() {

var labelElems = document.getElementsByTagName("label");
var jq = $('img[src*=daffodil]');

$('img:even').add('img[src*=primula]').add(jq)
.add(labelElems).css("border", "thick double red");

});
</script>
</head>
<body>
<h1>Jacqui's Flower Shop</h1>
<form method="post">
<div id="oblock">
<div class="dtable">
<div id="row1" class="drow">
<div class="dcell">
<img src="astor.png"/><label for="astor">Astor:</label>
<input name="astor" value="0" required>
</div>
<div class="dcell">
<img src="daffodil.png"/><label for="daffodil">Daffodil:</label>
<input name="daffodil" value="0" required >
</div>
<div class="dcell">
<img src="rose.png"/><label for="rose">Rose:</label>
<input name="rose" value="0" required>
</div>
</div>
<div id="row2"class="drow">
<div class="dcell">
<img src="peony.png"/><label for="peony">Peony:</label>
<input name="peony" value="0" required>
</div>
<div class="dcell">
<img src="primula.png"/><label for="primula">Primula:</label>
<input name="primula" value="0" required>
</div>
<div class="dcell">
<img src="snowdrop.png"/><label for="snowdrop">Snowdrop:</label>
<input name="snowdrop" value="0" required>
</div>
</div>
</div>
</div>
<div id="buttonDiv"><button type="submit">Place Order</button></div>
</form>
</body>
</html>
19 changes: 19 additions & 0 deletions Part I/Listing 01-02.html
@@ -0,0 +1,19 @@
...
<script type="text/javascript">
$(document).ready(function() {

var jq = $('label');

// select and operate on the first element
jq.first().css("border", "thick double red");

// select and operate on the last element
jq.last().css("border", "thick double green");

// select and operate on an element by index
jq.eq(2).css("border", "thick double black");
jq.eq(-2).css("border", "thick double black");

});
</script>
...
13 changes: 13 additions & 0 deletions Part I/Listing 01-03.html
@@ -0,0 +1,13 @@
var http = require('http');
var url = require('url');


http.createServer(function (req, res) {
console.log("Request: " + req.method + " to " + req.url);

res.writeHead(200, "OK");
res.write("<h1>Hello</h1>Node.js is working");
res.end();

}).listen(80);
console.log("Ready on port 80");
61 changes: 61 additions & 0 deletions Part I/Listing 02-01.html
@@ -0,0 +1,61 @@
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
<script src="jquery-1.7.js" type="text/javascript"></script>
<style>
h1 {
width: 700px; border: thick double black; margin-left: auto;
margin-right: auto; text-align: center; font-size: x-large; padding: .5em;
color: darkgreen; background-image: url("border.png");
background-size: contain; margin-top: 0;
}
.dtable {display: table;}
.drow {display: table-row;}
.dcell {display: table-cell; padding: 10px;}
.dcell > * {vertical-align: middle}
input {width: 2em; text-align: right; border: thin solid black; padding: 2px;}
label {width: 5em; padding-left: .5em;display: inline-block;}
#buttonDiv {text-align: center;}
#oblock {display: block; margin-left: auto; margin-right: auto; width: 700px;}
</style>
</head>
<body>
<h1>Jacqui's Flower Shop</h1>
<form method="post">
<div id="oblock">
<div class="dtable">
<div class="drow">
<div class="dcell">
<img src="astor.png"/><label for="astor">Astor:</label>
<input name="astor" value="0" required>
</div>
<div class="dcell">
<img src="daffodil.png"/><label for="daffodil">Daffodil:</label>
<input name="daffodil" value="0" required >
</div>
<div class="dcell">
<img src="rose.png"/><label for="rose">Rose:</label>
<input name="rose" value="0" required>
</div>
</div>
<div class="drow">
<div class="dcell">
<img src="peony.png"/><label for="peony">Peony:</label>
<input name="peony" value="0" required>
</div>
<div class="dcell">
<img src="primula.png"/><label for="primula">Primula:</label>
<input name="primula" value="0" required>
</div>
<div class="dcell">
<img src="snowdrop.png"/><label for="snowdrop">Snowdrop:</label>
<input name="snowdrop" value="0" required>
</div>
</div>
</div>
</div>
<div id="buttonDiv"><button type="submit">Place Order</button></div>
</form>
</body>
</html>
1 change: 1 addition & 0 deletions Part I/Listing 02-02.html
@@ -0,0 +1 @@
<label for="astor">Astor:</label>
1 change: 1 addition & 0 deletions Part I/Listing 02-03.html
@@ -0,0 +1 @@
<input name="snowdrop" value="0" required>
11 changes: 11 additions & 0 deletions Part I/Listing 02-04.html
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
</head>
<body>
<h1 id="mainheader">Welcome to Jacqui's Flower Shop</h1>
<h2 id="openinghours">We are open 10am-6pm, 7 days a week</h2>
<h3 id="holidays">(closed on national holidays)</h3>
</body>
</html>
11 changes: 11 additions & 0 deletions Part I/Listing 02-05.html
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
</head>
<body>
<h1 id="mainheader" class="header">Welcome to Jacqui's Flower Shop</h1>
<h2 class="header info">We are open 10am-6pm, 7 days a week</h2>
<h3 class="info">(closed on national holidays)</h3>
</body>
</html>
9 changes: 9 additions & 0 deletions Part I/Listing 02-06.html
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
...head content...
</head>
<body>
...body content...
</body>
</html>
1 change: 1 addition & 0 deletions Part I/Listing 02-07.html
@@ -0,0 +1 @@
<script src="jquery-1.7.js" type="text/javascript"></script>
17 changes: 17 additions & 0 deletions Part I/Listing 02-08.html
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
<script src="jquery-1.7.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#mainheader').css("color", "red");
});
</script>
</head>
<body>
<h1 id="mainheader" class="header">Welcome to Jacqui's Flower Shop</h1>
<h2 class="header info">We are open 10am-6pm, 7 days a week</h2>
<h3 class="info">(closed on national holidays)</h3>
</body>
</html>
16 changes: 16 additions & 0 deletions Part I/Listing 02-09.html
@@ -0,0 +1,16 @@
<style>
h1 {
width: 700px; border: thick double black; margin-left: auto;
margin-right: auto; text-align: center; font-size: x-large; padding: .5em;
color: darkgreen; background-image: url("border.png");
background-size: contain; margin-top: 0;
}
.dtable {display: table;}
.drow {display: table-row;}
.dcell {display: table-cell; padding: 10px;}
.dcell > * {vertical-align: middle}
input {width: 2em; text-align: right; border: thin solid black; padding: 2px;}
label {width: 5em; padding-left: .5em;display: inline-block;}
#buttonDiv {text-align: center;}
#oblock {display: block; margin-left: auto; margin-right: auto; width: 700px;}
</style>
32 changes: 32 additions & 0 deletions Part I/Listing 02-10.html
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
</head>
<body>
<article>
<header>
<hgroup>
<h1>New Delivery Service</h1>
<h2>Color and Beauty to Your Door</h2>
</hgroup>
</header>
<section>
We are pleased to announce that we are starting a home delivery service for
your flower needs. We will deliver within a 20 mile radius of the store
for free and $1/mile thereafter. All flowers are satisfaction-guaranteed and
we offer free phone-based consultation.
</section>
<section>
Our new service starts on <b>Wednesaday</b> and there is a $10 discount
for the first 50 customers.
</section>
<footer>
<nav>
More Information:
<a href="http://jacquisflowershop.com">Learn More About Fruit</a>
</nav>
</footer>
</article>
</body>
</html>
38 changes: 38 additions & 0 deletions Part I/Listing 02-11.html
@@ -0,0 +1,38 @@
<body>
<h1>Jacqui's Flower Shop</h1>
<form method="post">
<div id="oblock">
<div class="dtable">
<div class="drow">
<div class="dcell">
<img src="astor.png"/><label for="astor">Astor:</label>
<input name="astor" value="0" required>
</div>
<div class="dcell">
<img src="daffodil.png"/><label for="daffodil">Daffodil:</label>
<input name="daffodil" value="0" required >
</div>
<div class="dcell">
<img src="rose.png"/><label for="rose">Rose:</label>
<input name="rose" value="0" required>
</div>
</div>
<div class="drow">
<div class="dcell">
<img src="peony.png"/><label for="peony">Peony:</label>
<input name="peony" value="0" required>
</div>
<div class="dcell">
<img src="primula.png"/><label for="primula">Primula:</label>
<input name="primula" value="0" required>
</div>
<div class="dcell">
<img src="snowdrop.png"/><label for="snowdrop">Snowdrop:</label>
<input name="snowdrop" value="0" required>
</div>
</div>
</div>
</div>
<div id="buttonDiv"><button type="submit">Place Order</button></div>
</form>
</body>
1 change: 1 addition & 0 deletions Part I/Listing 02-12.html
@@ -0,0 +1 @@
<input name="snowdrop" value="0" required>
1 change: 1 addition & 0 deletions Part I/Listing 02-13.html
@@ -0,0 +1 @@
<button type="submit">Place Order</button>
1 change: 1 addition & 0 deletions Part I/Listing 02-14.html
@@ -0,0 +1 @@
<img src="snowdrop.png"/>

0 comments on commit 0a942a8

Please sign in to comment.