Merge branch 'main' of git.mcssliberia.org:jelkner/elknernet

main
Jeff Elkner 1 year ago
commit 0e4f91891c

@ -0,0 +1,46 @@
import os
import sys
import argparse
import quotes
from bottle import route, run, template, static_file
# get current location, set as current location, and append to path
current_dir = os.path.dirname(os.path.abspath(__file__))
os.chdir(current_dir)
sys.path.append(current_dir)
# get absolute path of database file
dbfile = current_dir + '/quotes.db'
print(dbfile)
@route('/')
def index():
quote = quotes.get_random_quote(dbfile)
return template('templates/index.tpl', text=quote[0], author=quote[1])
@route('/static/<filename:path>')
def server_static(filename):
return static_file(filename, root=os.path.join(current_dir, 'static'))
@route('/contact')
def contact():
quote = quotes.get_random_quote(dbfile)
return template('templates/contact.tpl', text=quote[0], author=quote[1])
def get_port():
description = 'A bottle server for the HILT Institute'
parser = argparse.ArgumentParser(description)
parser.add_argument('-p', '--port', type=int,
help="The port number the server will run on")
args = parser.parse_args()
return args.port if args.port else 8080
if __name__ == '__main__':
run(host='0.0.0.0', port=get_port(), reloader=True, debug=True)

@ -0,0 +1,227 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Welcome to elkner.net!</title>
<style>
@import url(static/elknernet.css);
</style>
</head>
<body>
<header>
<div id="logo">
<img src="static/images/debian_gnu_linux.png" alt="Debian GNU/Linux">
</div>
<h1>Welcome to elkner.net!</h1>
<p>
I'm *WAY* too busy with all the exciting projects I'm working on to do much
with this page, so let me just include contact information and some links.
Check them out!
</p>
<p class="author" style="text-align: right; padding-right: 360px;">
-- Jeff Elkner</p>
</header>
<h2>
<a href="http://weblog.elkner.net">Weblog</a> |
<a href="contact">Contact Information</a> |
<a href="static/resume.html">Resume</a>
</h2>
<div class="split">
<div class="left">
<h2>Current Activities/Projects:</h2>
<ul>
<li><a href="https://novawebdevelopment.org/">NOVA Web Development</a></li>
<li><a href="https://libreorganize.org/">LibreOrganize</a></li>
<li><a href="https://novalaciro.org/">NOVALACIRO</a></li>
<li><a href="http://openbookproject.net/">The Open Book Project</a></li>
<li><a href="http://ict.gctaa.net">CS /Web Development Program @ ACC</a></li>
</ul>
</div>
<div class="right">
<h2>NOVA Web Development:</h2>
<ul>
<li><a href="static/NOVAWebLimitedLiabilityCompanyOperatingAgreement.pdf">
Operating Agreement</a></li>
<li><a href="https://wordsbynana.com/">Words by Nana</a>: Natalia Cerna's
Weblog</li>
<li><a href="static/dj4e1/index.html">First DJ4E Study Session Notes</a>
(using (<a href="https://github.com/regebro/hovercraft">Hovercraft!</a>)</li>
<li><a href="static/DJ4Enotes/index.html">First DJ4E Study Session Notes</a>
(using <a href="https://github.com/hakimel/reveal.js">reveal.js</a>)</li>
</ul>
</div>
</div>
<div class="split">
<div class="left">
<h2>Papers for University of the People MBA Program:</h2>
<ul>
<li><a href="static/UofPeople/MarketingManagementReflections.pdf">
Marketing Management Reflections (2020-06-01)</a></li>
<li><a href="static/UofPeople/ShouldLibreOrganizeBeCalledAnOMS.pdf">
Should LibreOrganize Be Called an OMS? (2020-05-31)</a></li>
<li><a href="static/UofPeople/MarketingChannelsForNOVAWebDevelopment.pdf">
Marketing Channels for NOVA Web Development (2020-05-27)</a></li>
<li><a href="static/UofPeople/WhenIsMarketingEthical.pdf">
When is Marketing Ethical? (2020-05-27)</a></li>
<li><a href="static/UofPeople/EstablishingAnIntegratedMarketingCommunicationsStrategy.pdf">
Establishing an Integrated Marketing Communications Strategy (2020-05-20)</a>
</li>
<li><a href="static/UofPeople/MarketingAndSalesForNOVAWebDevelopment.pdf">
Marketing and Sales for NOVA Web Development (2020-05-16)</a></li>
<li><a href="static/UofPeople/DeterminingPriceWithoutSacrificingValues.pdf">
Determining Price without Sacrificing Values (2020-05-13)</a></li>
<li><a href="static/UofPeople/PricingGoodsThatImpactLives.pdf">
Asking the Wrong Question: Pricing of Goods that Impact People's Lives
(2020-05-12)</a></li>
<li><a href="static/UofPeople/DrugPricesAndTheBigLie.pdf">
Drug Prices and the Big Lie about the "Free Market" in U.S. Economic Relations
(2020-05-09)</a></li>
<li><a href="static/UofPeople/OnTheShouldersOfGiants.pdf">Invention vs.
Innovation in New Product Development: On the Shoulders of Giants
(2020-05-06)</a></li>
<li><a href="static/UofPeople/TheLifeCycleOfOpenSourceSoftware.pdf">
The Life Cycle of Open Source Software (2020-05-03)</a></li>
<li><a href="static/UofPeople/BrandingStrategyForLibreOrganize.pdf">
Possible Benefits of a Global Branding Strategy for LibreOrganize (2020-04-29)
</a></li>
<li><a href="static/UofPeople/BrandingArlingtonVirginiaREIT.pdf">
Branding in an Arlington, Virginia REIT (2020-04-26)</a></li>
<li><a href="static/UofPeople/User_BuyerModelForActionNetworkAndTheArgumentForSoftwareFreedom.pdf">
User/Buyer Model for Action Network and the Argument for Software Freedom
(2020-04-22)</a></li>
<li><a href="static/UofPeople/YouthAndBernieSanders.pdf">
Youth and Bernie Sanders: A Look at the Role of Demographics in Market Behavior
(2020-04-19)</a></li>
<li><a href="static/UofPeople/MarketingComponentsAndValuePropositionOfNationBuilder.pdf">
Marketing Components and Value Proposition of NationBuilder (2020-04-15)</a>
</li>
<li><a href="static/UofPeople/QualitativeFactorsAndTheWorldWeWantToLiveIn.pdf">
Qualitative Factors and the World We Want to Live In (2020-02-26)</a></li>
<li><a href="static/UofPeople/TycoCorruptionCaseStudy.pdf">
Tyco Corruption Case Study: Targeting the Wrong Victim (2019-10-23)</a></li>
</ul>
</div>
<div class="right">
<h2>Other Stuff:</h2>
<ul>
<li><a href="static/Illustrious_American_and_Other_Verses_Lewis_A_Young.pdf">
Illustrious American and Other Verses by Lewis A. Young</a>
(plain text version
<a href="static/Illustrious_American_and_Other_Verses_Lewis_A_Young.txt">
here</a>)</li>
<li><a href="static/presentations/CP4E2004/index.html">CP4E Presentation</a>
</li>
<li><a href="static/photos/march21_2010_march.jpg">Immigration Rights March</a>
</li>
<li><a href="static/venezuela/index.html">Photographs from Venezuela</a></li>
</ul>
</div>
</div>
<div class="split">
<div class="left">
<h2>Books:</h2>
<ul>
<li><a href="http://openbookproject.net/thinkcs/python/english2e">How to
Think Like a Computer Scientist: Learning with Python</a> 2nd Ed.</li>
</ul>
</div>
<div class="right">
<h2>Exits:</h2>
<ul>
<li><a href="http://ibiblio.org/">ibiblio</a></li>
<li><a href="http://launchpad.net/">Launchpad</a></li>
</ul>
</div>
</div>
<h2>Papers/Articles/Presentations:</h2>
<ul>
<li><a href="https://www.peoplesworld.org/article/public-tools-for-public-schools-stopping-tech-giants-online-education-takeover/">
Public Tools for Public Schools: Stopping tech giants online education
takeover</a> (<a href="https://www.peoplesworld.org">People's World</a>
article June 29, 2020).</li>
<li><a href="static/VCCSPeerGroupPresentationFeb2017.pdf">Connecting
VCCS Courses to to a Project Based Dual-enrolled High School IT / CS
Program</a></li>
<li><a href="static/papers/hidden_curriculum.pdf">
Challenging the Hidden Curriculum of Inequity: Full-Time Students at the
Arlington Career Center</a></li>
<li><a href="static/papers/gmu_ctch601_final_paper.pdf">
Dual Enrollment in a High School Career and Technical Center as a
Strategy to Address the Achievement Gap</a></li>
<li><a href="static/FromTeacherToCrusader.pdf">
From teacher to crusader: Confessions of an open source educator</a></li>
<li><a href="static/testFirst/index.html">
Using Test Driven Development in a Computer Science Classroom:
A First Experience</a></li>
<li><a href="static/frank_wilson_interview.html">
Frank Wilson Interview</a></li>
<li><a href="https://www.linux.com/news/portrait-jeff-elkner-free-software-activist-and-teacher"><!-- static/linuxdotcom_portrait/index.html -->
Linux.com Article</a></li>
<li><a href="static/pyYHS/year01/pyYHS.html">
Using Python in a High School Computer Science Program</a></li>
<li><a href="static/pyYHS/year02/pyYHS2.html">
Using Python in a High School Computer Science Program - Year 2</a></li>
<li><a href="static/articles/caseStudy.html">
How to Think Like a Computer Scientist: Learning with Python
A Copyleft Case Study</a></li>
<li><a href="static/articles/mainstream.html">
LTSP: Moving into the Mainstream</a></li>
</ul>
<blockquote>
<p>{{text}}</p>
<p class="author">-- {{author}}</p>
</blockquote>
<footer>
<p>copyright © 2020 Jeffrey Elkner</p>
<a href="http://validator.w3.org/check/referer">
<strong> HTML </strong> Valid! </a>
<a href="http://jigsaw.w3.org/css-validator/check/referer?profile=css3">
<strong> CSS </strong> Valid! </a>
</footer>
</body>
</html>

@ -0,0 +1,77 @@
import sqlite3
import random
def query(db, stmnt):
con = sqlite3.connect(db)
cur = con.cursor()
cur.execute(stmnt)
results = cur.fetchall()
con.close()
return results
def get_authors(db):
return query(db, 'SELECT * FROM Author ORDER BY lname')
def get_quotes(db):
stmnt = """SELECT qtext, fname, lname, source, qdate FROM Quote
NATURAL JOIN Author ORDER BY RANDOM()"""
return query(db, stmnt)
def format_quote(raw_quote):
"""
Return a tuple containing (text, source) for a quote given a raw quote
containing [text, author first name, author last name, source document,
quote date] where all fields accept text are possibly None values. Source
should be set to "Anonymous" if no other info is provided.
Examples:
>>> format_quote(['Quote', 'F', 'L', 'Source', 'Date'])
('Quote', 'F L, Source, Date')
>>> format_quote(['Quote', 'F', 'L', None, None])
('Quote', 'F L')
>>> format_quote(['Quote', 'F', 'L', 'Source', None])
('Quote', 'F L, Source')
>>> format_quote(['Quote', 'F', 'L', None, 'Date'])
('Quote', 'F L, Date')
>>> format_quote(['Quote', None, 'L', None, None])
('Quote', 'L')
>>> format_quote(['Quote', None, None, 'Source', None])
('Quote', 'Source')
>>> format_quote(['Quote', None, None, None, None])
('Quote', 'Anonymous')
"""
text = raw_quote[0]
source = []
# append author name (first and last) to source list if provided
if raw_quote[1] and raw_quote[2]:
source.append("%s %s" % (raw_quote[1], raw_quote[2]))
elif raw_quote[2]: # only last name provided
source.append(raw_quote[2])
# append source document and date to source list if provided
for item in raw_quote[-2:]:
if item:
source.append(item)
# join the pieces into a string seperated by comma and space
if source:
source = ", ".join(source)
else: # no source information provided, so make it "Anonymous"
source = "Anonymous"
return text, source
def get_random_quote(db):
return format_quote(get_quotes(db)[0])
if __name__ == '__main__':
import doctest
doctest.testmod()

@ -0,0 +1,66 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Abduction Form</title>
<style>
@import url(style.css);
form {
display: block;
margin-left: 30vw;
}
</style>
</head>
<body>
<h1>Abduction Form</h1>
<main>
<p>
Share your story of alien abduction:
</p>
<form action="report.php" method="post">
<label for="firstname">First name:</label>
<input type="text" id="firstname" name="firstname"><br>
<label for="lastname">Last name:</label>
<input type="text" id="lastname" name="lastname"><br>
<label for="email">What is your email address?</label>
<input type="text" id="email" name="email"><br>
<label for="occurred">When did it happen?</label>
<input type="text" id="occurred" name="occurred"><br>
<label for="howlong">How long were you gone?</label>
<input type="text" id="howlong" name="howlong"><br>
<label for="howmany">How many did you see?</label>
<input type="text" id="howmany" name="howmany"><br>
<label for="description">Describe them:</label>
<input type="text" id="description" name="description"><br>
<label for="whattheydid">What did they do to you?</label>
<input type="text" id="whattheydid" name="whattheydid"><br>
<label for="tabbyspotted">Have you seen my cat Tabby?</label>
Yes <input id="tabbyspotted" name="tabbyspotted" type="radio" value="yes">
No <input id="tabbyspotted" name="tabbyspotted" type="radio" value="no"><br>
<img src="images/tabby.jpg" height="175" alt="My abducted cat Tabby"><br>
<label for="other" name="other">Anything else you want to add?</label>
<textarea id="other" name="other"></textarea><br>
<input type="submit" value="Report Abduction" name="submit">
</form>
</main>
<footer id="vLinks">
</footer>
<script>
var loc = window.location.href;
var linkStr = '<a href="http://validator.w3.org/check?uri=';
linkStr += loc;
linkStr += '">\n<strong> HTML </strong> Valid! </a> |';
linkStr +=' <a href="http://jigsaw.w3.org/css-validator/validator?uri='
linkStr += loc;
linkStr += '?profile=css3">\n<strong> CSS </strong> Valid! </a>'
console.log(linkStr);
var footer = document.getElementById("vLinks");
console.log(footer);
footer.innerHTML = linkStr;
</script>
</body>
</html>

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<style>
@import url(style.css);
</style>
</head>
<body>
<h1></h1>
<main>
<?php
$dir = 'sqlite:/home/jelkner/Data/phpliteadmin/alien_abductions.sqlite';
$dbh = new PDO($dir) or die("Cannot open the database");
$query = "SELECT * FROM Abductions";
foreach ($dbh->query($query) as $row)
{
echo $row[1];
}
$dbh = null; //This is how you close a PDO connection
?>
</main>
<footer id="vLinks">
</footer>
<script>
var loc = window.location.href;
var linkStr = '<a href="http://validator.w3.org/check?uri=';
linkStr += loc;
linkStr += '">\n<strong> HTML </strong> Valid! </a> |';
linkStr +=' <a href="http://jigsaw.w3.org/css-validator/validator?uri='
linkStr += loc;
linkStr += '?profile=css3">\n<strong> CSS </strong> Valid! </a>'
console.log(linkStr);
var footer = document.getElementById("vLinks");
console.log(footer);
footer.innerHTML = linkStr;
</script>
</body>
</html>

@ -0,0 +1,15 @@
DROP TABLE IF EXISTS Abductions;
CREATE TABLE Abductions(
id INTEGER PRIMARY KEY AUTOINCREMENT,
firstname TEXT NOT NULL,
lastname TEXT NOT NULL,
email TEXT NOT NULL,
occured TEXT NOT NULL,
howlong TEXT NOT NULL,
howmany TEXT NOT NULL,
description TEXT NOT NULL,
whattheydid TEXT NOT NULL,
tabbyspotted INTEGER NOT NULL,
other TEXT NOT NULL
);

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Head First PHP &amp; MySQL</title>
<style>
@import url(../main.css);
</style>
</head>
<body>
<h1>Head First PHP &amp; MySQL</h1>
<main>
<h2>Projects</h2>
<ul>
<li><a href="abduction_form.html">Alien Abduction</a></li>
</ul>
<h2>Who Am I?</h2>
<p>
<?php
print shell_exec( 'whoami' );
?>
</p>
</main>
<footer id="vLinks">
</footer>
<script>
var loc = window.location.href;
var linkStr = '<a href="http://validator.w3.org/check?uri=';
linkStr += loc;
linkStr += '">\n<strong> HTML </strong> Valid! </a> |';
linkStr +=' <a href="http://jigsaw.w3.org/css-validator/validator?uri='
linkStr += loc;
linkStr += '?profile=css3">\n<strong> CSS </strong> Valid! </a>'
console.log(linkStr);
var footer = document.getElementById("vLinks");
console.log(footer);
footer.innerHTML = linkStr;
</script>
</body>
</html>

@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Aliens Abducted Me - Abduction Report</title>
<style>
</style>
</head>
<body>
<h1>Aliens Abducted Me - Abduction Report</h1>
<main>
<?php
$when_it_happened = $_POST['when'];
$how_long = $_POST['howlong'];
$alien_description = $_POST['description'];
$tabby_spotted = $_POST['tabbyspotted'];
$email = $_POST['email'];
echo '<p>Thanks for submitting the form.<br>';
echo 'You were abducted ' . $when_it_happened;
echo ' and were gone for ' . $how_long . '<br>';
echo 'Describe them: ' . $alien_description . '<br>';
echo 'Was Tabby there? '. $tabby_spotted . '<br>';
echo 'Your email address is ' . $email . '</p>';
?>
</main>
<footer id="vLinks">
</footer>
<script>
var loc = window.location.href;
var linkStr = '<a href="http://validator.w3.org/check?uri=';
linkStr += loc;
linkStr += '">\n<strong> HTML </strong> Valid! </a> |';
linkStr +=' <a href="http://jigsaw.w3.org/css-validator/validator?uri='
linkStr += loc;
linkStr += '?profile=css3">\n<strong> CSS </strong> Valid! </a>'
console.log(linkStr);
var footer = document.getElementById("vLinks");
console.log(footer);
footer.innerHTML = linkStr;
</script>
</body>
</html>

@ -0,0 +1,16 @@
main {
margin: 30px;
padding: 30px;
border: 1px dotted #555;
}
h1 {
text-align: center;
}
a, a:visited {
text-decoration: none;
color: #555;
}
footer {
text-align: center;
margin-top: 20px;
}

@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Book List</title>
<style>
@import url(style.css);
header > nav {
text-align: center;
}
</style>
</head>
<body>
<header>
<h1>Book List</h1>
<nav>
<a href="index.php">Home</a>
</nav>
</header>
<main>
<?php
$dir = 'sqlite:database/acclib.db';
$dbh = new PDO($dir) or die("Cannot open the database");
$query = "SELECT * FROM Books";
foreach ($dbh->query($query) as $row)
{
echo $row[1];
}
$dbh = null; //This is how you close a PDO connection
?>
</main>
<footer id="vLinks">
</footer>
<script>
var loc = window.location.href;
var linkStr = '<a href="http://validator.w3.org/check?uri=';
linkStr += loc;
linkStr += '">\n<strong> HTML </strong> Valid! </a> |';
linkStr +=' <a href="http://jigsaw.w3.org/css-validator/validator?uri='
linkStr += loc;
linkStr += '?profile=css3">\n<strong> CSS </strong> Valid! </a>'
console.log(linkStr);
var footer = document.getElementById("vLinks");
console.log(footer);
footer.innerHTML = linkStr;
</script>
</body>
</html>

@ -0,0 +1,12 @@
.mode column
.headers on
SELECT
title, class, subclass, cutter, suppl
FROM
Books
ORDER BY
class ASC,
subclass ASC,
cutter ASC,
suppl ASC;

@ -0,0 +1,501 @@
INSERT INTO Books VALUES(
1,
'Good Faith Collaboration: The Culture of Wikipedia',
'AE',
100,
'R43',
'2010',
'9780262014472',
'shelf'
);
INSERT INTO Books VALUES(
2,
'Algorithms to Live By: The Computer Science of Human Decisions',
'BF',
39,
'C4885',
'2016',
'9781627790369',
'shelf'
);
INSERT INTO Books VALUES(
3,
'Ours to Hack and to Own: The Rise of Platform Cooperativism, A New Vision for the Future of Work and a Fairer Internet',
'HM',
851,
'O973',
'2016',
'9781944869335',
'shelf'
);
INSERT INTO Books VALUES(
4,
'The Mathematics of Elections and Voting',
'JF',
1001,
'W35',
'2014',
'9783319098098',
'shelf'
);
INSERT INTO Books VALUES(
5,
'Beyond Transparency: Open Data and the Future of Civic Innovation',
'JK',
468,
'T7 B49',
'2013',
'9780615889085',
'shelf'
);
INSERT INTO Books VALUES(
6,
'Trusting Teachers with School Success: What Happens when Teachers Call the Shots',
'LB',
2806.45,
'F36',
'2013',
'9781610485104',
'shelf'
);
INSERT INTO Books VALUES(
7,
'Murphy''s Law and Other Reasons Why Things Go Wrong',
'PN',
6231,
'M82 B57',
'',
'0843104287',
'shelf'
);
INSERT INTO Books VALUES(
8,
'The Annotated Alice: Alice''s Adventures in Wonderland & Through the Looking Glass',
'PR',
4611,
'A7',
'1960',
'9780452010413',
'shelf'
);
INSERT INTO Books VALUES(
9,
'Gödel, Escher, Bach: An Eternal Golden Braid',
'QA',
9.8,
'H63',
'1980',
'0394745027',
'shelf'
);
INSERT INTO Books VALUES(
10,
'Doing Math with Python: Use Programming to Explore Algebra, Statistics, Calculus, and More!',
'QA',
20,
'C65 S24',
'2015',
'9781593276409',
'shelf'
);
INSERT INTO Books VALUES(
11,
'Rethinking Mathematics: Teaching Social Justice by the Numbers',
'QA',
22.3,
'R478',
'2013',
'9780942961553',
'shelf'
);
INSERT INTO Books VALUES(
12,
'Unlocking the Clubhouse: Women in Computing',
'QA',
76.25,
'M35',
'2001',
'9780262632690',
'shelf'
);
INSERT INTO Books VALUES(
13,
'Stuck in the Shallow End: Education, Race, and Computing',
'QA',
76.27,
'M347',
'2008eb',
'9780262514040',
'shelf'
);
INSERT INTO Books VALUES(
14,
'Turtles, Termites, and Traffic Jams: Explorations in Massively Parallel Microworlds',
'QA',
76.58,
'R47',
'1994',
'9780262680936',
'shelf'
);
INSERT INTO Books VALUES(
15,
'The C Trilogy: A Complete Library for C Programmers',
'QA',
76.73,
'C15 B56',
'1987',
'0830628908',
'shelf'
);
INSERT INTO Books VALUES(
16,
'The C Programming Language',
'QA',
76.73,
'C15 K47',
'1988',
'9780131103702',
'shelf'
);
INSERT INTO Books VALUES(
17,
'The C Answer Book: Solutions to the Exercises in The C Programming Language, Second Edition, by Brian W. Kernighan and Dennis M. Ritchie',
'QA',
76.73,
'C15 K47',
'1988 suppl',
'9780131096530',
'shelf'
);
INSERT INTO Books VALUES(
18,
'C Programming: A Complete Guide to Mastering the C Language',
'QA',
76.73,
'C15 H364',
'1989',
'9780201194449',
'shelf'
);
INSERT INTO Books VALUES(
19,
'Data Structures Using C',
'QA',
76.73,
'C15 T46',
'1990',
'9780131997462',
'shelf'
);
INSERT INTO Books VALUES(
20,
'C: A Reference Manual',
'QA',
76.73,
'C15 H38',
'1991',
'9780131109339',
'shelf'
);
INSERT INTO Books VALUES(
21,
'The Beginner''s Guide to C',
'QA',
76.73,
'C15 H668',
'1994',
'9781874416159',
'shelf'
);
INSERT INTO Books VALUES(
22,
'C Primer Plus',
'QA',
76.73,
'C15 P733',
'1988',
'0672225824',
'shelf'
);
INSERT INTO Books VALUES(
23,
'C: The Complete Reference',
'QA',
76.73,
'C15 S353',
'1995',
'9780078821011',
'shelf'
);
INSERT INTO Books VALUES(
24,
'Eloquent JavaScript, 3rd Edition: A Modern Introduction to Programming',
'QA',
76.73,
'J39 H38',
'2019',
'9781593279509',
'shelf'
);
INSERT INTO Books VALUES(
25,
'Head First JavaScript Programming',
'QA',
76.73,
'J39 F735',
'2014',
'9781449340131',
'shelf'
);
INSERT INTO Books VALUES(
26,
'Javascript: The Good Parts',
'QA',
76.73,
'J39 C763',
'2008',
'9780596517748',
'shelf'
);
INSERT INTO Books VALUES(
27,
'Python Testing Beginner''s Guide: An Easy and Convenient Approach to Testing Your Python Projects',
'QA',
76.73,
'P98 A73',
'2010eb',
'9781847198846',
'shelf'
);
INSERT INTO Books VALUES(
28,
'Data Structures and Algorithms in Python',
'QA',
76.73,
'P98 G66',
'2013',
'9788126562176',
'shelf'
);
INSERT INTO Books VALUES(
29,
'Python Algorithms: Mastering Basic Algorithms in the Python Language',
'QA',
76.73,
'P98 H485',
'2010',
'9781430232377',
'shelf'
);
INSERT INTO Books VALUES(
30,
'Python for Data Analysis',
'QA',
76.73,
'P98 M42',
'2013',
'9781449319793',
'shelf'
);
INSERT INTO Books VALUES(
31,
'Introduction to Computer Science Using Python: A Computational Problem-Solving Focus',
'QA',
76.73,
'P98 D547',
'2013',
'9780470555156',
'shelf'
);
INSERT INTO Books VALUES(
32,
'Think Python',
'QA',
76.73,
'P98 D694',
'2012',
'9781449330729',
'shelf'
);
INSERT INTO Books VALUES(
33,
'Problem Solving with Algorithms and Data Structures Using Python',
'QA',
76.73,
'P98 M54',
'2011',
'9781590282571',
'shelf'
);
INSERT INTO Books VALUES(
34,
'Python Testing Beginner''s Guide: An Easy and Convenient Approach to Testing Your Python Projects',
'QA',
76.73,
'P98 A73',
'2010',
'9781847198846',
'shelf'
);
INSERT INTO Books VALUES(
35,
'Mathematics for the Digital Age and Programming in Python',
'QA',
76.73,
'P98 L58',
'2010',
'9780982477540',
'shelf'
);
INSERT INTO Books VALUES(
36,
'Python Testing Cookbook over 70 Simple but Incredibly Effective Recipes for Taking Control of Automated Testing Using Powerful Python Testing Tools',
'QA',
76.73,
'P98 T87',
'2011',
'9781849514668',
'shelf'
);
INSERT INTO Books VALUES(
37,
'The SQL Guide to SQLite',
'QA',
76.73,
'S67 L3617',
'2009',
'9780557076765',
'shelf'
);
INSERT INTO Books VALUES(
38,
'The Definitive Guide to Sqlite, Second Edition',
'QA',
76.73,
'S67 A45',
'2010eb',
'9781430232254',
'shelf'
);
INSERT INTO Books VALUES(
39,
'Test-Driven Development: A Practical Guide',
'QA',
76.76,
'D47 A783',
'2003',
'9780131016491',
'shelf'
);
INSERT INTO Books VALUES(
40,
'Clean Code: A Handbook of Agile Software Craftsmanship',
'QA',
76.76,
'D47 C583',
'2009',
'9780132350884',
'shelf'
);
INSERT INTO Books VALUES(
41,
'Learning the Vi Editor',
'QA',
76.76,
'O63 L355',
'1990',
'9780937175675',
'shelf'
);
INSERT INTO Books VALUES(
42,
'The UNIX-Haters Handbook',
'QA',
76.76,
'O63 U54518',
'1994',
'9781568842035',
'shelf'
);
INSERT INTO Books VALUES(
43,
'Test-Driven Development: By Example',
'QA',
76.76,
'T48 B43',
'2003',
'9780321146533',
'shelf'
);
INSERT INTO Books VALUES(
44,
'Assembly Language for x86 Processors: Sixth Edition',
'QA',
76.8,
'I77',
'2011',
'9780136022121',
'shelf'
);
INSERT INTO Books VALUES(
45,
'Data Structure and Algorithmic Thinking with Python',
'QA',
76.9,
'A43 K368',
'2016',
'9788192107592',
'shelf'
);
INSERT INTO Books VALUES(
46,
'Data Structures and Algorithms with Python',
'QA',
76.9,
'D35',
'',
'9783319130712',
'shelf'
);
INSERT INTO Books VALUES(
47,
'Data Structures and Algorithms',
'QA',
76.9,
'D35 A38',
'1982',
'0201000237',
'shelf'
);
INSERT INTO Books VALUES(
48,
'Discrete Mathematics',
'QA',
76.9,
'M35 R67',
'1988',
'0132154277',
'shelf'
);
INSERT INTO Books VALUES(
49,
'Think Stats',
'QA',
276.4,
'D69',
'2014',
'9781491907337',
'shelf'
);
INSERT INTO Books VALUES(
50,
'Think Bayes',
'QA',
279.5,
'D69',
'2013',
'9781449370787',
'shelf'
);

@ -0,0 +1,12 @@
DROP TABLE IF EXISTS Books;
CREATE TABLE Books (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
class TEXT NOT NULL,
subclass REAL NOT NULL,
cutter TEXT,
suppl TEXT,
isbn TEXT,
stat TEXT NOT NULL
);

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Arlington Career Center CS / ICT Library</title>
<style>
@import url(../main.css);
</style>
</head>
<body>
<h1>Arlington Career Center CS / ICT Library</h1>
<main>
<nav>
<a href="book_list.php">Browse Books</a>
</nav>
</main>
<footer id="vLinks">
</footer>
<script>
var loc = window.location.href;
var linkStr = '<a href="http://validator.w3.org/check?uri=';
linkStr += loc;
linkStr += '">\n<strong> HTML </strong> Valid! </a> |';
linkStr +=' <a href="http://jigsaw.w3.org/css-validator/validator?uri='
linkStr += loc;
linkStr += '?profile=css3">\n<strong> CSS </strong> Valid! </a>'
console.log(linkStr);
var footer = document.getElementById("vLinks");
console.log(footer);
footer.innerHTML = linkStr;
</script>
</body>
</html>

@ -0,0 +1,9 @@
<?php
$dir = 'sqlite:database/acclib.db';
$dbh = new PDO($dir) or die("Cannot open the database");
$query = "SELECT * FROM Books";
foreach ($dbh->query($query) as $row)
{
echo $row[0] . ' ' . substr($row[1], 0, 75) . "\n";
}
$dbh = null; //This is how you close a PDO connection

@ -0,0 +1,2 @@
<?php
phpinfo();

@ -0,0 +1,16 @@
main {
margin: 30px;
padding: 30px;
border: 1px dotted #555;
}
h1 {
text-align: center;
}
a, a:visited {
text-decoration: none;
color: #555;
}
footer {
text-align: center;
margin-top: 20px;
}

@ -0,0 +1,18 @@
<footer id="vLinks">
</footer>
<script>
var loc = window.location.href;
var linkStr = '<a href="http://validator.w3.org/check?uri=';
linkStr += loc;
linkStr += '">\n<strong> HTML </strong> Valid! </a> |';
linkStr +=' <a href="http://jigsaw.w3.org/css-validator/validator?uri='
linkStr += loc;
linkStr += '?profile=css3">\n<strong> CSS </strong> Valid! </a>'
console.log(linkStr);
var footer = document.getElementById("vLinks");
console.log(footer);
footer.innerHTML = linkStr;
</script>

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Learning PHP with TDD</title>
<style>
@import url(main.css);
</style>
</head>
<body>
<h1>Learning PHP with TDD</h1>
<main>
<h2>Projects</h2>
<ul>
<li><a href="HeadFirst">Head First PHP &amp; MySQL</a></li>
<li><a href="acclib">ACC CS / ICT Library</a></li>
</ul>
</main>
<footer id="vLinks">
</footer>
<script>
var loc = window.location.href;
var linkStr = '<a href="http://validator.w3.org/check?uri=';
linkStr += loc;
linkStr += '">\n<strong> HTML </strong> Valid! </a> |';
linkStr +=' <a href="http://jigsaw.w3.org/css-validator/validator?uri='
linkStr += loc;
linkStr += '?profile=css3">\n<strong> CSS </strong> Valid! </a>'
console.log(linkStr);
var footer = document.getElementById("vLinks");
console.log(footer);
footer.innerHTML = linkStr;
</script>
</body>
</html>

@ -0,0 +1,15 @@
main {
margin: 30px;
padding: 30px;
border: 1px dotted #555;
}
h1 {
text-align: center;
}
a, a:visited {
text-decoration: none;
color: #555;
}
footer {
text-align: center;
}

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<style>
</style>
</head>
<body>
<h1></h1>
<main>
</main>
<footer id="vLinks">
</footer>
<script>
var loc = window.location.href;
var linkStr = '<a href="http://validator.w3.org/check?uri=';
linkStr += loc;
linkStr += '">\n<strong> HTML </strong> Valid! </a> |';
linkStr +=' <a href="http://jigsaw.w3.org/css-validator/validator?uri='
linkStr += loc;
linkStr += '?profile=css3">\n<strong> CSS </strong> Valid! </a>'
console.log(linkStr);
var footer = document.getElementById("vLinks");
console.log(footer);
footer.innerHTML = linkStr;
</script>
</body>
</html>
Loading…
Cancel
Save