Mostrando entradas con la etiqueta calculo. Mostrar todas las entradas
Mostrando entradas con la etiqueta calculo. Mostrar todas las entradas

viernes, 29 de octubre de 2010

Smart pointers. shared_ptr and normal pointer

Shared pointer can make our code more secure. shared_pointer is a kind of pointer that allow to others pointer share his container. And when no pointer points to a container, the garbage collector erase the container thus ensuring the reliable of the program in order to no consume the heap of the process.

If we use the next code, the above behaviour.

The follow code show the common error, creating new pointers and not erase the container.


If we compile and execute this two codes, we obtain the next statistical result:

viernes, 2 de noviembre de 2007

Polinomios interpoladores y el esquema de Shamir




La interpolacion polinómica se utiliza, entre otras cosas, para la aproximacion de funciones, pero existe otra aplicacion para criptografia, entre otras, para compartir secretos, en este articulo se detalla el algoritmo que define "el esquema de Shamir" y se brinda el codigo escrito para PHP .

-

miércoles, 10 de enero de 2007