Tuesday, May 15, 2012

new quiz


1) rot13 is an example of
a) encryption
b) decryption
c) a & b
d) none of the above

2) In Excel, what would be the R1C1 reference for B2, if I were standing in A1?
relative: R[1]C[1]
absolute: r2c2
e.g. mixed column-absolute: r[1]c2

3) $a5 is an example of a:
a) R1C1 reference
b) absolute reference
c) relative reference
d) mixed reference

4) The following:
Function MySum(X, Y)
    MySum = X + Y
End Function

is an example of a:

a) Javascript program
b) UDF
c) Excel formula
d) server-side script

5) Why might I want to index a foreign key?
faster, will need it often, to match to primary key


6) Consider the following SQL query, where Customers has 10 records and Employees has 20 records.
select * from Customers, Employees

How many records would be returned?
200 records


7) A JPEG uses a form of compression which is _____________.
lossy

8) Which of the following would be matched by the wildcard B*B? (Circle all that are correct.)

a) BOB
b) BIB
c) BB
d) BABY

9) What is an example of an Object oriented language?
C++, Smalltalk, Java

past quizzes



1) The process by which several technologies with distinct functionalities evolve to form a single product is called:
a) the digital revolution
b) convergence
c) divergence
d) digitization

2) Source code (able to be read or written by a programmer) is converted into machine code by:
a) a compiler
b) an interpreter
c) a translator
d) A and B

3) Images can be digitized by treating them as a series of colored _________. pixels

4) A _________ is about one billion bytes. gigabyte

5) Which of the following is not actually part of the von Neumann architecture?
a) memory
b) arithmetic / logarithmic unit
c) control unit
d) input and output

6) A computer does not usually run out of RAM because it can use an area of the hard disk called ______ memory. virtual

7) Data on an optica storage medium, such as a DVD, is stored as pits and __________. lands

8) A device _________ is software usually run in the background without opening a window and is designed to help a peripheral device establish a connection with a computer. driver

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

10) An example of open source software is: winscp, openoffice

11) What is the purpose of an Fn key? Does your computer keyboard include an Fn key? Why or why not?

12) Using only pen and paper, convert the following into binary: 48

13) What would be the output of the following in codecademy? "Hello there".length
11

14) What is a trilobite?
extinct marine arthropod

15) Which of the following is a closing HTML tag?
a) <close>
b) </body>
c) <a href="hello.html">
d) {\b}

16) Grace Hopper is crediting with popularizing the term _____________: bug

1) A ________ program stored in ROM tells the hard disk to load the operating system into RAM:
a) kernel
b) bootstrap
c) terminate and stay resident
d) device driver

2) A ___________ boot computer could boot into Windows, and then reboot into Mac OS.
dual

3) Giving a **practical** example, how can a disk become fragmented?

4) What does Dropbox let you do?

5) The sounds you hear as two modems or fax machines connect are examples of a process called handshaking:
a) True
b) False

6) An encrypted message is called:
A) plaintext
B) cleartext
C) ciphertext
D) encryptex

7) Use ROT13 to encode the following message:
This message is in English.

8) In the URL:

What is the domain?
en.wikipedia.org
or better,
wikipedia.org


9) If I am in cell G4 and refer to cell A1 using a relative reference, the R1C1 reference would be:
R[-3]C[6]

10) In the Javascript statement:
var x = 100;
what does var mean?


make me a variable

1) What is the difference between the Internet and the Web?
internet: connected machines. web: connected documents

2) .com, .net, and .gov are examples of _____ ______ domains.
top level

3) SETI@home is an example of ________ computing.
distributed

4) What is the purpose of SETI@home?
find aliens

5) What is FTP, and what is its purpose?
file transfer protocol, transferring files

6) Hackers can use automated software to look for computers with open _____ that are vulnerable to unauthorized access.
ports

7) Cookies were developed because HTTP is a stateless protocol. Explain.
stateless protocol means that no recollection of previous interaction. therefore, save state on user's machine.

8) Are most search engines case sensitive?
no

9) If I save a file as a monochrome bitmap, 100 across and 100 down, approximately what will be the file size?
=100 * 100 / 8

10) A raster image will be sharper than a vector image if we zoom in. True or false?
false.

11) Consider the following code from codecademy:
var i = 0;
while ( i < 2 ) {
  console.log( "i is now " + i );
  i++;
}

This is an example of a:

a) substring function
b) input statement
c) loop
d) comment

12) What is an example of netiquette?
DON'T WRITE IN ALL CAPS! IT LOOKS LIKE YOU ARE SHOUTING!

Thursday, May 10, 2012


what langs are out there?

VBA in Office
open source, free languages
e.g. Python, Java
also are free IDEs

Visual Studio Express edition

Tuesday, May 8, 2012


one should primary key, other one not needed.
link on comparable fields
same data types
on primary key, no duplicates
data should be consistent when you make the link


SELECT LastName, FirstName, Max(Price) AS thePrice
FROM Author, Book where AuthorID = AuthorCode
GROUP BY LastName, FirstName;

parameters, calculated fields

Like "G*"

Thursday, May 3, 2012


CS department website

www.cs.qc.cuny.edu/

80: visual basic
Visual Stuidio is an IDE
integrated development environment
IDE


111: c++
#include <iostream>
using namespace std;
int main()
{
int a, b;
cout << "Please enter two numbers separated by a space. " << endl;
cin >> a;
cin >> b;
int c;
c  = a + b;
cout << "Your sum was " << c << endl;
return 0;
}

SELECT
INSERT INTO Book (AuthorCode, Title, PubID)
VALUES (35, 'Hello There World', 'MH');
UPDATE
DELETE


Practice Access exam walkthroughs






Tuesday, April 24, 2012


quiz 3 next tues

from last end of chapter 8 in New Perspectives Book
probably: ch 6, 7, 8

Ada_Lovelace first computer programmer
for Babbage's analytic engine

Practice Access Exam 1.
Practice Access Exam 2.
Access Review Presentation.


Access practice exam files.

Thursday, April 19, 2012


UPDATE Positions
Set Salary=Salary + Salary*10%
Where Salary <= 50000

Query design:

1) select table or tables
2) select fields
3) set criteria
4) set sorting order

SELECT Positions.Title, Positions.Description
FROM Positions
where salary>30000

SELECT Positions.Title, Positions.Description, Positions.Salary
FROM Positions
ORDER BY Positions.Salary;

there is a like operator
where
author like "G*"

like "J?sh"

usually on a test
begins with
ends with
contains

G*
*g
*g*

Web Page Assignment

The web page assignment is due the day of the final exam.
Use a simple text editor. Not Frontpage, Dreamweaver.


Your web site should include: lists (UL, LI, OL, images, tables, bold, colors, paragraphs, etc.)


All the files and directories making up your web pages assignment must be within the public_html directory of your UNIX account. The filename of your main web page must be called index.html and located directly in the public_html directory of your UNIX account. Your web page assignment has to have at least the following:
  • Pictures - Create a directory called pictures in your public_html directory. Don't forget to set the proper permissions for the pictures directory. Place all of the image files (pictures) you are using in all of your web pages in the pictures directory.
  • About me - Create a web page (html file), in your public_html directory, describing yourself. Include a "photo", real or imagined, of yourself on this web page. Create a link to this web page in your main web page (index.html).
  • My family - Create a web page (html file), in your public_html directory, describing your family. You can link to their web pages from there or include scanned pictures if you like! Create a link to this web page in your main web page (index.html).
  • My friends - Create a web page (html file), in your public_html directory, describing your friends. You can link to their web pages from there or include scanned pictures if you like! Create a link to this web page in your main web page (index.html).
  • My hobbies - Create a directory called hobbies in your public_html directory. Don't forget to set the proper permissions for the hobbies directory. Create a web page (html file), in the hobbies directory, that describes your hobby. Provide links to at least 2 web sites that deal with your hobby and you can put pictures there too. Create a link to this web page in your main web page (index.html).
  • Queens College - Create a link to the college's main web page in your main web page (index.html).

Be Creative!!!

Experiment!!!

Make it look nice!!!

Tuesday, April 17, 2012


did ch 8
lossless vs lossy compression

msaccess
language: SQL

query
SELECT
INSERT
DELETE
UPDATE

CREATE TABLE
DROP TABLE


Select * From Courses

Select section, days, time, room From Courses

Select section, days, time, room From Courses
Where days='Tue Fri' AND
(time = '8:15 -- 9:05 am'
OR
time='10:15 -- 11:05 am')

INSERT INTO Positions (Title, Salary, Description)
Values ('TA', '1000', 'student teacher')

Delete * From Positions where PID=4

Tuesday, April 3, 2012




Comprehensive HWs (so far) to hand it
1) New Perspectives Labs at end of each chapter
2) Screenshot of anything
3) Codecademy (screenshot of progress at end of semester)
4) Grauer Excel, practice exercises ch 1 and ch 2
5) Writing a UDF (user defined function in Excel)
6) Intermediate web project 1
7) Create and submit toy database

=IF(H3>=100, 105, Average(E3:G3))
=IF(h3 = "yes", Average(E3:G3, 100), Average(E3:G3) )

Thursday, March 29, 2012


design a table to store course information,
make up information to fill that table
course number, number of credits, faculty, faculty rating

design a table to store faculty information,\
msaccess


Access is different from other office applications
does not automatically start with a blank database
you need to create a blank database on the disk

Many changes to the database automatically save
(editing a table)
also, cannot undo

which is why we often save backup copies of a database

create /; table design
there is data and there is meta-data

in access, must explicitly save meta-data
changes to data automatically save
Link of the CS dept at Queens College
http://www.cs.qc.cuny.edu/

http://www.cs.qc.cuny.edu/schedule/fa12/fa12.htm

non-relational
will have duplicated values
inconsistent data

Guidelines:
in general, fields should be as atomic as possible
keep fields as unchanging as much as possible
calculate changing values based on that

Prepare for the Excel exams

Excel practice exam files,

Practice Excel Exam 1.
Practice Excel Exam 2.
Practice Excel Exam 3.
Practice Excel Exam 4.
Practice Excel Exam 5.
Excel Review Presentation.


Walkthroughs:
Exam 1



Exam 2


Exam 3


Exam 4


Exam 5

Tuesday, March 27, 2012


UDF: user defined function

Alt-F11: launches VB editor
Insert/Module: add new module

then type:
Function MySum(X, Y)
    MySum = X + Y
End Function


HW: write a UDF called MyProduct
which will be X times Y

why use names? self-documenting formulas

you can also Name relative refs and mixed refs
name manager
DiagonalUp

MonthlyPayment
='HO3-4'!$H9

databases
record: row in Excel
table: collection of records, tab, worksheet
database: collection of tables and methods of interacting with those tables
field: corresponds cell (or column?)

Access is a relational database
what does that mean?
*shrugs*

HW:
design a table to store course information,
make up information to fill that table
course number, number of credits, faculty, faculty rating

design a table to store faculty information,\
msaccess

Thursday, March 22, 2012


codeacademy, defining functions, and that is almost all

VBA

stands for Visual Basic for Applications

classes (types) of programming languages
- functional programming language (Lisp)
- logical programming languages (Prolog)
- imperative programming language (C, C++, Javascript, VBA, etc)

to gain access to VBA, Alt-F11

Immediate window lets me type commands which are immediately carried out
to access the immediate window, must press Ctrl-G
HW: try this out in VBA in Excel
? 1
 1
? "hello"
hello
? 1 + 2
 3
? 50 + 100 / 2
 100
? Len("Ryan")
 4
myFirstName = "Joshua"

? myFirstName
Joshua
lastName = "Waxman"
myFullName = myFirstName & " " & lastName
? myFullName
Joshua Waxman
? Len(myFullName)
 13
Call MsgBox("hello")
Call MsgBox("hello", vbYesNo)
number = 42
? number / 2
 21
? number Mod 10
 2
myString = "hello"
? Mid(myString, 1, 2)
he
three = Mid(myString, 1, 3)
? three
hel
? replace("coding rules", "coding", "programming")
programming rules
? UCase(myString)
HELLO
? LCase(myString)
hello
? Range("A1")
 761
Range("B1").Value = 986

Tuesday, March 20, 2012


Quiz #2 will be on Mond, Tues, next week, in lab.

HW: due next Tues,
submit via screenshot

1) Write up a single webpage about your favorite sport.
Use 2 pictures to illustrate it. Some text should be:
* bold
* italics
* bold italics
* underlined

Also, include a link to another webpage somewhere on the Web which discusses your sport.

for help with the HTML, remember that you have w3schools.com

web pages:
order a tuna sandwich

hotlinking
is often like stealing

 netiquette - internet etiquette
1) don';t hotlink
2) NO ALL CAPS!!!!
3) Don't reply all.

Email storm

To:
CC:
BCC:
http://en.wikipedia.org/wiki/Email_storm

also, with hotlinking, you are not in control of the image

Thursday, March 15, 2012

Second quiz only up to today.

we did more excel. if, vlookup

sequential search, binary search

Tuesday, March 13, 2012


Sputnik and the internet

http://www.computerworld.com/s/article/9036482/Happy_Birthday_Sputnik_Thanks_for_the_Internet_

http://computer.howstuffworks.com/internet/basics/internet-start.htm

every computer can have an IP address
http://en.wikipedia.org/wiki/IP_address?utm_source=twitterfeed&utm_medium=twitter

DNS domain name service
google.com
will yield
http://72.14.204.101/

0.. 255
256 ^ 4

URL
Uniform resource locator
http://en.wikipedia.org/wiki/Uniform_resource_locator

scheme://
protocol://

http://
hypertext transfer protocol

https://
secure

ftp://

telnet://

gopher://

domain:
en.wikipedia.org
http://en.wikipedia.org/wiki/Uniform_resource_locator
scheme://domain/

domain
last two items, usually, in the US
subdomain
e.g., en, www,

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

scammers
phishing scheme

http://chase.safenetworking.com/login
http://chase.scamsite.com/login

http://3.0.4.123/chase.com/

http://0xc.0x2.4.123/chase.com/

TLD
top level domains
TLAs
three letter acronyms

.com
.net
.biz
.tv
.org
.gov
.edu
.xxx

country codes
uk
.co.uk
google.co.uk

whitehouse.gov
whitehouse.net


Thursday, March 8, 2012


rot13
http://www.pearsonhighered.com/exploring/

in excel, dates are really numbers
number of days since Jan 0, 1900

Tuesday, March 6, 2012


R1C1 reference style

Row 1 column 1

A1 reference style
column A row 1

naming cells makes absolute refs much easier

Tuesday, February 28, 2012


Quiz #1 is now Mar 12/13, in lab
Only up to what we did last class
Thursday, February 23, 2012

up to section 3 in the book

What will be output of typing
"Ryan".length

Codecademy up to Variables

HW:
make your very first webpage on WinSCP:
What we need:
A special folder (directory) called public_html
Capitalization matters. It is NOT
Public_HtmL
public.html

Inside public_html folder, we will store an html file: hello.html

The file permissions, folder permissions will not be set. We need to change the permissions.

web address (URL):
hostname/~loginname/filename
cs12.cs.qc.cuny.edu/~asth2456/hello.html

Error:
404 -- not found
403 Forbidden

every folder has two folders in it:
. which is yourself
.. which is one level up

command-line, text based user interface
GUI

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

Thursday, February 23, 2012


Administrative matter:
Quiz 1: Mar 6, in lab

webserver
log in to that machine.
WINSCP
credentials:
login: first two letters of last name +
first two letters of your first name +
last 4 digits of your CUNYFirst ID
password: all 8 digits of your CUNYFirst ID

Joshua Waxman
CunyFirst ID: 12345678

login: wajo5678
password: 12345678
hostname: cs12.cs.qc.cuny.edu

HW: log in to the cs12 machine using winscp
Submit a screenshot

data type
integers (5), float (3.14159), string ("Josh")
open source software
openoffice.org
libreoffice.org

Spybot Search & Destroy
www.safer-networking.org/

Thursday, February 16, 2012


To get the files for the Excel book:
prenhall.com/grauer
http://wps.prenhall.com/bp_exploring_excel_2010_comp/

debugging formulas
http://en.wikipedia.org/wiki/Grace_Hopper

formatting is NOT the same as the underlying values

HW: Midlevel

Tuesday, February 14, 2012

lecture notes


Anything that can be done in software can be done in hardware and vice versa.

At w3schools:
HTML Formatting
HTML Fonts
HTML Styles
HTML Links

Read through Ch 2 in New Perspectives, do the lab

Confirm or deny on Codecademy.

Thursday, February 9, 2012

lecture notes


docs.google.com

Alternatives to Office
OpenOffice.org

Google applications
Google Reader - RSS reader

pull paradigm
push paradigm

XML - extensible markup language
RSS feed: would include date and time change, title, material

Google search for "happy cow" vs. happy cow

milk site:happycow.net

"happy * cow"

sign in to CodeAcademy

On w3schools, from HTML elements to HTML paragraphs

ways to make document bigger

point = 1/72"
serif vs. sans serif




Tuesday, February 7, 2012

hw: Learn HTML: Read (and practice!) from “HTML Home” until “HTML Basic” (w3schools)

hw: New Perspectives labs, ch 1

To Do: how to search on Google

Homework Assignment submission

is now possible. I enabled BlackBoard.


* 2012 Spring Term, lab section Mon Wed 7:30 -- 8:20 pm
* 2012 Spring Term, lab section Tue Thu 7:30 -- 8:20 pm
* 2012 Spring Term, lab section Tue Thu 5:30 -- 6:20 pm
If you look there under assignments, you should be able to submit your completed screenshot homework assignment.

Thursday, February 2, 2012

lecture 2

HW:
Take a screenshot
Cmd Shift 4 on a Mac
print screen key on PC

CPU has control unit, ALU (arithmetic / logic unit)

von Neumann architecture

see this link for the picture


Trilobite

Navigating Windows, Part I

The root folder and file paths


Tuesday, January 31, 2012

Welcome to CS12

Here is a link to the book for the lecture component.

Here is a link to the syllabus.


HW: try to get the books
Download WinSCP
get a gmail account
register a khanacademy account

Free tutors
http://www.cs.qc.cuny.edu/tutors.html