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 | |
// Zeuxis Lo | |
// Created at 2011-03-23 05:05 PM | |
date_default_timezone_set("Asia/Hong_Kong"); | |
function calculate_rank_sum($score, $created_at) { | |
$order = log10(max(abs($score), 1)); | |
if ($score > 0) { |
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 | |
/** | |
* Formats string, removes accents from string | |
* @param string $string String to format | |
* @return string | |
*/ | |
function strip_accent($string) | |
{ | |
$accents = '/&([A-Za-z]{1,2})(grave|acute|circ|cedil|uml|lig);/'; |