Skip to content

Instantly share code, notes, and snippets.

View PUSRISTEK's full-sized avatar

Gun Gun Febrianza PUSRISTEK

  • Fablab - Bandung
  • Indonesia
View GitHub Profile
@PUSRISTEK
PUSRISTEK / .cs
Created January 28, 2017 13:06
Fungsi Terbilang
#region "Method Terbilang"
//labelBayarAngsuran.Text = Terbilang(decimal.Parse(textjumang.Text));
string[] satuan = new string[10] { "nol", "satu", "dua", "tiga", "empat", "lima", "enam", "tujuh", "delapan", "sembilan" };
string[] belasan = new string[10] { "sepuluh", "sebelas", "dua belas", "tiga belas", "empat belas", "lima belas", "enam belas", "tujuh belas", "delapan belas", "sembilan belas" };
string[] puluhan = new string[10] { "", "", "dua puluh", "tiga puluh", "empat puluh", "lima puluh", "enam puluh", "tujuh puluh", "delapan puluh", "sembilan puluh" };
string[] ribuan = new string[5] { "", "ribu", "juta", "milyar", "triliyun" };
string Terbilang(Decimal d)
{
string strHasil = "";
@PUSRISTEK
PUSRISTEK / PHP - Upload Multi File.php
Created November 18, 2016 06:36
How to Upload Multi Files
<form action="" method="post" enctype="multipart/form-data">
<p>Pictures:
<input type="file" name="pictures[]" />
<input type="file" name="pictures[]" />
<input type="file" name="pictures[]" />
<input type="submit" value="Send" />
</p>
</form>
@PUSRISTEK
PUSRISTEK / PHP - CheckFakeImageFile.php
Created November 18, 2016 01:54
PHP - Check Fake Image File
$target_dir = "upload-folder/";
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
$uploadOk = 1;
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
if(isset($_POST["submit"])) {
$check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);
if (exif_imagetype($_FILES["fileToUpload"]["tmp_name"]) != IMAGETYPE_JPEG) {
echo 'File bukan gambar asli..';
$uploadOk = 0;

A Programmer's Geometry

This is my notes repo reading "A Programmer's Geometry" by Adrian Bowyer and John Woodwark (ISBN-13: 978-0408012423)

Example in the book is given in FORTRAN 77, I'm taking notes and converting the sample in JavaScript.

  1. Points and lines

1.1 Distance between Two Points 1.2 Equations of a Line 1.3 Distance from a Point to a Line

Draft Untuk Menulis Buku Potensi HTML 5 Kajian akan membahas :

Web Socket, Web RTC, Canvas, SVG, WebGL, File API, File System API,