Lecturer: Nurdatillah Hasim
PHP and MySQL for Dynamic Websites
Lab Work 3
1. Validating form data
register.php
<html>
<head>
<title>Registration Form</title>
</head>
<body>
<form action="handle_register.php" method="post">
<fieldset><legend>Enter your inf
Introduction to SQL and MySQL
Creating Databases and Tables,
Inserting Records, Selecting Data, Using Conditionals,
Using LIKE and NOT LIKE, Sorting Query Results
Creating Databases and Tables
1. Type http:/localhost/phpmyadmin in your address bar to get
Using PHP with MySQL
Modifying the Template,
Connecting to MySQL and Selecting the Database,
Executing Simple Queries,
Retrieving Query Results
Modifying the Template
1. Open file name header.html using Dev-PHP (Code Editor)
Type codes below (Figure 1) in
Lecturer: Nurdatillah Hasim
PHP and MySQL for Dynamic Websites
Lab Work 4
1. What number is bigger?
biggest_number.php
<html>
<head>
<title>What number's bigger?</title>
</head>
<body>
<form action="biggest_num.php" method="post">
<h2>Enter your numbers:<
SHOPPING CART
In this lab session you will create some part of the shopping cart.
For customer site: Create a folder: shopping and save all the PHP programs as listed below
and follow the instructions carefully.(index.php, browse_prints.php, view_print.ph
Lecturer: Nurdatillah Hasim
PHP and MySQL for Dynamic Websites
Lab Work 1
1. Sending Data to Web Browser
<html>
<head>
<title>Using Echo()</title>
</head>
<body>
<p>This is standard HTML.</p>
<?php
echo "This was generated using PHP!";
?>
</body>
</html>
P
Packet
T
Tracer
- Connec
ct a Router to a LAN
T
Topology
A
Addressing
g Table
Device
Interface
IP Addrress
S
Subnet
Mask
Default Gateway
G
G0
0/0
192.168.10
0.1
255
5.255.255.0
N/A
G0
0/1
192.168.11
1.1
255
5.255.255.0
N/A
S0
0/0/0 (DCE)
209.165.20
00.2
REVISION - Stack Exercise (Answers)
Q1) a.
Q2) i)
ii)
ba2*c/b.
a.
1/3+4+3
c.
c.
bd-kc*-e+
(2/(8*(3+8)%3
Note : Assume the stack hold integer values only and any real numbers will
be truncated. Support EACH of your answer with stack diagram.
a.
b.
c.
7
8
0
MARKET IMPERFECTIONS
Imperfect Competition and Market Power: Core Concepts
imperfectly competitive industry An industry in
which individual firms have some control over the price
of their output.
market power An imperfectly competitive firms
ability to ra
MICROECONOMICS AND
INNOVATIONS
THE PRODUCTION FUNCTION
In microeconomics, a production function
is a function that specifies the output of a
firm for all combinations of inputs.
Alternatively, a production function can be
defined as the specification of t
UNIVERSITI KUALA LUMPUR KAMPUS KOTA
MALAYSIAN INSTITUTE OF INFORMATION TECHNOLOGY
Name of Course
Course Code
Lecturer
Semester / Year
Student Name
ID Number
Programme
Submission Date
Assessment
LAB EXERCISE 5: JSP, SERVLET or JSF Page
Section A:
Create a
UNIVERSITI KUALA LUMPUR KAMPUS KOTA
MALAYSIAN INSTITUTE OF INFORMATION TECHNOLOGY
Name of Course
Course Code
Lecturer
Semester / Year
Student Name
ID Number
Programme
Submission Date
Assessment
WEEK 2: WORK-OUT
DEVELOP WEB APP
1. EXERCISE IN LAB
2. YOUR O
UNIVERSITI KUALA LUMPUR KAMPUS KOTA
MALAYSIAN INSTITUTE OF INFORMATION TECHNOLOGY
Name of Course
Course Code
Lecturer
Semester / Year
Student Name
ID Number
Programme
Submission Date
Assessment
WEEK 4: Tasks 1
DEVELOP WEB APP
Create a new database togethe
3 permutation matrices satisfy P k = I. 1.21 Describe the
rows of DA and the columns of AD if D = [ 2 0 0 5 ]. 1.22
(a) If A is invertible what is the inverse of A T ? (b) If A is
also symmetric what is the transpose of A 1 ? (c)
Illustrate both formulas
factorization is unique (see Problem 17), L T must be
identical to U. L T = U and A = LDLT " 1 2 2 8# = " 1 0 2
1#"1 0 0 4#"1 2 0 1# = LDLT . When elimination is applied
to a symmetric matrix, A T = A is an advantage. The
smaller matrices stay symmetric a
elimination, We need to devote one more section to
those questions, to find every solution for an m by n
system. Then that circle of ideas will be complete. But
elimination produces only one kind of understanding of
Ax = b. Our chief object is to achieve
Compare tic; inv(A); toc for A = rand(500) and A =
rand(1000). The n 3 count says that computing time
(measured by tic; toc) should multiply by 8 when n is
doubled. Do you expect these random A to be invertible?
70. I = eye(1000); A = rand(1000); B = triu
This is a linear equation for the unknown function u(x).
Any combination C + Dx could be added to any solution,
since the second derivative ofC+Dx contributes nothing.
The uncertainty left by these two arbitrary constants C
and D is removed by a boundary
form (the block B should be r by r): R = " A B C D# . What
is the nullspace matrix N of special solutions? What is its
shape? 17. (Silly problem) Describe all 2 by 3 matrices A1
and A2 with row echelon forms R1 and R2, such that R1
+R2 is the row echelon
might not be invertible. Instead, it is the inverse of their
product 52 Chapter 1 Matrices and Gaussian Elimination
AB which is the key formula in matrix computations.
Ordinary numbers are the same: (a+b) 1 is hard to
simplify, while 1/ab splits into 1/a
side, which appeared after the forward elimination steps,
is just L 1b as in the previous chapter. Start now with Ux
= c. It is not clear that these equations have a solution.
The third equation is very much in doubt, because its lefthand side is zero. Th
attainable vectors b is closed under addition. (ii) If b is in
the column space C(A), so is any multiple cb. If some
combination of columns produces b (say Ax = b), then
multiplying that combination by c will produce cb. In
other words, A(cx) = cb. For an
columns to be independents There cannot be n pivots,
since there are not enough rows to hold them. The rank
will be less than n. Every system Ac = 0 with more
unknowns than equations has solutions c 6= 0. 2G A set
of n vectors in R m must be linearly depe
in their nullspace form a subspace. Problems 2130 are
about column spaces C(A) and the equation Ax = b. 21.
Describe the column spaces (lines or planes) of these
particular matrices: A = 1 2 0 0 0 0 and B =
1 0 0 2 0 0 and C = 1 0 2 0 0 0 . 22. For
whic
= (1BA)B. 22. Find the inverses (directly or from the 2 by
2 formula) of A, B, C: A = " 0 3 4 6# and B = " a b b 0 # and
C = " 3 4 5 7# . 23. Solve for the columns of A 1 = " x t y
z# : " 10 20 20 50#"x y # = " 1 0 # and " 10 20 20 50#"t z #
= " 0 1 # . 2
Basis for a Vector Space To decide if b is a combination of
the columns, we try to solve Ax = b. To decide if the
columns are independent, we solve Ax = 0. Spanning
involves the column space, and independence involves
the nullspace. The coordinate vectors
free, u and w are not: Complete solution x = xp +xn x =
u v w y = 2 0 1 0 +v
3 1 0 0 +y 1 0 1 1 . (4)
This has all solutions to Ax = 0, plus the new xp =
(2,0,1,0). That xp is a particular solution to Ax = b. The
last two terms with v and y yield more
solution xp 2 0 = MATLABs particular solution A\b all xn
line of all solutions x = xp + xn nullspace Axn = 0 Figure
2.2: The parallel lines of solutions to Axn = 0 and 1 1 2 2
[ y z ] = 2 4 . Echelon Form U and Row Reduced
Form R We start by simplifying