Sorting cards

2021-12-29 Thread J. Landman Gay via use-livecode
I am converting an old stack to LC and it needs to sort cards by one of two fields. LC does 
stable sorts, so if I sort by field 1 it works, and then if I sort later by field 2 it retains 
the original sort and does a sub-sort. I don't want that. What's the best way to ignore the 
previous sort order?


I've tried a number of things with no luck.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Only kinda OT

2021-12-29 Thread Mark Smith via use-livecode
Oh Jacque, it may have been short but then there was the tantalizing link to 
Ray Dalio’s Last Warning: “Most People have no idea what’s coming”. And then 
the one about the “Most Powerful Computers you never heard of”. Oh, and the MIT 
study that predicted that Society will collapse in 2040 (this was very evidence 
based and used real simulation models… cool!!) And who could resist an Elon 
Musk vid on how he has "FINALLY Revealed the Artificial Gravity Starship". 
C'mmon, I know you wanna go watch it 😊

So while yours may have been short, the round trip down the rabbit hole 
probably was at least an hour — but I am more now edumacated, and wiser 😄

Now, what was that original link about again? 😂 

> On Dec 29, 2021, at 5:27 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> It's short:
> 
> 
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Is there a better way to check if images are the same? I now use imagedata

2021-12-29 Thread J. Landman Gay via use-livecode
If the intent is to copy the example exactly then I'd think the imageData 
would be the same. But I'd use location data as others have suggested. Get 
the end points of the line graphic and loop through a list of correct 
points to compare against.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On December 29, 2021 11:15:50 AM William de Smet via use-livecode 
 wrote:



Thanks for the replies.
I just put it on the forum as well and attached an image with it to get a
better idea of what I want to do.
https://forums.livecode.com/viewtopic.php?f=8&t=36585

greetings,,

William




Op wo 29 dec. 2021 om 17:51 schreef William Prothero via use-livecode <
use-livecode@lists.runrev.com>:


William,
My basic suggestion is that you use the location data of each connected
dot, rather than the image data.
Good luck,
Bill P

Sent from my iPad

> On Dec 29, 2021, at 8:42 AM, William Prothero via use-livecode <
use-livecode@lists.runrev.com> wrote:
>
> William,
> I understand that you want to see if the dots that are connected in one
path are also connected in another path which may have them connected in a
different order. Seems you could just loop through each dot in the
reference path, then see if the same dots are included in the user’s path.
You would need to include a name for each reference point, of course.
That’s if I understand your problem correctly.
>
> Bill
>
>
> Sent from my iPad
>
>> On Dec 29, 2021, at 1:58 AM, William de Smet via use-livecode <
use-livecode@lists.runrev.com> wrote:
>>
>> Hi there,
>>
>> Is there a better way to check if images are the same?
>> I now use imagadata.
>>
>> In my app I have an example drawn image (5x5 matrix with dots, a
Geoboard).
>> These dots are important because by touching them their Loc is used
>> (gStartLoc and gStartLoc)
>> Two dots will be connected by setting the points of the last grc to
>> gStartLoc & return & gStartLoc.
>> No problem here.
>>
>> The idea is that the user copies my example on their matrix/geoboard by
>> connecting the dots.
>> To check if the made images (geoboards) are the same I make a snapshot
of
>> both and compare the imagadata of these images.
>> Everything is fine as long as the user connects the same dots as the way
>> (length between dots) it is done in the example.
>> Then the imagadat is the same.
>>
>> The geoboards can look the same but the connected dots can be different
in
>> length so use imagadata to compare these is not the way to get it right.
>>
>> Any ideas for a better way?
>>
>>
>>
>> greetings,
>>
>> William
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Only kinda OT

2021-12-29 Thread J. Landman Gay via use-livecode

It's short:


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Is there a better way to check if images are the same? I now use imagedata

2021-12-29 Thread William de Smet via use-livecode
Thanks for the replies.
I just put it on the forum as well and attached an image with it to get a
better idea of what I want to do.
https://forums.livecode.com/viewtopic.php?f=8&t=36585

greetings,,

William




Op wo 29 dec. 2021 om 17:51 schreef William Prothero via use-livecode <
use-livecode@lists.runrev.com>:

> William,
> My basic suggestion is that you use the location data of each connected
> dot, rather than the image data.
> Good luck,
> Bill P
>
> Sent from my iPad
>
> > On Dec 29, 2021, at 8:42 AM, William Prothero via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > William,
> > I understand that you want to see if the dots that are connected in one
> path are also connected in another path which may have them connected in a
> different order. Seems you could just loop through each dot in the
> reference path, then see if the same dots are included in the user’s path.
> You would need to include a name for each reference point, of course.
> That’s if I understand your problem correctly.
> >
> > Bill
> >
> >
> > Sent from my iPad
> >
> >> On Dec 29, 2021, at 1:58 AM, William de Smet via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >>
> >> Hi there,
> >>
> >> Is there a better way to check if images are the same?
> >> I now use imagadata.
> >>
> >> In my app I have an example drawn image (5x5 matrix with dots, a
> Geoboard).
> >> These dots are important because by touching them their Loc is used
> >> (gStartLoc and gStartLoc)
> >> Two dots will be connected by setting the points of the last grc to
> >> gStartLoc & return & gStartLoc.
> >> No problem here.
> >>
> >> The idea is that the user copies my example on their matrix/geoboard by
> >> connecting the dots.
> >> To check if the made images (geoboards) are the same I make a snapshot
> of
> >> both and compare the imagadata of these images.
> >> Everything is fine as long as the user connects the same dots as the way
> >> (length between dots) it is done in the example.
> >> Then the imagadat is the same.
> >>
> >> The geoboards can look the same but the connected dots can be different
> in
> >> length so use imagadata to compare these is not the way to get it right.
> >>
> >> Any ideas for a better way?
> >>
> >>
> >>
> >> greetings,
> >>
> >> William
> >> ___
> >> use-livecode mailing list
> >> use-livecode@lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Infection Simulation

2021-12-29 Thread Roger Guay via use-livecode
Thanks for the many great ideas, Alex. They will keep me busy for a while.

Roger

> On Dec 29, 2021, at 6:23 AM, Alex Tweedly via use-livecode 
>  wrote:
> 
> That's really cool - thanks.
> 
> Improvements ?   How much time do you have :-)
> 
> 1. Visual display of contagion zone while running.
> 
> 2. Recovery. After being infected for some length of time, an individual 
> stops being infectious; either it dies, and becomes a static black dot, or 
> recovers and becomes a white dot again. Probably different times for each of 
> those to happen.  And obviously a control for the likelihood of recovery vs 
> death.
> 
> 3.  Probabilistic infection. Rather than always infect another which comes 
> within reach, make that a probability of infection.
> 
> 4. Viral load. Make the probability as above follow a bell curve over time, 
> as the individual becomes more infected, then recovers.
> 
> 5. Simulate superspreader events. Maybe introduce short-term "gravity" that 
> attracts individuals within a range together - and hence if one is already 
> infected they infects lots of others.
> 
> And I could go on almost forever :-)
> Thinking of features is orders of magnitude easier and quicker than 
> implementing them :-)
> 
> Thanks again,
> 
> Alex.
> 
> 
> On 29/12/2021 03:37, Roger Guay via use-livecode wrote:
>> I just uploaded a stack called “Infection" to Sample Stacks which might be a 
>> little fun (in a scary way) for some of you. It’s a Monte Carlo simulation 
>> wherein a number of individuals randomly moving about in an enclosed space, 
>> are infected by a single randomly infected individual. I welcome any 
>> feedback that might lead to more accuracy in or improvement to this model.
>> 
>> Cheers,
>> Roger
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Is there a better way to check if images are the same? I now use imagedata

2021-12-29 Thread William Prothero via use-livecode
William,
My basic suggestion is that you use the location data of each connected dot, 
rather than the image data.
Good luck,
Bill P

Sent from my iPad

> On Dec 29, 2021, at 8:42 AM, William Prothero via use-livecode 
>  wrote:
> 
> William,
> I understand that you want to see if the dots that are connected in one path 
> are also connected in another path which may have them connected in a 
> different order. Seems you could just loop through each dot in the reference 
> path, then see if the same dots are included in the user’s path. You would 
> need to include a name for each reference point, of course. That’s if I 
> understand your problem correctly.
> 
> Bill
> 
> 
> Sent from my iPad
> 
>> On Dec 29, 2021, at 1:58 AM, William de Smet via use-livecode 
>>  wrote:
>> 
>> Hi there,
>> 
>> Is there a better way to check if images are the same?
>> I now use imagadata.
>> 
>> In my app I have an example drawn image (5x5 matrix with dots, a Geoboard).
>> These dots are important because by touching them their Loc is used
>> (gStartLoc and gStartLoc)
>> Two dots will be connected by setting the points of the last grc to
>> gStartLoc & return & gStartLoc.
>> No problem here.
>> 
>> The idea is that the user copies my example on their matrix/geoboard by
>> connecting the dots.
>> To check if the made images (geoboards) are the same I make a snapshot of
>> both and compare the imagadata of these images.
>> Everything is fine as long as the user connects the same dots as the way
>> (length between dots) it is done in the example.
>> Then the imagadat is the same.
>> 
>> The geoboards can look the same but the connected dots can be different in
>> length so use imagadata to compare these is not the way to get it right.
>> 
>> Any ideas for a better way?
>> 
>> 
>> 
>> greetings,
>> 
>> William
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Is there a better way to check if images are the same? I now use imagedata

2021-12-29 Thread William Prothero via use-livecode
William,
I understand that you want to see if the dots that are connected in one path 
are also connected in another path which may have them connected in a different 
order. Seems you could just loop through each dot in the reference path, then 
see if the same dots are included in the user’s path. You would need to include 
a name for each reference point, of course. That’s if I understand your problem 
correctly.

Bill


Sent from my iPad

> On Dec 29, 2021, at 1:58 AM, William de Smet via use-livecode 
>  wrote:
> 
> Hi there,
> 
> Is there a better way to check if images are the same?
> I now use imagadata.
> 
> In my app I have an example drawn image (5x5 matrix with dots, a Geoboard).
> These dots are important because by touching them their Loc is used
> (gStartLoc and gStartLoc)
> Two dots will be connected by setting the points of the last grc to
> gStartLoc & return & gStartLoc.
> No problem here.
> 
> The idea is that the user copies my example on their matrix/geoboard by
> connecting the dots.
> To check if the made images (geoboards) are the same I make a snapshot of
> both and compare the imagadata of these images.
> Everything is fine as long as the user connects the same dots as the way
> (length between dots) it is done in the example.
> Then the imagadat is the same.
> 
> The geoboards can look the same but the connected dots can be different in
> length so use imagadata to compare these is not the way to get it right.
> 
> Any ideas for a better way?
> 
> 
> 
> greetings,
> 
> William
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Is there a better way to check if images are the same? I now use imagedata

2021-12-29 Thread Rick Harrison via use-livecode
Hi William,

If you could provide a link to a photo example of 
what you are doing that would help us to understand
the problem better.

There may be a way to simplify your process so you
don’t have to check every pixel.

Rick

> On Dec 29, 2021, at 4:57 AM, William de Smet via use-livecode 
>  wrote:
> 
> Hi there,
> 
> Is there a better way to check if images are the same?
> I now use imagadata.
> 
> In my app I have an example drawn image (5x5 matrix with dots, a Geoboard).
> These dots are important because by touching them their Loc is used
> (gStartLoc and gStartLoc)
> Two dots will be connected by setting the points of the last grc to
> gStartLoc & return & gStartLoc.
> No problem here.
> 
> The idea is that the user copies my example on their matrix/geoboard by
> connecting the dots.
> To check if the made images (geoboards) are the same I make a snapshot of
> both and compare the imagadata of these images.
> Everything is fine as long as the user connects the same dots as the way
> (length between dots) it is done in the example.
> Then the imagadat is the same.
> 
> The geoboards can look the same but the connected dots can be different in
> length so use imagadata to compare these is not the way to get it right.
> 
> Any ideas for a better way?
> 
> 
> 
> greetings,
> 
> William
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Infection Simulation

2021-12-29 Thread Alex Tweedly via use-livecode

That's really cool - thanks.

Improvements ?   How much time do you have :-)

1. Visual display of contagion zone while running.

2. Recovery. After being infected for some length of time, an individual 
stops being infectious; either it dies, and becomes a static black dot, 
or recovers and becomes a white dot again. Probably different times for 
each of those to happen.  And obviously a control for the likelihood of 
recovery vs death.


3.  Probabilistic infection. Rather than always infect another which 
comes within reach, make that a probability of infection.


4. Viral load. Make the probability as above follow a bell curve over 
time, as the individual becomes more infected, then recovers.


5. Simulate superspreader events. Maybe introduce short-term "gravity" 
that attracts individuals within a range together - and hence if one is 
already infected they infects lots of others.


And I could go on almost forever :-)
Thinking of features is orders of magnitude easier and quicker than 
implementing them :-)


Thanks again,

Alex.


On 29/12/2021 03:37, Roger Guay via use-livecode wrote:

I just uploaded a stack called “Infection" to Sample Stacks which might be a 
little fun (in a scary way) for some of you. It’s a Monte Carlo simulation wherein a 
number of individuals randomly moving about in an enclosed space, are infected by a 
single randomly infected individual. I welcome any feedback that might lead to more 
accuracy in or improvement to this model.

Cheers,
Roger
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Infection Simulation

2021-12-29 Thread Mark Smith via use-livecode
Neat simulation Roger. I wonder if you could simulate the effect of a lock down 
where small groups form and individuals rarely move outside their bubble? That 
might show the benefit of lockdowns in helping to reduce the spread of disease. 
Also,  I did not understand what the concept of “diversity” meant in this 
context. 

Mark


> On Dec 29, 2021, at 3:37 AM, Roger Guay via use-livecode 
>  wrote:
> 
> I just uploaded a stack called “Infection" to Sample Stacks which might be a 
> little fun (in a scary way) for some of you. It’s a Monte Carlo simulation 
> wherein a number of individuals randomly moving about in an enclosed space, 
> are infected by a single randomly infected individual. I welcome any feedback 
> that might lead to more accuracy in or improvement to this model.
> 
> Cheers,
> Roger
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: chartsEngine bug with version 10 of LC

2021-12-29 Thread scott--- via use-livecode
> (If they are equal: then the 2nd chars, etc.)


Ah, that was the helpful piece of information I required. I didn’t realize it 
worked through the string one ASCII character at a time (with neither side 
being a “number” anymore.)

(With the exception of upper and lower case characters having different ascii 
but evaluating as equivalent.)

Whew! I knew I had both consumed coffee and taken a nap. I was about ready to 
ask you to use smaller words.  :- )

One of the things that was throwing me (though I’m sure everyone else was 
rolling their eyes) was the

> > “9foo”  >  9
> 
> Because "9" = "9" ... but "f" > “”

because, if I’m understanding this correctly, it is really evaluated as 59 = 59 
 …. 102 <> empty

I like that "-1” < empty  AND 1 > empty  BUT  0 isn’t lesser/greater/equal to 
empty.  I’m not sure why this whole string comparison issue hasn’t come up for 
me before but I’m sure that you will all be thankful that I’m ready to move on 
to my next question... why is it that the socks I put into the wash aren’t 
always equivalent  to the socks that come out of the dryer. A rounding issue?

—
Scott


> On Dec 28, 2021, at 10:23 PM, Curry Kenworthy via use-livecode 
>  wrote:
> 
> 
> Scott:
> 
> > So you are saying that if the first char of the string is a number
> 
> No! There is no number.
> Don't think about numbers. :)
> Both sides are text in your comparison.
> 
> > it uses the ascii value of the first char?
> 
> Always! Because both sides are text.
> Two text strings. No numbers.
> 
> LC compares the FIRST CHAR of each text.
> (If they are equal: then the 2nd chars, etc.)
> 
> > “9foo”  >  9
> 
> Because "9" = "9" ... but "f" > "".
> 
> If you want a numerical comparison,
> both sides must be numbers!
> 
> Once you have two dots, or an "f" etc, it's a string.
> And if either side is text, the comparison is textual.
> 
> Best wishes,
> 
> Curry Kenworthy
> 
> WordLib: Import MS Word and OpenOffice documents in LiveCode!
> http://livecodeaddons.com/wordlib.html
> 
> Christian LiveCode Training and Consulting
> http://livecodeconsulting.com/
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Is there a better way to check if images are the same? I now use imagedata

2021-12-29 Thread William de Smet via use-livecode
Hi there,

Is there a better way to check if images are the same?
I now use imagadata.

In my app I have an example drawn image (5x5 matrix with dots, a Geoboard).
These dots are important because by touching them their Loc is used
(gStartLoc and gStartLoc)
Two dots will be connected by setting the points of the last grc to
gStartLoc & return & gStartLoc.
No problem here.

The idea is that the user copies my example on their matrix/geoboard by
connecting the dots.
To check if the made images (geoboards) are the same I make a snapshot of
both and compare the imagadata of these images.
Everything is fine as long as the user connects the same dots as the way
(length between dots) it is done in the example.
Then the imagadat is the same.

The geoboards can look the same but the connected dots can be different in
length so use imagadata to compare these is not the way to get it right.

Any ideas for a better way?



greetings,

William
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode