[SP-pm] TRNGs com Rand

Stanislaw Pusep creaktive at gmail.com
Fri Nov 5 05:20:37 PDT 2010


A grosso modo, é a mesma coisa, mas valeu!

ABS()



2010/11/5 Alexei Znamensky <russoz em gmail.com>

>
>
> 2010/11/5 Stanislaw Pusep <creaktive em gmail.com>
>
> Legal!
>> Aproveitando: como vocês fazem para dar um shuffle() num array qqer? Eu
>> costumo fazer:
>>
>> my @x = (1..10);
>> for (my $i = 0; $i <= $#x; $i++) {
>>     my $j = rand $#x;
>>     ($x[$i], $x[$j]) = ($x[$j], $x[$i])
>> }
>>
>
> http://www.perlmonks.org/?node_id=1869
> <http://www.perlmonks.org/?node_id=1869>
>
>>
>> ABS()
>>
>>
>>
>>
>> On Fri, Nov 5, 2010 at 01:31, Daniel de Oliveira Mantovani <
>> mantovani em perl.org.br> wrote:
>>
>>>
>>> http://stackoverflow.com/questions/4092348/in-perl-how-can-i-generate-an-array-with-random-values-without-using-a-loop
>>>
>>> Além do conceito, eu achei interessante o hack para alterar uma função
>>> nativa.
>>>
>>> []'s
>>>
>>> --
>>> "If you’ve never written anything thoughtful, then you’ve never had
>>> any difficult, important, or interesting thoughts. That’s the secret:
>>> people who don’t write, are people who don’t think."
>>> _______________________________________________
>>> SaoPaulo-pm mailing list
>>> SaoPaulo-pm em pm.org
>>> http://mail.pm.org/mailman/listinfo/saopaulo-pm
>>>
>>
>>
>> _______________________________________________
>> SaoPaulo-pm mailing list
>> SaoPaulo-pm em pm.org
>> http://mail.pm.org/mailman/listinfo/saopaulo-pm
>>
>
>
>
> --
> Alexei Znamensky [russoz_gmail_com] [russoz.wordpress.com] [
> www.flickr.com/photos/alexeiz]
> «Only love / Can bring the rain / That makes you yearn to the sky»
>
>
> _______________________________________________
> SaoPaulo-pm mailing list
> SaoPaulo-pm em pm.org
> http://mail.pm.org/mailman/listinfo/saopaulo-pm
>
-------------- Pr�xima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/saopaulo-pm/attachments/20101105/4937c41e/attachment-0001.html>


More information about the SaoPaulo-pm mailing list