Simple, sub tidak return value, function return value.
Sunday, 12 January 2014
Saturday, 11 January 2014
Terminologi programming
Modules = class with super power
Class =
- is the blueprint
- container of related method
Contoh:
console
Object is an instance of a class
Class =
- is the blueprint
- container of related method
Contoh:
console
Object is an instance of a class
Looping
Components
Looping's components: (a = b x c)
(a) what to be looped(b)
(b) how many times (c)
- Unknown
- Known
=
(c) result
(d) exit condition or stop condition
Which one?
If you know what to be looped and how many times you loop and what to be looped, you can use for.
If you don't know how many times you loop but know what to be looped and the what result you want, you can use while.
For: a, b, c
While: d
Examples
Python looping
- Python For
Example (Python)
>>> for i in range (0,2):
print i
0
1
- Python While
Example (Python):
>>> x=1
>>> while x < 3:
x = x + 1
print x
2
3
C Looping
- For
Usage: for (start counter; end counter; how to get to end counter)
Example:
- While
This the most basic loop in C.
check first, do last.
Example:
- do..While
do.. While loop is just like while except the condition to test is behind
do first, check later
Looping's components: (a = b x c)
(a) what to be looped(b)
(b) how many times (c)
- Unknown
- Known
=
(c) result
(d) exit condition or stop condition
Which one?
If you know what to be looped and how many times you loop and what to be looped, you can use for.
If you don't know how many times you loop but know what to be looped and the what result you want, you can use while.
For: a, b, c
While: d
Examples
Python looping
- Python For
Example (Python)
>>> for i in range (0,2):
print i
0
1
- Python While
Example (Python):
>>> x=1
>>> while x < 3:
x = x + 1
print x
2
3
C Looping
- For
Usage: for (start counter; end counter; how to get to end counter)
Example:
- While
This the most basic loop in C.
check first, do last.
Example:
- do..While
do.. While loop is just like while except the condition to test is behind
do first, check later
Technology what you offer?
Routing = passing
Think of three router triangle.
Passing
Passing polos
Passing if (conditional)
Access-list technology
block certain packet with label ....
permit certain packet with label ....
Access-list standard: if you want examine only layer 3 use this type
Access-list extended: if you want to examine packet's at layer 3 (network, transport, application) and above use this type
NAT
translate certain packet with label ....
don't translate certain packet with label .....
Spanning-tree
: distributed technologies, means each switch process and tell other
OSPF
: distributed technologies
Think of three router triangle.
Passing
Passing polos
Passing if (conditional)
Access-list technology
block certain packet with label ....
permit certain packet with label ....
Access-list standard: if you want examine only layer 3 use this type
Access-list extended: if you want to examine packet's at layer 3 (network, transport, application) and above use this type
NAT
translate certain packet with label ....
don't translate certain packet with label .....
Spanning-tree
: distributed technologies, means each switch process and tell other
OSPF
: distributed technologies
Subscribe to:
Comments (Atom)