December 21, 2009david
Recently I heard about OpenCV and some applications for AI using this library. This is a interesting topic and very powerful. There is many examples in C, C++ and Python, but I really surprised because I found 2 implementations in PHP.
First of all, What Face Detection/Recognition is?
Is a computer technology that determines the locations and [...]
Share on Facebook
read More »
November 4, 2009david
This is a very simple function, but ver useful. Enjoy it!
function getRepetitions($value, array $values){
$length = count($values);
if($length==0)
return FALSE;
$repetitions = 0;
foreach($values as $v){
if($v==$value)
$repetitions++;
}
return $repetitions;
}
print getRepetitions(3,array(3,3,3,5,6,4,3,6,5,4,6,3,2,8,8))."\n";
Share on Facebook
Share on Facebook
read More »
November 4, 2009david
In statistics, the mode is the value that occurs the most frequently in a data set or a probability distribution. In some fields, notably education, sample data are often called scores, and the sample mode is known as the modal score. Like the statistical mean and the median, the mode is a way of capturing [...]
Share on Facebook
read More »
November 3, 2009david
This was a quick modification to use use MicroUri, instead bit.ly on Tweetme plugin. We just need to change a function called tweetme_bitly_link().
function tweetme_bitly_link($id) {
if (function_exists(’revcanonical_shorten’) &&
[...]
Share on Facebook
read More »
November 1, 2009david
This php function Validate an IP Address using PHP and Regular Expressions, returns 1 if the IP is valid or 0 if is invalid. The regular expression rather ugly, but still functional and can be very useful. Enjoy it!
function valid_ip($ip) {
return preg_match("/^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])" .
[...]
Share on Facebook
read More »