Le jeudi 5 mai 2011 18:43, Paul Johnson a écrit :
> On Thu, May 05, 2011 at 08:20:13AM -0700, eventual wrote:
> > Hi, Concerning the game Lotto, how do I generate a list of 6 numbers out
> > of 12 numbers, eg
> >
> > given the 12 numbers as 1,2,3,4,5,6,7,8,9,10,11,12
> > the list of 6 numbers goes
On Thu, May 05, 2011 at 08:20:13AM -0700, eventual wrote:
> Hi, Concerning the game Lotto, how do I generate a list of 6 numbers out of
> 12
> numbers, eg
>
> given the 12 numbers as 1,2,3,4,5,6,7,8,9,10,11,12
> the list of 6 numbers goes like this :-
> 1,2,3,4,5,6
> 1,2,3,4,5,7
> 1,2,3,4,5,8
From: Ryan <[EMAIL PROTECTED]>
> While I agree that it would be a good homework assignment it's not.
> What I have is a logic look up table for health records using an EAV
> model (in an SQL table):
>
> rowID - key - value
>
> From a web form I select some keys and values. When subm
On Mon, Oct 06, 2008 at 08:32:22PM -0400, Stephen Gallagher wrote:
> I can come up with one example where this might be interesting. Imagine you
> are a software tester and were tasked with identifying all potential
> variable combinations that needed to be covered/tested. Risk mitigation,
> don
- Original Message -
From: "Jason Trebilcock" <[EMAIL PROTECTED]>
To: "Perl Beginners"
Sent: Monday, October 6, 2008 7:57:23 PM GMT -05:00 US/Canada Eastern
Subject: RE: combinations
-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED]
Sent: M
While I agree that it would be a good homework assignment it's not.
What I have is a logic look up table for health records using an EAV
model (in an SQL table):
rowID - key - value
From a web form I select some keys and values. When submitted, I
create a new rowID and put in the
-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED]
Sent: Monday, October 06, 2008 12:37 PM
To: Perl Beginners
Cc: Randal L. Schwartz; Mr. Shawn H. Corey
Subject: Re: combinations
What are the real-world problems that are solved using a list of
combinations of
sets of items
> "Rob" == Rob Dixon <[EMAIL PROTECTED]> writes:
Rob> The homework aroma entices me to respond with another question -
Rob> hopefully an educational one. I hadn't thought of watermarking them
Rob> though - good idea :)
I didn't come up with the watermark idea. Can't remember where I saw it..
Randal L. Schwartz wrote:
>> "Peter" == Peter Scott <[EMAIL PROTECTED]> writes:
>
> Peter> Did you see the smiley? Randal might have been more inclined to give a
> Peter> less cute answer if the poster said what he wanted this for, because it
> Peter> does sound like homework.
>
> Precisely.
Mr. Shawn H. Corey wrote:
> On Mon, 2008-10-06 at 09:02 -0700, Randal L. Schwartz wrote:
>>
>> As in, my answer started with a joke. Hence the smiley. But I did have a
>> puzzling question about this recurring need for "all combinations" and
>> always stated rather abstractly, without the real-wo
Randal L. Schwartz wrote:
>> ""Mr" == "Mr Shawn H Corey" <[EMAIL PROTECTED]> writes:
>
> "Mr> On Sun, 2008-10-05 at 21:30 -0700, Randal L. Schwartz wrote:
>>> Eh? My question has *nothing* to do with my solution. My question
>>> has to do with the original question.
>
> "Mr> And my question
On Mon, 2008-10-06 at 09:02 -0700, Randal L. Schwartz wrote:
> As in, my answer started with a joke. Hence the smiley. But I did
> have a
> puzzling question about this recurring need for "all combinations" and
> always
> stated rather abstractly, without the real-world need backing it up.
>
Yo
> "Peter" == Peter Scott <[EMAIL PROTECTED]> writes:
Peter> Did you see the smiley? Randal might have been more inclined to give a
Peter> less cute answer if the poster said what he wanted this for, because it
Peter> does sound like homework.
Precisely. If it smells like homework to me, I t
> ""Mr" == "Mr Shawn H Corey" <[EMAIL PROTECTED]> writes:
"Mr> On Sun, 2008-10-05 at 21:30 -0700, Randal L. Schwartz wrote:
>> Eh? My question has *nothing* to do with my solution. My question
>> has to do with the original question.
"Mr> And my question is why isn't these abilities of glob
On Sun, 05 Oct 2008 19:06:35 -0400, Mr. Shawn H. Corey wrote:
> On Sun, 2008-10-05 at 15:11 -0700, Randal L. Schwartz wrote:
>> my @result = map [split /-/], glob "{a}-{b,c}-{d,e,f}-{a}";
>>
>> :-)
>>
>> But seriously, why does this come up often?
>
> Because your solution relies on knowledge of
Mr. Shawn H. Corey wrote:
> On Sun, 2008-10-05 at 21:30 -0700, Randal L. Schwartz wrote:
>>
>> Eh? My question has *nothing* to do with my solution. My question
>> has to do with the original question.
>
> And my question is why isn't these abilities of glob described in
> perldoc?
They are des
On Sun, 2008-10-05 at 21:30 -0700, Randal L. Schwartz wrote:
> Eh? My question has *nothing* to do with my solution. My question
> has to do with the original question.
And my question is why isn't these abilities of glob described in
perldoc?
--
Just my 0.0002 million dollars worth,
Sh
> "Shawn" == Shawn H Corey <[EMAIL PROTECTED]> writes:
Shawn> Because your solution relies on knowledge of bash which many Windows
Shawn> users do not have.
Eh? My question has *nothing* to do with my solution. My question
has to do with the original question.
--
Randal L. Schwartz - Ston
On Sun, 2008-10-05 at 15:11 -0700, Randal L. Schwartz wrote:
> my @result = map [split /-/], glob "{a}-{b,c}-{d,e,f}-{a}";
>
> :-)
>
> But seriously, why does this come up often?
Because your solution relies on knowledge of bash which many Windows
users do not have.
Also this ability of glob is
> "Ryan" == Ryan <[EMAIL PROTECTED]> writes:
Ryan> my %data = (
Ryan> k1 => 'a',
Ryan> k2 => ['b', 'c'],
Ryan> k3 => ['d', 'e', 'f']
Ryan> k4 => 'a'
Ryan> );
Ryan> I want to get all the possible combinations:
my @result = map [split /-/], glob "{a}-{b,c}-{d,e,f}-{a}";
:-)
But ser
On Sun, 2008-10-05 at 17:33 -0400, Mr. Shawn H. Corey wrote:
> sub combos {
> my %data = @_;
> my @keys = sort keys %data;
>
> return _combos( [EMAIL PROTECTED], %data );
> }
>
First correction:
sub combos {
my %data = @_;
my @keys = keys %data;
return _combos( [EMAIL PROTECTED], %
On Sun, 2008-10-05 at 15:29 -0500, Ryan wrote:
> my %data = (
> k1 => 'a',
> k2 => ['b', 'c'],
> k3 => ['d', 'e', 'f']
> k4 => 'a'
> );
>
> I want to get all the possible combinations:
>
> k1 => a
> k2 => b
> k3 => d
> k4 => a
>
> k1 => a
> k2 => c
> k3 => d
> k4 => a
>
"David Byrne" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> I am fairly new to Perl and haven't approached a scipt
> this complex or computation this intensive. So I
> would certainly appreciate any advice.
>
> I have successfully created a hash of arrays
> equivalent to a 122 x 6
"David Byrne" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am fairly new to Perl and haven't approached a scipt
> this complex or computation this intensive. So I
> would certainly appreciate any advice.
>
> I have successfully created a hash of arrays
> equivalent to a 122 x 61
24 matches
Mail list logo