This file contains 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 | |
class Pegawai | |
{ | |
public $nama = 'Budi'; | |
public $umur = 29; | |
} | |
foreach ((new Pegawai()) as $key => $value) { |
This file contains 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 | |
$pegawai = [ | |
[ | |
'nama' => 'Joni', | |
'umur' => 25, | |
], | |
[ | |
'nama' => 'Ani', | |
'umur' => 21, |
This file contains 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 | |
for ($i = 0; $i < 10; $i++) { | |
for ($x = 0; $x < 10; $x++) { | |
if ($i == 0 || $i == 9) { | |
echo '*'; | |
continue; | |
} | |
if ($x == 0 || $x == 9) { |
This file contains 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 | |
class Pelanggan | |
{ | |
} | |
class Roti | |
{ | |
private $jumlah; |
This file contains 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
package main | |
import ( | |
"github.com/gorilla/mux" | |
"net/http" | |
"github.com/codegangsta/negroni" | |
"encoding/json" | |
"strconv" | |
"time" | |
"gopkg.in/mgo.v2" |
This file contains 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
class Database | |
{ | |
/** | |
* @var \PDO | |
*/ | |
protected static $conn; | |
/** | |
* @return \PDO | |
*/ |
This file contains 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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
func random(min, max int) int { | |
rand.Seed(time.Now().UnixNano()) |
This file contains 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
package main | |
import ( | |
"fmt" | |
"github.com/ChimeraCoder/anaconda" | |
"net/url" | |
"encoding/csv" | |
"os" | |
) |
This file contains 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 | |
Class Keygen { | |
private $serial; | |
private function randChar($length = 8) { | |
$characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
$string = ''; | |
for ($p = 0; $p < $length; $p++) { |
This file contains 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
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click | |
Dim year As String = Now.Year - 2000 | |
Dim month As String | |
If (Now.Month > 10) Then | |
month = Now.Month | |
Else | |
month = "0" & Now.Month | |
End If |
NewerOlder