Re: lingo-l joining lists in lingo
Hello Tim, You can do it by appending list two to list one, by using a loop and getAt(), getPropAt(), addProp() and addAt() methods. repeat with i = 1 to list2.count() addProp(list1, getAt(list2, i) end repeat i'm not exatcly sure of the syntax, however, it clearly should give you an idea. Ciao, Ozkan -Orjinal mesaj- From: Tim Welford [EMAIL PROTECTED] Date: Mon, 11 Apr 2005 14:28:10 +0300 To: lingo-l@penworks.com Subject: lingo-l joining lists in lingo Greetings List... I'm sure this is a daft question, but it escapes me. Is there away of joining 2 lists together other than looping through the second list and using .add to add it to the first list. i.e. list1 = [1,2,3,4] list2 = [5,6,7,8] list1 + list2 = [1,2,3,4,5,6,7,8] rather than a result of [6,8,10,12] or [1,2,3,4,[5,6,7,8]] This is just an example, I actually need to do it with a list of property lists, whilst the list is quite complicated, the format of the 2 lists being joined will always be exactly the same, although the number of elements may change. Thanks Tim [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
RE: lingo-l joining lists in lingo
Hi, Thanks, that's similar to the method I am using at the moment. I was hoping for some undocumented way of doing a simple join to get rid of the repeat loop and hence improve the efficiency of the code. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ozkan ALTUNER Sent: 11 April 2005 13:15 To: Lingo programming discussion list Subject: Re: lingo-l joining lists in lingo Hello Tim, You can do it by appending list two to list one, by using a loop and getAt(), getPropAt(), addProp() and addAt() methods. repeat with i = 1 to list2.count() addProp(list1, getAt(list2, i) end repeat i'm not exatcly sure of the syntax, however, it clearly should give you an idea. Ciao, Ozkan -Orjinal mesaj- From: Tim Welford [EMAIL PROTECTED] Date: Mon, 11 Apr 2005 14:28:10 +0300 To: lingo-l@penworks.com Subject: lingo-l joining lists in lingo Greetings List... I'm sure this is a daft question, but it escapes me. Is there away of joining 2 lists together other than looping through the second list and using .add to add it to the first list. i.e. list1 = [1,2,3,4] list2 = [5,6,7,8] list1 + list2 = [1,2,3,4,5,6,7,8] rather than a result of [6,8,10,12] or [1,2,3,4,[5,6,7,8]] This is just an example, I actually need to do it with a list of property lists, whilst the list is quite complicated, the format of the 2 lists being joined will always be exactly the same, although the number of elements may change. Thanks Tim [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
RE: lingo-l joining lists in lingo
Hi, there was quite an extensive discussion of this on Direct-L a couple of weeks ago - go to http://listserv.uark.edu/scripts/wa.exe?S1=direct-l and search for subject How does one concatenate 2 lists together? HTH cheers, Martin Pallett At 13:48 11/04/2005 +0100, you wrote: Hi, Thanks, that's similar to the method I am using at the moment. I was hoping for some undocumented way of doing a simple join to get rid of the repeat loop and hence improve the efficiency of the code. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ozkan ALTUNER Sent: 11 April 2005 13:15 To: Lingo programming discussion list Subject: Re: lingo-l joining lists in lingo Hello Tim, You can do it by appending list two to list one, by using a loop and getAt(), getPropAt(), addProp() and addAt() methods. repeat with i = 1 to list2.count() addProp(list1, getAt(list2, i) end repeat i'm not exatcly sure of the syntax, however, it clearly should give you an idea. Ciao, Ozkan Spike Rowe House Emson Close Saffron Walden UK CB10 1HL +44 (0) 1799 529 100 [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
Re: lingo-l joining lists in lingo
Hi Tim, it won't help you in this situation, but in DMX2004 for javascript there is the concat() function for arrays: var a = Array(1,2,3); var b = Array(4,5,6); trace(a.concat(b)); // 1,2,3,4,5,6 Valentin Tim Welford wrote: Hi, Thanks, that's similar to the method I am using at the moment. I was hoping for some undocumented way of doing a simple join to get rid of the repeat loop and hence improve the efficiency of the code. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ozkan ALTUNER Sent: 11 April 2005 13:15 To: Lingo programming discussion list Subject: Re: lingo-l joining lists in lingo Hello Tim, You can do it by appending list two to list one, by using a loop and getAt(), getPropAt(), addProp() and addAt() methods. repeat with i = 1 to list2.count() addProp(list1, getAt(list2, i) end repeat i'm not exatcly sure of the syntax, however, it clearly should give you an idea. Ciao, Ozkan -Orjinal mesaj- From: Tim Welford [EMAIL PROTECTED] Date: Mon, 11 Apr 2005 14:28:10 +0300 To: lingo-l@penworks.com Subject: lingo-l joining lists in lingo Greetings List... I'm sure this is a daft question, but it escapes me. Is there away of joining 2 lists together other than looping through the second list and using .add to add it to the first list. i.e. list1 = [1,2,3,4] list2 = [5,6,7,8] list1 + list2 = [1,2,3,4,5,6,7,8] rather than a result of [6,8,10,12] or [1,2,3,4,[5,6,7,8]] This is just an example, I actually need to do it with a list of property lists, whilst the list is quite complicated, the format of the 2 lists being joined will always be exactly the same, although the number of elements may change. Thanks Tim [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
RE: lingo-l joining lists in lingo
Hi Tim, maybe this could fit list1 = [1,2,3,4] list2 = [5,6,7,8] --- s1 = string(list1) s2 = string(list2) --- res1 = s1.char[1..s1.length - 1] res2 = s2.char[2..s2.length] --- put value(res1 , res2) -- [1, 2, 3, 4, 5, 6, 7, 8] Dam On Apr 11, 2005 3:16 PM, Valentin Schmidt [EMAIL PROTECTED] wrote: Hi Tim, it won't help you in this situation, but in DMX2004 for javascript there is the concat() function for arrays: var a = Array(1,2,3); var b = Array(4,5,6); trace(a.concat(b)); // 1,2,3,4,5,6 Valentin Tim Welford wrote: Hi, Thanks, that's similar to the method I am using at the moment. I was hoping for some undocumented way of doing a simple join to get rid of the repeat loop and hence improve the efficiency of the code. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ozkan ALTUNER Sent: 11 April 2005 13:15 To: Lingo programming discussion list Subject: Re: lingo-l joining lists in lingo Hello Tim, You can do it by appending list two to list one, by using a loop and getAt(), getPropAt(), addProp() and addAt() methods. repeat with i = 1 to list2.count() addProp(list1, getAt(list2, i) end repeat i'm not exatcly sure of the syntax, however, it clearly should give you an idea. Ciao, Ozkan -Orjinal mesaj- From: Tim Welford [EMAIL PROTECTED] Date: Mon, 11 Apr 2005 14:28:10 +0300 To: lingo-l@penworks.com Subject: lingo-l joining lists in lingo Greetings List... I'm sure this is a daft question, but it escapes me. Is there away of joining 2 lists together other than looping through the second list and using .add to add it to the first list. i.e. list1 = [1,2,3,4] list2 = [5,6,7,8] list1 + list2 = [1,2,3,4,5,6,7,8] rather than a result of [6,8,10,12] or [1,2,3,4,[5,6,7,8]] This is just an example, I actually need to do it with a list of property lists, whilst the list is quite complicated, the format of the 2 lists being joined will always be exactly the same, although the number of elements may change. Thanks Tim [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
Re: lingo-l file in RAM
?php @extract($_POST); One thing to be aware of is that there are security implications to using extract(); if you use it (like here) to grab post and get variables, you've essentially returned to a register_globals = TRUE regime. A malicious user could inject suspect data into your global space, or overwrite legitimate globals with new data. At the very least, use the EXTR_SKIP parameter to avoid the overwrite issue. In the case of your script here, it's probably not a big deal, but in general, I'd avoid using extract() on untrusted data. One other thing -- spammers are on the lookout for unauthenticated mailscripts like this, so you might want to throw an extra magic parameter to provide a deterrent to casual reuse. Something like this is better then nothing: if (!($unlock_key == mySecretValue)){ exit; } Hope this is useful... [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
Re: lingo-l joining lists in lingo
On Apr 11, 2005, at 8:54 AM, Buzz Kettles wrote: While the below looks good, doing the 2 list-to-string conversions make that approach much slower than repeat-and-append. hth -Buzz Also it would fail with large lists. String to list fails if the list has more than 32768 entries. rj [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
Re: lingo-l SES 10 questions
Am 11.04.2005 um 21:36 schrieb Thomas Higgins: Is there a new DOM replacement for 'the systemDate'? Yes, in the form of _system.date(), but it does not offer 1-for-1 functionality. The older 'the systemDate' returned a date object whose properties you could query (year, month, day) whereas the newer _system.date() returns a string that you must parse once you've sorted out the expected format of the string. Ugh. The decision was made back in my QA days oh so long ago (I'm joking, it was just over a year ago actually) and I for one disagreed with it. So there is no direct identical replacement in the new DOM world. don't want to be a fault-finder, but isn't it that _system.date is rather the old the date, which always returned a localized string, which you had to do ugly string trickery before the systemdate was introduced in D8 (?), when the date object was introduced as whole new data type ? the systemdate actually is NOT undocumented AFAIK, it even made its way into the manual. the only thing, which is undocumented since the beginning (dunno why though and can't figure it either) is the VERY useful seconds property of the date object. so I think the systemdate rather shares the fate of floatprecision in that it was forgotten to put into the _system object. but isn't it a good idea to leave some work for upcoming releases after all ? I mean making a perfect product could mean unemployment for the talented engeneers, isn't it ? --- ||| a¿ex [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
Re: lingo-l SES 10 questions
At 10:17 PM +0200 4/11/05, you wrote: the systemdate actually is NOT undocumented AFAIK, it even made its way into the manual. the only thing, which is undocumented since the beginning (dunno why though and can't figure it either) is the VERY useful seconds property of the date object. Not really 'undocumented' - just not described in the help entry for the systemDate. What's 'left out' is that since the systemDate returns a data object and 2 properties of all date objects are .seconds .minutes that therefore (the systemDate).seconds (the systemDate).minutes are included within that returned object. note - these props have been viewable (in action) in the list view of a castLib. ... member().modifiedDate() sure, the docs for the systemDate could include examples of this ... (to expose this subtlety) hth -Buzz [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
Re: lingo-l joining lists in lingo
At 8:17 PM +0200 4/11/05, you wrote: ... and it's dangerous if you want to user other value types than numbers. as an example, try put value( string( [1,2,3,QUOTE] )) Valentin I was going to mention this aspect too, but figured the performance difference was enough of a good enough reason. Many people don't find out about list-to-string mutation until they write some big list out then it doesn't come back as they expected - then they watch the process closely see what is really going on. -Buzz Buzz Kettles wrote: While the below looks good, doing the 2 list-to-string conversions make that approach much slower than repeat-and-append. hth -Buzz At 4:09 PM +0200 4/11/05, you wrote: Hi Tim, maybe this could fit list1 = [1,2,3,4] list2 = [5,6,7,8] --- s1 = string(list1) s2 = string(list2) --- res1 = s1.char[1..s1.length - 1] res2 = s2.char[2..s2.length] --- put value(res1 , res2) -- [1, 2, 3, 4, 5, 6, 7, 8] Dam On Apr 11, 2005 3:16 PM, Valentin Schmidt [EMAIL PROTECTED] wrote: Hi Tim, it won't help you in this situation, but in DMX2004 for javascript there is the concat() function for arrays: var a = Array(1,2,3); var b = Array(4,5,6); trace(a.concat(b)); // 1,2,3,4,5,6 Valentin Tim Welford wrote: Hi, Thanks, that's similar to the method I am using at the moment. I was hoping for some undocumented way of doing a simple join to get rid of the repeat loop and hence improve the efficiency of the code. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ozkan ALTUNER Sent: 11 April 2005 13:15 To: Lingo programming discussion list Subject: Re: lingo-l joining lists in lingo Hello Tim, You can do it by appending list two to list one, by using a loop and getAt(), getPropAt(), addProp() and addAt() methods. repeat with i = 1 to list2.count() addProp(list1, getAt(list2, i) end repeat i'm not exatcly sure of the syntax, however, it clearly should give you an idea. Ciao, Ozkan -Orjinal mesaj- From: Tim Welford [EMAIL PROTECTED] Date: Mon, 11 Apr 2005 14:28:10 +0300 To: lingo-l@penworks.com Subject: lingo-l joining lists in lingo Greetings List... I'm sure this is a daft question, but it escapes me. Is there away of joining 2 lists together other than looping through the second list and using .add to add it to the first list. i.e. list1 = [1,2,3,4] list2 = [5,6,7,8] list1 + list2 = [1,2,3,4,5,6,7,8] rather than a result of [6,8,10,12] or [1,2,3,4,[5,6,7,8]] This is just an example, I actually need to do it with a list of property lists, whilst the list is quite complicated, the format of the 2 lists being joined will always be exactly the same, although the number of elements may change. Thanks Tim [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with
Re: lingo-l joining lists in lingo
Am 11.04.2005 um 23:42 schrieb Buzz Kettles: I was going to mention this aspect too, but figured the performance difference was enough of a good enough reason. after all I don't quite understand, what is so bad about the little repeat loop. I for one like repeat loops... ;-) if only I could collapse them in the script editor at last... :-) --- ||| a¿ex [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
Re: lingo-l SES 10 questions
Hi Buzz, the systemDate returns a data object and 2 properties of all date objects are .seconds .minutes Unfortunately, (the systemDate).minutes throws an error for me. Has this ever worked, or were you mis-remembering? It would be redundant anyway, as minutes can be calculated from seconds. -Sean. [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
Re: lingo-l joining lists in lingo
At 12:11 AM +0200 4/12/05, you wrote: Am 11.04.2005 um 23:42 schrieb Buzz Kettles: I was going to mention this aspect too, but figured the performance difference was enough of a good enough reason. after all I don't quite understand, what is so bad about the little repeat loop. I for one like repeat loops... ;-) if only I could collapse them in the script editor at last... :-) Hahaha - I am also a big fan of repeat loops :) I couldn't code w/o them :) but it sure would be nice if there was an appendElements function for lists proplists. listA = [2,4,6] listB = [1,3,5] listA.appendElements(listB) put listA -- [2,4,6,1,3,5] I guess it's not a built-in Lingo function because it seems like an easy user-defined function. on appendElements, listA, listB c = listB.count repeat with i = 1 to c listA.append(listB[i]) end repeat return listA end hth -Buzz --- ||| a¿ex [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
Re: lingo-l SES 10 questions
At 12:11 AM +0200 4/12/05, you wrote: Am 11.04.2005 um 23:36 schrieb Buzz Kettles: What's 'left out' is that since the systemDate returns a data object and 2 properties of all date objects are .seconds .minutes that therefore (the systemDate).seconds (the systemDate).minutes are included within that returned object. minutes ?? never heard of that. is that win only ? sorry - I mis-remembered There's only seconds one must use division to get minutes and hours out of that --- ||| a¿ex [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
lingo-l OT: Printing from Powerpoint .PPS
Hello List, I know this is off topic. But is there a chance where I can print from a PowerPoint Presentation slideshow?. extension .PPS?? thanks. [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]