Menggunakan Flex.
mxmlc path/to/StageExample.as
Kode demo untuk tutorial di Youtube
// @param st: The string that will be trimmed. @default whitespace | |
String.prototype.strim = function(st) { | |
st = st || "\\s"; | |
return this.replace(new RegExp("^"+st+"+|"+st+"+$",'g'),''); | |
} | |
/* | |
example: | |
"alorem ipsuma".strim('a'); // return "lorem ipsum" | |
" lorem ipsum ".strim(); // return "lorem ipsum" |
<?php | |
/** | |
* @version 20150828 | |
*/ | |
function username($str) { | |
$bool = preg_match('/^[a-zA-Z][a-zA-Z0-9_]+$/', $str); | |
$status = ($bool ? "<b>Good</b>" : "Bad"); | |
echo $status." : ".$str."\n"; | |
} | |
$kind = array( |
-- work, but the result not accurate | |
SELECT c.user_id, | |
c.user_fname, | |
COUNT(cc.user_id) AS total_child, | |
COUNT(ccc.user_id) AS total_consul | |
FROM drpp_user c | |
LEFT JOIN drpp_child cc | |
ON cc.user_id = c.user_id | |
LEFT JOIN drpp_consul ccc | |
ON ccc.user_id = c.user_id |