Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Pygator/murach
Browse files Browse the repository at this point in the history
  • Loading branch information
Pygator committed Apr 23, 2015
2 parents 11e60f5 + 6694c26 commit 713942c
Show file tree
Hide file tree
Showing 2,826 changed files with 291,965 additions and 0 deletions.
Binary file added java/db/MurachDB/db.lck
Binary file not shown.
Binary file added java/db/MurachDB/dbex.lck
Binary file not shown.
Binary file added java/db/MurachDB/log/log.ctrl
Binary file not shown.
Binary file added java/db/MurachDB/log/log1.dat
Binary file not shown.
Binary file added java/db/MurachDB/log/logmirror.ctrl
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c10.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c101.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c111.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c121.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c130.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c141.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c150.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c161.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c171.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c180.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c191.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c1a1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c1b1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c1c0.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c1d1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c1e0.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c1f1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c20.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c200.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c211.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c221.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c230.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c241.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c251.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c260.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c271.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c281.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c290.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c2a1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c2b1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c2c1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c2d0.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c2e1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c2f0.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c300.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c31.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c311.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c321.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c331.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c340.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c351.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c361.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c371.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c380.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c391.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c3a1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c3b1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c3c0.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c3d1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c3e1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c3f1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c400.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c41.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c411.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c421.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c430.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c441.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c451.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c461.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c490.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c4a0.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c51.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c60.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c71.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c81.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/c90.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/ca1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/cb1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/cc0.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/cd1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/ce1.dat
Binary file not shown.
Binary file added java/db/MurachDB/seg0/cf0.dat
Binary file not shown.
22 changes: 22 additions & 0 deletions java/db/MurachDB/service.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#/murach/java/db/MurachDB
# ********************************************************************
# *** Please do NOT edit this file. ***
# *** CHANGING THE CONTENT OF THIS FILE MAY CAUSE DATA CORRUPTION. ***
# ********************************************************************
#Mon Sep 26 15:06:07 PDT 2011
SysschemasIndex2Identifier=225
SyscolumnsIdentifier=144
SysconglomeratesIndex1Identifier=49
SysconglomeratesIdentifier=32
SyscolumnsIndex2Identifier=177
SysschemasIndex1Identifier=209
SysconglomeratesIndex3Identifier=81
SystablesIndex2Identifier=129
SyscolumnsIndex1Identifier=161
derby.serviceProtocol=org.apache.derby.database.Database
SysschemasIdentifier=192
derby.storage.propertiesId=16
SysconglomeratesIndex2Identifier=65
derby.serviceLocale=en_US
SystablesIdentifier=96
SystablesIndex1Identifier=113
7 changes: 7 additions & 0 deletions java/db/MurachDBCreate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Change to the directory that stores the script
cd /murach/java/db

# Use the ij tool to run the script
java org.apache.derby.tools.ij MurachDBCreate.sql
77 changes: 77 additions & 0 deletions java/db/MurachDBCreate.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
CONNECT 'jdbc:derby:MurachDB;create=true';

-- drop tables (ignore errors if they don't exist)
DROP TABLE Products;
DROP TABLE LineItems;

-- create Products table
CREATE TABLE Products
(
ProductCode VARCHAR(10),
Description VARCHAR(40),
Price DOUBLE
);

-- insert data into Products table
INSERT INTO Products VALUES
('bvbn', 'Murach''s Beginning Visual Basic .NET', 49.50);

INSERT INTO Products VALUES
('cshp', 'Murach''s C#', 49.50);

INSERT INTO Products VALUES
('java', 'Murach''s Beginning Java', 49.50);

INSERT INTO Products VALUES
('jsps', 'Murach''s Java Servlets and JSP', 49.50);

INSERT INTO Products VALUES
('mcb2', 'Murach''s Mainframe COBOL', 59.50);

INSERT INTO Products VALUES
('sqls', 'Murach''s SQL for SQL Server', 49.50);

INSERT INTO Products VALUES
('zjcl', 'Murach''s OS/390 and z/OS JCL', 62.50);

-- view data in Products table
SELECT * FROM Products;

-- create LineItems table
CREATE TABLE LineItems
(
LineItemID INT,
InvoiceID INT,
ProductCode VARCHAR(10),
Quantity INT
);

-- insert data into LineItems table
INSERT INTO LineItems VALUES
(1, 1, 'java', 5);

INSERT INTO LineItems VALUES
(2, 1, 'jsps', 5);

INSERT INTO LineItems VALUES
(3, 2, 'mcb2', 1);

INSERT INTO LineItems VALUES
(7, 4, 'cshp', 1);

INSERT INTO LineItems VALUES
(8, 4, 'zjcl', 2);

INSERT INTO LineItems VALUES
(9, 6, 'sqls', 1);

INSERT INTO LineItems VALUES
(10, 6, 'java', 1);

INSERT INTO LineItems VALUES
(11, 7, 'mcb2', 5);

-- view data in LineItems table
SELECT * FROM LineItems;

DISCONNECT;
6 changes: 6 additions & 0 deletions java/db/ProductsTableCreate.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CREATE TABLE Products
(
ProductCode VARCHAR(10),
Description VARCHAR(40),
Price DOUBLE
)
22 changes: 22 additions & 0 deletions java/db/ProductsTableInsert.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
DELETE FROM Products;

INSERT INTO Products VALUES
('bvbn', 'Murach''s Beginning Visual Basic .NET', 49.50);

INSERT INTO Products VALUES
('cshp', 'Murach''s C#', 49.50);

INSERT INTO Products VALUES
('java', 'Murach''s Beginning Java', 49.50);

INSERT INTO Products VALUES
('jsps', 'Murach''s Java Servlets and JSP', 49.50);

INSERT INTO Products VALUES
('mcb2', 'Murach''s Mainframe COBOL', 59.50);

INSERT INTO Products VALUES
('sqls', 'Murach''s SQL for SQL Server', 49.50);

INSERT INTO Products VALUES
('zjcl', 'Murach''s OS/390 and z/OS JCL', 62.50);
7 changes: 7 additions & 0 deletions java/db/ProductsTableSelect.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Change to the directory that stores the script
cd /murach/java/db

# Use the ij tool to run the script
java org.apache.derby.tools.ij ProductsTableSelect.sql
24 changes: 24 additions & 0 deletions java/db/ProductsTableSelect.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
CONNECT 'jdbc:derby:MurachDB';

SELECT ProductCode, Description, Price
FROM Products
WHERE Price > 50
ORDER BY ProductCode ASC;

SELECT * FROM Products;

SELECT p.ProductCode, p.Price, li.Quantity,
p.Price * li.Quantity AS Total
FROM Products p
INNER JOIN LineItems li
ON p.ProductCode = li.ProductCode
WHERE p.Price > 50
ORDER BY p.ProductCode ASC;

SELECT p.ProductCode, p.Price, li.Quantity,
p.Price * li.Quantity AS Total
FROM Products p, LineItems li
WHERE p.ProductCode = li.ProductCode AND p.Price > 50
ORDER BY p.ProductCode ASC;

DISCONNECT;
10 changes: 10 additions & 0 deletions java/db/derby.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
----------------------------------------------------------------
Wed Sep 28 10:23:49 PDT 2011:
Booting Derby version The Apache Software Foundation - Apache Derby - 10.8.1.2 - (1095077): instance a816c00e-0132-b110-5333-ffffde6e0ee7
on database directory /murach/java/db/MurachDB with class loader sun.misc.Launcher$ExtClassLoader@543a586d
Loaded from file:/System/Library/Java/Extensions/derby.jar
java.vendor=Oracle Corporation
java.runtime.version=1.7.0-b147-20110926
user.dir=/murach/java/netbeans/book_apps/ch21_ProductMaint
derby.system.home=/murach/java/db
Database Class Loader started - derby.database.classpath=''
7 changes: 7 additions & 0 deletions java/db/ij.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Change to the directory that stores the database
cd /murach/java/db

# Use the java command to run the ij class in the org.apache.derby.tools package
java org.apache.derby.tools.ij
4 changes: 4 additions & 0 deletions java/db/shutdown.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

# Shutdown the Derby network server
java org.apache.derby.drda.NetworkServerControl shutdown
7 changes: 7 additions & 0 deletions java/db/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Change to the directory that stores the database
cd /murach/java/db

# Start the Derby network server
java org.apache.derby.drda.NetworkServerControl start
Binary file added java/dist/.DS_Store
Binary file not shown.
5 changes: 5 additions & 0 deletions java/dist/ch23_FutureValueConsole.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:: Change to the directory that stores the jar file
cd \murach\java\dist

:: Use the java command to run the class
java -jar ch23_FutureValueConsole.jar
Binary file added java/dist/ch23_FutureValueConsole.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions java/dist/ch23_FutureValueConsole.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Change to the directory that stores the JAR file
cd /murach/java/dist

#Use the java command to run the JAR file
java -jar ch23_FutureValueConsole.jar
Binary file added java/dist/ch23_FutureValueGUI.jar
Binary file not shown.
19 changes: 19 additions & 0 deletions java/dist/future_value.jnlp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+"
codebase="http://www.murach.com/fv/app"
href="future_value.jnlp">
<information>
<title>Future Value Calculator</title>
<vendor>Mike Murach & Associates</vendor>
<offline-allowed/>
</information>
<resources>
<!-- Application Resources -->
<j2se version="1.6+"
href="http://java.sun.com/products/autodl/j2se"/>
<jar href="ch23_FutureValueGUI.jar" main="true" />
</resources>
<application-desc></application-desc>
<update check="background"
policy="prompt-run" />
</jnlp>
11 changes: 11 additions & 0 deletions java/dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>Future Value Calculator</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<h1>Future Value Calculator application</h1>
<a href="future_value.jnlp">Launch application</a>
</body>
</html>
Binary file added java/files/products.bin
Binary file not shown.
Binary file added java/files/products.ran
Binary file not shown.
4 changes: 4 additions & 0 deletions java/files/products.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
java Murach's Beginning Java 49.5
jsps Murach's Java Servlets and JSP 49.5
txtp TextPad 20.0
mcb2 Murach's Mainframe COBOL 59.5
1 change: 1 addition & 0 deletions java/files/products.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0"?><Products><Product Code="java"><Description>Murach's Beginning Java</Description><Price>49.5</Price></Product><Product Code="jsps"><Description>Murach's Java Servlets and JSP</Description><Price>49.5</Price></Product><Product Code="mcb2"><Description>Murach's Mainframe COBOL</Description><Price>59.5</Price></Product></Products>
Binary file added java/netbeans/.DS_Store
Binary file not shown.
Binary file added java/netbeans/book_apps/.DS_Store
Binary file not shown.
74 changes: 74 additions & 0 deletions java/netbeans/book_apps/ch02_Invoice/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="ch02_Invoice" default="default" basedir=".">
<description>Builds, tests, and runs the project ch02_Invoice.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="ch02_Invoice-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>
3 changes: 3 additions & 0 deletions java/netbeans/book_apps/ch02_Invoice/manifest.mf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build

Loading

0 comments on commit 713942c

Please sign in to comment.