1 of each
replace "*" with "" in h
put h into fld 2 -- output
end mouseUp
--- On Fri, 7/2/10, Dick Kriesel wrote:
> From: Dick Kriesel
> Subject: Re: Intelligent sorting: A bit of a poser NEW WINNER
> To: "use-rev"
> Date: Friday, July 2, 2010, 9:25 PM
eat
>
> repeat for each line k in v
> replace "*" with "" in item 2 to -1 of k
> put k & cr after h
> end repeat
> delete last char of h
>
> sort h numeric by item 2 of each
> sort h by item 1 of each
> replace "*" with "&quo
ar of h
sort h numeric by item 2 of each
sort h by item 1 of each
replace "*" with "" in h
put h into fld 2 -- output
end mouseUp
-
--- On Fri, 7/2/10, FlexibleLearning wrote:
> From: FlexibleLearning
> Subject: Re: Intelligen
t h numeric by item 2 of each
> sort h by item 1 of each
> replace "*" with "" in h
>
> put h into fld 2 -- output
> end mouseUp
>
> -
>
> --- On Fri, 7/2/10, FlexibleLearning wrote:
>
>> From: FlexibleLearning
>> Subj
BTW this is going straight into my Shamelessly Exploit folder.
Bob
On Jul 1, 2010, at 11:19 PM, FlexibleLearning wrote:
> I made an inexcusable error when applying the solutions in the benchtests.
> When adjusting Mike's solution to handle commas in the list I omitted to
> adjust the itemDel. T
That's beautiful stuff! See? Humanity CAN work together for the common good!
Bob
On Jul 1, 2010, at 11:19 PM, FlexibleLearning wrote:
> I made an inexcusable error when applying the solutions in the benchtests.
> When adjusting Mike's solution to handle commas in the list I omitted to
> adjust
h numeric by item 2 of each
sort h by item 1 of each
replace "*" with "" in h
put h into fld 2 -- output
end mouseUp
-
--- On Fri, 7/2/10, FlexibleLearning wrote:
> From: FlexibleLearning
> Subject: Re: Intelligent sorting: A bit
Thanks for keeping us up to date, Hugh.
Of course, another solution might be to write a polite letter to whoever is
giving you this data suggesting they collect it differently in the first place.
:-)
Cheers
Dave___
use-revolution mailing list
use-revo
I made an inexcusable error when applying the solutions in the benchtests.
When adjusting Mike's solution to handle commas in the list I omitted to
adjust the itemDel. The corrected solution is below.
As a result, Mike's solution is not only very fast, but also sub-sorts the
alpha component and ha
Bob-
Thursday, July 1, 2010, 10:43:48 AM, you wrote:
> My strategy is to sit back and watch the competition heat up,
> then explode, and then pick up the best pieces, save them to a
> keepers folder, and later shamelessly use them in my projects. It
> works really well for me.
That's funny... t
> My strategy is to sit back and watch the competition heat up, then explode,
> and then pick up the
> best pieces, save them to a keepers folder, and later shamelessly use them in
> my projects. It
> works really well for me.
Heh... you work too hard at it Bob. ;-)
I read pretty much *everythin
For strictly numeric, remove this line.
sort lines of tTemp ascending by item 1 of each
For some reason I got it in my head that you wanted the alphas
grouped, then each alpha group by numeric.
As pointed out, my solution didn't allow for commas in the list, and
also didn't allow for names with
Oh boy! Just shows what a great list this is, and how a challenge sparks
invention! Thanks to ALL who contributed and participated from which golden
nuggets can be gleaned by everyone.
The following 4 solutions were benchtested against a list of 10,000 lines
using a fixed string suffixed with a ra
My strategy is to sit back and watch the competition heat up, then explode, and
then pick up the best pieces, save them to a keepers folder, and later
shamelessly use them in my projects. It works really well for me.
Bob
On Jul 1, 2010, at 10:02 AM, dunb...@aol.com wrote:
> My mistakes all c
My mistakes all come from rushing to get the first response in. You would
not believe the competition.
I also just screw up a lot. Oh, and don't test.
Craig Newman
In a message dated 7/1/10 12:59:32 PM, dave.cr...@lacscentre.co.uk writes:
> I think that may be a better idea. I just discovered
Bob.
Old HC trick. You can have any number of sortkeys, and they operate in
order. Stable sorts, of course.
The real gist of this thread for H, if that is his real name, is that the
data has to be parsed. The multiple sorts, regex solutions, etc. are just
tools.
Craig
In a message dated 7/1/
On 1 Jul 2010, at 17:30, dunb...@aol.com wrote:
> In the handlers submitted earlier one could use an obscure delimiter, like
> ASCII 241 or whatever, instead of comma, and set the itemDel.
I think that may be a better idea. I just discovered some mistakes (deliberate
of course :-)) in my contr
Whoa! You can do that?? Okay, how about concatenating sort criteria, like char
1 and char 3? Just curious I don't need to do that.
Bob
On Jul 1, 2010, at 5:36 AM, Klaus on-rev wrote:
> Hi Hugh,
>
>> I have a list of words, each ending in a number...
>>
>> img1
>> img10
>> img11
>> img2
>> i
In the handlers submitted earlier one could use an obscure delimiter, like
ASCII 241 or whatever, instead of comma, and set the itemDel.
In a message dated 7/1/10 11:46:06 AM, dave.cr...@lacscentre.co.uk writes:
> It should handle cases where there are commas in the original text. I
> don't k
arning wrote:
> From: FlexibleLearning
> Subject: Re: Intelligent sorting: A bit of a poser
> To: use-revolution@lists.runrev.com
> Date: Thursday, July 1, 2010, 6:46 AM
> Klaus, Colin...
>
> I should have been more clear! Looking for a generic
> solution to sorting
> arbitr
Coming late to this.
It should handle cases where there are commas in the original text. I don't
know how it scales with large data sets.
function specialSort tData
put "(^.*?)([0-9]*$)" into tRE
put "" into tData2
repeat for each line tLine in tData
get matchText(tLine, tRE,
On Jul 1, 2010, at 10:42 AM, dunb...@aol.com wrote:
> Almost identical except you
> like the early part of the alphabet, and I like the latter.
I do more 3D work than you, so would want to use UV for texture coordinates,
and XYZ for 3D locations. Interestingly, I use a and b, etc for 'Talk-li
Another method used to split at the numeric.
on mouseUp
put specialsorter(field "srcF")
end mouseUp
function specialSorter pVar
repeat for each line theLIne in PVar
get matchchunk(theLine,"([a-zA-Z\s]\d)" , theChar,theEnd )
put comma after char theChar of theLine
put theLi
Colin, I actually just read your correction of my earlier script. I swear I
did not do so before I sent my latest one in. Almost identical except you
like the early part of the alphabet, and I like the latter.
Craig
___
use-revolution mailing list
use-
This is what comes of these races to publish, especially against Colin.
Frantic copying and pasting. Horrible mistakes. It has to stop!
Anyway...
function separateNumbers var
repeat with y = 1 to the number of lines of var
repeat with u = 1 to the number of chars of line y of var
Probably could streamline this, but:
function separateNumbers var
repeat with y = 1 to the number of lines of var
repeat with u = 1 to the number of chars of line y of var
if char u of line y of var is in "0123456789" then
put comma before char u of line y of
repeat
return x
end f_sort_word
on mouseUp
sort fld 1 numeric by f_sort_num(each)
sort fld 1 by f_sort_word(each)
end mouseUp
--- On Thu, 7/1/10, Colin Holgate wrote:
> From: Colin Holgate
> Subject: Re: Intelligent sorting: A bit of a poser
> To: "How to use Revolution"
> Dat
On Jul 1, 2010, at 10:16 AM, dunb...@aol.com wrote:
> Hold everything. Doesn't work.
I noticed. This does though:
on mouseUp
put separateNumbers(fld yourField) into temp
sort temp numeric by item 2 of each & item 1 of each
sort temp by item 1 of each
replace comma with
Hold everything. Doesn't work.
Yet.
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
> Try this:
>
on mouseUp
put separateNumbers(fld yourField) into temp
sort temp numeric by item 2 of each & item 1 of each
sort temp by item 1 of each
replace comma with empty in temp
put temp into fld yourField
end mouseUp
function separateNumbers var
repeat for each ch
Klaus, Colin...
I should have been more clear! Looking for a generic solution to sorting
arbitrary alphanumeric strings that have suffix numbers.
For example...
pic 10
pic 2
image1
pic 1
image10
image2
How do I sort them like this?
image1
image2
image10
pic 1
pic 2
pic 10
/H
1 numeric by f(each)
end mouseUp
--- On Thu, 7/1/10, FlexibleLearning wrote:
> From: FlexibleLearning
> Subject: Intelligent sorting: A bit of a poser
> To: use-revolution@lists.runrev.com
> Date: Thursday, Jul
Darn, Klaus beat me by moments:
on mouseup
put "img1" & return & "img10" & return & "img5" & return & "img6" & return &
"img60"into imagelist
sort imagelist numeric by char 4 to -1 of each
put imagelist
end mouseup
___
use-revolution mailing
Hi Hugh,
> I have a list of words, each ending in a number...
>
> img1
> img10
> img11
> img2
> img201
> img3
> img4
>
> How do I sort them so they are in the visually correct numerical order, like
> this? ...
>
> img1
> img2
> img3
> img4
> img10
> img11
> img201
>
> /H
This works for me:
..
I have a list of words, each ending in a number...
img1
img10
img11
img2
img201
img3
img4
How do I sort them so they are in the visually correct numerical order, like
this? ...
img1
img2
img3
img4
img10
img11
img201
/H
___
use-revolution mailing list
35 matches
Mail list logo