This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function hitung_total(&$data) | |
{ | |
// hitung harga | |
$data['harga_total'] = $data['quantity'] * $data['harga_satuan']; | |
$data['nilai_diskon'] = $data['harga_total'] * $data['diskon']; | |
$data['harga_diskon'] = $data['harga_total'] - $data['nilai_diskon']; | |
// return status | |
// kita bisa kasih logic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
-- logic untuk fizzbuzz | |
case | |
when baris %15 = 0 then 'FizzBuzz' | |
when baris %3 = 0 then 'Fizz' | |
when baris %5 = 0 then 'Buzz' | |
else baris end fizzbuzz | |
from ( | |
-- generate 100 baris row dan beri nomor | |
select @no := @no+1 baris |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Contoh Layout</title> | |
<style> | |
p { margin: 0; } | |
.span-3, .span-6, .span-10, .span-23 { | |
float:left; | |
margin-right:10px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// connect ke oracle xe pakai easy naming | |
$conn = oci_connect('hr', 'hr', '//localhost/xe'); | |
if (!$conn) { | |
$e = oci_error(); | |
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR); | |
} | |
// execute query |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// connect ke oracle xe pakai easy naming | |
$conn = oci_connect('hr', 'hr', '//localhost/xe'); | |
if (!$conn) { | |
$e = oci_error(); | |
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR); | |
} | |
// execute query |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D:\xampp\mysql\bin>mysql -u root | |
Welcome to the MySQL monitor. Commands end with ; or \g. | |
Your MySQL connection id is 6 | |
Server version: 5.5.16 MySQL Community Server (GPL) | |
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. | |
Oracle is a registered trademark of Oracle Corporation and/or its | |
affiliates. Other names may be trademarks of their respective | |
owners. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
#container { | |
background-color:#FFF; | |
min-height:100px; | |
border-bottom-right-radius:10px; | |
border-bottom-left-radius:10px; | |
border-top-right-radius:10px; | |
border-top-left-radius:10px; | |
-moz-box-shadow: 0 0 5px #333; | |
-webkit-box-shadow: 0 0 5px #333; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// require PEAR:Mail | |
require_once("Mail.php"); | |
// parameter mail | |
$host = "ssl://smtp.google.com"; | |
$port = 465; | |
$email = "[email protected]"; | |
$pass = "your_gmail_password"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* contoh interface | |
*/ | |
interface Printer | |
{ | |
public function printOut($message); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type="text/css"> | |
.page { | |
width: 960px; | |
margin: 5 auto; | |
} | |
.header { | |
background-color: #F00; | |
} | |
.main-wrapper { | |
background-color: #fff; |
OlderNewer