Sunday, December 11, 2011
SELECT Customers.FirstName, Customers.LastName, Accounts.Balance, Branch.Location
FROM Branch INNER JOIN (Customers INNER JOIN Accounts ON Customers.[CID] = Accounts.[CID]) ON Branch.BID = Accounts.BID
WHERE (((Branch.Location)="Central"))
ORDER BY Customers.LastName;
SELECT * From Accounts, Customers
This will give me the Cartesian Product of the
two tables
SELECT * From Accounts, Customers
WHERE Accounts.CID = Customers.CID
This is called an INNER JOIN
SELECT * From Accounts, Customers, Branch
WHERE Accounts.CID = Customers.CID
AND
Branch.BID = Accounts.BID
[SalePrice]/[SqFeet] AS PricePerSqFt
as part of the field list in a Select Query
[SaleSPrice]/[SqFeet] AS PricePerSqFt
Instead of
WhERE BID="b5"
Where BID=[TheBranchIDISupply]
Serial Numbers in Excel, Access?
the way we handle dates and times
dates are whole number offsets from Jan
0, 1900
times are fractions of whole numbers
Test 2:
Query 4:
Select Title, PublDate, LastName, PubName
From Book, Author, Publisher
WHERE Book.AuthorCode = Author.AuthorID
And Book.PubID = Publisher.PubID
And PubName="Wiley"
Order By Title Asc
And PubID = "WI"
Diff types of wildcards
?
*
Begins with: G*
Ends with: *ing
Contains: *Excel 2007*
SELECT [Waxman Commissions].LastName, Sum([Waxman Commissions].SalePrice) AS Fred, Avg([Waxman Commissions].MarketDays) AS AvgOfMarketDays, Sum([Waxman Commissions].Commission) AS SumOfCommission
FROM [Waxman Commissions]
GROUP BY [Waxman Commissions].LastName;
http://office.microsoft.com/en-us/access/
Sunday, December 4, 2011
To create a query, you can use a Wizard + Design View to further modify the query.
OR, you can just write it directly in
SQL.
http://w3schools.com/sql/default.asp
SELECT * From Books
Where Clause
SELECT Title, Year, ListPrice, Publisher
From Books
Where Publisher="Prentice Hall"
wildcards
?
*
SELECT Title, Year, ListPrice, Publisher
From Books
Where Publisher Like "Prentice?Hall"
Order By ListPrice Desc
First use the wizard to choose Table(s)
and fields. Then, add sorting and criteria
in design view.
SELECT Books.Title, Books.Year, Books.ListPrice, Books.Publisher
FROM Books
WHERE (((Books.Publisher)="Prentice Hall"))
ORDER BY Books.ListPrice DESC;
Query 2:
Select Title, Author, Year, ListPrice
From Books
Where Author Like "G*"
Begins with. G*
Ends with. *ing
Contains. *Excel*
SELECT Books.[ISBN], Books.[Title], Books.[Author], Books.[Year], Books.[ListPrice]
FROM Books
WHERE (((Books.[Author]) Like "G*"));
Query 3:
Select Title, Year, ListPrice, Publisher
From Books
Where Year >= 1995 Or ListPrice > 25
Order By Year Desc
Query 4:
Select ProductName, UnitPrice, UnitsOnOrder
From Products
Where (UnitsOnOrder=0) And (UnitPrice>=50 And UnitPrice<=100)
Select ProductName, UnitPrice, UnitsOnOrder
From Products
Where UnitsOnOrder=0 And UnitPrice Between 50 100
OR, you can just write it directly in
SQL.
http://w3schools.com/sql/default.asp
SELECT * From Books
Where Clause
SELECT Title, Year, ListPrice, Publisher
From Books
Where Publisher="Prentice Hall"
wildcards
?
*
SELECT Title, Year, ListPrice, Publisher
From Books
Where Publisher Like "Prentice?Hall"
Order By ListPrice Desc
First use the wizard to choose Table(s)
and fields. Then, add sorting and criteria
in design view.
SELECT Books.Title, Books.Year, Books.ListPrice, Books.Publisher
FROM Books
WHERE (((Books.Publisher)="Prentice Hall"))
ORDER BY Books.ListPrice DESC;
Query 2:
Select Title, Author, Year, ListPrice
From Books
Where Author Like "G*"
Begins with. G*
Ends with. *ing
Contains. *Excel*
SELECT Books.[ISBN], Books.[Title], Books.[Author], Books.[Year], Books.[ListPrice]
FROM Books
WHERE (((Books.[Author]) Like "G*"));
Query 3:
Select Title, Year, ListPrice, Publisher
From Books
Where Year >= 1995 Or ListPrice > 25
Order By Year Desc
Query 4:
Select ProductName, UnitPrice, UnitsOnOrder
From Products
Where (UnitsOnOrder=0) And (UnitPrice>=50 And UnitPrice<=100)
Select ProductName, UnitPrice, UnitsOnOrder
From Products
Where UnitsOnOrder=0 And UnitPrice Between 50 100
Sunday, November 20, 2011
what would a database system look like if it were NOT relational
problems
1) a lot of repeated data
2) inconsistent data
related tables
CustID on the Customer Table is a primary key
uniquely identifies a record
OrderID on the Orders Table is a primary key
uniquely identifies a record
benefits of a relational database:
1) smaller database, no repeated data
2) consistent data
BillCustId and ShipCustID are foreign keys
match up with primary key of another table
Indexing
What if I have 1 million records and I want to search for "Josh Waxman" as the name? How long will it take, on average, to find that record?
Why will it take 5 minutes? Sequential search.
(n+1)*(n/2)
(n^2 +n)/2
divide by n to get average
(n+1)/2 is the average
with 1 million records, sequential search will take (n+1)/2, or 500,000 time units, on average
within the CS department, there is a course called Analysis of Algorithms. Algorithm: a recipe for solving a problem.
Binary search would be much faster. But needs items to be in sorted order.
It is like the high-low game.
mid = (top + bottom)/2
if num looking for is more:
top = mid + 1
if num looking for is less:
bottom = mid - 1
we can either have a sorted list Or we can have Binary Search Tree. Course in CS dept called Data Structures. considers how to store collections of data.
if indexed, instead of O(n), it will take O(log n), or 20 searches for a million records.
we are skipping ch 1 hands on 2. we are on page 581, ch 1 hands on 3.
Quiz next time we meet; also Excel exam
The quiz on Ch4 in lecture book.
from SUNDAY, OCTOBER 23, 2011 until
SUNDAY, NOVEMBER 13, 2011
Read, do quickchecks of Ch 6
Sunday, November 13, 2011
lecture
Goal Seek
within the PMT function
I can fiddle with some numbers
Solver -- more advanced -- goal seek on steroids
Solver can fiddle with multiple cells
Solver can solve for a maximum or minimum
Solver can work within constraints
Pivot Table
Pivot Chart
CSV file = comma separated value
difference between raw data and information
PivotTables and PivtoChartsCharts are more dynamic than Subtotal
Filtering and Advanced Filtering
in advanced filtering, within same row, it means AND
within diff rows, means OR
Financial Formulas
1) What function should I use?
FV, PV, PMT, RATE, NPER
2) Once I determine that, what should be the parameters
Wildcards:
*
?
J*sh
______
Josh
Jish
Jash
Joosh
Jsh
but not
Joshua
What about J?sh
____
Josh
Jish
Jash
Not Joosh
Not Jsh
Microsoft Access requires an actual file to work against. diff from word and excel
Many changes to your Access file cannot be undone.
Many changed to your Access file are automatically saved.
RDBS - relational database system
store your data, has ways of processing, viewing, asking questions about your data
Database: collection of Tables
Table: collection of records
Record: collection of fields
Field: one unit of information
Goal Seek
within the PMT function
I can fiddle with some numbers
Solver -- more advanced -- goal seek on steroids
Solver can fiddle with multiple cells
Solver can solve for a maximum or minimum
Solver can work within constraints
Pivot Table
Pivot Chart
CSV file = comma separated value
difference between raw data and information
PivotTables and PivtoChartsCharts are more dynamic than Subtotal
Filtering and Advanced Filtering
in advanced filtering, within same row, it means AND
within diff rows, means OR
Financial Formulas
1) What function should I use?
FV, PV, PMT, RATE, NPER
2) Once I determine that, what should be the parameters
Wildcards:
*
?
J*sh
______
Josh
Jish
Jash
Joosh
Jsh
but not
Joshua
What about J?sh
____
Josh
Jish
Jash
Not Joosh
Not Jsh
Microsoft Access requires an actual file to work against. diff from word and excel
Many changes to your Access file cannot be undone.
Many changed to your Access file are automatically saved.
RDBS - relational database system
store your data, has ways of processing, viewing, asking questions about your data
Database: collection of Tables
Table: collection of records
Record: collection of fields
Field: one unit of information
Web Page Assignment
The web page assignment is due the day of the final exam.
But, all the files and directories making up your web pages assignment must end up in 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). This web page should use CSS, referring to the external style sheet.
- 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). This web page should use CSS, referring to the external style sheet.
- 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!!!
Sunday, November 6, 2011
Sunday, October 30, 2011
Formula auditing
debugging your formulas
evaluate formula is one suich debugging tool
trace precedents (draws arrows...)
trace dependents (draws arrows...)
Relative reference - get changed as copy formula
Absolute reference - stays put
Using the Name Box, you can give Names to Absolute references
FUNCTION is basically a named operator
+-*/^
5 + 4
5 and 4 are operands
SQRT
SQRT(16)
operands we call parameters or arguments
we covered some basic functions
Number formatting:
There is a diff between the actual value stored in a cell and the way it displays.
Superman III, Office Space
maybe use the round function
Read through Ch 5 in the Lecture Book
Do quickchecks
No Quiz next week. Instead, a Word exam
IF function
VLOOKUP function
Do Practice Exercises for ch 2 in Excel
(you might want to also look at the mid-level exercises, since that won't have as much hand-holding, and you want to be able to develop and intuition about writing formulas, to prepare for the Excel hands-on exam.)
Sunday, October 23, 2011
workbook
has many worksheets
literals vs formulas
sometimes you will make a mistake
formula auditing is a "debugging" tool
Evaluate Formula
Word exam (hands on) - Nov 6
next week, Oct 30, quiz
on material from
SUNDAY, OCTOBER 16, 2011
http://qccs012.blogspot.com/2011/10/something-called-ip-address-httpen.html
http://qccs012.blogspot.com/2011/10/httpqcpages.html
plus, lecture book, ch 3, all sections
Please finish Ch 4 in lecture book
do the quickchecks
From lab book, do Practice Exercises for Ch1 of Excel
start with HTML images
for the src tag, you can give relative or absolute paths
we can store on the same webserver, or pull images from a different webserver
src="/images/pulpit.jpg"
this means that it is on the same webserver
src="http://img.thesun.co.uk/multimedia/archive/00440/cow_682_440047a.jpg"
What I just did, pulling the image from another webserver is called "hotlinking".
not nice; not a good idea
"stealing" bandwidth
we got up to the end of lists
that is it for now for HTML
CSS - cascading style sheets
http://www.w3schools.com/css/default.asp
font tag, and other tags were deprecated
CSS Syntax
selector
declarations
together, they form a CSS rule
simple selectors are based on the tag
class selectors, id selectors
We will start our web pages:
1) log in using WinSCP
2) We will create a folder called public_html
3) We will create a file called main.html inside the public_html folder
4) we will see our webpage in a webbrowser
hostname of OUR webserver is:
cs12.cs.qc.cuny.edu
username: wajo5678
password: 12345678
permissions
three groups:
you, group, universe
actions: read, write, execute
octal means base 8
so far, we have seen base 10 (decimal); base 2 (binary);
each 3 bits corresponds to a single octal digit, for the sake of setting permissions
chmod 705 main.html
would change the permissions to give all rights to the owner, none to the group, and read and execute to the universe
to see your webpage:
hostname/~loginname/filename
http://cs12.cs.qc.cuny.edu/~wajo5678/main.html
404 error: not found
you typed the URL wrong
or filename isn't actually in public_html
403 error: forbidden
you didn't set the permissions correctly
Every folder has two folder within it
One is called .
means myself
One is called ..
means parent
cmd line (DOS), text based interface to the Operating System
cd means change directory (a directory is a folder)
cd .
cd ..
HW: (not to hand it)
go home, log in to WinSCP, make an html page called new.html, put something there
Also, edit main.html
DropBox
https://www.dropbox.com/
Sunday, October 16, 2011
something called an IP address
http://en.wikipedia.org/wiki/IP_address
a 32-bit number
that means that there are 4 bytes in an IP address
hard to remember IP addresses
DNS - domain name server
will give you IP addresses in return for domain names
hosts file in a specific folder on your computer
can use it to block web sites
scammers can use it, so nowadays, only edit as admin
Domain:
everything from the :// until the first / after that
http://www.scamsite.ru/login/www.chase.com/
http://23.123.6.5/www.chase.com/login
http://0x62.0x1F.0x11.0x44/www.chase.com/login
TLDs - top level domain
TLAs = three letter acronym
.com
.org
.net
.gov
.edu
.xxx
whitehouse.gov
countries have their own top level domain
.uk
ac.uk
co.uk
google.co.uk
google.com
subdomain
www.google.com
www is a subdomain within google.com
google.com is the "real" domain
Dr. Svitak's website
http://eniac.cs.qc.edu/~svitak/cs12/
eniac.cs is the subdomain
http://www.chase.com.gimmeyourinfo.ru/login
This is NOT really chase.com
It is a Phishing scheme
Let us pretend that my name is Joshua Waxman and my CunyFirst ID is 12345678
hostname of OUR webserver is:
cs12.cs.qc.cuny.edu
login: first two letters of YOUR last name +
first two letters of YOUR first name +
last 4 digits of your CunyFirst ID
my login: wajo5678
my password: 12345678
#1: lowercase
#2: maybe the first and lastnames are reversed
#3: it is YOUR information, not mine
#4: if it still doesn't work, see Xiuyi
HW: Go home and install WinSCP on your computer
(or Fugu / TextWrangler if you have a Mac)
Usually, web pages are stored on web server
Your web browser is called the client
When you load up a webpage by typing in a URL
you are sending an "HTTP request"
http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol
You type in: http://en.wikipedia.org/wiki/Main_Page
something like: GET /wiki/Main_Page http/1.1
to host: en.wikipedia.org
The webserver responds with an Http response
HTTP/1.0 200 OK
followed by the contents of the requested html page
web client receives it, and renders it
other responses:
404 Page not found
403 Forbidden
The Web is NOT the Internet
it is one of the services available on the internet
there is software called WinSCP
is windows software for editing files remotely, and file transfer
if you have a Mac, you will need Fugu instead
follow this link
http://cs12.cs.qc.cuny.edu/~xiuyi/fugu.html
If you a PC (most of you do):
http://winscp.net/eng/download.php
Make sure you don't download the Beta version
What is Beta?
What is Alpha?
make sure to get the stable version
http://qcpages.qc.cuny.edu/weekend/
Finish Ch 3 in lecture book
(includes quickchecks)
Begin Ch 4 in lecture book
(sections A and B)
next time we meet (next week), quiz
on material from SUNDAY, OCTOBER 2, 2011
as well as Ch 2 in lecture book
Other ways of storing pictures
Pictures, Clip Art, Word Art, Symbols
Do practice exercises for Word, Ch 3
Word exam (hands-on), 3 weeks from now
Will be on ch 1-4 in the book,
plus Mail merge
http://eniac.cs.qc.edu/~svitak/cs12/MailMerge.pdf
A sample exam:
http://eniac.cs.qc.edu/~svitak/cs12/PracticeWord.pdf
Dr. Svitak's website:
http://eniac.cs.qc.edu/~svitak/cs12/
Sunday, October 2, 2011
HW:
Lab book: practice exercises for ch 2, maybe ch 3
Lecture book: ch 3, section A - C
Do the QuickChecks at the end of each section
Quiz next time we meet (two sundays from now):
everything from prev quiz until last week's material
that includes some basic HTML
also, Ch 1 in the lecture book
freeware, open source software
http://www.openoffice.org/
open source = they give you the source code = the instructions written in some programming language
http://sourceforge.net/
find, create, publish open source software for free
more HTML
a is for anchor
we finished HTML links on w3schools
anatomy of a URL:
http://en.wikipedia.org/wiki/Uniform_Resource_Locator
Uniform Resource Locator
syntax:
scheme://domain:port/path?query_string#fragment_id
http
hypertext transfer protocol
webclient and webserver communicate in this http protocol
https
it is secure
bank websites
domain indicates the computer
www.google.com is a domain
qc.cuny.edu is a domain
port is a number, for most websites, optional
scheme, or protocol, is the way we define the structure of the information
web technologies
Tuesday, September 27, 2011
Sunday, September 25, 2011
cams.qc.cuny.edu
3 levels of formatting
* Character level
* paragraph level
* section level
Homework:
Word, Ch 1, practice exercises
Lecture Book, Ch 2, the quickchecks at the
end of each section
In lab, we finished Ch 2, hands-on-exercise 3. But we have not completed hands-on exercise 4 yet, so no practice exercises from the end of that chapter.
** file extensions, how we can see them, what
they mean
chap1_ho3_credit_solution.docx
file extensions mark the TYPE of the file
TXT = text
file associations
In old Operating Systems (like MS-DOS), you would first start the program, then you would open the file in the program
In modern Operating Systems, there are file associations. If the extension is .docx, then docx is associated with Microsoft Word. It will launch the program automatically.
In Access,
.accdb
.laccdb
In web pages:
.htm
.html
In Word:
.doc = word 2003 file (also word 97)
.docx = word 2007, 2010
.docm = macro enabled document
3 levels of formatting
* Character level
* paragraph level
* section level
Homework:
Word, Ch 1, practice exercises
Lecture Book, Ch 2, the quickchecks at the
end of each section
In lab, we finished Ch 2, hands-on-exercise 3. But we have not completed hands-on exercise 4 yet, so no practice exercises from the end of that chapter.
** file extensions, how we can see them, what
they mean
chap1_ho3_credit_solution.docx
file extensions mark the TYPE of the file
TXT = text
file associations
In old Operating Systems (like MS-DOS), you would first start the program, then you would open the file in the program
In modern Operating Systems, there are file associations. If the extension is .docx, then docx is associated with Microsoft Word. It will launch the program automatically.
In Access,
.accdb
.laccdb
In web pages:
.htm
.html
In Word:
.doc = word 2003 file (also word 97)
.docx = word 2007, 2010
.docm = macro enabled document
Sunday, September 18, 2011
lecture
* Macros in Word
Mail Merge
qccs012.blogspot.com
Visual Basic is a programming language
Visual Basic for Applications is a programming language
Macro
Mail Merge
* need database (of patients)
* template document
binary
bit
8 bits = byte
4 bits = nibble
2 bytes = word
4 bytes = dword
1024 bytes = 1 kilobyte
2^10 = 1024
2^20 bytes = approx 1 million = 1 megabyte
2^30 bytes = approx 1 billion = 1 gigabyte
trilobite = Trilobites (play /ˈtraɪləbaɪt/, /ˈtrɪləbaɪt/; meaning "three lobes") are a well-known fossil group of extinct marine arthropods that form the class Trilobita
2^40 bytes = terabyte
http://en.wikipedia.org/wiki/Terabyte
also in computer speed
megahertz
bigger number, faster the computer, more powerful
we saw how to convert from binary to decimal
11010111 is 215 in binary
HW:
Convert 24 to binary
Convert 124 to binary
What is 1000111 in decimal?
What is 10010 in decimal?
First quiz -- two weeks from now. up to this.
counting in binary, adding in binary
A comp can store #s
How do we store letters?
we store them as numbers
ASCII - american standard code for information interchange
ASCII chart
how many poss different characters can we store?
http://www.cdrummond.qc.ca/cegep/informat/Professeurs/Alain/images/ASCII1.GIF
7 bits = 128 poss values
extended ASCII, using all 8 bits
256 possible values
Unicode
http://en.wikipedia.org/wiki/Unicode
How do I encode colors?
pixels = picture element
in a 256 color bitmap
1 pixel = 1 byte
16 colors; each pixel = 1 nibble
monochrome, each pixel = 1 bit
True color
takes 3 bytes per pixel
RGB
red green blue
256 poss values for each
HW: Lecture book, quickcheck at the end of each lettered section in chapter 1
Mail Merge
qccs012.blogspot.com
Visual Basic is a programming language
Visual Basic for Applications is a programming language
Macro
Mail Merge
* need database (of patients)
* template document
binary
bit
8 bits = byte
4 bits = nibble
2 bytes = word
4 bytes = dword
1024 bytes = 1 kilobyte
2^10 = 1024
2^20 bytes = approx 1 million = 1 megabyte
2^30 bytes = approx 1 billion = 1 gigabyte
trilobite = Trilobites (play /ˈtraɪləbaɪt/, /ˈtrɪləbaɪt/; meaning "three lobes") are a well-known fossil group of extinct marine arthropods that form the class Trilobita
2^40 bytes = terabyte
http://en.wikipedia.org/wiki/Terabyte
also in computer speed
megahertz
bigger number, faster the computer, more powerful
we saw how to convert from binary to decimal
11010111 is 215 in binary
HW:
Convert 24 to binary
Convert 124 to binary
What is 1000111 in decimal?
What is 10010 in decimal?
First quiz -- two weeks from now. up to this.
counting in binary, adding in binary
A comp can store #s
How do we store letters?
we store them as numbers
ASCII - american standard code for information interchange
ASCII chart
how many poss different characters can we store?
http://www.cdrummond.qc.ca/cegep/informat/Professeurs/Alain/images/ASCII1.GIF
7 bits = 128 poss values
extended ASCII, using all 8 bits
256 possible values
Unicode
http://en.wikipedia.org/wiki/Unicode
How do I encode colors?
pixels = picture element
in a 256 color bitmap
1 pixel = 1 byte
16 colors; each pixel = 1 nibble
monochrome, each pixel = 1 bit
True color
takes 3 bytes per pixel
RGB
red green blue
256 poss values for each
HW: Lecture book, quickcheck at the end of each lettered section in chapter 1
Sunday, September 11, 2011
Welcome to CS12, Sunday!
qccs012.blogspot.com
Joshua Waxman
joshwaxman@gmail.com
* Lecture -- concepts of computers
* Lab -- hands on skills, microsoft office
Lecture:
New Perspectives on Computer Concepts, 10th Edition, Comprehensive (New Perspectives Series)
Lab:
Big diff bet Office 2003 and Office 2007
Exploring Microsoft Office 2007 Vol. 1 (3rd Edition) (Spiral-bound)
I-building, help desk
* three lab exams (word - 10%, excel - 25%, access - 25%)
* powerpoint project - 5%
* lecture exam - 10%
* hw - 10%
* web project - 10%
* quizzes - 10%
What do you need to do the lab exercises and lab homeworks?
* data - from prentice hall's website
* programs - Microsoft Ultimate Steal (Professional Academic Edition)
1 point = 1/72"
input
output
memory (RAM)
math ability
control
CPU - central processing unit. contains:
*ALU - arithmetic / logic unit
*control unit
von Neumann architecture
instead of specialized machines
universal computer, general purpose computer
hardware -- physical components
software -- instructions, computer programs
fetch-execute cycle
computer program: a bunch of instructions
1. Say: Please enter a #
2. Get a number, store it in X
3. Say: Please enter another #
4. Get a number, store it in Y
5. Add X and Y, store it in Z
6. Say: X + Y = Z
7. Go to step 1
IP: instruction pointer (within the control unit)
Artificial Intelligence
Alan Turing - Turing test
Don't need to get this, but C++ Express Edition
In C++
// calculator1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int x, y, z;
beginning:
cout << "Please enter a #: ";
cin >> x;
cout << "Please enter another #: ";
cin >> y;
z = x + y;
cout << x << " + " << y << " = " << z << endl;
goto beginning;
return 0;
}
A computer only understands machine language
01000010001
annoying
assembly language
MOV AX, 4
MOV BX, 6
ADD AX, BX
SAY AX
there will be a computer program which takes an assembly language program as input, will spit out the machine language program as output
assembler
disassembler
still annoying
programming languages:
Visual Basic, C++, Java, Javascript, Python, Prolog, Lisp
we need to translate it
Visual basic:
For I = 1 to 10
Msgbox "Hello there!"
Next
translators:
* compiler
* interpreter
interpreted is slower
you get to send the original plaintext instructions for an interpreted languages
C++ compiled language
Javascript interpreted languages
how do I make a 9 page paper into a 10 page
paper?
* line spacing (multiple and exactly)
* adjust the margins
* increase size of period
* add footnotes and images
* add meaningful text
* font face. fixed width, proportional width
* letter spacing
* widow and orphan protection
i
Joshua Waxman
joshwaxman@gmail.com
* Lecture -- concepts of computers
* Lab -- hands on skills, microsoft office
Lecture:
New Perspectives on Computer Concepts, 10th Edition, Comprehensive (New Perspectives Series)
Lab:
Big diff bet Office 2003 and Office 2007
Exploring Microsoft Office 2007 Vol. 1 (3rd Edition) (Spiral-bound)
I-building, help desk
* three lab exams (word - 10%, excel - 25%, access - 25%)
* powerpoint project - 5%
* lecture exam - 10%
* hw - 10%
* web project - 10%
* quizzes - 10%
What do you need to do the lab exercises and lab homeworks?
* data - from prentice hall's website
* programs - Microsoft Ultimate Steal (Professional Academic Edition)
1 point = 1/72"
input
output
memory (RAM)
math ability
control
CPU - central processing unit. contains:
*ALU - arithmetic / logic unit
*control unit
von Neumann architecture
instead of specialized machines
universal computer, general purpose computer
hardware -- physical components
software -- instructions, computer programs
fetch-execute cycle
computer program: a bunch of instructions
1. Say: Please enter a #
2. Get a number, store it in X
3. Say: Please enter another #
4. Get a number, store it in Y
5. Add X and Y, store it in Z
6. Say: X + Y = Z
7. Go to step 1
IP: instruction pointer (within the control unit)
Artificial Intelligence
Alan Turing - Turing test
Don't need to get this, but C++ Express Edition
In C++
// calculator1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int x, y, z;
beginning:
cout << "Please enter a #: ";
cin >> x;
cout << "Please enter another #: ";
cin >> y;
z = x + y;
cout << x << " + " << y << " = " << z << endl;
goto beginning;
return 0;
}
A computer only understands machine language
01000010001
annoying
assembly language
MOV AX, 4
MOV BX, 6
ADD AX, BX
SAY AX
there will be a computer program which takes an assembly language program as input, will spit out the machine language program as output
assembler
disassembler
still annoying
programming languages:
Visual Basic, C++, Java, Javascript, Python, Prolog, Lisp
we need to translate it
Visual basic:
For I = 1 to 10
Msgbox "Hello there!"
Next
translators:
* compiler
* interpreter
interpreted is slower
you get to send the original plaintext instructions for an interpreted languages
C++ compiled language
Javascript interpreted languages
how do I make a 9 page paper into a 10 page
paper?
* line spacing (multiple and exactly)
* adjust the margins
* increase size of period
* add footnotes and images
* add meaningful text
* font face. fixed width, proportional width
* letter spacing
* widow and orphan protection
i
Subscribe to:
Posts (Atom)