Though they might not show up until Monday for you.
If you got an F, don't fret! This is readily resolvable. It means that I am missing a test for you, for whatever cause, and did not want to give you a low grade without getting your attention. Otherwise, you might have gotten a B and not thought to ask me about it, when you should have gotten an A+, for example. Please contact me ASAP -- I'll try contacting you as well -- and we can resolve this quickly.
Saturday, June 4, 2011
Friday, June 3, 2011
The following students should contact me
It is possible a text got misplaced by a lab instructor, or some associated problem, such that you deserve a higher grade:
N. Misra
J. Fernandez
M. Rivera
More to come, possibly.
N. Misra
J. Fernandez
M. Rivera
More to come, possibly.
Wednesday, May 18, 2011
Answers to the quizzes
1) c
2) control unit
3) b
4) 1024
5) a
---
1) a
2) RAM
3) d
4) nothing. it is a fossilized marine animal.
5) b
-----
1) b
2) b
3) 1023
4) graphical user interface
5) a
6) d
_____________
1) a
2) a
3) 210, or (n + 1) * (n/2) with n =20
4) a code of storing characters
5) c
6) a
------
1) b
2) a
3) 51 * 25
4) 16
5) c
6) b
----
1) you can seek for multiple values in cells
2) b
3) stealing bandwidth by referencing an image located on someone else's website
4) a
5) lets you see what cells this current cell relies on
6) chase-banking.com
----
New:
1) b
2) b
3) 3rd party cookies can be used to track your behavior and history on the web
4) d
5) c
6) d
7) b
8) a value in one table, corresponds to primary key of other table
9) c
2) control unit
3) b
4) 1024
5) a
---
1) a
2) RAM
3) d
4) nothing. it is a fossilized marine animal.
5) b
-----
1) b
2) b
3) 1023
4) graphical user interface
5) a
6) d
_____________
1) a
2) a
3) 210, or (n + 1) * (n/2) with n =20
4) a code of storing characters
5) c
6) a
------
1) b
2) a
3) 51 * 25
4) 16
5) c
6) b
----
1) you can seek for multiple values in cells
2) b
3) stealing bandwidth by referencing an image located on someone else's website
4) a
5) lets you see what cells this current cell relies on
6) chase-banking.com
----
New:
1) b
2) b
3) 3rd party cookies can be used to track your behavior and history on the web
4) d
5) c
6) d
7) b
8) a value in one table, corresponds to primary key of other table
9) c
list of homeworks
Homeworks:
HW: make a macro, any macro
HW: make a UDF, any UDF
defined here:
http://qccs12.blogspot.com/2011/04/ipmt-ppmt-find-out-is-lab-instructor.html
HW:
lecture book, review questions at end of ch 1
lecture book, exercises in ch 2
lecture book, review questions at end of ch 3
HW:
1) Convert these numbers to binary:
7
14
103
2) Convert these binary numbers to decimal:
11001
110
11
1101
3) Convert those numbers in part 2 to octal.
4) Convert those numbers in part 2 to hexadecimal.
HW: make a macro, any macro
HW: make a UDF, any UDF
defined here:
http://qccs12.blogspot.com/2011/04/ipmt-ppmt-find-out-is-lab-instructor.html
HW:
lecture book, review questions at end of ch 1
lecture book, exercises in ch 2
lecture book, review questions at end of ch 3
HW:
1) Convert these numbers to binary:
7
14
103
2) Convert these binary numbers to decimal:
11001
110
11
1101
3) Convert those numbers in part 2 to octal.
4) Convert those numbers in part 2 to hexadecimal.
Previous Quiz Questions
1) Convert this binary number to decimal:
10101
a) 19
b) 20
c) 21
d) 22
2) The CPU contains the ALU and the ________
3) Which of the following is an example of long-term memory?
a) CPU registers
b) CD-ROM
c) CD-RAM
d) RAM
4) One kilobyte = how many bytes?
5) Which will be faster, a compiled language or an interpreted language?
a) compiled
b) interpreted
c) same speed
d) neither, because there is no such thing
---------------
1) Convert this decimal number to binary:
25
a) 11001
b) 10001
c) 11011
d) 11000
2) The fetch-execute cycle fetches instructions from ________
3) Which of the following is an example of volatile memory?
a) hard disk drive
b) CD-ROM
c) CD-RAM
d) RAM
4) One trilobite = how many bytes?
5) C++ is an example of a
a) low-level language
b) high-level language
c) interpreted language
d) none of the above
---------------
1) The collection of HTML documents, linked together, across many countries is best called:
a) the Internet
b) the World Wide Web
c) the Intertubes
d) CSS
2) The HTML document you view on your web browser usually initially comes from
a) a web client
b) a web server
c) an http
d) Microsoft Word
3) Using the party trick I discussed in class, using your ten fingers, you could count up to:
______________
4) A GUI is _____________________________
5) A 256 color bitmap can store a pixel in how many bytes?
a) 1
b) 2
c) 3
b) 4
6) If I tried to solve the traveling salesman problem for 100 cities, using the algorithm I described,
and started it now, it would finish:
a) in one minute
b) in one hour
c) in one day
d) in more than a trillion years
--------------------
1) If I used my algorithm for traveling salesman for five cities, my program
would finish executing in:
a) less than an hour
b) a day
c) a year
d) more than a trillion years
2) A web page will typically be in the following format:
a) HTML
b) HTTP
c) FTP
d) DOC
3) The sum of the numbers 1 through 20 is:
______________
4) ASCII is:
5) Which is likely the smallest of images?
a) a BMP bitmap
b) a JPEG image
c) an SVG vector graphics image
6) If a collection of numbers are sorted, then I can use binary search
a) true
b) false
-------------------------------
1) The Internet is a synonym for the World Wide Web:
a) true
b) false
2) A web page will typically be in the following format:
a) HTML
b) HTTP
c) FTP
d) DOC
3) The sum of the numbers 1 through 50 is:
______________
4) A hexadecimal digit is in base: ________________
5) A "true-color" bitmap can store a pixel in how many bytes?
a) 1
b) 2
c) 3
b) 4
6) Linear search through a collection is faster than binary search, on average:
a) true
b) false
---------------------------
1) Give one way in which Solver is better than Goal seek.
2) If I want to figure out how much to deposit now in order to
retire with a million bucks, I would use the _______ function.
a) FV
b) PV
c) PMT
d) RATE
3) What is hotlinking?
4) Which of the following is a relative reference?
a) A1
b) $A$1
c) $A1
d) R1C1
5) What does the trace precedents tool do?
what is the domain?
----------------------------
New:
1) Which of the following is used for client-side scripting?
a) C++
b) JavaScript
c) Python
d) PHP
2) In CSS, the level which takes highest cascading precedence is:
a) internal
b) inline
c) external
d) web browser settings
3) Give one reason cookies are bad:
_______________________
4) In CSS, we can target:
a) a tag
b) a bunch of related items, by class
c) one individual item, by id
d) all of the above
5) Really, dates and times are stored in Excel and Access as:
a) text
b) dates
c) whole numbers and fractional numbers
d) none of the above
6) The following text will be matched by h??lo
a) hOOOLO
b) bkjlo
c) helo
d) hello
7) Descartes walked into a bar. When he turned down a drink:
a) he appeared
b) he disappeared
c) he reappeared
d) all of the above
8) A foreign key is: ______________________
9) A record is a collection of:
a) records
b) rows
c) fields
d) views
Monday, May 16, 2011
we did some simple PHP.
AJAX - asychronous JavaScript and XML
Web 2.0
ajax is really just the combination of JavaScript on the client side with e.g. PHP on the server side, communicating with each other asynchronously via XML
Open source software
http://en.wikipedia.org/wiki/Open-source_software
Linux -- a free, open source Operating System
OpenOffice - a free office clone
openoffice.org
talk next time briefly about google docs
AJAX - asychronous JavaScript and XML
Web 2.0
ajax is really just the combination of JavaScript on the client side with e.g. PHP on the server side, communicating with each other asynchronously via XML
Open source software
http://en.wikipedia.org/wiki/Open-source_software
Linux -- a free, open source Operating System
OpenOffice - a free office clone
openoffice.org
talk next time briefly about google docs
Wednesday, May 11, 2011
lecture
<html>
<head>
<link rel="stylesheet" type="text/css"
href="first.css" />
</head>
<body>
<p>This is all about my friends!</p>
<hr/>
<p>They are nice.</p>
</body>
</html>
for the web site, use an external style sheet on at least one web page.
client side scripting vs. server-side scripting
web server sends info to the web browser (which is the client)
Javascript -- carried out on the client's machine
javascript is event-driven.
as opposed to procedural-based programming.
Javascript can write cookies.
drawbacks of cookies.
stays only on that machine.
third-party cookies.
both site A and site B get their ads from site Z. site Z is the third party.
third-party cookies can be used to track users.
Amazon obviously does NOT use simple cookies to keep track of your order.
they use server-side scripting. examples of lanugages that support it: PHP, vbscript meaning ASP, ASPX.
often, hooked up to a database.
next up, AJAX.
<head>
<link rel="stylesheet" type="text/css"
href="first.css" />
</head>
<body>
<p>This is all about my friends!</p>
<hr/>
<p>They are nice.</p>
</body>
</html>
for the web site, use an external style sheet on at least one web page.
client side scripting vs. server-side scripting
web server sends info to the web browser (which is the client)
Javascript -- carried out on the client's machine
javascript is event-driven.
as opposed to procedural-based programming.
Javascript can write cookies.
drawbacks of cookies.
stays only on that machine.
third-party cookies.
both site A and site B get their ads from site Z. site Z is the third party.
third-party cookies can be used to track users.
Amazon obviously does NOT use simple cookies to keep track of your order.
they use server-side scripting. examples of lanugages that support it: PHP, vbscript meaning ASP, ASPX.
often, hooked up to a database.
next up, AJAX.
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>
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*
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
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
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
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
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
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
Wednesday, March 30, 2011
more financial formulas
solver (2 examples)
1) take nominal rate (APR) and divide it by freq for year. (e.g., if compounds monthly, divide by 12). that is called the periodic effective rate.
2) calculate: (1 + PeriodicEffectiveRate)^NPER - 1. that is called the annual effective rate
quiz up to this point
next time:
back to invoice
pivottable and pivotchart
solver (2 examples)
1) take nominal rate (APR) and divide it by freq for year. (e.g., if compounds monthly, divide by 12). that is called the periodic effective rate.
2) calculate: (1 + PeriodicEffectiveRate)^NPER - 1. that is called the annual effective rate
quiz up to this point
next time:
back to invoice
pivottable and pivotchart
Monday, March 28, 2011
Wednesday, March 23, 2011
lecture
HW:
lecture book, exercise 2.9
start reading ch 3 in book.
index.html
how to copy local files to the remote machine, and vice versa
incorporating images in a web page
i used width and height attributes
i also "hotlinked"
that is not nice!
the web site might go down
they can take revenge by changing the image to something you don't want, embarrassing
how not to hotlink
equation for financial calculations
FV = PV * (1 + RATE) ^ NPER
we got up to and including example 9 in finance chapter
lecture book, exercise 2.9
start reading ch 3 in book.
index.html
how to copy local files to the remote machine, and vice versa
incorporating images in a web page
i used width and height attributes
i also "hotlinked"
that is not nice!
the web site might go down
they can take revenge by changing the image to something you don't want, embarrassing
how not to hotlink
equation for financial calculations
FV = PV * (1 + RATE) ^ NPER
we got up to and including example 9 in finance chapter
Monday, March 21, 2011
=3+A1
=SUM(), AVERAGE
quick intro to functions
WEB:
once you have successfully logged in
you need to create a folder called
public_html
then, you can create files inside that folder. i created hello.html
cs12.cs.qc.cuny.edu/~wajo6788/hello.html
note to self - it was called Invoice1.xlsx
Time value of money
money is worth more now than later
PV = present value
FV = future value
PV + PV * RATE
PV * ( 1 + RATE )
PV * ( 1 + RATE )
PV * ( 1 + RATE ) * ( 1+ RATE)
PV * ( 1 + RATE ) * ( 1+ RATE) *(1 + RATE)
FV = PV * (1 + RATE) ^ NPER
404 error
page does not exist
403 error
permissions not granted
=SUM(), AVERAGE
quick intro to functions
WEB:
once you have successfully logged in
you need to create a folder called
public_html
then, you can create files inside that folder. i created hello.html
cs12.cs.qc.cuny.edu/~wajo6788/hello.html
note to self - it was called Invoice1.xlsx
Time value of money
money is worth more now than later
PV = present value
FV = future value
PV + PV * RATE
PV * ( 1 + RATE )
PV * ( 1 + RATE )
PV * ( 1 + RATE ) * ( 1+ RATE)
PV * ( 1 + RATE ) * ( 1+ RATE) *(1 + RATE)
FV = PV * (1 + RATE) ^ NPER
404 error
page does not exist
403 error
permissions not granted
Wednesday, March 16, 2011
absolute vs. relative refs
excel seems to be smart
it modifies rows as appropriate
so too, cols
we don't like "magic numbers"
we want to isolate assumptions
relative refs automatically adjust
absolute references stay in place
absolute refs: use $
A1 style - what we;ve seen so far
R1C1 style - row number, column number
[] in R1C1 style mean offsets
by default, when you NAME a cell, it names
it as an absolute reference
debugging tools
things go wrong
"bug"
http://en.wikipedia.org/wiki/Grace_Hopper
Grace Hopper
first computer bug
"evaluate formula" tool
"trace precedents" tool
"trace dependents" tool
way of figuring out what is going wrong
excel seems to be smart
it modifies rows as appropriate
so too, cols
we don't like "magic numbers"
we want to isolate assumptions
relative refs automatically adjust
absolute references stay in place
absolute refs: use $
A1 style - what we;ve seen so far
R1C1 style - row number, column number
[] in R1C1 style mean offsets
by default, when you NAME a cell, it names
it as an absolute reference
debugging tools
things go wrong
"bug"
http://en.wikipedia.org/wiki/Grace_Hopper
Grace Hopper
first computer bug
"evaluate formula" tool
"trace precedents" tool
"trace dependents" tool
way of figuring out what is going wrong
Monday, March 14, 2011
http://cs12.cs.qc.cuny.edu/~joshwaxman
your webpage will be:
http://cs12.cs.qc.cuny.edu/~wajo4672
host name: cs12.cs.qc.cuny.edu
username (all lower-case):
First 2 letters of last name followed by
First 2 letters of first name followed by
Last 4 digits of CUNYFirst ID#
password: 8 digits of CUNYFirst ID#
need a program to log on to this computer
WINSCP if you have a PC
Fugu if you have a Mac
If you Google Search
WinSCP download
winscp.net/eng/download.php
HW: Try to download and install WINSCP
try to login using your credentials
If you have a Mac, Fugu
http://cs12.cs.qc.cuny.edu/~xiuyi/fugu.html
HW: the next two exercises in ch 2 in lecture book about HTML
2.7-2.8
Really, all websites are numbers
IP addresses
DNS - domain name system
http://en.wikipedia.org/wiki/Domain_Name_System
a phone book for the internet
http://123.45.2.90/chase.com/thisisreal/gimmeyourfinancialinfo.htm
http://0xff.0xab.0xca.0xab/chase.com/login
http://chase.info/login
http://chase-banking.com/login
You could Google Chase
http://scamsite.ru/chase.com/login
domain starts at the :// and ends at the first slash
you can use this to detect many scams
domain, subdomain
domain is REALLY just the last 2 elements of what we've called the domain so far.
subdomain is before this.
eniac.cs.qc.cuny.edu/~svitak/cs12/
why is this important?
http://chase.com.scamsite.ru/login
Phishing email
besides the URLs, misspellings, will not know your name.
http://www.snopes.com/
Also, check out Amazon student
your webpage will be:
http://cs12.cs.qc.cuny.edu/~wajo4672
host name: cs12.cs.qc.cuny.edu
username (all lower-case):
First 2 letters of last name followed by
First 2 letters of first name followed by
Last 4 digits of CUNYFirst ID#
password: 8 digits of CUNYFirst ID#
need a program to log on to this computer
WINSCP if you have a PC
Fugu if you have a Mac
If you Google Search
WinSCP download
winscp.net/eng/download.php
HW: Try to download and install WINSCP
try to login using your credentials
If you have a Mac, Fugu
http://cs12.cs.qc.cuny.edu/~xiuyi/fugu.html
HW: the next two exercises in ch 2 in lecture book about HTML
2.7-2.8
Really, all websites are numbers
IP addresses
DNS - domain name system
http://en.wikipedia.org/wiki/Domain_Name_System
a phone book for the internet
http://123.45.2.90/chase.com/thisisreal/gimmeyourfinancialinfo.htm
http://0xff.0xab.0xca.0xab/chase.com/login
http://chase.info/login
http://chase-banking.com/login
You could Google Chase
http://scamsite.ru/chase.com/login
domain starts at the :// and ends at the first slash
you can use this to detect many scams
domain, subdomain
domain is REALLY just the last 2 elements of what we've called the domain so far.
subdomain is before this.
eniac.cs.qc.cuny.edu/~svitak/cs12/
why is this important?
http://chase.com.scamsite.ru/login
Phishing email
besides the URLs, misspellings, will not know your name.
http://www.snopes.com/
Also, check out Amazon student
Wednesday, March 9, 2011
lecture
I haven't put up the assignments on Blackboard yet, so hold on to them.
For HW:
Ch 2 in lecture book, on HTML, exercises 2.4 to 2.6.
A list of hws so far:
1) binary conversions
2) lecture book, ch 1, review questions
3) lecture book, ch 2, exercises 2.1 to 2.3.
4) lecture book, ch 2, exercises 2.4 to 2.6.
http://www.w3schools.com/html/default.asp
early goal of HTML, they didn't stick to much: markup meaning, rather than formatting.
CSS - cascading style sheets
We finished "HTML Elements" on W3Schools
Excel
rows, col, cells
values
data types: number, text, logical, errors
formulas
always start =
operands can be values
operators such as +, -, /, *
order of operation
PEMDAS
Monday at 3:00 in adjunct room (A202?, right across from dept office)
For HW:
Ch 2 in lecture book, on HTML, exercises 2.4 to 2.6.
A list of hws so far:
1) binary conversions
2) lecture book, ch 1, review questions
3) lecture book, ch 2, exercises 2.1 to 2.3.
4) lecture book, ch 2, exercises 2.4 to 2.6.
http://www.w3schools.com/html/default.asp
early goal of HTML, they didn't stick to much: markup meaning, rather than formatting.
CSS - cascading style sheets
We finished "HTML Elements" on W3Schools
Excel
rows, col, cells
values
data types: number, text, logical, errors
formulas
always start =
operands can be values
operators such as +, -, /, *
order of operation
PEMDAS
Monday at 3:00 in adjunct room (A202?, right across from dept office)
Monday, March 7, 2011
lecture
algorithm - a recipe
search algorithms
Linear search vs. binary search
choose a good algorithm, because CPU speed can only go so far
Linear search - sequentially examine each element in collection, see if it is what you are looking for
int i = 0;
while(A[i] != 6)
{
i = i + 1;
}
if (A[i] == 6)
cout << "We found it at position " << i;
else
cout << "Sorry, we did not find it";
Analysis of Algorithms
Euler's rule
sum of:
1 + 2 + 3 ..... + n
(n+1) * (n/2) =
(n^2 + n) / 2
divide by n
about n
on the order of n
O(n)
What if the numbers are sorted?
we can use binary search.
is O(log n)
log base 2 of n
1 million elements in my collection
in linear search, about 1 million operations
in binary search, about 20 operations
Computers cannot do everything
http://www.claymath.org/millennium/
Traveling salesman problem
not solvable in amount of time we have
using algorithm i described
next quiz next wednesday
search algorithms
Linear search vs. binary search
choose a good algorithm, because CPU speed can only go so far
Linear search - sequentially examine each element in collection, see if it is what you are looking for
int i = 0;
while(A[i] != 6)
{
i = i + 1;
}
if (A[i] == 6)
cout << "We found it at position " << i;
else
cout << "Sorry, we did not find it";
Analysis of Algorithms
Euler's rule
sum of:
1 + 2 + 3 ..... + n
(n+1) * (n/2) =
(n^2 + n) / 2
divide by n
about n
on the order of n
O(n)
What if the numbers are sorted?
we can use binary search.
is O(log n)
log base 2 of n
1 million elements in my collection
in linear search, about 1 million operations
in binary search, about 20 operations
Computers cannot do everything
http://www.claymath.org/millennium/
Traveling salesman problem
not solvable in amount of time we have
using algorithm i described
next quiz next wednesday
Wednesday, March 2, 2011
how to encode:
numbers
characters
now, pixels
picture element
2 color bitmap. L x W / 8
because only need 1 bit per pixel
16 colors
2^4 = 16
so we need four bits for each pixel
four bits = 1/2 byte
300 across x 200 down = 60,000 pixels
so, 30 bytes are necessary
256 colors.
2^8 = 256
so, need 1 byte per 1 pixel
60,000
24-bit bitmap = "True color" = 3 bytes per pixel
180,000
store RGB values
16,777,216 possible values
this was for .BMP files that you do this kind of mult to find the size
hexadecimal specification of color
#99 ff 00
RLE
run-length encoding
http://en.wikipedia.org/wiki/Run-length_encoding
GIF uses LZW encoding, which is a different encoding scheme. specifics, you don't need to know
lossless compression - GIF
don't lose info
lossy compression - JPG
loses info every time you save
raster vs. vector graphics
http://en.wikipedia.org/wiki/Raster_graphics
http://en.wikipedia.org/wiki/Vector_graphics
http://en.wikipedia.org/wiki/SVG
numbers
characters
now, pixels
picture element
2 color bitmap. L x W / 8
because only need 1 bit per pixel
16 colors
2^4 = 16
so we need four bits for each pixel
four bits = 1/2 byte
300 across x 200 down = 60,000 pixels
so, 30 bytes are necessary
256 colors.
2^8 = 256
so, need 1 byte per 1 pixel
60,000
24-bit bitmap = "True color" = 3 bytes per pixel
180,000
store RGB values
16,777,216 possible values
this was for .BMP files that you do this kind of mult to find the size
hexadecimal specification of color
#99 ff 00
RLE
run-length encoding
http://en.wikipedia.org/wiki/Run-length_encoding
GIF uses LZW encoding, which is a different encoding scheme. specifics, you don't need to know
lossless compression - GIF
don't lose info
lossy compression - JPG
loses info every time you save
raster vs. vector graphics
http://en.wikipedia.org/wiki/Raster_graphics
http://en.wikipedia.org/wiki/Vector_graphics
http://en.wikipedia.org/wiki/SVG
Monday, February 28, 2011
how to count in binary
finger party trick
add two binary numbers
not just how a number is encoded
some sense of how the CPU, that is ALU
handles addition (of binary numbers)
ASCII - american standard code for information interchange
http://www.asciitable.com/
internally, letters are stored as numbers
capital A is 65
lowecase A = 97
digit 0 is 48
regular ASCII goes from 0 to 127
2^7 possible values
can store it in 7 bits
extended ascii code
a Text file, if ASCII, usually is one byte per "letter"
File extensions
stuffbeforethedot.extension
used to be:
8chars.3le -- three letter extension
this is from the days of DOS (early DISK OPERATING SYSTEM)
.EXE is a three letter extension meaning executable
.XML
.HTM
.DOC
.XLS
.MDB
.PPT
backwards compatibility
cmd - command prompt
text-based interface to the Operating System
DOS
DOS prompt
Office 2007, longer file extensions
.DOCX
.XLSX
.ACCDB
.PPTX
Tools/Folder Options/View Tab
hide extensions for known file types
Windows uses GUI -- pronounced "gooey"
graphical user interface
Old way: to open a document: first open program. then, file/open and specify the file
New way: file associations. based on the extension part of the filename, Windows knows what program to open.
ASCII is not the only encoding. There is also Unicode.
since greater range, file size will be greater. if 4 bytes per letter, X 4 to get file size
finger party trick
add two binary numbers
not just how a number is encoded
some sense of how the CPU, that is ALU
handles addition (of binary numbers)
ASCII - american standard code for information interchange
http://www.asciitable.com/
internally, letters are stored as numbers
capital A is 65
lowecase A = 97
digit 0 is 48
regular ASCII goes from 0 to 127
2^7 possible values
can store it in 7 bits
extended ascii code
a Text file, if ASCII, usually is one byte per "letter"
File extensions
stuffbeforethedot.extension
used to be:
8chars.3le -- three letter extension
this is from the days of DOS (early DISK OPERATING SYSTEM)
.EXE is a three letter extension meaning executable
.XML
.HTM
.DOC
.XLS
.MDB
.PPT
backwards compatibility
cmd - command prompt
text-based interface to the Operating System
DOS
DOS prompt
Office 2007, longer file extensions
.DOCX
.XLSX
.ACCDB
.PPTX
Tools/Folder Options/View Tab
hide extensions for known file types
Windows uses GUI -- pronounced "gooey"
graphical user interface
Old way: to open a document: first open program. then, file/open and specify the file
New way: file associations. based on the extension part of the filename, Windows knows what program to open.
ASCII is not the only encoding. There is also Unicode.
since greater range, file size will be greater. if 4 bytes per letter, X 4 to get file size
Wednesday, February 23, 2011
lecture #6
The Internet vs. World Wide Web
Internet: a series of connected computers
World Wide Web: a series of connected web pages
other things besides WWW run on the Internet
you can network computers together
Local area networks
LANs
Internet vs. Intranet
ISP (internet service provider); Time warner; Verizon
World wide web: pages connect together using hyperlinks
hello.html
Hypertext markup language
WinSCP
you can use NOTEPAD to edit web pages
web browser: software that reads and interprets HTML
Hypertext markup language
www.w3schools.com
go to the HTML section
read until HTML elements
a computer that serves up web pages is called a "web server"
they serve those web pages to web clients. an internet browser.
computer cs12
http://cs12.cs.qc.cuny.edu/
protocol: an agreed upon way of communicating
http
hypertext transfer protocol
ftp
file transfer protocol
https
secure hypertext transfer protocol
http://en.wikipedia.org/wiki/Http
http session
request
the anatomy of a URL
Uniform Resource Locator
http://en.wikipedia.org/wiki/URL
The syntax is
scheme://domain:port/path?query_string#fragment_id
file:///C:/josh/greetings.html
HW: review questions for lecture book chapter 1
IP address
http://en.wikipedia.org/wiki/IP_address
mostly, you are not anonymous
Internet: a series of connected computers
World Wide Web: a series of connected web pages
other things besides WWW run on the Internet
you can network computers together
Local area networks
LANs
Internet vs. Intranet
ISP (internet service provider); Time warner; Verizon
World wide web: pages connect together using hyperlinks
hello.html
Hypertext markup language
WinSCP
you can use NOTEPAD to edit web pages
web browser: software that reads and interprets HTML
Hypertext markup language
www.w3schools.com
go to the HTML section
read until HTML elements
a computer that serves up web pages is called a "web server"
they serve those web pages to web clients. an internet browser.
computer cs12
http://cs12.cs.qc.cuny.edu/
protocol: an agreed upon way of communicating
http
hypertext transfer protocol
ftp
file transfer protocol
https
secure hypertext transfer protocol
http://en.wikipedia.org/wiki/Http
http session
request
the anatomy of a URL
Uniform Resource Locator
http://en.wikipedia.org/wiki/URL
The syntax is
scheme://domain:port/path?query_string#fragment_id
file:///C:/josh/greetings.html
HW: review questions for lecture book chapter 1
IP address
http://en.wikipedia.org/wiki/IP_address
mostly, you are not anonymous
Quiz 1
A hex chart, in case you need it:
base 16 = hexadecimal
0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
A = 1010
B = 1011
C = 1100
D = 1101
E = 1110
F = 1111
base 16 = hexadecimal
0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
A = 1010
B = 1011
C = 1100
D = 1101
E = 1110
F = 1111
Wednesday, February 16, 2011
Tuesday, February 15, 2011
How to obtain Microsoft Office (for PCs)
You can get it from microsoft, in one of three ways:
1) You can use the 60 day free trial, available here:
2) You can buy the full version available for cheap to university students, here:
For this, you will need your QC email, since it requires an email which ends in .edu. $80 is a pretty
good price for the full version of office.
3) For free, you can use Office Web Apps:
These run in your web browser. Unfortunately, Microsoft Access is not included as a Web App, but
it does include PowerPoint, Word, and Excel.
You can get the data files you need for the exercise either by downloading it from Prentice Hall website:
or by bringing in a Flash drive to lab next time and copying the folder onto it.
Monday, February 14, 2011
lecture #5
Reed book, read chapter 1.
First quiz, in lab, next wednesday. covers material up to the end of today.
HW#1:
1) Convert these numbers to binary:
7
14
103
2) Convert these binary numbers to decimal:
11001
110
11
1101
3) Convert those numbers in part 2 to octal.
4) Convert those numbers in part 2 to hexadecimal.
end user software. e.g Microsoft Word
programming software. Integrated development environment for creating end-user software. compiler. things used by programmers to create software.
system software. your operating system. Windows XP. lets you launch programs, manage files. used by other programs.
How do you program a computer?
Computer speaks machine language. 01110101 1111
Do humans speak machine language?
assembly language
mov ax, 4
mov bx, 5
add ax, bx
mov = 1001
add = 1111
ax = 1000
bx = 0001
1001 1000 0100
1001 0001 0101
1111 1000 0001
this process of translating TO / FROM machine language very simple.
http://en.wikipedia.org/wiki/Assembly_language
low-level programming languag
assembler
http://en.wikipedia.org/wiki/Low-level_programming_language
first generation, second generation languages
High-level programming language
http://en.wikipedia.org/wiki/High-level_programming_language
Some C++ code to calculate costs:
http://www.functionx.com/cpp/examples/ifelse1.htm
#include <iostream>
using namespace std;
void main()
{
unsigned int Miles;
const double LessThan100 = 0.25;
const double MoreThan100 = 0.15;
double PriceLessThan100, PriceMoreThan100, TotalPrice;
cout << "Enter the number of miles: ";
cin >> Miles;
if(Miles <= 100)
{
PriceLessThan100 = Miles * LessThan100;
PriceMoreThan100 = 0;
}
else
{
PriceLessThan100 = 100 * LessThan100;
PriceMoreThan100 = (Miles - 100) * MoreThan100;
}
TotalPrice = PriceLessThan100 + PriceMoreThan100;
cout << "\nTotal Price = $" << TotalPrice << "\n\n";
}
compiler or an interpreter
compiler does the translation up front.
takes in C++ sources code. outputs machine language.
interpreter.
does not translate front.
translates as executing, as carrying out the instructions.
C++ compiled.
Javascript interpreted.
First quiz only up to this point.
Quiz does not include book material.
First quiz, in lab, next wednesday. covers material up to the end of today.
HW#1:
1) Convert these numbers to binary:
7
14
103
2) Convert these binary numbers to decimal:
11001
110
11
1101
3) Convert those numbers in part 2 to octal.
4) Convert those numbers in part 2 to hexadecimal.
end user software. e.g Microsoft Word
programming software. Integrated development environment for creating end-user software. compiler. things used by programmers to create software.
system software. your operating system. Windows XP. lets you launch programs, manage files. used by other programs.
How do you program a computer?
Computer speaks machine language. 01110101 1111
Do humans speak machine language?
assembly language
mov ax, 4
mov bx, 5
add ax, bx
mov = 1001
add = 1111
ax = 1000
bx = 0001
1001 1000 0100
1001 0001 0101
1111 1000 0001
this process of translating TO / FROM machine language very simple.
http://en.wikipedia.org/wiki/Assembly_language
low-level programming languag
assembler
http://en.wikipedia.org/wiki/Low-level_programming_language
first generation, second generation languages
High-level programming language
http://en.wikipedia.org/wiki/High-level_programming_language
Some C++ code to calculate costs:
http://www.functionx.com/cpp/examples/ifelse1.htm
#include <iostream>
using namespace std;
void main()
{
unsigned int Miles;
const double LessThan100 = 0.25;
const double MoreThan100 = 0.15;
double PriceLessThan100, PriceMoreThan100, TotalPrice;
cout << "Enter the number of miles: ";
cin >> Miles;
if(Miles <= 100)
{
PriceLessThan100 = Miles * LessThan100;
PriceMoreThan100 = 0;
}
else
{
PriceLessThan100 = 100 * LessThan100;
PriceMoreThan100 = (Miles - 100) * MoreThan100;
}
TotalPrice = PriceLessThan100 + PriceMoreThan100;
cout << "\nTotal Price = $" << TotalPrice << "\n\n";
}
compiler or an interpreter
compiler does the translation up front.
takes in C++ sources code. outputs machine language.
interpreter.
does not translate front.
translates as executing, as carrying out the instructions.
C++ compiled.
Javascript interpreted.
First quiz only up to this point.
Quiz does not include book material.
Wednesday, February 9, 2011
lecture #4: a lot of math!
represent bigger numbers by combining bits
an introduction to binary
how to understand binary. this will entail converting binary to decimal.
how to convert decimal to binary. an easy way.
introducing octal numbers.
introducing hexadecimal numbers.
I give links and videos on the blog, so you can review how to do it.
decimal = base 10
google calculator
octal = base 8
3 bits = 8 possible values
0 = 000
1 = 001
2 = 010
3 = 011
4 = 100
5 = 101
6 = 110
7 = 111
to go from base 8 to base 10, use an intermediate base 2. use the lookup chart
to go from base 10 to base 8, use an intermediate base 2. use the lookup chart
4 bits = 16 possibilities = 2^4
0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
10= 1010
11= 1011
12= 1100
13= 1101
14= 1110
15= 1111
base 16 = hexadecimal
0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
A = 1010
B = 1011
C = 1100
D = 1101
E = 1110
F = 1111
an introduction to binary
how to understand binary. this will entail converting binary to decimal.
how to convert decimal to binary. an easy way.
introducing octal numbers.
introducing hexadecimal numbers.
I give links and videos on the blog, so you can review how to do it.
decimal = base 10
google calculator
octal = base 8
3 bits = 8 possible values
0 = 000
1 = 001
2 = 010
3 = 011
4 = 100
5 = 101
6 = 110
7 = 111
to go from base 8 to base 10, use an intermediate base 2. use the lookup chart
to go from base 10 to base 8, use an intermediate base 2. use the lookup chart
4 bits = 16 possibilities = 2^4
0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
10= 1010
11= 1011
12= 1100
13= 1101
14= 1110
15= 1111
base 16 = hexadecimal
0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
A = 1010
B = 1011
C = 1100
D = 1101
E = 1110
F = 1111
Binary <--> Decimal Conversion
See here for how to convert a binary number to a decimal number.
See here for how to convert a decimal number to a binary number.
At each of these links, there is a detailed description of the process in text, as well as a video. However, they accidentally put the same video in each. To see how a video of how to convert binary --> decimal, see it on YouTube here.
Actually, I'll also post both videos in this blog post:
Decimal to Binary:
Binary to decimal:
For now, practice with the practice numbers they give at those two links. Eventually, I will assign other binary and decimal numbers to convert for a homework.
Here is an extended ASCII chart.
How to convert between binary and hexadecimal.
How to convert between octal and binary. There are better ways.
See here for how to convert a decimal number to a binary number.
At each of these links, there is a detailed description of the process in text, as well as a video. However, they accidentally put the same video in each. To see how a video of how to convert binary --> decimal, see it on YouTube here.
Actually, I'll also post both videos in this blog post:
Decimal to Binary:
Binary to decimal:
For now, practice with the practice numbers they give at those two links. Eventually, I will assign other binary and decimal numbers to convert for a homework.
Here is an extended ASCII chart.
How to convert between binary and hexadecimal.
How to convert between octal and binary. There are better ways.
Monday, February 7, 2011
lecture #3
lecture 3
memory
bit = binary digit. 0 and 1
binary: base 2
in base n, the digits go from 0 to n-1
RAM - random access memory
using electricity
volatile
short term memory
hard disk drive, floppy disk, CD-ROM
ROM - means read only memory
these are long-term memory
not volatile
now we know how you might store a bit
how do we encode bigger numbers?
http://en.wikipedia.org/wiki/Magnetic_tape
random access memory
book
sequential access memory
scroll
that is why we copy program from long-term memory to short term before running
metaphor
sequential access
*VHS tapes
random access
*DVD
1 bit = 2 possible value
0, 1
2 bits = 4
00
01
10
11
how many possible outfits
5 pants
8 shirts
40
5 x 8
simple combinatorics
3 bits = 8 possible values
000
001
010
011
100
101
110
111
2 x 2 x 2
2^3
4 bits = 16 possibilities = 2^4
0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
10= 1010
11= 1011
12= 1100
13= 1101
14= 1110
15= 1111
n bits, store 2^n possible values
8 bits = byte
4 bits = nibble
2 bytes = word
4 bytes = dword
1024 bytes = 1 kilobyte (kb) = 2^10 bytes
why 2^10 rather than 10^3?
because if we store a memory address in memory, why waste space? you can store 1024 different positions. we operate in base 2.
1024 x 1024 bytes = 2^20 bytes = 1 megabyte
2^30 bytes = gigabyte
2^40 bytes = terabyte
manufacturers redefined terms to mean powers of 10
trilobite; nothing to do with CS
http://en.wikipedia.org/wiki/Terabyte
speed in hertz
kilohertz, megaherz, gigahertz
http://en.wikipedia.org/wiki/Gigahertz
http://en.wikipedia.org/wiki/Von_Neumann_architecture
swap file
memory
bit = binary digit. 0 and 1
binary: base 2
in base n, the digits go from 0 to n-1
RAM - random access memory
using electricity
volatile
short term memory
hard disk drive, floppy disk, CD-ROM
ROM - means read only memory
these are long-term memory
not volatile
now we know how you might store a bit
how do we encode bigger numbers?
http://en.wikipedia.org/wiki/Magnetic_tape
random access memory
book
sequential access memory
scroll
that is why we copy program from long-term memory to short term before running
metaphor
sequential access
*VHS tapes
random access
*DVD
1 bit = 2 possible value
0, 1
2 bits = 4
00
01
10
11
how many possible outfits
5 pants
8 shirts
40
5 x 8
simple combinatorics
3 bits = 8 possible values
000
001
010
011
100
101
110
111
2 x 2 x 2
2^3
4 bits = 16 possibilities = 2^4
0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
10= 1010
11= 1011
12= 1100
13= 1101
14= 1110
15= 1111
n bits, store 2^n possible values
8 bits = byte
4 bits = nibble
2 bytes = word
4 bytes = dword
1024 bytes = 1 kilobyte (kb) = 2^10 bytes
why 2^10 rather than 10^3?
because if we store a memory address in memory, why waste space? you can store 1024 different positions. we operate in base 2.
1024 x 1024 bytes = 2^20 bytes = 1 megabyte
2^30 bytes = gigabyte
2^40 bytes = terabyte
manufacturers redefined terms to mean powers of 10
trilobite; nothing to do with CS
http://en.wikipedia.org/wiki/Terabyte
speed in hertz
kilohertz, megaherz, gigahertz
http://en.wikipedia.org/wiki/Gigahertz
http://en.wikipedia.org/wiki/Von_Neumann_architecture
swap file
Wednesday, February 2, 2011
lecture #2
qccs12.blogspot.com
blackboard
attendance
Incomplete policy is the same college-wide; you need to request
actual content
what is a computer?
something that computes
what does a "computer" need?
input
output
memory
control
mathematical ability
von Neumann architecture
from special purpose machine to
a universal computer
(general purpose computer)
hardware (physical machine)
software (instructions)
von Neumann architecture
conceptual model of computing
Finite State Automata
Turing Machines
Von Neumann architecture
http://en.wikipedia.org/wiki/Von_Neumann_architecture
look at the diagram there
CPU (central processing unit)
ALU (arithmetic / logic unit)
control unit
Memory (in this case, RAM)
examples of output:
printer
speaker
screen
examples of input:
mouse
keyboard
mike
Adding machine.
program:
1) say "please enter a number"
2) get the number, store it in X
3) say "please enter another number"
4) get the number, store it in Y
5) add X and Y, store it in Z
6) say X "+" Y "=" Z
7) Go to step 1
initially, this program will be stored in long-term memory. hard drive.
double-click, copies it to short-term memory. RAM.
RAM stores instructions and data
control unit has IP (instruction pointer)
IP: 1
data is carried via the "bus"
fetch-execute cycle
with that last step 7, we loop
register; really really short term memory, inside the CPU itself
blackboard
attendance
Incomplete policy is the same college-wide; you need to request
actual content
what is a computer?
something that computes
what does a "computer" need?
input
output
memory
control
mathematical ability
von Neumann architecture
from special purpose machine to
a universal computer
(general purpose computer)
hardware (physical machine)
software (instructions)
von Neumann architecture
conceptual model of computing
Finite State Automata
Turing Machines
Von Neumann architecture
http://en.wikipedia.org/wiki/Von_Neumann_architecture
look at the diagram there
CPU (central processing unit)
ALU (arithmetic / logic unit)
control unit
Memory (in this case, RAM)
examples of output:
printer
speaker
screen
examples of input:
mouse
keyboard
mike
Adding machine.
program:
1) say "please enter a number"
2) get the number, store it in X
3) say "please enter another number"
4) get the number, store it in Y
5) add X and Y, store it in Z
6) say X "+" Y "=" Z
7) Go to step 1
initially, this program will be stored in long-term memory. hard drive.
double-click, copies it to short-term memory. RAM.
RAM stores instructions and data
control unit has IP (instruction pointer)
IP: 1
data is carried via the "bus"
fetch-execute cycle
with that last step 7, we loop
register; really really short term memory, inside the CPU itself
Monday, January 31, 2011
lecture #1
Lecture book:
A Balanced Introduction to Computer Science
David Reed
ISBN-10: 013046709X
ISBN-13: 978-0130467096
http://www.amazon.com/Balanced-Introduction-Computer-Science/dp/013046709X/ref=sr_1_1?ie=UTF8&s=books&qid=1296518217&sr=8-1
bookfinder.com
there will a blackboard site
W3Schools
www.w3schools.com
for HTML, CSS, Javascript?, PHP?, SQL
Lecture:
we'll learn a few of these technologies
computer concepts
how to cheat at solitaire
hidden feaures of programs -- easter eggs
How do you get Microsoft Word? Excel? Access?
Google:
microsoft ultimate steal
http://www.microsoft.com/student/office/en-us/default.aspx
How do I start Word?
file system is a hierarchy.
hard disk:
C:
floppy disk
A:
B:
root folder / directory
\
c:\
every folder can have files and subfolders
navigate
C:\Program Files
C:\Program Files\Microsoft Office
C:\Program Files\Microsoft Office\Office12
C:\Program Files\Microsoft Office\Office12\WINWORD.EXE
Start/Run
WINWORD
WINWORD
EXCEL
MSACCESS
POWERPNT
A Balanced Introduction to Computer Science
David Reed
ISBN-10: 013046709X
ISBN-13: 978-0130467096
http://www.amazon.com/Balanced-Introduction-Computer-Science/dp/013046709X/ref=sr_1_1?ie=UTF8&s=books&qid=1296518217&sr=8-1
bookfinder.com
there will a blackboard site
W3Schools
www.w3schools.com
for HTML, CSS, Javascript?, PHP?, SQL
Lecture:
we'll learn a few of these technologies
computer concepts
how to cheat at solitaire
hidden feaures of programs -- easter eggs
How do you get Microsoft Word? Excel? Access?
Google:
microsoft ultimate steal
http://www.microsoft.com/student/office/en-us/default.aspx
How do I start Word?
file system is a hierarchy.
hard disk:
C:
floppy disk
A:
B:
root folder / directory
\
c:\
every folder can have files and subfolders
navigate
C:\Program Files
C:\Program Files\Microsoft Office
C:\Program Files\Microsoft Office\Office12
C:\Program Files\Microsoft Office\Office12\WINWORD.EXE
Start/Run
WINWORD
WINWORD
EXCEL
MSACCESS
POWERPNT
Some practice exams that are out there
though there will likely be material on the exams which do not appear on these practices:
Practice Excel Exam 1.
Practice Excel Exam 2.
Practice Excel Exam 3.
Practice Excel Exam 4.
Practice Excel Exam 5.
Practice Excel Exam 2.
Practice Excel Exam 3.
Practice Excel Exam 4.
Practice Excel Exam 5.
Some downloads to be able to take the practice exams:
Practice Exam Walkthroughs
Word exam:
Excel exam 1:
Excel exam 2:
Excel exam 3:
Excel exam 4:
Excel exam 5:
Access exam 1:
Access exam 2:
Excel exam 1:
Excel exam 2:
Excel exam 3:
Excel exam 4:
Excel exam 5:
Access exam 1:
Access exam 2:
Initial syllabus
Cs12 -- understanding personal computers
qccs12.blogspot.com
lecture
lab exams -- 60%
word -- 10%
excel -- 25%
access -- 25%
lecture exams -- 20%
quizzes - 10%
final exam - 10%
homeworks -- 10%
web page -- 10%
lab Book -- grauer, exploring microsoft excel, access, word, 2007
prentice hall has a website. you can download the files
http://www.pearsonhighered.com/exploring/
you need the programs (microsoft office)
you need the instructions (book)
you need the data files (website, copy onto flashdrive)
qccs12.blogspot.com
lecture
lab exams -- 60%
word -- 10%
excel -- 25%
access -- 25%
lecture exams -- 20%
quizzes - 10%
final exam - 10%
homeworks -- 10%
web page -- 10%
lab Book -- grauer, exploring microsoft excel, access, word, 2007
prentice hall has a website. you can download the files
http://www.pearsonhighered.com/exploring/
you need the programs (microsoft office)
you need the instructions (book)
you need the data files (website, copy onto flashdrive)
Subscribe to:
Posts (Atom)