Wednesday, October 6, 2010

notes

Microsoft DOS
it was a "Disk Operating System"
it used a command prompt instead of GUI
cmd

command prompt

A, B were floppy disks
C was typically hard drive

backslash is the root folder

commands:
tree
c:
dir
dir *.xlsx
cd
cd josh
cd .
cd ..
md
mkdir

BATCH file

three letter palindrome
<([A-Za-z])[A-Za-z]\1>

101
1010
10100

bitshift

VB programming
variable
has name, address, value, data type
declare a variable
Dim TaxRate As Double
double is the data type
7.45 is a double

7 is an integer
"hello there" is a string

Private Sub CommandButton1_Click()
    Dim TaxRate As Double
End Sub

Monday, October 4, 2010

notes

Download and Install WinSCP

webserver
cs12.cs.qc.cuny.edu/~login

username: first two letters of last, first two letters of first name, last 4 digits of SSN
password: all digits of ssn

username: wajo6789
password: 123456789

for Mac, download Fugu instead

HTML
HyperText Markup Language

w3schools.com

markup tags
a is for anchor

read up until HTML attributes

save as DOTM
right click on your own file, rather than Normal, and add the UserForm

write the codebehind
event handler
write VBA syntax
write VBA code to handle these event


input statements
output statements
processing statements

MsgBox is an output statement

Excel
formula auditing
name box to name specific cells

try to login

Wednesday, September 29, 2010

lecture notes

lossless compression (GIF)
    e.g. run length encoding
lossy compression (JPG, JPEG)
don't save as JPEG until the end

http://en.wikipedia.org/wiki/Vector_Graphics
http://en.wikipedia.org/wiki/Raster_graphics

vector graphics are sharper when zoom in
file size smaller

Macromedia Flash

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

http://www.w3schools.com/

WinSCP Download

Excel
literals
formulas begin with =
operators
can refer to other cells
A1 style
as opposed to R1C1 style
built in functions
SUM, AVERAGE

Monday, September 27, 2010

Tutors and tutor schedule

is available here
what can we do (so far) with binary numbers?

* convert to, from decimal
* add 'em, subtract 'em
* represent negative nums

 101
 101
_____
1010

 11
 11
____
110

 11011
 11011
______
110110

multiplication by powers of 2 can be accomplished via bitshifting to the left

division by powers of 2 can be accomplished via bitshifting to the right

1010 becomes 101 becomes 10 becomes 1 becomes 0

letter A
how do we represent characters?
ASCII
http://www.asciitable.com/

ASCII uses 7 bits
total number of combination is 2 ^ number bits
2 ^ 7 = 128 possibilities

extended ascii

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

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

how do we encode pixels?
pixel = picture element
654 x 466 = 302764


web safe colors

RGB = red green blue
1 byte for each, total 3 bytes

BMP

what is a GIF? what is a JPEG?
compression


lossless compression
- run-length encoding
- GIF
lossy compression

Wednesday, September 22, 2010

write regular expressions for the following:

1) a sibilant followed by any letter followed by asterisk symbol
2) a capital letter except G followed by anything

1) [sczSCZ][A-Za-z][\*]
2) [A-FH-Z]*

* convert from binary to decimal
* convert from decimal to binary
* add two binary numbers
* subtract two binary numbers

HW: Convert the following numbers to binary and add them:
27 + 56
1 + 6
7 + 3
give me the binary result

HW: Convert the following numbers to binary and subtract them:
8 - 5
12 - 9
20 - 10

remember also the cool trick with 10's complement. and show your friend.

how do we store negative numbers?
-83
three different approaches

* sign bit

83 in binary is  0101 0011
-83 in binary is 1101 0011

* use the one's complement
83 in binary is  0101 0011
-83 in binary is 1010 1100

* use the two's complement
83 in binary is  0101 0011
-83 in binary is 1010 1101

Two's complement is "best"
in terms of values you can store

8 bits lets me store 256 distinct values
2 ^ number of bits
0000 0000 = 0
0000 0001 = 1
0000 0010 = 2

0 .. 255

-0
0000 0000

sign bit
1000 0000

one's complement
1111 1111

two's complement
0000 0000

Monday, September 20, 2010

A clarification of what to submit for assignment 2

for assignment 2, there is no file, and you are not supposed to submit any file to me. make up your own file to search in and then come up with the appropriate regular expressions.

For example, imagine that the first question was to find text in the document which was the letter w, then the letters i or o, then the letter n.

You could write in your document the text:
win
won
wan

In the Find What box, you would type:
w[io]n

and turn on the wildcard option. And when you tried to find, it would find win and won, but not wan. What should you submit to me? In Blackboard, in the comment section, the text w[io]n. But no Word document.

Don't actually submit to me w[io]n. Rather, submit to me the appropriate answers to the questions 1 through 5 in assignment 2.