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
--- icu.orig/source/test/intltest/dtfmttst.cpp 2013-10-04 22:48:00.000000000 +0200 | |
+++ icu/source/test/intltest/dtfmttst.cpp 2014-06-13 19:34:40.611299572 +0200 | |
@@ -1129,7 +1129,7 @@ | |
return; | |
} | |
parse2DigitYear(fmt, "5/6/17", date(117, UCAL_JUNE, 5)); | |
- parse2DigitYear(fmt, "4/6/34", date(34, UCAL_JUNE, 4)); | |
+ parse2DigitYear(fmt, "4/6/34", date(134, UCAL_JUNE, 4)); | |
} | |
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 | |
/* nawawi jamili -- rutweb.com */ | |
function _remove_sql_inject($str) { | |
// add more pattern | |
$pat[] = "/'\s+AND\s+extractvalue.*/i"; | |
$pat[] = "/'\s+and\(.*/i"; | |
$pat[] = "/select\s+.*?\s+from.*/i"; | |
$pat[] = "/(rand|user|version|database)\(.*/i"; | |
$pat[] = "/union\(.*/i"; |
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
-- function duit masuk simpan dalam sen | |
-- contoh guna: INSERT INTO `test` (`duit`) VALUES ( duitmasuk('1.20') ); | |
CREATE FUNCTION `duitmasuk`(`num` FLOAT) RETURNS int(11) | |
DETERMINISTIC | |
RETURN ( num * 100 ) | |
-- function duit keluar dalam ringgit | |
-- conth guna: SELECT duitkeluar(duit) as duit FROM `test` | |
CREATE FUNCTION `duitkeluar`(num INT) RETURNS float | |
DETERMINISTIC |
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 | |
$noic="letak no ic"; | |
$p = file_get_contents("https://api-rutweb.rhcloud.com/spr/?ic={$noic}"); | |
$array = json_decode($p); | |
print_r($array); |
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
function _check_phone_number($string, &$data = null ) { | |
if ( preg_match( '/^[+]?([\d]{0,3})?[\(\.\-\s]?([\d]{3})[\)\.\-\s]*([\d]{3})[\.\-\s]?([\d]{4})$/', $string, $mm ) ) { | |
$data = $mm; | |
return true; | |
} | |
// 13102016: malaysia format 00-000 000 00-000000 | |
if ( preg_match( '/^[+]?([\d]{0,2})?[\(\.\-\s]?([\d]{2})[\)\.\-\s]*([\d]{2})[\.\-\s]?([\d]{4})$/', $string, $mm ) ) { | |
$data = $mm; | |
return true; | |
} |
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
/** | |
* Check uploaded file | |
* | |
* @param string $file file | |
* @param int $max_file_length Maximum file length | |
* @return bool Return TRUE if Ok, FALSE otherwise. | |
*/ | |
function _check_upload_filename($file, $max_file_length = 260) { | |
$valid_chars_regex = '.A-Z0-9_ !@#$%^&()+={}\[\]\',~`-'; | |
$file_name = preg_replace('/[^'.$valid_chars_regex.']|\.+$/i', "", basename($file) ); |
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
function dump_object(array) { | |
var pad_char = ' ', pad_val = 2; | |
function repeat_char(len, pad_char) { | |
var str = ''; | |
for (var i = 0; i < len; i++) { | |
str += pad_char; | |
} | |
return str; | |
}; |
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 | |
$img = imagecreatetruecolor(200, 200); | |
// allocate some colors | |
$white = imagecolorallocate($img, 255, 255, 255); | |
$red = imagecolorallocate($img, 255, 0, 0); | |
$green = imagecolorallocate($img, 0, 255, 0); | |
$blue = imagecolorallocate($img, 0, 0, 255); | |
$blue1 = imagecolorallocate($img, 102, 104, 230); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>table responsive</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
<style> | |
@media screen and (max-width: 600px) { | |
table.table-grid { |
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 | |
function _check_email($email, $strict = false) { | |
if ( filter_var($email, FILTER_VALIDATE_EMAIL) ) { | |
if ( $strict && function_exists("getmxrr") ) { | |
list($prefix, $domain) = split("@",$email); | |
return @getmxrr($domain, $maxhost); | |
} | |
return true; | |
} | |
return false; |
OlderNewer