[ruby-it] Permutazioni
lello107
lello107 a hotmail.com
Gio 14 Gen 2010 16:03:55 CET
Ciao a tutti,
Ho questo problema voglio calcolare le combinazioni di una matrice, ovvero:
a=[1,2]
p a.permutation(2).to_a
result
[[1, 2], [2, 1]]
Ma sbaglio o mancano [1,1] e [2,2] ???
Grazie
Marcello
Il giorno 13/gen/2010, alle ore 12.00, ml-request a lists.ruby-it.org ha scritto:
> Send Ml mailing list submissions to
> ml a lists.ruby-it.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.ruby-it.org/mailman/listinfo/ml
> or, via email, send a message with subject or body 'help' to
> ml-request a lists.ruby-it.org
>
> You can reach the person managing the list at
> ml-owner a lists.ruby-it.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Ml digest..."
>
>
> Argomenti del Giorno:
>
> 1. Re: caricamento file (Giovanni Messina)
> 2. Re: rails in rete locale (Cristiano Ceglia)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 12 Jan 2010 13:10:12 +0100
> From: Giovanni Messina <messina.gio a gmail.com>
> Subject: Re: [ruby-it] caricamento file
> To: ml a lists.ruby-it.org
> Message-ID: <94278130962ea513cc70a40eb4bc2fdb a ruby-forum.com>
> Content-Type: text/plain; charset=utf-8
>
> risolto aggiungendo nel controller
>
> if f.is_a?(ActionController::UploadedStringIO)
> temp_file = Tempfile.new("some_temp_name")
>
> temp_file.write f.read
> f = temp_file
> temp_file.close
> end
>
> non che la cosa mi soddisfi, ma funziona
>
> sarei curioso di sapere come aggiungerlo di default per file_field
> --
> Posted via http://www.ruby-forum.com/.
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 12 Jan 2010 17:12:04 +0100
> From: Cristiano Ceglia <c.ceglia a email.it>
> Subject: Re: [ruby-it] rails in rete locale
> To: ml a lists.ruby-it.org
> Message-ID: <9f769921e26039284177e2f817115050 a ruby-forum.com>
> Content-Type: text/plain; charset=utf-8
>
> jamba jamba wrote:
>> ma dopo che ho configurato apache2 e passenger devo comunque lanciare
>> scrivpt/server?
>
> No, fa tutto passenger (spawna istanze dell'applicazione all'occorenza,
> e le tira gił se non ci sono richieste per un tot di tempo).
>
> Comunque se vuoi configurare apache+passenger senza troppe rotture usa
> speedy (http://speedy.mohamedaslam.com/).
>
> Ciao ciao
> --
> Posted via http://www.ruby-forum.com/.
>
>
> ------------------------------
>
> _______________________________________________
> Ml mailing list
> Ml a lists.ruby-it.org
> http://lists.ruby-it.org/mailman/listinfo/ml
>
>
> Fine di Digest di Ml, Volume 36, Numero 11
> ******************************************
>
More information about the Ml
mailing list