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.

lecture notes

how do we convert? use a series of subtractions of powers of 2.
Assignment 4:
Convert the folowing decimal numbers to binary.
599
1209
970
1846
849


GUI - pronounced gooey
graphical user interface
controls
dropped the controls on the form
modify properties of those controls

Assignment 5:
Imagine a program where the Input is Title, FirstName, LastName, and the Output is the FullName. Draw a GUI for this program.

Assignment 4 and 5, due next Monday

Sunday, September 19, 2010

Don't forget!

Assignment #1 is due this Monday night!

And Assignment #2 and #3 this Wednesday night.

Wednesday, September 15, 2010

class 3 notes

file extensions

termpaper.DOC
termpaper.DOCX
termpaper.DOCM

.HTML
.TXT
.EXE

TestDatabase.accdb

Old way: First run program. THEN open the file

New way: File extensions. Associates with program.

*
?
regular expressions

read these two articles:
http://office.microsoft.com/en-us/support/add-power-to-word-searches-with-regular-expressions-HA001087305.aspx?redir=0

http://office.microsoft.com/en-us/support/putting-regular-expressions-to-work-in-word-HA001087304.aspx?redir=0

1) Find all three-letter words which have a vowel as the middle letter.
2) Find all three-letter palindromes
3) Find all four letter words which begin with the letter K
4) Change Waxman, Joshua to Joshua Waxman
5) Transform active voice to passive voice. That is, find sentences such as:
Jim kissed Pam.
and replace it with
Pam was kissed by Jim.
For this last one, what goes in the find what box, and what goes in the replace with box?

bit: 0, 1
how do i represent numbers using these bits?
binary: base 2

HW: Convert the following binary numbers to decimal.

11011
11
111
1111
10010

How to record a macro in Microsoft Word

Monday, September 13, 2010

notes, class 2

Programming language: VBA
Visual Basic for Applications

record a macro homework

how do I make a 15 pg paper into a 20 pg paper
Line spacing
Adjust margins
Spacing before and after paragraphs
Change the font

font is measured in point size
1 point = 1/72 inch

fixed-width, proportion-width fonts

serif, sans serif

lorem ipsum

Three types of formatting in Word
Character
Paragraph
Section

be careful about search and replace
advanced search and replace
wildcard
* ?
* is any number of letters
? is exactly one character
qccs12.blogspot.com