Thursday, 3 March 2016

28/01/16 - MOBILE APP DEVELOPMENT WORKSHOP

Pengajar : En Hasnol Mizam
Dibantu Oleh : En Muna'im

Aktiviti : 
  • Install SDK Manager
  • Install Cordova
  1. To install the cordova command-line tool, download and install Node.js ( http://nodejs.org) first. Following installation, you should be able to invoke node and npm on your command line.
  2. Create an app
  3. Add platform

  4. Add Plugin Features

27/01/16 - BENGKEL PHP Hypertext Preprocessor


Pengajar : Encik Faisal & Pn. Nornima

Aktiviti : 


  1. Belajar basic tentang PHP.
  • Introduction to PHP
  • PHP Fundamental
  • Variables, Dta Types, Operators.
  • Conditional Statements
  • Loops
  • Functions
  • Arrays
  • Forms
  • PHP & MySql2. 

      2. Buat exercise dalam kumpulan

Ahli kumpulan: Saya, Aina & Azrul
Soalan :
Tugasan yg diberikan
Jawapan:

a. Create new customer


<html>
<body>

<h2> <center> NEW CUSTOMER REGISTER </center></h1>
<div align="center">
<form method="POST" action="form_insert.php">
  <table width="200" border="2">
    <tr>
      <td scope="col">Name</th>
      <td scope="col">:</th>
      <td colspan="2" scope="col">
        <label for="textfield"></label>
        <input type="text" name="cust_name" onfocus="this.value = '';" onblur="if (this.value == '') " required="required" />
      </form></th>
    </tr>
 
    <tr>
      <td colspan="4">
        <div align="center">
          <input type="submit" name="button" id="button" value="Submit" />
          </div>
      </form></td>
    </tr>
  </table>
</div>

</form>
</body>
</html>

b. Customer List

<html>
<body>
<?php
include ('connection.php');
?>
<html>
<body>

<table width="411" height="79" border="1" cellspacing="0" align="center">
<tr>
<th width="49" bgcolor="#FFCC99">id</th>
<th width="80"   bgcolor="#FFCC99">Name</th>
<th width="99"  bgcolor="#FFCC99">Action</th>
</tr>


<?php
$sql = "SELECT cust_id, cust_name FROM cust_profile";
$result = $con->query($sql);

if ($result->num_rows > 0) {

while($row = $result->fetch_array()) {
echo "<tr><td>" . $row["cust_id"]. "</td><td>" . $row["cust_name"]."</td>";
echo "<td> <a href='edit_customer.php?cust_id=". $row["cust_id"]."'>edit </a>  || <a href='delete_cust.php?cust_id=". $row["cust_id"]."'>delete </td></tr>";
}
echo "</table>";
}
else {
     echo "0 results";
}

$con->close();
?>

<div align="center"><a href="new_customer.php">Home</a>
</div>


</body>
</html>

c. Edit Customer

<?php
 include('connection.php');

 $result=0;
$cust_id=$_GET['cust_id'];
$query= "SELECT cust_id, cust_name FROM cust_profile WHERE cust_id=$cust_id";
$result=$con->query($query);
echo count($result);

while($dataArray = $result->fetch_array()){

$id = $dataArray['cust_id'];
$name= $dataArray['cust_name'];

echo "$id: $name<br/>";


}

?>

<html>
<body>


<h2> <center> Edit CUSTOMER REGISTER </center></h1>
<div align="center">
<form method="POST" action="form_edit.php?cust_id=<?= $cust_id;?>]">
  <table width="200" border="2">
    <tr>
      <td scope="col">Name</th>
      <td scope="col">:</th>
      <td colspan="2" scope="col">
        <label for="textfield"></label>
<input type="hidden" name="cust_id" id="cust_id" value="<?php echo $row["userid"]; ?>" />
        <input type="text" name="cust_name" value="<?php echo $name; ?>" />
      </form></th>
    </tr>
 
    <tr>
      <td colspan="4">
        <div align="center">
          <input type="submit" name="button" id="button" value="Submit" />
          </div>
      </form></td>
    </tr>
  </table>
</div>

</form>
</body>
</html>


d. Delete Customer


<?php
include('connection.php');

 $cust_id=$_GET['cust_id'];
$query =" DELETE FROM cust_profile WHERE cust_id=$cust_id";
$result= $con->query($query);

if($result)
echo 'Data already deleted: '.$con->affected_rows;
else
die('There wan an error running in the query [' .$con->error . '] ');

$con->close();
header('Location: cust_list.php');
?>





26/01/16 - Bengkel JAVA


Bermula minggu baru setelah 3 hari bercuti... hehe.. Amboi, sebut cuti je mesti happy kan.. Yela, boleh rehat2 kt rumah kan.. spend masa ngan family.. Tapi cmne pun harini tetap kena gi keje gak kan.. Ok, harini kita belajar Java tau.. En. Muna'im yg ajar..


Okayy, sebelum kita terjah lebih jauh, meh nak cite sikit objektif workshop Java ni..
  1. Mempelajari bahasa asas Java
  2. Membiasakan diri dengan Java SE Library
  3. Belajar konsep Pengaturcaraan Berorientasikan Objek (OOP) 
Apa yang dipelajari harini adalah pembelajaran secara atas talian.

  1. http://www.learnjavaonline.org/


  
      2. https://www.codecademy.com

Pembelajaran harini siap 100% 



 

Olala Template by Ipietoon Cute Blog Design and Bukit Gambang