Monday, May 9, 2011

index.html is a special name

http://eniac.cs.qc.edu/~svitak/index.html

every folder has two special subfolders
help you navigate

one is called .  (yourself)
the other is called .. (one level up)

the PATH is a list of folders to look in when trying to execute a program


<img src="./pictures/chicken-picture1.gif"
height="100" width="100"/>

http://www.w3schools.com/css/default.asp

we discussed CSS.
what does sytle mean?
what does cascading mean? how does it work.

The id Selector

proof:
0 = 1
0 + 1 = 1 + 1
1 = 2
clearly, the pope and i are two
therefore, the pope and i are one
therefore, i am the pope

we got to id and class selectors

<html>
<head>
<style type="text/css">
.argument
{
text-align:left;
color:green;
}
.summary
{
text-align:right;
color:red;
}
.center
{
text-align:center;
}
</style>
</head>

<body>
<h1 class="center">Center-aligned heading</h1>
<p class="center">Center-aligned paragraph.</p>
<p class="argument">
proof:</p>
<p class="argument">0 = 1</p>
<p class="argument">0 + 1 = 1 + 1
1 = 2
clearly, the pope and i are two
therefore, the pope and i are one
therefore, i am the pope</p>

<p class="summary">Proof by contradiction
</p>
</body>
</html>

Wednesday, May 4, 2011

dates / times are stored in Excel and Access as serial numbers.

date and time arithmetic

SELECT Book.Title, Book.PublDate, Book.Copyright, Author.LastName, Publisher.PubName, Date()-60 AS Expr1
FROM Publisher INNER JOIN (Author INNER JOIN Book ON Author.[AuthorID] = Book.[AuthorCode]) ON Publisher.[PUBID] = Book.[PubID]
WHERE Book.PublDate>Date()-60;

we want:
SELECT Book.Title, Book.PublDate, Book.Copyright, Author.LastName, Publisher.PubName, Date()-60 AS Expr1
FROM Publisher INNER JOIN (Author INNER JOIN Book ON Author.[AuthorID] = Book.[AuthorCode]) ON Publisher.[PUBID] = Book.[PubID]
WHERE (((Book.PublDate) Between Date()-60 And Date()));


SELECT Book.Title, Book.EDITION, Author.LastName, Publisher.PubName
FROM Publisher INNER JOIN (Author INNER JOIN Book ON Author.[AuthorID] = Book.[AuthorCode]) ON Publisher.[PUBID] = Book.[PubID]
WHERE (((Book.EDITION) Is Null));

more about wildcards
* match anything, including nothing
? match exactly one character

begins with G
G*
turned it into
Like "G*"

where the title contains Excel
*Excel*

Monday, May 2, 2011

relational databases

two problems with non-relational, non-normalized databases.

primary key: field that uniquely identifies a record

foreign key: points to the primary key of a different (thus foreign) table

SQL statement:

SELECT Customers.First, Customers.Last, ItemDescription From Customers, Orders

will give me the Cartesian product of the two tables

SELECT Customers.First, Customers.Last, ItemDescription From Customers, Orders
WHERE Customers.CusId = Orders.CusID

called an INNER JOIN ON Customers.CusId = Orders.CusID
Quiz material. From here:
http://qccs12.blogspot.com/2011/03/lecture_09.html
WEDNESDAY, MARCH 9, 2011

until here:
http://qccs12.blogspot.com/2011/03/more-financial-formulas-solver-2.html
WEDNESDAY, MARCH 30, 2011

Wednesday, April 13, 2011

intro to CSS

http://www.w3schools.com/css/default.asp

selectors and declarations

back to MS Access
field properties

to ask questions about the data, we use Queries

SQL - a standard query language you can use to talk to databases
http://www.w3schools.com/sql/default.asp

SELECT * FROM Customers
WHERE FirstName = "Peter"

query wizard:
what table?
what fields?
what shall we name this query?

then, we will need to fine-tune it in Design View.

SELECT Customers.Title, Customers.FirstName, Customers.LastName, Customers.PhoneNumber, Customers.FullAddress, Customers.SSN, Customers.CreditCardNumber, Customers.DOB
FROM Customers;

we added the where clause using the design view, in the Criteria row.

SELECT Customers.Title, Customers.FirstName, Customers.LastName, Customers.PhoneNumber, Customers.FullAddress, Customers.SSN, Customers.CreditCardNumber, Customers.DOB
FROM Customers
WHERE (((Customers.FirstName)="Peter"));

Access databases will typically have Tables, Queries, Forms, Reports

wildcards: * ?
* means match any number of characters, including zero character

j*sh

____________

josh
jish
joshua -- only this one won't match
jsh
jjsh
jaash

Monday, April 11, 2011

MSACCESS
first, create a database
don't need to save data
do need to save meta-data
no undo

Microsoft Access is a relational database

A database: data and ways of maintaining that data

Database: a collection of tables
Table: a collection of records
Record: a collection of fields
Field: one unit of data. e.g. the SSN field of a given record

Table design = meta-data of the table. the table structure

* when designing tables, find the smallest unit
* data type = the type of data. number, text, date, etc.
* MUCH better to store values that don't need constant updating. Date of birth instead of age
* calculate things rather than storing duplicate information wherever possible
. Quality Points and GPA but not Credits. save space, less likely to have inconsistent data.

possibility of duplicate records
999,999,999

http://www.snopes.com/business/taxes/woolworth.asp

primary key: unique identifier for a record

Monday, April 4, 2011

ipmt, ppmt

find out: is lab instructor doing pivottables?

how to extend Excel's function

Visual Basic for Applications: a programming language

record a macro.

when we make a macro, we cannot save the file as .xlsx
instead, it is a .xlsm

Sub is for subroutine
function calculates a value and sends it back

UDF = user defined function
HW: make a macro, any macro
HW: make a UDF, any UDF
for example:
Function WaxmanCoefficient(X, Y)
WaxmanCoefficient = (X + 2) ^ Y
End Function

prenhall.com/grauer

Making web pages
http://eniac.cs.qc.edu/~svitak/cs12/webpageassign.html

plus, there will be some more

CSS
cascading style sheets
http://www.w3schools.com/css/default.asp

took a lot of the formatting and the "deprecated" it
font tag: allows font color, typeface, etc.
css instead