A checkout form using styled radio buttons
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
Public Function URLEncode(StringToEncode As String, Optional _ | |
UsePlusRatherThanHexForSpace As Boolean = False) As String | |
Dim TempAns As String | |
Dim CurChr As Integer | |
CurChr = 1 | |
Do Until CurChr - 1 = Len(StringToEncode) | |
Select Case Asc(Mid(StringToEncode, CurChr, 1)) | |
Case 48 To 57, 65 To 90, 97 To 122 | |
TempAns = TempAns & Mid(StringToEncode, CurChr, 1) |
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
/** | |
* Check emoji from string | |
* | |
* @return bool if existed emoji in string | |
*/ | |
function checkEmoji($str) | |
{ | |
$regexEmoticons = '/[\x{1F600}-\x{1F64F}]/u'; | |
preg_match($regexEmoticons, $str, $matches_emo); | |
if (!empty($matches_emo[0])) { |
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 | |
// array | |
$array = Array ( | |
"0" => Array ( | |
"id" => "USR1", | |
"name" => "Steve Jobs", | |
"company" => "Apple" | |
), | |
"1" => Array ( | |
"id" => "USR2", |
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
<p>Haven't finish this yet but, boy, what fun it's been!</p> | |
<h1>New Game</h1> | |
<h2>Select difficulty…</h2> | |
<section> | |
<div> | |
<input type="radio" id="control_01" name="select" value="1" checked> | |
<label for="control_01"> | |
<h2>Pfft</h2> | |
<p>Awww, poor baby. Too afraid of the scary game sprites? I laugh at you.</p> | |
</label> |
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
Regex for coordinate maps: /(-?\d+\.\d+),(-?\d+\.\d+)/ | |
example: | |
https://www.google.com.au/maps/place/Douglas+Park/@-34.1909818,150.7130019,15.5z/data=!4m2!3m1!1s0x6b12fc6f59d70d01:0x1d0609b5909b97b0 | |
https://www.google.com.au/maps/@-34.2078481,150.7163248,13.5z |
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
rate = -1; | |
clockStart = 300.00; | |
sign = ""; | |
function padZero(n) { | |
if (n < 10) { | |
return "0" + n | |
} | |
else { | |
return "" + n | |
} |
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
function findLongestStringFromArray($array = array()) { | |
if(!empty($array)){ | |
$lengths = array_map('strlen', $array); | |
$maxLength = max($lengths); | |
$key = array_search($maxLength, $lengths); | |
return $array[$key]; | |
} | |
} |
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
while($hasil=mysqli_fetch_array($data)){ | |
$cellWidth=20; //lebar sel | |
$cellHeight=1; //tinggi sel satu baris normal | |
//periksa apakah teksnya melibihi kolom? | |
if($pdf->GetStringWidth($hasil['pesan']) < $cellWidth){ | |
//jika tidak, maka tidak melakukan apa-apa | |
$line=1; | |
}else{ | |
//jika ya, maka hitung ketinggian yang dibutuhkan untuk sel akan dirapikan |
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 | |
/** | |
* Determine that url is exists or not | |
* | |
* @param $url = The url to check | |
**/ | |
function url_exists($url) { | |
$result = false; | |
$url = filter_var($url, FILTER_VALIDATE_URL); | |
NewerOlder