Tuesday, December 13, 2011

Quiz review

1) All these are part of the von Neumann architecture except for:
a) control unit
b) arithmetic / logarithmic unit
c) input
d) memory

2) The Turing test is ______________________.
a test of computer intelligence.
Can the computer fool the interrogator into thinking it is a human?

3) In fonts, a point is precisely: _____________.
1/72 of an inch

4) Sequential access memory can best be compared to _________.
Sequential:
VHS tape, cassette tape, scroll

RAM:
kind of like a DVD
book

5) One can convert C++ to machine language using:
a) a compiler
b) an editor
c) ASCII
d) Unicode

6) A kilobyte is = 
a) 1020 bytes
b) 2^10 bytes
c) 2^20 bytes
d) 10^9 bytes

7) The binary number 101 is equal to _____ in decimal:
a) 101
b) 3
c) 5
d) 7

8) Vector graphics will typically be ___________ than the equivalent bitmap graphics:
a) bigger
b) smaller
1) The process of converting text, sound, etc., into data that can be processed by digital devices is called:
a) compiling
b) interpreting
c) digitization
d) numberization

2) What is a mainframe computer?
A computer which many people log on to and use simultaneously.

3) Which is NOT a way can hackers get someone's password?
a) dictionary attack
b) phishing
c) sniffing
d) dishing

4) A computer uses ____ASCII____ codes to represent numbers in your SSN and Street Address, but it uses ___binary______ numbers for numeric data such as your age.


5) An example of an HTML attribute is:
a) br
b) src
c) omg
d) http

6) An example of a closing tag is:
a) <br>
b) </em>
c) {close}
d) <php>

7) If I wanted to solve the traveling salesman problem for 200 cities, on a 2.4 GHz PC, with 20 GB of RAM and a 1 TB hard drive, it would take me:
a) about 1 minute
b) about 1 day
c) about 10 years
d) more than a trillion years

8) Why is that a good thing? We can rely on encryption.

9) One trilobite is: ____________________  an extinct marine arthropod
Consider the following URL:


1) What is the protocol?
http
2) What is the top level domain?
edu
3) What it the domain?
qc.edu
4) What is the path?
~svitak/cs12/
or
~svitak/cs12/syllabi.html

5) Give me an example of an IP address:
192.168.1.1

6) The Internet is the same as the World Wide Web
a) True
b) False

7) What is hotlinking?
using someone else's image and bandwidth by putting the URL of the image on their server directly into the src attribute

8) What is beta software?
software that is not really "ready" yet. may be buggy. they are hoping you will test it and find the errors. Often is free.
1) A type of application softawre that is called _____ is designed to help several people collaborate on a single project using local networds or Internet connections.
a) system software
b) productivity software
c) utility software
d) groupware

2) ______ software stores data as a series of records and allows you to establish relationships between different types of records.
a) spreadsheet
b) database
c) groupware
d) recording

3) A _____ license is priced per copy and allows a specific number of copies to be used at the same time.
a) concurrent-use
b) sequential-use
c) single-use
d) site

4) A software _____ is a small section of program code that replaces part of the software you currently have installed.
patch

5) The term _______ refers to software tools used to conceal malware and backdoors that have been installed on a victim's computer.
a) trojan
b) phish
c) rootkit
d) malware

6) An example of an HTML tag that only makes sense within another HTML tag is:
<li>
<tr>
<td>

7) GUI stands for:
graphical user interface

8) An example of a CSS selector is:
a) align
b) #fred
c) ;
d) light-blue

9) What, precisely, does the Evaluate Formula do?
Opens up a window, lets you see step by step how your formula is evaluated. Used for debugging in Excel.

10) If I am sitting in cell B5 and refer to cell A1 as an relative reference, what will the R1C1 reference look like?
R[-4]C[-1]

11) What does the ROUND function have to do with the plot from Superman III or Office Space?
fractions of a penny

1) A ____ program stored in ROM tells the hard disk to load the operating system into RAM.
bootstrap

2) A ____ compatible OS should be able to run application software designed for the OS's prior generations.
backwards

3) File ______ software overwrites deleted files with random 1s and 0s.
shredder

4) Name one way in which Solver is more powerful than Goal Seek.
impose constraints; look for a max or min instead of a specific value; can fiddle with multiple cells

5) Draw me a small decision tree to distinguish between rocks, cats, and mice.
Done.
1) Comnmunications _________, such as TCP/IP, set standards for encoding and decoding data, guiding data to its destination, and mitigating the effects of noise.

a) interfaces
b) buzzwords
c) protocols
d) SSIDs


2) A network ______ is a device that links two or more nodes of a wired device and broadcasts it to all the network nodes.

a) hub
b) router
c) modem
d) packet


3) For security reasons, it is not advisable to allow shared access to the _____ directory of your C: drive.
a) driver
b) root
c) branch
d) folder


4) _____ is public key encryption software that is popular with PC owners who want to encrypt email and data files.

a) PGP
b) Bluetooth
c) The system registry
d) A keylogger

5) What, relating to SQL, do you get when Santa is bitten by a werewolf?
Where Clause

6) In SQL, the sort of statement which will display some records from a table is called:
a) DISPLAY
b) SHOW
c) SELECT
d) SUBTABLE

7) A record in a database is closest to a _______ in Excel.
a) column
b) row
c) cell
d) worksheet

8) Explain one way in which Solver is more powerful than Goal seek.
 Done.
________________
Some more questions:
1) The sorting algorithm in which you repeatedly find the smallest item and place it in the appropriate slot is called:
a) insertion sort
b) bubble sort
c) selection sort
d) merge sort
2) In Visual Basic, you continuously wait for an event to occur and respond to it. This is called an ___________. event driven programming language.

3) Descartes walks into a bar. The bartender says, "Are you having a beer?" Descartes says, "I think not," and ceases to exist. Why?

4) What does Descartes have to do with SQL?
Cartesian product

5) A Serial Number in Access and Excel is a way to handle:
a) dates
b) times
c) both
d) neither

6) A primary key is a field, or set of fields, which uniquely identify a record.
a) true
b) false

7) How would you look for a single word which begins with the letter J, ends with the letter H, in advanced wildcard search in Word?
<J*H>
if not for pointy backets, it would match
Jump for joy, TRISH.

8) p {color:red;text-align:center;}
In the above CSS, what is the selector?



Thursday, December 8, 2011


Final
Lecture book:
Ch 1-6

Multiple choice (mostly)
Fill in the blank (less)
Short answer (even less)

30-50 questions

CS313 - data structures
you have a bunch of data. you want to store it in some way. you want to perform actions upon that data. what are the repercussions of how you store it.

collection of numbers

dense list, or an array

linked list
doubly-linked list
arrows also point to previous item

diff ways of storing same data
why do we care?

remove bob from telephone list
pretend that I have n records, where n is very large, such as 1 million.

Does my computer program "scale"

in an array based list, we would need to shift all elements one up, to take Bob's place (and then Sally's place, etc.)


array is simpler
but, deleting is VERY slow
O(n)

deleting from a doubly-linked list
is
O(1)
constant time


Algorithms:
selection sort:
http://en.wikipedia.org/wiki/Selection_sort
each time, find the smallest item, put it into the appropriate slot
linear search for the smallest item
swap the items
repeat
O(n^2)

insertion sort
http://en.wikipedia.org/wiki/Insertion_sort
repeatedly grow sorted section by taking the next element, shifting over elements greater than it, and INSERTING the new element into the correct slot
O(n^2)

Wednesday, December 7, 2011

Tuesday, December 6, 2011


What else is there?
http://www.cs.qc.cuny.edu/

080 Problem Solving with Computers
Is REALLY Visual Basic.NET Programming

1) Draw your GUI (Graphical User Interface)
2) Visual basic is Event-Driven
as opposed to procedural
3) Write the event handler

081 HTML and WWW Programming


Client-side, server-side programming language
PHP
This is my webpage:
<?php
for ($i=1; $i<=100; $i=$i+1)
{
   echo "Hello$i ";
}

?>

And <font color="red">that ends my webpage.</font>


Javascript
client-side scripting


085 Database Application Programming

088 Advanced Productivity Tools For Business
Advanced Excel
all chapters of the book
developing an intuition for writing formulas

111 Algorithmic Problem Solving
introduction to programming (for majors) using C++

Friday, December 2, 2011

INSERT INTO BOOKS
(ISBN, Title, Author, Publisher)
VALUES
("111", "C++ Recipes", "Josh Waxman", "Waxman Books")

UPDATE BOOKS
Set
ISBN="444"
Where Author="Josh Waxman"

UPDATE BOOKS
Set
ISBN=ISBN & " 2nd Edition"
Where Author="Josh Waxman"

Delete * From Books
Where Author="Josh Waxman"

CREATE TABLE

Quiz on tuesday, dec 6
next chap in book
material up to Nov 17th

read ch 8 book.

Final on 22nd, 6:30-8:30, here, in C205

SUMMARY QUERIES

Group by Clause


SELECT Publisher, AVG(ListPrice) As AveragePrice From BOOKS
GROUP BY Publisher

Select [Last Name], [First Name], Salary+Bonus As TotalSalary
from Employee

Calculate field

Split form

Form/SubForm
you need a defined relationship


There are two types of Macros.
Macros are USUALLY VBA

Access does have VBA
But they also have "Macros"

a few interesting Algorithms
Bubble sort

n elements i want to sort
each time, i do about n comparisons
i need to repeat it about n times
n squared
O(n^2)


Sorting machines

Tuesday, November 29, 2011


Query 2:
Select Title, PublDate, LastName, PubName
From Book, Author, Publisher
Where PublDate > #11/29/2011# And
Book.AuthorCode = AuthorId And
Publisher.PubId = Book.PubId
ORDER BY PublDate DESC

Select Title, PublDate, LastName, PubName
From Book, Author, Publisher
Where PublDate > DATE() And
Book.AuthorCode = AuthorId And
Publisher.PubId = Book.PubId
ORDER BY PublDate DESC

Query 3:
Select Title, PublDate, Copyright, LastName, PubName
From Book, Author, Publisher
Where
(Copyright = 2010 OR Date()-PublDate Between 0 And 60 ) And
Book.AuthorCode = AuthorId And
Publisher.PubId = Book.PubId
ORDER BY PublDate DESC

Query 4:
Select Title, LastName, PubName
From Book, Author, Publisher
Where PubName ="Wiley" And
Title Like "*Excel 2007*"
Book.AuthorCode = AuthorId And
Publisher.PubId = Book.PubId
ORDER BY Title ASC

Query 5:
Is Null
ISNULL(fieldname)

Select Title, Edition, LastName, PubName
From Book, Author, Publisher
Where ISNULL(Edition)=True And
Book.AuthorCode = AuthorId And
Publisher.PubId = Book.PubId
ORDER BY Title ASC

within access, -1 means True
0 means false

Select Title, Edition, LastName, PubName
From Book, Author, Publisher
Where Edition Is Null And
Book.AuthorCode = AuthorId And
Publisher.PubId = Book.PubId
ORDER BY Title ASC

w3schools.com

Serial numbers in access and excel
is the offset of days since January 0, 1900
dates
times are fractions of days

Parameters in Queries
We have finished (more or less) SELECT queries

UPDATE, DELETE, DROP TABLE, CREATE TABLE
INSERT

Tuesday, November 22, 2011


Read ch 7 in book. quickchecks.

last time: relational database. basic SQL.
w3schools.com

SELECT Customers.CusID, First, Last, Street, Apt, City, OrderId, Descrip, Price, Qnty, [Total Price], Orders.CusID From Customers, Orders

Select * From Customers, Orders

Cartesian product of the rows of both tables

Select * From Customers, Orders
WHERE Customers.CusID = Orders.CusID

That is called an INNER JOIN. (There is also a right and a left join.)

import vs export

Layout view is WYSIWYG

Select Title, LastName, PubName
from Book, Author, Publisher
WHERE Book.AuthorCode = Author.AuthorID And
Book.PubID = Publisher.PubID And
Book.PubID = "Prentice-Hall"
ORDER BY Title

Oops!

SELECT Book.Title, Author.LastName, Publisher.PubName
FROM Publisher INNER JOIN (Author INNER JOIN Book ON Author.[AuthorID] = Book.[AuthorCode]) ON Publisher.[PubID] = Book.[PubID]
WHERE (((Publisher.PubName)="Prentice-Hall"))
ORDER BY Book.Title;

This was auto-generated by Access query designer.

Thursday, November 17, 2011


Queries are dynamic

WHERE CLAUSE
ORDER BY CLAUSE

Design view

SQL View

SELECT Title,  Year, ListPrice, Publisher  FROM BOOKS
Where Publisher="Prentice Hall"

SELECT Title,  Year, ListPrice, Publisher  FROM BOOKS
Where Publisher="Prentice Hall" OR Publisher="Prentice-Hall"

SELECT Title,  Year, ListPrice, Publisher  FROM BOOKS
Where Publisher Like "Prentice?Hall"


SELECT Title,  Year, ListPrice, Publisher  FROM BOOKS
Where Publisher Like "Prentice?Hall"
Order by ListPrice DESC

Using the wizard:
1) what table?
2) what fields?
3) what to name the query?
4) go to design view, what criteria, sorting, etc. OR go to SQL view and add all that


SELECT Books.Title, Books.Year, Books.ListPrice, Books.Publisher
FROM Books
WHERE (((Books.Publisher)="Prentice Hall"));

*
?

Begins with G:
Like "G*"

ends with a y:
Like "*y"

contains the word Excel
*Excel*

WHERE Year >=1995 Or ListPrice>25


Select ProductName, UnitPrice, and UnitsOnOrder From Products Where UnitsOnOrder  = 0 And (UnitPrice>=50 And UnitPrice<=100)

SELECT Products.[ProductName], Products.UnitPrice, Products.UnitsInStock
FROM Products
WHERE (((Products.UnitPrice) Between 50 And 100) AND ((Products.UnitsInStock)=0));

Thursday, November 10, 2011


two ways of finding information from your raw data

read ch 6
quickchecks

pivottables, subtotal

Microsoft Access

Relational Database software

Database: a bunch of tables, and ways of manipulating the data in the tables

Database: a way of storing a whole bunch of data, and operations for manipulating that data

Table: a collection of records

Record: A collection of fields

Field: One unit of data

MSACCESS

is diff from Excel, Word
doesn't start you out with a blank document

You actually have to create a file

Two different views:
See the actual data in your table: Datasheet view
See the meta-data

Field Name, Data Type are properties of the field


You can have a table.

Query, Report, Form
Query: ask a question about your data
SQL
http://www.w3schools.com/sql/default.asp

Report: usually printed
don't edit the data

Form: also lets you edit. provides a user interface to the underlying table

Wildcard:
*
?

* means match anything, including nothing
? means match exactly one symbol

Works in Word, Access, Google searches

That is basic wildcard matching in Word

Advanced wildcard matching in Word
regular expressions

Go through these examples.
http://office.microsoft.com/en-us/help/add-power-to-word-searches-with-regular-expressions-HA001087305.aspx
http://office.microsoft.com/en-us/support/putting-regular-expressions-to-work-in-word-HA001087304.aspx?CTT=5&origin=HA001087305
Nothing to hand in at this time.

Thursday, November 3, 2011


Financial Functions

PV
FV
NPER
RATE
PMT
IPMT
PPMT


compounded monthly
nominal rate: 7% APR
7%/12
0.583% per month: periodic effective rate

why are we dividing and multiplying by 12

goal seek

Solver: goal seek on steroids


Tuesday, November 1, 2011



=(E12-100) *IF(E12>=100, 10%, 0%)
decision tree

nesting one if inside another if
=(E12-100) *IF(E12<100, 0%, IF(E12<1000, 10%, 15%))

Excel only lets you nest functions 7 deep

2^7 possibilities, if balance your decision tree right


decision tree were part of AI (artificial intelligence)
expert system

Financial functions
FV
PV
PMT
RATE
time value of money

future value
present value

FV = PV + PV X RATE

idea of compounding
NPER = how many compunding periods this loan is going on

FV = PV + PV X RATE
year 1 FV = PV X (1 + RATE)
year 2 FV = PV X (1 + RATE) X (1 + RATE)
year 3 FV = PV X (1 + RATE) X (1 + RATE) X (1 + RATE)
year NPER FV = PV X (1 + RATE) ^ NPER

Thursday, October 27, 2011

we finished css absolute reference relative reference we are used to A1 reference style R1C1 reference style keyboard shortcuts with number keys IF function there is a diff between actual value in a cell and the value displayed http://supermanhomepage.com/movies/movies.php?topic=m-movie3 Having now taken a job as a computer programmer at Webscoe Industries, Gus Gorman is extremely disappointed when he sees his first paycheck. "Where did it all go?" he asks. During lunch, Gus and a friend discuss all the percentages taken from a paycheck. When Gus tells him that there has to be fractions of cents left over, Gus's friend tells him that the checks are rounded down to the nearest "half-cent". "Where do those half-cents go?" asked Gus. Suddenly, another light bulb goes on above Gus's head. When everyone else is leaving, Gus is still busy programming. we will have a quiz next Thursday, up to this material, plus a chapter in the book.

Tuesday, October 25, 2011


Reading assignment:
Lecture book, ch 5
Do the quickchecks


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

CSS rules
selector { declarations; declarations;}
declaration is property:value

selectors which are tags
id and class selectors

we are up to CSS how to

excel
rows
cols
cells
name box tells you name of the cell

in cells, can store values, formulas

we call these values literals

formulas begin with =
formula bar will display the formula
operators and operands
+ - / * ^
PEMDAS


how to "debug" formulas
1) stare blankly at screen; think hard
2) use debugging tools
Formula Auditing / Evaluate formula


excel is smart! it adjusts relative refs for you. increment, decrement rows and cols

functions are basically operators without the symbols
pass in 'operands' as parameters
diff number of arguments

A1:B6 means all the cells from A1 to B6
is called a range


Ctrl plus and minus

refer to diff sheets
diff books

magic number
isolate assumptions
using names and the name box

Names

Tuesday, October 18, 2011


No class this Thursday, Oct 20, 2011

Reading assignment:
Lecture book, ch 4
Do the quickchecks

How to set up your webpage:
http://eniac.cs.qc.edu/~svitak/cs12/

1) We need to set up a folder called public_html
2) In that folder, we will put a file, main.html, which is an HTML file
3) If necessary, we will set permissions
owner, group, universe
r,w,x
755

chmod command to change permissions

We can use WINSCP to change it
We can use a command line interface, putty, SSHSecureShell

4) load the webpage in your web browser
hostname/~yourlogin/filename

SSH Secure shell
http://www.dartmouth.edu/comp/soft-comp/software/downloads/windows/ssh-sftp/install.html

Putty download
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

These are "telnet" clients
Lets you log on to a computer and do things

there is one computer, running programs for multiple users
it uses a command line interface
command prompt:
c:\>

GUI - graphical user interface

Citrix server

"telnet"  uses a command line interface

Advertisement:
logmein
free competitor to gotomypc


<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>

we have finished all of HTML
next time, move on with CSS

Tuesday, October 11, 2011


Reading assignment:
Lecture book, ch 3

Do the quickchecks

Next quiz this coming tuesday
material from last Thursday and today
Also, ch 2 in the lecture book

[72.14.204.147]

http://www.overclock.net/faqs/44143-how-use-hosts-file-block-websites.html

how to block websites
the hosts file

webserver
client


in loading a website
http://upload.wikimedia.org/wikipedia/commons/c/c6/Http_request_telnet_ubuntu.png
starts with an HTTP request from the web client

the server responds with an HTTP response

200 = OK
404 = Not Found
403 = Forbidden

hostname: cs12.cs.qc.cuny.edu
i will not be here this Thursday (10/13)!

WinSCP
you all have accounts created by Xiuyi
on this machine

your credentials:
username: first two letters of last name +
first two letters of first name +
last 4 digits of your CUNYFirst ID

password: all 8 digits of your CUNYFirst ID

So, for example, Josh Waxman's credentials:
my cuny first id happens to be: 12345678

login: wajo5678
password: 12345678

It has to be all lowercase

how do I get Winscp?

do a google search for the words
winscp download

http://winscp.net/eng/download.php

You don't want a beta release
You want a stable release

What is a beta?

we will use Winscp to make our web pages

it is a file editor for remote files
and a file transfer program


http://cs12.cs.qc.cuny.edu/~xiuyi/fugu.html



img tag
hotlinking and why it is bad
it's stealing!
it is a bad idea
to download the files from lab:
prenhall.com/grauer
alternatively:
http://www.pearsonhighered.com/exploring/

http://wps.prenhall.com/bp_exploring_excel_2010_comp/
click on student data files

quiz up to here

Thursday, October 6, 2011


2nd quiz will be up to last lecture
meaning, sept 20 and 22nd
Lecture book: ch 1

Anatomy of a URL
url: website address

http://en.wikipedia.org/wiki/Uniform_Resource_Locator

scheme://domain:port/path?query_string#fragment_id

scheme://domain/

scheme, or protocol
http://
https://
ftp://
telnet://
gopher://

http = hypertext transfer protocol

http://en.wikipedia.org/wiki/Uniform_Resource_Locator
what is the scheme?
http

what is the domain?
en.wikipedia.org

what is the path?
(C:\josh\subfolder\hello.txt)
/wiki/Uniform_Resource_Locator

#fragment_id
some bookmark within the html page

Analyzing domains

http://mypage.net/5/6/www.chase.com/login
Phishing
embedding name not in the domain portion
misspellings

TLD - top level domain
example of a TLA (three letter acronym)
.com
.net
.gov
.org
.edu

www.chase.net

countries
.uk
.ru

.ac.uk
.co.uk

Domain:
www.google.com
what I will define as 'domain' is JUST the google.com

the www is what we call a subdomain

http://eniac.cs.qc.edu/~svitak/cs12/


http://www.chase.com.scamsite.ru/login

look at the very last two things before the first slash
THAT is the domain

IP address
Really, there are four numbers that are used to identify any location on the Internet
http://en.wikipedia.org/wiki/IP_Address
Internet Protocol


IP addresses are hard to memorize
http://www.whois.net/
you type in a domain, they will tell you the IP


The Internet is NOT the same as the Web
The web is a bunch of connected documents
the internet is a bunch of connected computers (networks)

The "World Wide Web" is one service available on the Internet.

DNS - domain name service
automatic address book, mapping names to IP addresses
when i type google.com

Thursday, September 22, 2011

lecture


http://xkcd.com/792/

password reuse

http://xkcd.com/936/


how come some computers are MUCH MORE COSTLY than others?
power. how much you can do at one time.

speed.
measures in hertz
http://en.wikipedia.org/wiki/Hertz

Gigahertz
http://en.wikipedia.org/wiki/Megahertz_myth

other factors:
RAM -- how much do you have?

swap space -- they will swap data and instructions from RAM to the hard drive and back

Moore's law
http://en.wikipedia.org/wiki/Moore's_law

also, computing speed does seem to continuously increase

Traveling salesman problem

millenium prize
http://www.claymath.org/millennium/

1) Generate all permutations of cities
2) For each, calculate the trip length
3) Go through all those lengths, select the smallest one

This works for 4 cities
only 4! permutations

100 cities?
100!
20,098,468,420,666 years

this is assuming current computer architecture
there are other approaches
multiple CPUs in one computer
parallel computing

Quantum computing
DNA computing
maybe we can solve it that way

Phishing

<a href="http://scamsite.com">www.trustedbank.com</a>
http://en.wikipedia.org/wiki/Phishing

Tuesday, September 20, 2011

lecture notes


assigned reading:
finish ch 1 in lecture book
do the quickchecks


first quiz:
up to last class. in lab. next tuesday.

types of software
System
programming software
end-user

VBA (visual basic for applications)
1) You will need to display the Developer Tab
search google for:
how do i display the Developer Tab in word 2010
http://msdn.microsoft.com/en-us/library/bb608625.aspx

2) Click on the Visual Basic Button

3) Insert / UserForm

4) Draw a userform

5) Click Play

6) Save the document as a macro-enabled document


http://www.w3schools.com/
to learn HTML
try it out editor
go up to HTML basic


Word Exam walkthrough



Practice Word Exam.
Word practice exam file, 

Word exam:

Thursday, September 15, 2011


how do we store images?
what are the repercussions in terms of file size?

pixel - picture element
300 x 200 dimensions
60000

using 256 colors, each byte = 1 pixel
60000 bytes

using 16 colors, each nibble = 1 pixel
30000 bytes

using 2 colors, each bit = 1 pixel
60000/4 bytes bytes

24 bit bitmap (true color)
each pixel = 3 bytes
RGB
60000 x 3 bytes

covered bitmaps

raster graphics and vector graphics
http://en.wikipedia.org/wiki/Raster_graphics
http://en.wikipedia.org/wiki/Vector_graphics
http://en.wikipedia.org/wiki/Scalable_Vector_Graphics

http://www.w3schools.com/

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

vector graphics will be sharper when zoom in
will take less space

counting in binary

bitmap

Tuesday, September 13, 2011


reading:
lecture book, ch 1, section a
hw: quickcheck at the end of the section

how do we store numbers?
base 2 numbers
decimal = base 10 numbers
binary = base 2 numbers

how do we store letters?
ASCII -
http://www.asciitable.com/

extended ascii
there is also unicode
A

http://www.ssec.wisc.edu/~tomw/java/unicode.html



nibble = 4 bits
word = 2 bytes
dword = 4 bytes

kilobyte = 1024 bytes (2^10)
megabyte = 2^20 (1024 kilobytes)
gigabyte = 2^30
trilobite = extinct marine arthropod
terabyte = 2^40

http://en.wikipedia.org/wiki/Terabyte


try converting the following binary to decimal:
101101

try converting 542 into binary


Thursday, September 8, 2011

lecture


lbinary
bits 0, 1

machine language: 0100111 10001 100111

add 5 and 6

next level:
assembly language

move into A the value 5
move into B the value 6
add A and B and store the result in A

MOV AX, 5
MOV BX, 6
ADD AX, BX

An assembler program (first written in machine language) takes as input some text consisting of assembly language, puts out output of 0100100111001

C++, Java, JavaScript, Visual Basic, Python: programming languages. On a higher level than assembly language.

Visual Basic:
For I = 1 To 10
MsgBox "Hello!"
Next

100: MOV AX, 1
108: SAY "Hello!"
ADD AX, 1
CMP AX, 11
JNE 108

this is a loop

2 different ways of translating a computer program:
* compiling : will give me an EXE
* interpreting




Tuesday, September 6, 2011

lecture notes


General purpose machine / universal computer

hardware -- physical components of the computer
software -- instructions (a type of data)

pass info from one component in von Neumann architecture to another via the bus


1) First, my program sits on the hard drive
2) Double click on it, it is copied to RAM
3) Point the IP (instruction pointer) to the beginning of the computer program.
4) fetch-execute cycle
a) fetch
b) execute
c) fetch
d) execute

a loop

algorithm: recipe. a set of instructions one can follow to solve some problem.

RAM: short term memory.
RAM: stands for Random Access Memory
as opposed to - sequential access memory
Random Access Memory means that you can get to any random slot in memory in about equal time.

RAM is much more expensive than Hard Drives.
500 GB of HD space
But, only 4 GB of RAM


Von Neumann Architecture


Thursday, September 1, 2011

lecture 2 notes


What is a computer?
something that computes

what does a "computer" need?

eyes, ears (input)
mouth, hands (output)
memory (short term)
control
math ability (brain)

Alan Turing
http://en.wikipedia.org/wiki/Alan_Turing
Turing Test
(part of field of AI -artificial intelligence)

link to a description of Machine passing Turing test

http://home.sprynet.com/~owl1/turing.htm

http://xkcd.com/329/


on a machine:

input (keyboard)
output (speakers)
short-term memory (RAM)
CPU - central processing unit
- ALU -- arithmetic / logic unit
- control unit

von Neumann architecture
http://en.wikipedia.org/wiki/Von_Neumann_architecture

how do I increase pages in a Word Document

1 pt = 1/72 "
change line spacing, including "Exactly" and "Multiple"
adjust margins
replace periods with periods with 16pt (search and replace)
change font face itself
change point size

serif
sans serif

fixed width
proportional

Tuesday, August 30, 2011

Welcome to CS12


Understanding Personal Computers

there is a lab; and a lecture
lab: 60%
 three exams:
Word
Excel
Access
lecture: 40%
quizzes -- 10%
web project -- 10%
final -- 10%
homeworks -- 10%

New Perspectives on Computer Concepts, 10th Edition, Comprehensive (New Perspectives Series)


qccs12.blogspot.com


Software: Microsoft Office 2010

at home
If you have office 2003: problem
If you have office 2007: good
If you have office 2010: good

http://www.microsoft.com/office
Web Apps, which are free

Try office for 60 days:
http://office.microsoft.com/en-us/try/try-office-2010-FX101868838.aspx?WT%2Emc_id=ODC_ENUS_OATProdHome_MonTry&culture=en-us

http://office.microsoft.com/en-us/access/

Microsoft Ultimate Steal
http://www.microsoftstore.com/store/msstore/en_US/pd/productID.229301900

Where to get the files
1) You could bring in a flash drive. copy the contents of that folder. C:\exploring word
c:\exploring excel

2) How to download the files
http://www.pearsonhighered.com/exploring/