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
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 user… Sigue leyendo
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 to… Sigue leyendo
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 …
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 that… Sigue leyendo
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
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";
…
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 …
¿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 have… Sigue leyendo
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 annoying — it casts the $right_operand ($exp…) a una (native PHP, not arbitrary length) entero, so when you try to calculate the square Sigue leyendo





