Internet Review - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

Internet Review

Description:

What does robustness mean with respect to a network? Resilience to disruptions or faults. ... Floats stored as mantissa and exponent. Variables in Strings ... – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 36
Provided by: stephenc94
Category:

less

Transcript and Presenter's Notes

Title: Internet Review


1
Internet Review
  • CS101A1
  • April 30, 2002

2
Internet Review
What does robustness mean with respect to a
network?
Resilience to disruptions or faults.
Name two reasons the Internet is considered
robust?
Packets
Routing multiple paths between any two nodes
3
Gateway
What is a router?
A network device that connects two or more
networks
What is a gateway?
A router that connects different networks, often
a LAN and the Internet
4
Network Layers
Name and describe the five layers of a network
connection
Application Layer
Transport Control Protocol (TCP) Layer
Internet Protocol (IP) layer
Local Access Network (LAN) Protocol
Physical layer
5
Layers
Name three reasons for using layers
Modularity (development and configuration)
Efficiency (multitasking)
Reliability
6
HTML
What is a tag (and how is it formatted)?
ltcentergt
Most tags come in pairs (T or F)?
True
7
How does PHP work?
8
PHP
What does PHP add to web pages?
The ability to change the content of a web page
based upon input and processing also, the
ability to store information and execute commands
9
PHP-Input
Name two input sources for PHP
(1) Web-page visitors (2) The system
10
Programming Languages
What is a programming language?
A human-readable, text-based language for telling
a computer to do something
11
PL Categories
Describe the 4 types of Programming Languages
Functional
Imperative
Declarative
Object-Oriented
12
Source Code
What is source code?
Text file written in a computer language
13
Translating Source Code
Describe two devices for translating source code
into something a computer can understand
Interpreter
Compiler
14
Programs
What is a binary?
Executable program you can run
15
Programs
Compiled programs are easy to reverse engineer (T
or F)?
False
16
Compiling vs. Interpreting
Which uses more overhead when running a program?
Interpreting
17
PHP
Is PHP interpreted or compiled, and why?
Interpreted
18
Open Source
What is the Open Source Software Movement all
about?
Inclusion of source code along with executable
programs, so users can customize and improve them
19
PHP in HTML
What is the PHP tag?
lt?php // your PHP program ?gt
20
Echo
Give an example of the echo command
lt?php echo I would like to thank . . . ?gt
21
PHP Variables
Name and describe the variable types
Integer (no decimal point)
Float (decimal point)
String (text)
Array (list of one of the other three types)
22
Integers vs. Floats
Why are floats less precise than integers?
Integers stored a single number Floats stored as
mantissa and exponent
23
Variables in Strings
How would you insert a variable into a string
(e.g., with the echo command)?
lt?php echo Name is name.ltbrgt ?gt
24
Flawed Code
Whats wrong with this code? ltphp Name
Judy Echo Name ?gt
lt?php


Name
25
What does this do?
a getenv(REMOTE_ADDR) echo a
Prints the visitors IP address
26
Whats the result?
a 21 b 7 a / b echo a
3
27
Whats the result?
a 6 b a 5 a -2 b / a echo
b
7
28
What does this do?
b . a
. is the concatenation operator a is appended to
the end of b b Happy b . Birthday!
29
Format of if ... else statement?
if ( a gt 5 ) echo Yea, dude! else
echo No way!
30
Rewrite as while statement
for ( i 0 i lt 10 i ) echo i
i 0 while ( i lt 10 ) echo i i
31
What will happen here?
a 1 while ( a gt 0 ) echo a
Infinite Loop!
32
What do these do?

OR

AND
!
NOT
33
Whats the result?
floor( 12.9 )
12
round( 2.1 )
2
ceil( sqrt( 10 ) )
4
34
Forms
Describe five form objects
Text field Check box Radio button Pull-down
menu Button
35
Forms and PHP
How do you use a form to get information to a PHP
script?
ltform valuenamegt becomes name ltform
actiondoit.phpgt
Write a Comment
User Comments (0)
About PowerShow.com