Re: OT : Hosting providers
I just noticed, that one of our accounts which is on JASMINe since 2013 (it was moved from pancake at that time), now shows also old DB data from 2014. Not only our shop is no showing outdated products, but also it is not working correctly anymore because the onfiguration is stored in the db also and we are changing passwords regularly. Even our user access db for download is not up to date any more. This shows me 1.they did not delete the old account data on Pancake after our move to jasmine in 2013 and did include that old data in every backup. 2. they do not have a correct overview which accounts are on which system. So if there are others who moved from Pancake to Jasmine some time ago. Check your Databases. Regards, Matthias Am 04.05.2015 um 00:49 schrieb Matthias Rebbe | M-R-D matthias_livecode_150...@m-r-d.de: Am 04.05.2015 um 00:36 schrieb Alex Tweedly a...@tweedly.org: [apologies for starting a new thread, but I haven't received any email for days, so I can't respond within the thread :-( ] Many thanks for the suggestions - I had found hostm.com (by googling Livecode server hosting) and have started an account there - so it was comforting to then find them being recommended. But I do need one more rant some of my sites are down (bad) some have incomplete or old data (very bad) but MUCH WORSE some have their scripts and data in place, but LCServer isn't, so the scripts are being displayed to users rather than being executed. So on some sites (I won't name them :-), you can go along and have a look at all my .lc scripts. I suspect that might mean you can see my MySQL database names and passwords (since they are hard-coded into an LC script somewhere, which was acceptable because those scripts would never be viewable by any user). So this isn't just poor service, this is a breach of my security. To avoid that i got into the way of storing all my scripts outside the „public_html“ folder. I created a folder in my home folder where i store all my scripts. In the public_html and its subfolders i just place scripts with an one liner which uses the include command to include the scripts outside the publicly accessible folders. So in any case Livecode server is not running, the users just see the script with my include command. Nothing else. /rant -- Alex. ___ use-livecode mailing list use-livecode@lists.runrev.com mailto: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 http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com mailto: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 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: OT : Hosting providers
Matthias, Went you able to check them via CPANEL access ? On my side, https://jasmine.on-rev.com:2083/ stay unreachable with an ERR_CONNECTION_TIMED_OUT status. Regards, Pierre Le 4 mai 2015 à 09:11, Matthias Rebbe | M-R-D matthias_livecode_150...@m-r-d.de a écrit : So if there are others who moved from Pancake to Jasmine some time ago. Check your Databases. Regards, Matthias -- Pierre Sahores mobile : 06 03 95 77 70 www.sahores-conseil.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: OT : Hosting providers
Pierre, tried my 2 accounts on jasmine now. The newly moved one and the one where the DBs were overwritten. PHPMyAdmin access from within CPanel is successful for both. Regards, Matthias Am 04.05.2015 um 09:52 schrieb Pierre Sahores s...@sahores-conseil.com mailto:s...@sahores-conseil.com: Matthias, Went you able to check them via CPANEL access ? On my side, https://jasmine.on-rev.com:2083/ https://jasmine.on-rev.com:2083/ stay unreachable with an ERR_CONNECTION_TIMED_OUT status. Regards, Pierre Le 4 mai 2015 à 09:11, Matthias Rebbe | M-R-D matthias_livecode_150...@m-r-d.de mailto:matthias_livecode_150...@m-r-d.de a écrit : So if there are others who moved from Pancake to Jasmine some time ago. Check your Databases. Regards, Matthias -- Pierre Sahores mobile : 06 03 95 77 70 www.sahores-conseil.com http://www.sahores-conseil.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: OT : Hosting providers
Just to clarify: I have to correct my self. The DBs were not overwritten. I can see the current data using phpMyAdmin. Only our shop is not able to show the current data. Interestingly new orders and customers can also be seen. Only data between April 2014 and up to 30rd April 2015 cannot be seen. So no old backup was restored to our „old“ jasmine account. Matthias Am 04.05.2015 um 10:33 schrieb Matthias Rebbe | M-R-D matthias_livecode_150...@m-r-d.de: Pierre, tried my 2 accounts on jasmine now. The newly moved one and the one where the DBs were overwritten. PHPMyAdmin access from within CPanel is successful for both. Regards, Matthias Am 04.05.2015 um 09:52 schrieb Pierre Sahores s...@sahores-conseil.com mailto:s...@sahores-conseil.com: Matthias, Went you able to check them via CPANEL access ? On my side, https://jasmine.on-rev.com:2083/ https://jasmine.on-rev.com:2083/ stay unreachable with an ERR_CONNECTION_TIMED_OUT status. Regards, Pierre Le 4 mai 2015 à 09:11, Matthias Rebbe | M-R-D matthias_livecode_150...@m-r-d.de mailto:matthias_livecode_150...@m-r-d.de a écrit : So if there are others who moved from Pancake to Jasmine some time ago. Check your Databases. Regards, Matthias -- Pierre Sahores mobile : 06 03 95 77 70 www.sahores-conseil.com http://www.sahores-conseil.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 ___ 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
Release 6.7.5 RC 2 / 7.0.5 RC 2
Dear List Members, We are pleased to announce the release of LiveCode 6.7.5 RC 2 and 7.0.5 RC 2. This release is a maintenance release which contains bug fixes for both versions. The list of bugs fixed can be found in the Release Notes. *Getting the Release* To get the release please select check for updates from the help menu in the product or download the installer directly at: http://downloads.livecode.com *6.7.5 GM / 7.0.5 GM* The next stable builds of these releases is expected to be made public by the end of this week, unless critical issues appear. Warm regards, The LiveCode Team ___ 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
New LiveCode book
My new book, LiveCode Lite: Computer Programming Made Ridiculously Simple, is at this time available free for download in PDF format at www.medmaster.net/livecode.html. If anyone has comments or suggestions for improvement, please let me know, so that the book can be as useful as possible to those first learning LiveCode. Thanks. Stephen Goldberg www.medmaster.net ___ 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
Anyone have a LC based PHOTO Organizer app?
Hi, I need a photo organizer to catalog, trim, move, delete, tag, etc. I have been using google's Picasa 3 but now it chokes as I've got too many images (15,000). Does anyone have a LiveCode solution for this already built and is it open source? Even a LC widget to find duplicate files / images would be a big discovery. -- Ta. Mark Rauterkus mark.rauter...@gmail.com PPS Summer Dreamers' Swim and Water Polo Camp Head Coach Varsity Boys Swim Coach, Pittsburgh Obama Academy Head Water Polo Coach, Carnegie Mellon University Women's Club Team Pittsburgh Combined Water Polo Team http://Rauterkus.blogspot.com http://FixPA.wikia.com http://CLOH.wikia.com 412 298 3432 = cell ___ 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: New LiveCode book
On 04/05/15 16:43, stgoldb...@aol.com wrote: My new book, LiveCode Lite: Computer Programming Made Ridiculously Simple, is at this time available free for download in PDF format at www.medmaster.net/livecode.html. If anyone has comments or suggestions for improvement, please let me know, so that the book can be as useful as possible to those first learning LiveCode. Thanks. Stephen Goldberg www.medmaster.net Thank you very much indeed. Richmond. ___ 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
3 strategic questions I have re iOS development
Folks: I’ve been getting more and more into iOS development and need some direction. If you have input on any of the questions below, I’d appreciate it very much. I’d like to implement solutions that will last well into LC8. 1. Can iOS do audio recording, without Xtras? If not, is mergAV a good choice? It has much more capability than I currently need, but may be the best solution for the future. With mergeAV, I’d also get (I think) the capability to determine the play time of audio files, go to a specific spot in an audio file, etc. These are listed as video capabilities on the mergeEXT site, but I assume they would also work for audio (Monte?) 2. Is it possible for LC to link to iTunes songs. Seems I really only need to determine the directory. I notice there is also a mergeMP extra, but since I’ll just be playing a selected audio file, I wonder if it is needed. 3. What is the simplest way to store a file in the iOS dropbox (or Google Drive)? Do I need an external for that? 4. Is it possible (or feasible) to store data in the user’s iCloud storage? Comment: the LC implementation of the AV Foundation capabilities is really minimal. The standalone player is very nice. It would be great if the mobile system had the same capabilities. My questions are those that I have and can’t find dictionary or lesson entries, or Google answers for. Also, with LC8 coming out, I’d like to use a minimum of externals. Thanks for any input. Best regards, Bill William A. Prothero http://es.earthednet.org/ ___ 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: LC7 arrayEncode/Decode
Richard: You may be right about inconsistent formatting in the array. I started the array with: put myVal into myArray[1][“name”] Then later do: put myNextVa; into myArray[“i”][“name”], where i is an index in a repeat loop So, one would have an integer and the others would be a string of an integer. I did the fix and it worked fine. Still a bug? Seems it should still return the original array. Best, Bill On May 3, 2015, at 2:39 PM, Richard Gaskin ambassa...@fourthworld.com wrote: William Prothero wrote: I found an oddity with arrayEncode and arrayDecode, When I saved an array to a file, first using arrayEncode(myArray), wrote it out as put arrayEncode(myArray) into theEncodedArray put theEncodedArray into URL(“binfile:”myfile) and then read it back in using put URL(“binfile:”myFile) into theEncodedArray put arrayDecode(theEncodedArray) into myArray myArray has the first element as a blank entry. It’s not the same array as I started with. My array looks like myArray[1][“name”], myArray[2][“name”], etc This seems like a bug to me. I didn’t get any satisfaction when I set the storage method as text, but then again, I couldn’t find a lesson where that format was specified. But, it seems like whether it’s binary or not, it should still read back in and decode correctly. It might be a bug, but like many here I do a LOT of work with arrays, and with so much user testing, combined with that part of the engine's code base being somewhat isolated, I'd double-check the recipe first before submitting a bug report. Unexpected keys can sometimes arise from running split on data that's inconsistently formatted. How is the array created? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.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: LC7 arrayEncode/Decode
Richard: By the way, the fix was to do: put myVal into myArray[“1”][“name”] instead of myArray[1][“name”] Bill On May 4, 2015, at 11:43 AM, William Prothero proth...@earthednet.org wrote: Richard: You may be right about inconsistent formatting in the array. I started the array with: put myVal into myArray[1][“name”] Then later do: put myNextVa; into myArray[“i”][“name”], where i is an index in a repeat loop So, one would have an integer and the others would be a string of an integer. I did the fix and it worked fine. Still a bug? Seems it should still return the original array. Best, Bill On May 3, 2015, at 2:39 PM, Richard Gaskin ambassa...@fourthworld.com wrote: William Prothero wrote: I found an oddity with arrayEncode and arrayDecode, When I saved an array to a file, first using arrayEncode(myArray), wrote it out as put arrayEncode(myArray) into theEncodedArray put theEncodedArray into URL(“binfile:”myfile) and then read it back in using put URL(“binfile:”myFile) into theEncodedArray put arrayDecode(theEncodedArray) into myArray myArray has the first element as a blank entry. It’s not the same array as I started with. My array looks like myArray[1][“name”], myArray[2][“name”], etc This seems like a bug to me. I didn’t get any satisfaction when I set the storage method as text, but then again, I couldn’t find a lesson where that format was specified. But, it seems like whether it’s binary or not, it should still read back in and decode correctly. It might be a bug, but like many here I do a LOT of work with arrays, and with so much user testing, combined with that part of the engine's code base being somewhat isolated, I'd double-check the recipe first before submitting a bug report. Unexpected keys can sometimes arise from running split on data that's inconsistently formatted. How is the array created? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.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 ___ 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: LC7 arrayEncode/Decode
Shouldn’t myArray[“i”][“name”] be myArray[i][“name”] ? Otherwise all the data would be put into array key i instead of the value of i. Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of William Prothero Sent: Monday, May 04, 2015 2:43 PM To: Use-livecode Use-livecode Subject: Re: LC7 arrayEncode/Decode Richard: You may be right about inconsistent formatting in the array. I started the array with: put myVal into myArray[1][“name”] Then later do: put myNextVa; into myArray[“i”][“name”], where i is an index in a repeat loop So, one would have an integer and the others would be a string of an integer. I did the fix and it worked fine. Still a bug? Seems it should still return the original array. Best, Bill On May 3, 2015, at 2:39 PM, Richard Gaskin ambassa...@fourthworld.com wrote: William Prothero wrote: I found an oddity with arrayEncode and arrayDecode, When I saved an array to a file, first using arrayEncode(myArray), wrote it out as put arrayEncode(myArray) into theEncodedArray put theEncodedArray into URL(“binfile:”myfile) and then read it back in using put URL(“binfile:”myFile) into theEncodedArray put arrayDecode(theEncodedArray) into myArray myArray has the first element as a blank entry. It’s not the same array as I started with. My array looks like myArray[1][“name”], myArray[2][“name”], etc This seems like a bug to me. I didn’t get any satisfaction when I set the storage method as text, but then again, I couldn’t find a lesson where that format was specified. But, it seems like whether it’s binary or not, it should still read back in and decode correctly. It might be a bug, but like many here I do a LOT of work with arrays, and with so much user testing, combined with that part of the engine's code base being somewhat isolated, I'd double-check the recipe first before submitting a bug report. Unexpected keys can sometimes arise from running split on data that's inconsistently formatted. How is the array created? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.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 ___ 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: LC7 arrayEncode/Decode
Ralph: The first index is the integer 1, not the string representing the integer 1. So, it is probably an improper way to set an element of an array. Was my bad. Best, Bill On May 4, 2015, at 11:51 AM, Ralph DiMola rdim...@evergreeninfo.net wrote: Shouldn’t myArray[“i”][“name”] be myArray[i][“name”] ? Otherwise all the data would be put into array key i instead of the value of i. Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of William Prothero Sent: Monday, May 04, 2015 2:43 PM To: Use-livecode Use-livecode Subject: Re: LC7 arrayEncode/Decode Richard: You may be right about inconsistent formatting in the array. I started the array with: put myVal into myArray[1][“name”] Then later do: put myNextVa; into myArray[“i”][“name”], where i is an index in a repeat loop So, one would have an integer and the others would be a string of an integer. I did the fix and it worked fine. Still a bug? Seems it should still return the original array. Best, Bill On May 3, 2015, at 2:39 PM, Richard Gaskin ambassa...@fourthworld.com wrote: William Prothero wrote: I found an oddity with arrayEncode and arrayDecode, When I saved an array to a file, first using arrayEncode(myArray), wrote it out as put arrayEncode(myArray) into theEncodedArray put theEncodedArray into URL(“binfile:”myfile) and then read it back in using put URL(“binfile:”myFile) into theEncodedArray put arrayDecode(theEncodedArray) into myArray myArray has the first element as a blank entry. It’s not the same array as I started with. My array looks like myArray[1][“name”], myArray[2][“name”], etc This seems like a bug to me. I didn’t get any satisfaction when I set the storage method as text, but then again, I couldn’t find a lesson where that format was specified. But, it seems like whether it’s binary or not, it should still read back in and decode correctly. It might be a bug, but like many here I do a LOT of work with arrays, and with so much user testing, combined with that part of the engine's code base being somewhat isolated, I'd double-check the recipe first before submitting a bug report. Unexpected keys can sometimes arise from running split on data that's inconsistently formatted. How is the array created? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.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 ___ 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: fastes way to search an array?
I wrote a couple functions that “flatten” an array into a string in such a way that it can be converted back into an array again when done. Here they are: function altPrintKeys @pArray, theKeyList, pFullData put numtochar(11) into vertTab put numtochar(30) into altCr put the keys of pArray into theKeys sort theKeys numeric repeat FOR each line theKey in theKeys put [ theKey ] after theKeyList if theKey is not a number then replace [ theKey ] WITH [ quote theKey quote ] in theKeyList end if if pArray[theKey] is an array then put pArray[theKey] into theTempArray put altPrintKeys(theTempArray, theKeyList, pFullData) after theText put empty into the last word of theKeyList delete the last char of theKeyList put cr into the last char of theText else put pArray the last word of theKeyList into theKeyName -- put put theKeyName into theValue into theCommand -- do theCommand put value(theKeyName) into theValue replace tab WITH vertTab in theValue replace return WITH altCr in theValue put theKeyList tab theValue comma after theText put empty into the last word of theKeyList delete the last char of theKeyList end if end repeat return theText end altPrintKeys function altKeysToArray theText put numtochar(11) into vertTab put numtochar(30) into altCr repeat FOR each line theRecord in theText repeat FOR each item theKeyData in theRecord put the itemdelimiter into theOldDelim set the itemdelimiter to tab put item 1 of theKeyData into theKeyList put item 2 of theKeyData into theValue replace vertTab WITH tab in theValue replace altCr WITH return in theValue set the itemdelimiter to theOldDelim put put quote theValue quote into theArrayA theKeyList into theCommand do theCommand end repeat end repeat return theArrayA end altKeysToArray They work together, one for converting an array to text and the other for converting back again. This is handy when you need to eliminate keys using the filter command and then converting back to an array again. But it can be useful for finding an array key or element. Try it on a multidimensional array and view the results. You can see that if you find a line, you will be able to discern the actual array key. Bob S On Apr 22, 2015, at 14:44 , Mike Bonner bonnm...@gmail.com wrote: I wonder how easy it would be to add an option to arrayencode. It already flattens an array nicely, but not in a searchable way. It would be cool to add an optional argument that still flattens, but doesn't encode. The code to traverse the array is already there, with an option to leave the data and keys readable, it would then make an interesting batch of searchable text. Just glancing at an encoded array, it looks relatively comprehensible. One issue would be the unordered way arrays are stored. (making arrayencoded arrays come out different despite identical data, as per the dictionary page) On Wed, Apr 22, 2015 at 2:26 PM, Phil Davis rev...@pdslabs.net wrote: Hi Tiemo, How many levels deep are the array elements you want to search? How many words might each of the searchable array elements contain? How is the array keyed - by sequential number, a preassigned numeric ID, a content description, ...? Would it be worth your time when loading the primary array to build a second array that indexes the primary keys by word? (i.e. make an alternate index) Then finding which words are in which primary array elements would be easy. But if your array is flat enough, I like Geoff's idea of combining and filtering it. But you haven't told us much about its structure. Thanks - Phil Davis On 4/22/15 6:20 AM, Tiemo Hollmann TB wrote: Hello, I have an array with 2 records, where I want to extract all records, which either begins with or contains a search string. Up to now I just loop thru the whole array, do the compare and extract the result records. I wonder, if there is a way to speed up this search? E.g., does it makes a difference, if I compare the string in the key or the data of the array while looping thru? I mean, would it make a difference, if I would create an associative array, where my search looks up in the keys of the array, either by looping thru the array, or by extracting first the keys of the array into a separate variable, instead in the data of the original array? Would it make a difference looping thru a variable, which just contains the keys of the array, instead of looping thru the complete array, because of the smaller footprint in the memory? Or shouldn't I care about
Re: fastes way to search an array?
Cool function Bob, I always love a good recursive handler. It might be broken when an array element contains more than one word. (Limited testing tho.) Eric On May 4, 2015, at 2:14 PM, Bob Sneidar bobsnei...@iotecdigital.com wrote: I wrote a couple functions that “flatten” an array into a string in such a way that it can be converted back into an array again when done. Here they are: function altPrintKeys @pArray, theKeyList, pFullData put numtochar(11) into vertTab put numtochar(30) into altCr put the keys of pArray into theKeys sort theKeys numeric repeat FOR each line theKey in theKeys put [ theKey ] after theKeyList if theKey is not a number then replace [ theKey ] WITH [ quote theKey quote ] in theKeyList end if if pArray[theKey] is an array then put pArray[theKey] into theTempArray put altPrintKeys(theTempArray, theKeyList, pFullData) after theText put empty into the last word of theKeyList delete the last char of theKeyList put cr into the last char of theText else put pArray the last word of theKeyList into theKeyName -- put put theKeyName into theValue into theCommand -- do theCommand put value(theKeyName) into theValue replace tab WITH vertTab in theValue replace return WITH altCr in theValue put theKeyList tab theValue comma after theText put empty into the last word of theKeyList delete the last char of theKeyList end if end repeat return theText end altPrintKeys function altKeysToArray theText put numtochar(11) into vertTab put numtochar(30) into altCr repeat FOR each line theRecord in theText repeat FOR each item theKeyData in theRecord put the itemdelimiter into theOldDelim set the itemdelimiter to tab put item 1 of theKeyData into theKeyList put item 2 of theKeyData into theValue replace vertTab WITH tab in theValue replace altCr WITH return in theValue set the itemdelimiter to theOldDelim put put quote theValue quote into theArrayA theKeyList into theCommand do theCommand end repeat end repeat return theArrayA end altKeysToArray They work together, one for converting an array to text and the other for converting back again. This is handy when you need to eliminate keys using the filter command and then converting back to an array again. But it can be useful for finding an array key or element. Try it on a multidimensional array and view the results. You can see that if you find a line, you will be able to discern the actual array key. Bob S On Apr 22, 2015, at 14:44 , Mike Bonner bonnm...@gmail.com wrote: I wonder how easy it would be to add an option to arrayencode. It already flattens an array nicely, but not in a searchable way. It would be cool to add an optional argument that still flattens, but doesn't encode. The code to traverse the array is already there, with an option to leave the data and keys readable, it would then make an interesting batch of searchable text. Just glancing at an encoded array, it looks relatively comprehensible. One issue would be the unordered way arrays are stored. (making arrayencoded arrays come out different despite identical data, as per the dictionary page) On Wed, Apr 22, 2015 at 2:26 PM, Phil Davis rev...@pdslabs.net wrote: Hi Tiemo, How many levels deep are the array elements you want to search? How many words might each of the searchable array elements contain? How is the array keyed - by sequential number, a preassigned numeric ID, a content description, ...? Would it be worth your time when loading the primary array to build a second array that indexes the primary keys by word? (i.e. make an alternate index) Then finding which words are in which primary array elements would be easy. But if your array is flat enough, I like Geoff's idea of combining and filtering it. But you haven't told us much about its structure. Thanks - Phil Davis On 4/22/15 6:20 AM, Tiemo Hollmann TB wrote: Hello, I have an array with 2 records, where I want to extract all records, which either begins with or contains a search string. Up to now I just loop thru the whole array, do the compare and extract the result records. I wonder, if there is a way to speed up this search? E.g., does it makes a difference, if I compare the string in the key or the data of the array while looping thru? I mean, would it make a difference, if I would create an associative array, where my search looks up in the keys of the array, either by looping thru the array, or by extracting first the keys of the array into a separate variable, instead in the
Unicode
Busy converting SQLiteAdmin to be Unicode compliant using LC 7.0.4. It's going very smoothly so far and no performance issues or crashes. Couple of things I'm not clear on. These questions all refer to variables that hold textDecoded strings Does toUpper/toLower work? Similarly, does the setting of caseSensitive work OK when comparing textDecoded strings? Can I use char references, e.g. char x to y of tVar or offset, or do I need to use byte x to y, byteOffset? Thanks, Pete lcSQL Software http://www.lcsql.com Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and SQLiteAdmin http://www.lcsql.com/sqliteadmin.html ___ 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: fastes way to search an array?
That is in an array key name. Bob S On May 4, 2015, at 14:32 , Bob Sneidar bobsnei...@iotecdigital.commailto:bobsnei...@iotecdigital.com wrote: That may be. I never use multiple words in an array so it would never have occurred to me to test for that. Bob S ___ 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: Unicode
Peter Haworth wrote: Does toUpper/toLower work? Similarly, does the setting of caseSensitive work OK when comparing textDecoded strings? Can I use char references, e.g. char x to y of tVar or offset, or do I need to use byte x to y, byteOffset? Character is safer for strings since it accounts for multi-byte characters. Byte is useful only when working with raw binary data in which you can know in advance the number of bytes you need to deal with. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.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: Unicode
Great, thanks Richard. Pete lcSQL Software http://www.lcsql.com Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and SQLiteAdmin http://www.lcsql.com/sqliteadmin.html On Mon, May 4, 2015 at 1:39 PM, Richard Gaskin ambassa...@fourthworld.com wrote: Peter Haworth wrote: Does toUpper/toLower work? Similarly, does the setting of caseSensitive work OK when comparing textDecoded strings? Can I use char references, e.g. char x to y of tVar or offset, or do I need to use byte x to y, byteOffset? Character is safer for strings since it accounts for multi-byte characters. Byte is useful only when working with raw binary data in which you can know in advance the number of bytes you need to deal with. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.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: fastes way to search an array?
That may be. I never use multiple words in an array so it would never have occurred to me to test for that. Bob S On May 4, 2015, at 14:30 , Eric Corbett e...@canelasoftware.com wrote: Cool function Bob, I always love a good recursive handler. It might be broken when an array element contains more than one word. (Limited testing tho.) Eric On May 4, 2015, at 2:14 PM, Bob Sneidar bobsnei...@iotecdigital.com wrote: I wrote a couple functions that “flatten” an array into a string in such a way that it can be converted back into an array again when done. Here they are: function altPrintKeys @pArray, theKeyList, pFullData put numtochar(11) into vertTab put numtochar(30) into altCr put the keys of pArray into theKeys sort theKeys numeric repeat FOR each line theKey in theKeys put [ theKey ] after theKeyList if theKey is not a number then replace [ theKey ] WITH [ quote theKey quote ] in theKeyList end if if pArray[theKey] is an array then put pArray[theKey] into theTempArray put altPrintKeys(theTempArray, theKeyList, pFullData) after theText put empty into the last word of theKeyList delete the last char of theKeyList put cr into the last char of theText else put pArray the last word of theKeyList into theKeyName -- put put theKeyName into theValue into theCommand -- do theCommand put value(theKeyName) into theValue replace tab WITH vertTab in theValue replace return WITH altCr in theValue put theKeyList tab theValue comma after theText put empty into the last word of theKeyList delete the last char of theKeyList end if end repeat return theText end altPrintKeys function altKeysToArray theText put numtochar(11) into vertTab put numtochar(30) into altCr repeat FOR each line theRecord in theText repeat FOR each item theKeyData in theRecord put the itemdelimiter into theOldDelim set the itemdelimiter to tab put item 1 of theKeyData into theKeyList put item 2 of theKeyData into theValue replace vertTab WITH tab in theValue replace altCr WITH return in theValue set the itemdelimiter to theOldDelim put put quote theValue quote into theArrayA theKeyList into theCommand do theCommand end repeat end repeat return theArrayA end altKeysToArray They work together, one for converting an array to text and the other for converting back again. This is handy when you need to eliminate keys using the filter command and then converting back to an array again. But it can be useful for finding an array key or element. Try it on a multidimensional array and view the results. You can see that if you find a line, you will be able to discern the actual array key. Bob S On Apr 22, 2015, at 14:44 , Mike Bonner bonnm...@gmail.com wrote: I wonder how easy it would be to add an option to arrayencode. It already flattens an array nicely, but not in a searchable way. It would be cool to add an optional argument that still flattens, but doesn't encode. The code to traverse the array is already there, with an option to leave the data and keys readable, it would then make an interesting batch of searchable text. Just glancing at an encoded array, it looks relatively comprehensible. One issue would be the unordered way arrays are stored. (making arrayencoded arrays come out different despite identical data, as per the dictionary page) On Wed, Apr 22, 2015 at 2:26 PM, Phil Davis rev...@pdslabs.net wrote: Hi Tiemo, How many levels deep are the array elements you want to search? How many words might each of the searchable array elements contain? How is the array keyed - by sequential number, a preassigned numeric ID, a content description, ...? Would it be worth your time when loading the primary array to build a second array that indexes the primary keys by word? (i.e. make an alternate index) Then finding which words are in which primary array elements would be easy. But if your array is flat enough, I like Geoff's idea of combining and filtering it. But you haven't told us much about its structure. Thanks - Phil Davis On 4/22/15 6:20 AM, Tiemo Hollmann TB wrote: Hello, I have an array with 2 records, where I want to extract all records, which either begins with or contains a search string. Up to now I just loop thru the whole array, do the compare and extract the result records. I wonder, if there is a way to speed up this search? E.g., does it makes a difference, if I compare the string in the key or the data of the array while looping thru? I mean, would it make a difference, if I would create an associative array, where my search