172
1 Review- IT1010

1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

Embed Size (px)

Citation preview

Page 1: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

1

Review- IT1010

Page 2: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

2With thanks to Dr. Haipeng Guo and Dr. Judy Feng

LaTeX

Page 3: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

3

What is TeX? TeX is a typesetting system ( 排版系统 )

written by Donald E. Knuth in 1976, who says that it is “intended for the creation of beautiful books — and especially for books that contain a lot of mathematics”

Page 4: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

4

What is LaTeX? LaTeX is a free high-quality

document processing system that is based on TeX

LaTeX was originally written by Leslie Lamport in the 1980s

Page 5: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

5

Why LaTeX ? It is the premier typesetting package

in the world! It's free!!! It's available for many machines

(Linux, Mac, Windows) LaTeX files are ASCII

Therefore they are very portable You can use the editor of your choice

(Some people even use MS Word)

Page 6: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

6

Why LaTeX ? The typesetting is better

especially the maths Style changes are neater in LaTeX

Style files for many periodicals exist Many MS Word users don't use styles or

templates, so there's a limit to what they can do

LaTeX is extensible If you want a new feature, find a free

add-on or write one yourself

Page 7: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

7

Disadvantages LaTeX encourages (almost insists

on) structured writing and the separation of style from content This is not the way that many people

(especially non-programmers) are used to working

Without a WYSIWYG (What You See Is What You Get), it's not always easy to find out how to do things

Page 8: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

8

“Hello World” Example Suppose we want to produce the

following document:

Page 9: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

9

In MS Word To produce this in most typesetting or

word-processing systems, the author would have to decide what layout to use, so would select (say) 18pt Times Roman for the title, 12pt Times Italic for the name, and so on

This has two results: Authors wasting their time with designs A lot of badly designed documents!

Page 10: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

10

In LaTeX\documentclass{article}\title{Introduction to LaTeX}\author{Bill Gates}\date{November 2007}\begin{document}

\maketitle Hello world!

\end{document}

Page 11: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

11

Or In English This document is an article Its title is An Introduction to

LaTex Its author is Bill Gates It is written in November 2007 The document consists of a title

followed by the text Hello world!

Page 12: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

12

A Quick Start (0) 5 Steps involved in creating LaTeX

documents1.1. EditingEditing (to create a .tex source file)

2.2. CompilingCompiling (to generate a .dvi file)

3.3. ViewingViewing (to view the file on the screen)

4.4. PrintingPrinting (to generate a postscript file, .ps)

5.5. GeneratingGenerating a pdf file

Page 13: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

13

LaTeX Document Structure% A simple article to illustrate document % structure.

\documentclass[12pt]{article} \usepackage{times} \begin{document} …… \end{document}

Page 14: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

14

Document Classes At the top of the file you will have a line

something like \documentclass[12pt]{article}

It determines the font size (12pt) and document class (article)

The document class specifies the type of document you intend to write

It is associated with a class file, .cls Valid document classes include article,

report, book, letter

Page 15: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

15

Packages \usepackage{times}

A LaTeX package contains a set of commands that are not built into the core of LaTeX, but useful for special purposes.

To find out what commands a package provides (and thus how to use it), you need to read the documentation.

There exist hundreds of packages and they are all free!

Commonly used packages in mathematics Amsmath, amssymb, amsthm

Page 16: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

16

%: comments \documentclass[12pt]{article}

The type of document we want to produce: article Other classes that exist are book, report, thesis etc 12pt: the font

\usepackage{times} It tells Latex to utilize some external packages that

contain some useful commands \begin{document} … \end{document}

LaTeX Document Structure

Page 17: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

17

Top Matter \title{How to Structure a \LaTeX{}

Document} \author{ Bill Gates\\ Computer Science

and technology Program,\\ United International College,\\ Zhuhai, China\\ \texttt{[email protected]}} \date{\today}

\maketitle

Page 18: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

18

Output

Page 19: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

19

Abstract\begin{abstract} In this article, I shall introduce to you \

LaTeX{}, a typesetting software that is much better than Microsoft Word. I shall discuss some of the fundamental topics in producing a structured document. This document itself does not go into much depth, but is instead the output of an example of how to implement structure.

\end{abstract}

Page 20: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

20

Output

Page 21: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

21

Sectioning Commands \section{Introduction}

This section's content... \section{Structure}

This section's content... \subsection{Top Matter}

This subsection's content... \subsubsection{Article Information}

This subsubsection's content...

Page 22: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

22

Output

Page 23: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

23

Bulleted List \begin{itemize}

\item \texttt{\textbackslash address} - The author's address. Use the new line command (\texttt{\textbackslash\textbackslash}) for line breaks.

\item \texttt{\textbackslash thanks} - Where you put any acknowledgments.

\item \texttt{\textbackslash email} - The author's email address.

\item \texttt{\textbackslash urladdr} - The URL for the author's web page.

\end{itemize}

Page 24: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

24

Output

Page 25: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

25

The Bibliography \begin{thebibliography}{9}

\bibitem{lamport94} Leslie Lamport, \emph{\LaTeX: A Document

Preparation System}. Addison Wesley, Massachusetts, 2nd Edition, 1994.

\end{thebibliography}

Page 26: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

26

Citation In the text, This small document is designed to illustrate

how easy it is to create a well-structured document within \LaTeX\cite{lamport94}. You should quickly be able to see how the article looks very professional, despite the content being far from academic. Titles, section headings, justified text, text formatting etc., are all there, and you would be surprised when you see just how little markup was required to get this output.

Page 27: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

27

The Tabular Environment \begin{tabular}{ l c r } 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \\

\end{tabular}

\begin{tabular}{|l|l|} \hline stuff & stuff \\ \hline stuff & stuff \\ \hline \end{tabular}

Page 28: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

28

Mathematics Environments text formulae

\begin{math}...\end{math} $...$

displayed formulae \begin{displaymath}...\end{displaymath} \[...]\ \begin{equation}...\end{equation}

Page 29: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

29

Fraction LaTeX sourceLaTeX source

$\frac{x+y}{x-z}$ $\frac{\frac{1}{x} + \frac{1}{y}} {y-z}$

OutputOutput

Page 30: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

30

Powers and Indices LaTeXLaTeX sourcesource

$x^2$ $x^{2n}$ $X_i$ $X_{ij}$

OutputOutput

Page 31: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

31

Roots LaTeXLaTeX sourcesource

$\sqrt[3]{4xy^2}$ OutputOutput

What is the output of $\sqrt{\frac{a}{a+b^2}}$?

Page 32: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

32

Page 33: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

3333

Performing Calculation A distinguishing feature

Otherwise it is not more than a large table Formula calculations

Must begin with equal sign “=” Performs calculations and displays the result Includes cell addresses Visible in the cell entries of the formula bar after

execution Point mode

Enter a formula without typing cell addresses By clicking cells or using arrow keys

Page 34: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

3434

Formula Calculation Example

Calculating the sub total for a number of textbooks.

The formula multiplies the quantity and price of each textbook and adds them together

Formula is shown in the formula bar after

Page 35: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

3535

Performing Calculation Cell addressing

Identified by the column and row, e.g. B6 Records cell addresses in formulas in three ways Relative referencing

Calling cells by just their column and row labels Cell addresses will be changed when copy them

e.g. C1 "=(A1+B1)" C2 "=(A2+B2)" Absolute referencing

Accomplished by placing dollar signs "$"

e.g. "=($A$1+$B$1)" Mixed referencing

Only the row or column is fixed.

e.g. "=(A$1+$B2)"

Page 36: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

3636

Performing Calculation Reference operators refer to a cell or group

of cells • Range operator “:”

• TWO cell addresses separated by a colon • Refers to ALL the cells included in the reference

e.g. “A1:C3” includes A1, A2, A3, B1, B2, B3, C1, C2, and C3.

• Union operator “,”• Two or more cells separated by a comma • Refers ONLY to the cells (rather than a range) • e.g. “A7,B8,C9” includes only cells A7, B8, and C9

Page 37: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

3737

Performing Calculation Linking worksheets

Use the value from a cell in another worksheet

Format: "sheet_name!cell_address"

e.g.: "=A1+Sheet2.A2"

Page 38: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

3838

Performing Calculation – Functions

Functions Allow you to quickly perform calculations More efficient way than typing formula

formula: "=D1+D2+D3+D4+D5+D6+D7+D8+D9+D10" function: "=SUM(D1:D10)"

Format for using functions Use an equal sign to begin a formula Specify the function name Enclose arguments within parentheses Use a reference operator (a comma “,” or colon

“:”) to separate arguments

Page 39: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

3939

FunctionsFunction Example Description

SUM =SUM(A1:A100) finds the sum of cells A1 through A100

AVERAGE =AVERAGE(B1:B10)finds the average of cells B1 through B10

COUNT =COUNT(B1:B10)finds the number of items from cells B1 to B10

MAX =MAX(C1:C100)returns the highest number from cells C1 through C100

MIN =MIN(D1:D100)returns the lowest number from cells D1 through D100

SQRT =SQRT(D10)finds the square root of the value in cell D10

TODAY =TODAY()returns the current date (leave the parentheses empty)

Page 40: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

4040

Performing Calculation –Functions

The Sum icon

Automatically adds a column of numbers Highlight all cells above current cell and add For empty column, Sum adds the row values

Recalculations Automatically recalculate when changing cell

entries Tools > Cell Content > Recalculate

Page 41: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

4141

Performing Calculation –Sort Sort on one column

Sort Ascending button

Sort Descending button Sort on multiple columns

Highlight all columns Data > Sort Select 1st column (key

word) in Sort By field Select 2nd and 3rd column

in Then By field. Choose Header row or No

header row box

Page 42: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

42

Page 43: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

43

Computer Literacy What is computer literacy?

having knowledge and understanding of computers and their uses

refers to the ability to use applications rather than to program

Why is computer literacy important? Computers are everywhere nowadays One study alleges that “…those with less access

to technology are less successful!”

Page 44: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

44

What is a Computer? A computer is

is an electronic machine or deviceexecuting the instructions in a program

A computer can accept data, manipulate or process the data, produce results, and store the results

input process

outputstore

Page 45: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

45

Data and Information Data

Raw facts, figures, and symbols

Information organized,

meaningful, and more useful

(to people)

data

information

computer + program

Page 46: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

46

Computer ComponentsHardware: the physical parts of the computer Hardware: the physical parts of the computer

output devices

storage devices

input devices

system unit

CPU memory

Page 47: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

47

Why is a Computer Powerful?

1) Speed A computer can do billions of actions per second

2) Reliability and Accuracy Failures are usually due to human error, one way or another

Page 49: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

49

Page 52: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

52

Types of Computers Personal Computers (PCPCs)

Desktop computers Laptop or notebook computers handheld computer personal digital assistant (PDAPDA)

Servers Workstations Mainframes Supercomputers

Page 53: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

53

What is a LAN? Local Area Network A group of computers and devices In a limited geographic area

Page 54: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

54

Computer SoftwarePrograms that give instructions

to the hardware about what to do and how to do it

System Software Programs that perform system

tasks For example: Operating Systems

(Windows, Linux, MacOS)

Page 55: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

55

Computer Software Application Software

Programs that perform user-specific tasks

E.g. word processing, spreadsheets, databases, web applications …

Software is (usually) written by programmers Why “usually”?

Page 56: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

56

An Information System Besides computer hardware and computer

programs, an information system also includes the procedures, documentation, and management to make a computer system run smoothly Hardware Software Data People Procedures

Page 57: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

57

Applications for a SOHO user

Small Office Home OfficeSmall Office Home Office

Page 58: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

58

Page 59: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

5959

Alan Turing (1912-1954)

An English mathematician, logician, cryptanalyst, and computer scientist

Time magazine named Turing as one of the 100 important people of the 20th century for his role in the creation of the modern computer

Page 60: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

6060

Turing Machine In 1936 Turing demonstrated an

imaginary machine that could mimic human reasoning

A fairly simple device capable of scanning, reading or writing data and instructions on a tape of theoretically infinite length

Turing machine provides an abstract model of computation

Page 61: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

61

Turing Machine A Turing machine has a tape of infinite length,

a read-write head, and a control unit. The tape is divided into squares The head can move one position left or right.

It can also read or write 0/1 on the tape. The control unit contains instructions that tell

the Turing machine what to do next given its current state of the Turing machine and the symbol at the current position

Page 62: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

62

Ada Lovelace: the first programmer Byron's daughter

De De Morgan's student

Specified a method for calculating Bernoulli numbers with Charles Babbage's Analytic Engine

Recognized by historians as the world's first computer programmer

Page 63: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

63

Generations of Computers Generation 1 (1945-1953): Vacuum Tube

Computers Generation 2 (1954-1965): Transistor

Computers Generation 3 (1966-1980): IC (Integrated

Circuits) Computers Generation 4 (1980-present): VLSI (Very

Large Sacle IC) Computers

Page 64: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

64

Page 65: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

65

Why Hexadecimal? Hexadecimal is meaningful to humans,

and easy to work with for a computer Compact

A BYTE is composed of 8 bits One byte can thus be expressed by 2

digits in hexadecimal 11101111 EF (11101111)2 EFh

Simple to convert them to binary

Page 66: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

66

Binary to Decimal

Convert (10010011)2 to decimal:

(10010011)2 = 1 * 27 + 1 * 24 + 1 * 21 + 1 * 20

= 128 + 16 + 2 + 1 = (147)10

Conversions Between Number Systems

Page 67: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

67

Conversions Between Number Systems Hexadecimal to Decimal

Convert 21Fh to decimal:

21Fh = 2 * 162 + 1 * 161 + 15 * 160

= 512 + 16 + 15 = (543)10

Page 68: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

68

Conversions Between Number Systems

Octal to Decimal

(32)8 = (?)10

What’s wrong?

(187)8 = 1*64 + 8*8 + 7*1

Page 69: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

6969

Conversions

Decimal to binary Hexadecimal OctalQuotient Remainder 2) 28 ( 0 16) 28 ( C 8) 28 ( 4 2) 14 ( 0 16) 1 ( 1 8) 3 ( 3 2) 7 ( 1 0 0 2) 3 ( 1 Reading the remainders from

2) 1 ( 1 bottom to top, we have 0 (28)10=(11100)2 (28)10=(1C)16 (28)10=(34)8

Page 70: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

70

One More ExampleConvert 14710 to binary

So, 14710 = 100100112

Page 71: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

71

Conversions Between Number Systems

Decimal to Base rr Same as Decimal to Binary Divide the number by rr Record the quotient and remainder Divide the new quotient by rr again ….. Repeat until the newest quotient is 0 Read the remainder from bottom to top

Page 72: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

72

Exercises

Convert 19910 to binary Convert 25510 to binary Convert 25510 to hexadecimal Convert 2558 to decimal Convert 12316 to decimal

Please show your steps of conversion clearlyPlease show your steps of conversion clearly..

Page 73: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

73

Conversions Between Power-of-2 Radices

Because 16 = 24, a group of 4 bits is easily recognized as a Hexadecimal digit

And a group of 3 bits is easily recognized as one Octal digit

To convert a Hex or Octal number to a binary numberRepresent each Hex or Octal digit with 4 or 3 bits in

binary

Page 74: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

74

Convert a binary number to Hex or Oct number

Conversions Between Power-of-2 Radices

Page 75: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

75

Basic Arithmetic Operations with Binary Numbers

Rules for Binary Addition 1+1=0, with one to carry to the

next place

Page 76: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

76

Example

Page 77: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

77

Example

Page 78: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

78

Basic Arithmetic Operations with

Binary Numbers

Rules for Binary Subtraction 1 - 0 = 1 1 - 1 = 0 0 - 0 = 0 0 - 1 = 1 … borrow 1 from the

next most significant bit

Page 79: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

79

Example

minuend

subtrahend

difference

Page 80: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

80

Exercises00011010 + 00001100 = ?

00110011 - 00010110 = ?

00101001 × 00000110 =?

Page 81: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

81

Page 82: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

82

Data Representation Data comes in many forms

Numbers: 235, 11.01, -24, … Text: “hello, world!” “ 你好!” Audio: .mp3 Images and graphics: .bmp, gif, JPEG Video: .avi

All of the data is stored in computers as binary digits Data must be represented in a way that

Captures the essence of the information And in a form that is convenient for computer

processing

Page 83: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

83

Analogue and Digital Information

Information can be represented in one of two ways: analogue or digital

Analogue data: A continuous representation, analogous to the actual information it represents

Digital data: A discrete representation, breaking the information up into separate elements

A mercury thermometer is an analogue device The mercury rises in a continuous flow in the

tube in direct proportion to the temperature

Page 84: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

84

Analogue Data A mercury thermometer is an analogue

device. The mercury rises in a continuous flow in the tube in direct proportion to the temperature.

Page 85: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

85

Binary Representation In general, n bits can represent 2n things

because there are 2n combinations of 0 and 1 that can be made from n bits

Note that every time we increase the number of bits by 1, we double the number of things we can represent

Questions: How many bits are needed to represent 128 things? How many bits are needed to represent 67 things?

Page 86: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

86

Binary Representation

Page 87: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

87

Representing Text A text document can be decomposed into

chapters, paragraphs, sentences, words, and ultimately individual characters

To represent a text document in digital form, we simply need to be able to represent every character that may appear In English, “a, b, …, z, A, B,…Z”

The general approach for representing characters is to list them all and assign each a binary string ‘a’ (01100001)2 (97)10 61h

Page 88: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

88

Character Set A character set is a list of

characters and the codes used to represent them

By agreeing to use a particular character set, computer manufacturers have made the processing of text data easier

ASCII, Unicode, etc.

Page 89: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

89

ASCII ASCII stands for American Standard

Code for Information Interchange The ASCII character set originally

used seven bits to represent each character, allowing for 128 unique characters

Later ASCII evolved so that all eight bits were used which allows for 256 characters (Extended ASCII)

Page 90: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

90

ASCII Note that the first 32 characters

in the ASCII character chart do not have a simple character representation that you could print to the screen

Page 91: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

91

Unicode Character Set Extended version of the ASCII character

set is not enough for international use The Unicode character set uses 16 bits per

character Therefore, the Unicode character set can

represent 216, or over 65 thousand, characters Unicode was designed to be a superset of

ASCII The first 256 characters in the Unicode

character set correspond exactly to the extended ASCII character set

Page 92: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

92

Representing Audio Information We perceive sound when a series of air

compressions vibrate a membrane in our ear, which sends signals to our brain

A stereo sends an electrical signal to a speaker to produce sound

This signal is an analogue representation of the sound wave

The voltage in the signal varies in direct proportion to the sound wave

Page 93: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

93

To digitize the signal we periodically measure the voltage of the signal and record the appropriate numeric value A process called sampling

In general, a sampling rate of around 40,000 times per second is enough to create a reasonable sound reproduction

Representing Audio Information

Page 94: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

94

Audio Formats WAV, AU, AIFF, VQF, and MP3

MP3 is dominant MP3 is short for MPEG (Moving Picture Experts

Group) audio layer 3 file MP3 employs both lossy and lossless compression First it analyzes the frequency spread and

compares it to mathematical models of human psychoacoustics (the study of the interrelation between the ear and the brain), then it discards information that can’t be heard by humans

Then the bit stream is compressed to achieve additional compression

Representing Audio Information

Page 95: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

95

Representing Colour Colour is our perception of the

various frequencies of light that reach the retinas of our eyes

Our retinas have three types of colour photoreceptor cone cells that respond to different sets of frequencies

These photoreceptor categories correspond to the colours of red, green, and blue

Page 96: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

96

Representing Colour Color is often expressed in a computer

as an RGB (red-green-blue) value, which is actually three numbers that indicate the relative contribution of each of these three primary colours

For example, an RGB value of (255, 255, 0) maximizes the contribution of red and green, and minimizes the contribution of blue, which results in a bright yellow

Page 97: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

97

Representing Images and Graphics The amount of data that is used to

represent a colour is called the colour depth

HiColour is a term that indicates a 16-bit color depth Five bits are used for each number in an RGB

value and the extra bit is sometimes used to represent transparency

TrueColour indicates a 24-bit colour depth Each number in an RGB value gets eight bits

Page 98: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

98

Digitized Images and Graphics Digitizing a picture is the act of representing

it as a collection of individual dots called pixels

The number of pixels used to represent a picture is called the resolution

Storage of image information on a pixel-by-pixel basis is called a raster-graphics format

Several popular raster file formats including bitmap (BMP), GIF, and JPEG

Page 99: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

99

Page 100: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

100

What is Cyberspace? 'Cyberspace' is a term coined by

William Gibson, author of 'Neuromancer'

It is the imaginary space we pass through when 'surfing' the Internet

Page 101: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

101

What is Cyberspace? “the global domain of electro-

magnetics accessed through electronic technology and exploited through the modulation of electromagnetic energy to achieve a wide range of communication and control system capabilities”

Page 102: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

102

Cyberspace in the Real World

We are at the dawn of Cyberspace in the Real World

We can already see how Cyberspace affects our day-to-day lives

Laws have been written just for Cyberspace! As mobile devices become faster, easier to

use, more advanced and cheaper, Cyberspace will become even more of a real-world reality

Page 103: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

103

Cyberspace Today Gibson's term has now become a reality,

thanks to improvements in:

Communication Networks (faster Internet)

Hardware (faster, bigger storage) Software (allows for complex applications)

We are always pushing the boundaries of what we can achieve with the technology available

Page 104: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

104

Affecting Business Thomas L. Friedman outlines the affect

Cyberspace (and what it offers) in his book 'The World is Flat'

He describes how it affects us as individuals, but more importantly how it has changed the face of businesses worldwide

China and India are two countries he focuses on in particular

The book is available in many languages, including Chinese

Page 105: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

105

Computer Hackers Creating software and sharing it with

each other Placing a high value on freedom of

inquiry; hostility to secrecy Information-sharing as both an ideal and

a practical strategy Distaste for authority Playful cleverness, taking the serious

humorously and their humour seriously

Page 106: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

106

Hacker vs. Cracker 5. “[deprecated] A

malicious meddler who tries to discover sensitive information by poking around. Hence `password hacker', `network hacker'. The correct term is {cracker}.”

Page 107: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

107

Types of Cracker There are three types of Cracker:

1.Black Hat Crackers – Crack banks accounts, steal money, identities, documents

2.White Hat Crackers – Computer Security Experts

3.Grey Hat Crackers – In between black and white – will work for money, or to show off their skills

Crackers are technically also Hackers, but not all Hackers are Crackers

Page 108: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

108

GNU & OpenSource/FreeSoftware GNU – (GNU is not UNIX)

The Free Software movement is headed by the Free Software Foundation, a fund-raising organization for the GNU project

Free software VS Open source software

- Within the Linux community, there are two major ideological movements at work.

-The Free Software movement (which we'll get into in a moment) is working toward the goal of making all software free of intellectual property restrictions. Followers of this movement believe these restrictions hamper technical improvement and work against the good of the community.

-The Open Source movement is working toward most of the same goals, but takes a more pragmatic approach to them. Followers of this movement prefer to base their arguments on the economic and technical merits of making source code freely available, rather than the moral and ethical principles that drive the Free Software Movement. (source codes are opened)

http://www.slackbook.org/html/introduction-opensource.html http://www.gnu.org/philosophy/free-software-for-freedom.html

Page 109: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

109

Open source software GIMP OpenOffice Linux LaTex Joomla MySql . .

Page 110: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

110

Page 111: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

111

What is a LAN? Local Area Network Network in limited geographical area

such as home or office building

Page 112: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

112

What is a WAN? Wide Area Network Network that covers large a geographical

area using many types of media

Page 113: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

113

What is the Internet? A network of computer networks

worldwide The Internet is world’s largest WAN Also called the information highway,

the net, or cyberspace

Page 114: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

114

Connecting to the Internet At home

Through Phone modem Through DSL / ADSL Through Cable modem

At office Through LAN

Wireless connection Through hotspots

Page 115: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

115

Internet Service Provider (ISP)

User PC

Network Access Point

Page 116: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

116

How the Internet works Every computer connected to the

Internet must have a unique address. This is called the IP address. IP stands for Internet Protocol

5.6.7.81.2.3.4

Internet

Page 117: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

117

IP Address An IP address can be split into

network address, which specifies a specific network

host number, which specifies a particular machine in that network

Page 118: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

118

Domain Name System (DNS) A hostname consists of the computer

name followed by the domain name uic.edu.hk is the domain name

A domain name is separated into two or more sections that specify the organization, and possibly a subset of an organization, of which the computer is a part

Two organizations can have a computer named the same thing because the domain name makes it clear which one is being referred to

Page 119: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

119

Domain Name System The very last section of the domain is

called its top-level domain (TLD) name

Page 120: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

120

Client/Server ModelAll of the machines on the Internet are either servers or clients

Web server, e-mail server, DNS server, ftp server, game server……

Page 121: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

121

How data travels the Internet Messages are divided into fixed-sized,

numbered packets Network devices called routers are used

to direct packets between networks

Page 122: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

122

Routers

Routers determine the path between you and an Internet server

Page 123: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

123

Network Protocols Network protocols are layered such that

each one relies on the protocols that underlie it

Sometimes referred to as a protocol stack

Page 124: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

124

TCP/IP TCP stands for Transmission Control

Protocol TCP software breaks messages into

packets, hands them off to the IP software for delivery, and then orders and reassembles the packets at their destination

IP stands for Internet Protocol IP software deals with the routing of

packets through the maze of interconnected networks to their final destination

Page 125: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

125

High-Level Protocols Other protocols built on the

foundation established by the TCP/IP protocol suite Simple Mail Transfer Protocol (SMTP) Post Office Protocol version 3(POP3) File Transfer Protocol (FTP) Telnet Hyper Text Transfer Protocol (http)

Page 126: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

126

Page 127: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

127

Operating Systems A set of programs containing instructions

that maintain and manage the computer resources, such as CPU, memory and input/output devices

Provide an interface through which the user can interact with the computer

The core of a computer’s system software

Page 128: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

128

Who Creates Computer Software?

Programmers High-level language, easy for humans

C++, Java, etc Low-level language, used by CPU

Machine language Compiler

Translate high-level language into low-level language

Page 129: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

129

History of Operating Systems Multiprogramming Systems

allow several executing programs to be in memory concurrently

Timesharing system permits many users to share the same

CPU the CPU switches between user

sessions very quickly, giving each user a small slice of processor time

Page 130: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

130

Start the Computer What is booting?

Cold boot Turning on computer that has been powered off

Warm boot Restarting computer that is powered on

Process of starting or restarting a computer

Page 131: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

131

Functions of an Operating System?

monitor performance

provide a user interface

provide file management and other utilities

establish an Internet connection

control a network

administer security

start the computer manage programs

schedule jobs and configure devices

manage memory

Page 132: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

132

GUI Graphical User Interface

User interacts with menus and visual images such as icons and buttons

Page 133: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

133

Memory Management Optimizing use of random access memory (RAM) With virtual memory (VM), portion of hard disk is

allocated to function as RAM This process is called paging When an OS spends much of its time paging, instead

of executing application software, it is said to be thrashing

Page 134: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

134

Provide File Managment File System: Hierarchical Directories

Page 135: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

135

Windows File naming: four parts Drive Path File name File type (extension)

C:\Windows\System\WinTrust.hlp

Provide File Managment

Page 136: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

136

Types of Operating System Stand-Alone Operating Systems

works on a desktop computer, notebook computer, or mobile computing device

Network Operating Systems designed specifically to support a network

Embedded Operating Systems Found on most mobile computers, PDAs,

and other small devices

Page 137: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

137

Name of OS Unix MS windows –(95, 98, me, xp,…) Mac OS Linux OS/2 . .

Page 138: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

138

Page 139: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

139

An Introduction to HTML

The most common file-type used to present information on-line is HTML.

Other file-types commonly found on-line include:

MP3, JPG, GIF, PHP, CFM, ASP, HTM, PNG, AVI, MP4, SWF, ICO, ASPX and more![4]

HTML stands for Hypertext Mark-up Language

Page 140: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

140

The HTML Code Every HTML file starts with '<html>' and

ends with '</html>'

There are then two main sections to the file:

<head> ... </head>

<body> ... </body>

At any point within the code we can (and should!) write comments, like so:

<!-- this is a comment – for code-view only! -->

Page 141: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

141

HTML Lists There are two types of list: ordered lists

('ol') and unordered lists ('ul').

'li' stands for list item

<ol>

<li>This is a list item</li>

<li>This is <strong>another

item!</strong></li>

</ol>1. This is a list item

2. This is another item!

Page 142: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

142

What is a CMS? CMS stands for Content Management

System.

It is literally a system designed to help you manage content.

Found on-line, they fall under the general term 'web site'

Content Management Systems are used by all kinds of people and organisations, including:

Page 143: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

143

Page 144: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

144

Limitations of File-based Approach Separated files redundancy in

defining and storing data Difficult to capture inter-file

relationships Labor intensive Difficult to maintain data integrity Program-data dependency

Solution: database approach

Page 145: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

145

What is a database?

Add, change,

and delete data

Add, change,

and delete data

CreatedatabaseCreate

databaseSort and

retrieve data

Sort and

retrieve data

Createforms and

reports

Createforms and

reports

Database software allows you to

Database software allows you to

Collection of related data organized so

you can access, retrieve, and

use it

Collection of related data organized so

you can access, retrieve, and

use it

Database software also called database management system

(DBMS)

Database software also called database management system

(DBMS)

Page 146: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

146

Database Management System (DBMS)

Examples: DB2, SQL Server, Oracle, Sybase, MySQL

The management software that provides some convenient ways to the users to manipulate (add, update, delete), retrieve and present the data

Page 147: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

147

Data Model Every database or DBMS is based

on a specific data model, which consists of rules and standards that define how the database organizes data, and how users view the organization of the data

The most popular data model: Relational Model

Page 148: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

148

Relational database A relational database stores all its

data in tables The relationships among data

items are also stored in tables All operations on data are done on

the tables themselves or produce another table as the result

Page 149: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

149

Table

The Movie table contains 10 rows (movies).(ref; record)

Each record has 4 columns (attributes of movies) (ref ; field) MovieID, Title, Genre, Rating

Page 150: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

150

Records and Fields A table is a collection of records

A record is a collection of related fields

Each field of a database table contains a single data value

Each record in a table contains the same fields

Page 151: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

151

The Hierarchy of Data

Database contains files (tables) file contains records record contains fields field contains characters

Page 152: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

152

Relationships When a customer rents a movie, there is

a “rents” relationship between the person and the movie

We can use a table, Rents, to contain information about this relationship

Page 153: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

153

Relationships When we need data about the customer,

we use CustomerID stored in the Rents table to look up the customer's detail data in the Customer table

Address

Page 154: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

154

Relationship When we need data about the movie, we

use MovieID stored in the Rents table to look up the movie's detail data in the Movie table

Page 155: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

155

Relationship This is the basis of relational database.

Relational database is based on the idea that objects (tables) of a database are connected or related so they can exchange information

This exchange of information is made possible by defining relationships among objects (tables) of a database

Page 156: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

156

Relationship The “rents” relationship is called a

one-to-many relationship One customer many movies One movie only one customer

Types of relationships: one-to-one one-to-many many-to-many

Page 157: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

157

Operations on Data Adding records

when you obtain new data Modifying records

Correct inaccurate data Update old data

Deleting records When record no longer is needed Some programs remove record immediately, others

flag the record Validating Data

to enhance Data integrity: the degree to which data is correct

Page 158: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

158

File System vs DB Reduce data redundancy Improve data integrity:

DBMS performs validity check to help ensure the entered data is correct.

Also, the database approach reduces the possibility of introducing inconsistencies.

Share data Easier access Reduce development time More secure

Page 159: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

159

Data Validation What is validation? Process of comparing data with a set of rules to

find out if data is correct Reduce data entry errors and enhance data

integrity before program writes data on disk

Page 160: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

160

Structured Query Language (SQL)

A database language for managing relational databases

It includes statements to specify database schemas add, modify, and delete database

contents query the database to retrieve

specific data

Page 161: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

161

Create a new table To create a new table, we

need to specify1. the table name 2. Name of each field3. size of each field 4. data type of each field 5. the primary key

Page 162: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

162

The SQL statementcreate table Customer ( CustomerID numeric primary key, FirstName text(20), Surname text(20), Address text(100), CreditCardNumber text(16))

This statement creates the Customer table

Page 163: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

163

Add New Datainsert into Customer values (

9876,

“John”, “Smith”, “602 Green Street”, “2120 9873 0976 2445”

)

This statement inserts a new record into the Customer table

Page 164: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

164

Page 165: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

165

What is Image Processing?

Image processing is the storage, management and manipulation of images

Images could be photographs, or graphics

Page 166: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

166

Adding Text Click the font button to add text

Select from the fonts on your computer, change the size and justification

Page 167: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

167

Page 168: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

168

4 Primary Issues of Computer Ethics

1. PrivacyPrivacy : the right to be left alone when you want to be. It concerns the collection and use of data about individuals

2. AccuracyAccuracy : relates to the

responsibility of those who collect information to ensure that the information is correct

Page 169: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

169

3. PropertyProperty : relates to ownership and rights to the information or software

4. AccessAccess : relates to the responsibility of those who have data to control and who is able to use that data

4 Primary Issues of Computer Ethics

Page 170: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

170

Denial of Service (DoS) Attack Like a worm, it attempts to slow down

or stop a computer system or network Unlike a worm, it can self-replicate A DoSDoS attack floods a computer or

network with requests for information and data.

The targets of these attacks are InternetInternet ServiceService ProvidersProviders (ISPISPs) and specific web sites

Page 171: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

171

Protection DRM

Digital Rights Management can protect from stealing intellectual goods

Firewalls A Security plan for Organizational Level

A Security plan for Individual Level

Page 172: 1 Review- IT1010. 2 With thanks to Dr. Haipeng Guo and Dr. Judy Feng LaTeX

172

DRM DDigital RRights MManagement Access control technologies used by

hardware manufacturers, publishers and copyright holders to limit usage of digital media or devices. allows the issuer of the media or file to

control in detail what can and cannot be done

can limit the number of viewings, number of copies of the intellectual contents