Archivo de la etiqueta: algoritmo

Creación de algoritmo de temporizador en php

Estoy trabajando en una aplicación que envía alertas a los usuarios a través de correo electrónico. El usuario elige un marco de tiempo y crea cualquier número de alertas para recibir en ese marco de tiempo.
The goal is to send the alerts at equal time intervals.Sigue leyendo

Etiquetado , , , , | Deja un comentario

Anagrama algoritmo en 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.
Así que, básicamente, I understand the problem here : When userSigue leyendo

Etiquetado , , | Deja un comentario

Algoritmos de reconocimiento de patrones en PHP?

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

Etiquetado , , , | Deja un comentario

Implementar Equipamiento de Atwood nuestra armadura ASCII en 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 

Sigue leyendo

Etiquetado , , , , | Deja un comentario

Cualquier fallo en este método de selección de registros al azar de la base de datos?

Tengo una tabla db lleno de unos ~ 30 mil registros.
Quiero seleccionar al azar a uno de un registro a la vez (cuando la demandada por los usuarios), eliminar el registro de la tabla, e insertarlo en otra tabla.
I’ve heard/found thatSigue leyendo

Etiquetado , , , | Deja un comentario

algorithm to find most realistic market price average in dataset

Lo que tengo:

los usuarios están vendiendo foobars en un sitio de subastas.
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’ =>… Sigue leyendo

Etiquetado , , | Deja un comentario

PHP: How to sort values of an array in alphabetical order?

I want to sort values of an array in alphabetical order in PHP. If all values started with same character then they should be sorted using second character and so on. Ignore case sensitive.
Por ejemplo:

before:
values[0] = "programming";

Sigue leyendo

Etiquetado , , , | 2 comentarios

ESL Elo fórmula (algo malo)

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 

Sigue leyendo

Etiquetado , | Deja un comentario

¿Cómo ampliar el ELO?

In my soccer league Im using (where users play with teams) ELO rating. Todo funciona bien. I need advice on how to extend the formula to reflect the addition of the coefficient and power of the team players. (Teams haveSigue leyendo

Etiquetado , | Deja un comentario

Cálculo de potencias de punto flotante (PHP / BCMath)

I’m writing a wrapper for the bcmath extensión, and bug #10116 regarding bcpow() is particularly annoyingit casts the $right_operand ($exp…) a una (native PHP, not arbitrary length) entero, so when you try to calculate the square Sigue leyendo

Etiquetado , , , , | Deja un comentario
8 páginas