Tag Archives: l'algorithme

Creating timer algorithm in php

I’m working on an application that sends alerts to users via email. The user chooses a time-frame and sets up any number of alerts to receive in that time-frame.
The goal is to send the alerts at equal time intervals.Continuer la lecture

Tagged , , , , | Laisser un commentaire

Anagram Algorithm in PHP

I’m totally a newbie with PHP. Today I just got a problem that I can’t know how to solve, even after searching google and digging SOF. It’s the Anagram algorithm.
Donc, fondamentalement,, I understand the problem here : When userContinuer la lecture

Tagged , , | Laisser un commentaire

Algorithmes de reconnaissance de signatures de PHP?

I would like to begin experimenting with algorithms that recognize patterns in data. I deal with many types of sequences (image pixels, saisie de texte, user movement), and it would be fun to make use of Pattern Recognition to try toContinuer la lecture

Tagged , , , | Laisser un commentaire

Implement Atwood's Equipping our ASCII armor in PHP

I’m trying to implement in PHP something similar to Jeff Atwood’s
Equipping our ASCII armor.
Here’s C# Implementation of ASCII85.
Here’s PHP Implementation of ASCII85
Here’s how I convert the string to byte array:

$byteArr = str_split($uid);
foreach ($byteArr as 

Continuer la lecture

Tagged , , , , | Laisser un commentaire

Any flaws in this method of selecting random records from the db?

I have a db table filled with about ~30k records.
I want to randomly select a record one at a time (when demanded by users), delete the record from the table, and insert it in another table.
I’ve heard/found thatContinuer la lecture

Tagged , , , | Laisser un commentaire

algorithm to find most realistic market price average in dataset

What I have:

users are selling foobars on an auction site.
each foobar is identical.
price of foobar determined by user.
i will be scrapping each price listing to form a data set that looks like:
$prices = (‘foobar’ =>… Continuer la lecture

Tagged , , | Laisser un commentaire

PHP: Comment trier les valeurs d'un tableau dans l'ordre alphabétique?

Je veux trier les valeurs d'un tableau dans l'ordre alphabétique en PHP. If all values started with same character then they should be sorted using second character and so on. Ignore case sensitive.
Par exemple:

before:
values[0] = "programming";

Continuer la lecture

Tagged , , , | 2 Commentaires

ESL Elo formula (something wrong)

I’m trying to implement ELO formula like ESL portal have. ( http://cheater.esl.eu/uk/faq/rankmodules/ )
A first example corresponds to the example of ESL but the second and third give crazy results. Where I’m wrong?

    function eloEsl($k1, $k2, $g1, $g2)
{
    $per1 

Continuer la lecture

Tagged , | Laisser un commentaire

Comment faire pour étendre classement ELO?

In my soccer league Im using (where users play with teams) ELO rating. Everything works fine. I need advice on how to extend the formula to reflect the addition of the coefficient and power of the team players. (Teams haveContinuer la lecture

Tagged , | Laisser un commentaire

Calculating Floating Point Powers (PHP/BCMath)

I’m writing a wrapper for the bcmath extension, and bug #10116 regarding bcpow() is particularly annoyingit casts the $right_operand ($exp…) to an (native PHP, not arbitrary length) entier, so when you try to calculate the square Continuer la lecture

Tagged , , , , | Laisser un commentaire
8 pages