Re: Weekend challenge

2013-07-03 Thread Geoff Canyon
On Wed, Jul 3, 2013 at 11:30 AM, J. Landman Gay wrote: > Right, that's why yours is better. The nature of the data is usually that > only a single line would be out of sequence, but of course you can't rely > on that. So tell those guys that you don't condone half-assed error checking ;-) _

Re: Weekend challenge

2013-07-03 Thread J. Landman Gay
On 7/3/13 9:39 AM, Geoff Canyon wrote: The above code is just for the ID, but even on that task it doesn't seem to do the same thing I did. The above will not flag this as a problem, but my code would: ID SECTION SUBSECTION TYPE|OP1|OP2 AB MediumOrchid AB MediumOrchidOra

Re: Weekend challenge

2013-07-03 Thread Richard Gaskin
Geoff Canyon wrote: The above code is just for the ID, but even on that task it doesn't seem to do the same thing I did. The above will not flag this as a problem, but my code would... Earlier Jacque wrote: That was what I ended up with too for sequencing checks. Then they said something about

Re: Weekend challenge

2013-07-03 Thread Geoff Canyon
On Tue, Jul 2, 2013 at 10:28 PM, J. Landman Gay wrote: > look at a line and store the ID in a variable > look at that line + 1 >if the ID is the same, keep going >if the ID is different, look at line + 2 > if line+2 is the old ID, then line+1 is out of order > if line+2 is the sa

Re: Weekend challenge

2013-07-02 Thread J. Landman Gay
On 7/2/13 3:42 AM, Geoff Canyon wrote: I'd be very curious to know what the rails code looked like. They basically ended up with something very similar to what I did, but I don't have their code. They said it was like this: look at a line and store the ID in a variable look at that line + 1

Re: Weekend challenge

2013-07-02 Thread Geoff Canyon
I'd be very curious to know what the rails code looked like. I've said many times, and I hope the new language features enable this soon, that there are *many* extensions to the LC language that would be equal parts intuitive and useful. The unique requirement on the type might be (assuming th

Re: Weekend challenge

2013-07-01 Thread Mark Wieder
...can't live with 'em, can't shoot 'em... -- Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.r

Re: Weekend challenge

2013-07-01 Thread Mark Wieder
J. Landman Gay writes: > Fortunately the client said never mind, ...clients... -- Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your su

Re: Weekend challenge

2013-07-01 Thread J. Landman Gay
On 7/1/13 12:53 AM, Geoff Canyon wrote: Okay, this is a beast, and in no way good or generalized. It doesn't use the previous function, instead just going through line by line and flagging all the issues it sees in one pass. Thanks Geoff, I'll definitely look it over. I actually won't have to

Re: Weekend challenge

2013-06-30 Thread Geoff Canyon
Okay, this is a beast, and in no way good or generalized. It doesn't use the previous function, instead just going through line by line and flagging all the issues it sees in one pass. It should: 1. Flag any new ID that doesn't have just two items on the line. 2. Following that line, flag if the n

Re: Weekend challenge

2013-06-30 Thread J. Landman Gay
Cool. Note that in the sample data, the first two lines of the EF block are missing entirely, the ones that should have the empty values. Not sure how to call your function for that but I'm hoping you do. :) On 6/30/13 8:33 PM, Geoff Canyon wrote: This is just one piece, but here's a function

Re: Weekend challenge

2013-06-30 Thread J. Landman Gay
On 6/30/13 8:42 PM, Geoff Canyon wrote: In the email, item 2 is: 2. While every Type must be unique, a Type can be the same as the Subsection it's in. This is the only non-unique exception. In the file it says, 2. While every Type must be unique, a Type can be the same as a Subsection within

Re: Weekend challenge

2013-06-30 Thread Geoff Canyon
In the email, item 2 is: 2. While every Type must be unique, a Type can be the same as the Subsection it's in. This is the only non-unique exception. In the file it says, 2. While every Type must be unique, a Type can be the same as a Subsection within the same Section. This is the only non-uni

Re: Weekend challenge

2013-06-30 Thread Geoff Canyon
This is just one piece, but here's a function that takes a list much like yours and a list of columns, and returns the instances where a column repeats itself out of order. So this (note the true being passed to ignore empty values): replace tab with comma in yourData put isSequential(yourDa

Re: Weekend challenge

2013-06-30 Thread J. Landman Gay
On 6/30/13 7:04 PM, Michael Kann wrote: J, I tried to reply but the moderator says too many characters. Anyway, here's my question: According to rule 5 everything is grouped. Does that mean everything is also alphabetized. Nope, nothing is alphabetized, not even the ID blocks (my fake data set

Re: Weekend challenge

2013-06-30 Thread Michael Kann
J, I tried to reply but the moderator says too many characters. Anyway, here's my question: According to rule 5 everything is grouped. Does that mean everything is also alphabetized. Mike ___ use-livecode mailing list use-livecode@lists.runrev.com Pl

Weekend challenge

2013-06-30 Thread J. Landman Gay
I've got a challenge for anyone up for it. Below are the rules and some formatted example data. It's supposed to be tab-delimited but if email borks it, you can grab a zip file here: DATA FORMAT: Each tab-delimited line has