Thursday, 27 August 2015

1. create database
2. create table
3. define type

Wednesday, 26 August 2015

<!DOCTYPE html>
<html>
    <head>
        <title>This is my own web page</title>
    </head>
    <body>
        <h1>Totardo</h1>
        <img src="https://s3.amazonaws.com/codecademy-blog/assets/ninja_zpsa5dbe37a.jpg" />
        <p>Hello, my name is Totardo. I am the eldest of three brothers and sisters. I have 1 sister and 1 brother. </p>
        <p>I learn about html daily. I use <a href="http://www.codecademy.com">codecademy</a> to learn about html. Sometimes I learn about <a href="http://www.cisco.com">cisco."</a></p>
        <p>I want to be a succesful developer.</p>
    </body>
</html>
Achievement:
1. Membuat kondisi dengan menggunakan if
2. Membuat operasi matematik ($biaya=$soto + $tehbotol
3. Membuat local variabel ($soto, $tehbotol)
4. Membuat html drop-down untuk jenis/variasi makanan dan jenis/variasi minuman

Tampilan sekrip .php nya:  

Hello,<?php echo $_POST['name']?>
<br>

Jenis makanan adalah: <?php echo $_POST['makanan']
?><br>
Jenis minuman adalah: <?php echo $_POST

['minuman'];?>
<br>
<?php
$soto=10000;
$tehbotol=5000;
if ($_POST['makanan'] == "Soto"){
if($_POST['minuman']=="Tehbotol"){
$biaya = $soto+$tehbotol;
print "Biaya = ".$biaya;
}}
?>

Tampilan sekrip .html nya:

<form method="POST" action="wechat.php">
Name: <input type="text" name="name"> <br>
Jenis makanan: <select name="makanan">
<option value="Nasigoreng">Nasi Goreng</option>
<option value="Bakmie">Bakmi</option>
<option value="Soto">Soto</option>
</select> <br>
Minuman: <tab> <tab><select name="minuman">
<option value="Tehbotol">Teh Botol</option>
<option value="Aqua">Aqua</option>
<option value="Tehmanis">Teh Manis</option>
</select><br>
<input type="submit">

Tampilan GUI dari sekrip diatas:


Name:

Jenis makanan:

Minuman:

Monday, 24 August 2015

database
connect
create DB
create table
Insert Data
Get Last ID
Insert Multiple
Prepared
Select Data
Delete Data
Update Data
Limit Data

Saturday, 22 August 2015

HTML

Styling:
1. Ngasih warna
2. Ngasih font size
3. Ngasih tipe font, contoh: trebuchet, verdana,

font-size
font-family
text-align
color
background-color

2. Quotations
Ngasih kutipan (quotations) contoh: <q>Aloha</q>

3. CSS
untuk styling html element
1. Ngasih warna latar
2. Ngasih warna teks
3. Ngasih

4. html5 Migration
Tentang perpindahan dari html 4 ke html 5. Perubahan tag divisi. Perubahan doctype. Perubahan html encoding.
Header, nav, section, aside,

5. html class
di "class" kan supaya sama di style kan.
contoh:
<head><style>
div.cities {
    background-color:black;
    color:white;
    margin:20px;
    padding:20px;
}
</style>
 </head>

6. charset
untuk browser bisa tampil kan page html dengan bener web browser perlu mengetahui charcter set untuk digunakan.
ASCII adalah character set yang pertama kali digunakan sebagai character set.
 

Friday, 21 August 2015

$ python
>>>1/2
>>>1/2.

integer: don't know decimal point
float : know decimal point (comma)


>>> print "hello"

>>> fish = 'tuna'
>>> len (fish)

>>> fish * 10
'tunatunatunatunatunatunatunatunatunatuna'

>>> help(len)
>>> dir()
>>> 1 == 1
True
>>> len(fish) == 4
True
>>> "a" == "a"
True
>>> "a" == "A"
False
>>> "a" != "z"
True
>>> 1 > 0
True
>>> 2 >= 3 (is 2 lebah besar atau sama dengan 3?)
False
>>> -1 < 0
True
>>> "H" in "Hello"
True
>>> "z" in "Hello"
False
>>> "z" not in "hello"
True
>>> x == 4
True
>>> len("")
>>> my_list = ["a", "b", "c"]
>>> len(my_list)
>>> my_list[0]
'a'
>>> my_list[1]
'b'
>>> my_list.append("d")
>>> my_list
['a', 'b', 'c', 'd']
>>>my_list.index("c")
>>> "a" in my_list
True
>>> "z" in my_list
False
>>> my_list[0:2] '[start:not including the second]




Wednesday, 19 August 2015

read -p "Username : " user; echo "Hello $user. How are you"