Random sort demonstration

2013-05-23 Thread Dar Scott
This script demonstrates what is going on with random sorts of short lists using this: sort items of myVar by random( the number of items of myVar) This is a button script on a stack with a wide field with a scrollbar. local lineAssignments on mouseUp set the cursor to watch put

Re: Random sort demonstration

2013-05-23 Thread Jacques Hausser
Thanks, Dar, now I understand ! Till yesterday evening, I always used the numeric result of random(tUpperlimit) to de-sort chunks of text, being not aware of the use of function's combination like sort lines of […] random(xxx). … and at least my scripts worked exactly as I expected ! IMHO,

Re: Android splash screens

2013-05-23 Thread Pierre Sahores
Warmly add my votes to Terry demand! Le 23 mai 2013 à 01:31, Terry Judd a écrit : From what I can make out in the Android release notes, splash images only relate to the personal and educational versions of Livecode. However, there is still a field for a splash image in the android panel of

Re: scrolling stack I made

2013-05-23 Thread Michael Kristensen
Runrev has promised subpixel placement in a future update Mic Here it is adapted to use the array again. It's too bad (for this) that the loc can't use a fractional value and just work. ___ use-livecode mailing list use-livecode@lists.runrev.com

Re: UnicodeLabel pulldown menu trouble

2013-05-23 Thread ha...@exformedia.se
What's your problem? You get a unicode answer back if you have unicode label. Try this: 1. Create a menu button with unicode labels 2. create a new text field and name it result 3. Put the following code on the menu button: on menuPick pItemName set the unicodeText of field result to

Re: Random sort demonstration

2013-05-23 Thread Dick Kriesel
On May 23, 2013, at 12:41 AM, Jacques Hausser jacques.haus...@unil.ch wrote: and something like scramble lines of myVar, instead of sort lines of myVar random(xxx). Could be a command using the same function behind the scene, with the max integer as parameter to avoid prevalence of the

Re: randomly order a list

2013-05-23 Thread Michael Mays
I made a typo: delete line random_line_number of the_lines should be delete line random_line_number of some_lines (see below) Sorry, Michael On May 23, 2013, at 12:07 PM, Michael Mays michael_livec...@nayyan.com wrote: As I understand the sort command the syntax is something

Re: Random sort demonstration

2013-05-23 Thread Jacques Hausser
Yes shuffle is better - a penchant for gambling instead of a taste of eggs ;-) Jacques Le 23 mai 2013 à 10:24, Dick Kriesel dick.krie...@mail.com a écrit : On May 23, 2013, at 12:41 AM, Jacques Hausser jacques.haus...@unil.ch wrote: and something like scramble lines of myVar, instead

Can I set the linktext with the editor?

2013-05-23 Thread Tiemo Hollmann TB
Hello, I know, how to set the textstyle link and the linktext by script, but don't succeed in setting it manually in the property editor of a field. I can't even select a single word or text chunk of a field with the pointer tool. It seems that I have never had the need of it up to now. How can

Re: Can I set the linktext with the editor?

2013-05-23 Thread Richmond
On 05/23/2013 12:15 PM, Tiemo Hollmann TB wrote: Hello, I know, how to set the textstyle link and the linktext by script, but don't succeed in setting it manually in the property editor of a field. I can't even select a single word or text chunk of a field with the pointer tool. It seems that I

Re: Can I set the linktext with the editor?

2013-05-23 Thread Thierry Douez
Hallo Tiemo, Well, select the text you want to link, then Menu Text - link and it should work. HTH, Thierry Thierry Douez - http://sunny-tdz.com Maker of sunnYperl - sunnYmidi - sunnYmage 2013/5/23 Tiemo Hollmann TB toolb...@kestner.de

AW: Can I set the linktext with the editor?

2013-05-23 Thread Tiemo Hollmann TB
So stupid, I trapped my own mouse events in browse mode, that’s why I stumbled. Thanks for your hints Richmond and Thierry And is there also a standard procedure to set the linktext manually? Tiemo -Ursprüngliche Nachricht- Von: use-livecode

Re: UnicodeLabel pulldown menu trouble

2013-05-23 Thread in...@kenjikojima.com
Hankan, Thanks a reply. I was having switch unicode problem. on menuPick pItemName switch pItemName case uniencode(Choice 1) set the unicodeText of fld 1 to uniencode(Choice 1) break case uniencode(Choice 2) set the unicodeText of fld 1 to

Re: start using stack

2013-05-23 Thread Robert Mann
Hi interested too by this way to load stacks.. but I cannot get it to work on my on-rev server : I get a stack is corrupted, check for ~ backup file Am i the only one? - the file is accessible with 755 rights set to it and its parent folder within the on-rev space, - i can reach the file ok with

Re: start using stack

2013-05-23 Thread Alex Tweedly
It's all too easy to have a file be corrupted when ftp-ing it by inadvertently using the wrong mode, so I'd start by checking that the stack was copied in binary mode, while the .lc (or whatever) file was copied as text mode. If that doesn't help, then I'd be happy to try the same files on my

RE: start using stack

2013-05-23 Thread John Dixon
The stack that you are going to use on your on-rev server... save it in legacy format... that seems to do the trick ! Date: Thu, 23 May 2013 11:56:00 +0100 From: a...@tweedly.net To: use-livecode@lists.runrev.com Subject: Re: start using stack It's all too easy to have a file be corrupted

Re: randomly order a list

2013-05-23 Thread Michael Mays
No it is 3 factorial. Jacques and Craig and I are right. This is picking without replacement, not picking with replacement. The first answer position has three choices. Once you pick it the second answer position has 2 and the final position 1 option left. To get 27 options means you have

Re: start using stack

2013-05-23 Thread Robert Mann
Thanks for the warning, I re-checked as following :-- tried to upLoad as txt, bin or mapped-- then checked by launching the stacks from Interarchy, with the open with option i regularly use for working with stack files on on-rev.= indeed the save as txt format proved.. bad! crashes LC6 on load

Re: Escaping the Filter command's wildcards

2013-05-23 Thread Jan Schenkel
There has been an enhancement request in the quality center for a few years now. http://quality.runrev.com/show_bug.cgi?id=2805 But now that it's all open source, we can do these changes ourselves. It looks like it can be accomplished by modifying just a single file: cmdsf.cpp

Re: start using stack

2013-05-23 Thread Alex Tweedly
OK, I have to confess I'm confused :-( I thought you were trying to run a script on LC server (on-rev) and having trouble getting start using stack to work. But the testing stack below is actually a desktop stack which does a go stack URL ... ?? So - if the rest of this reply is misguided -

Re: start using stack

2013-05-23 Thread Klaus major-k
Hi Alex, Am 23.05.2013 um 15:20 schrieb Alex Tweedly a...@tweedly.net: OK, I have to confess I'm confused :-( I thought you were trying to run a script on LC server (on-rev) and having trouble getting start using stack to work. But the testing stack below is actually a desktop stack

Re: Random sort demonstration

2013-05-23 Thread Dar Scott
What sort does is very general. At first it looks like you put a chunk selector after 'by' in sort. Then we see things like random(99). That can be confusing. What goes after 'by' is any expression. We can call it blah-blay-blah-maybe-including-each. We might imagine this function

Re: Random sort demonstration

2013-05-23 Thread Richard Gaskin
Dick Kriesel wrote: command shuffle @rLines sort rLines by random( 4294967295 ) -- note: 2^32-1 end shuffle Wouldn't that put the probability of sorting bottom-to-top unusually high, since there the odds are 4294967292-to-1 that the sort integer will exceed the number of lines in the

Re: start using stack

2013-05-23 Thread Robert Mann
Yes! thanks for the correction! I couldn't get to that point.. because *the problem lies somewhere on my on-rev server.* indeed calling the sample test stack with the nabble link works fine (once the result line corrected!) So question is /do other guy than me have a problem with that command

Re: start using stack

2013-05-23 Thread Robert Mann
Yes! thanks for the correction! I couldn't get to that point.. because the problem lies somewhere on my on-rev server. indeed calling the sample test stack with the nabble link works fine (once the result line corrected!) So question is do other guy than me have a problem with that command in

Re: start using stack

2013-05-23 Thread Mike Bonner
As mentioned by John Dixon, save the stack that you wish to use' with your on-rev server in legacy format. LC server can't read the new stackfile format. (in the ide, save as, bottom of the window choose legacy 2.7. Save it, pop it onto your account and go from there) Also, not sure how

Re: Random sort demonstration

2013-05-23 Thread Dr. Hawkins
On Thu, May 23, 2013 at 6:51 AM, Richard Gaskin ambassa...@fourthworld.com wrote: Wouldn't that put the probability of sorting bottom-to-top unusually high, since there the odds are 4294967292-to-1 that the sort integer will exceed the number of lines in the list? If I'm reading the prior

Re: Random sort demonstration

2013-05-23 Thread Dr. Hawkins
On Thu, May 23, 2013 at 7:36 AM, Dr. Hawkins doch...@gmail.com wrote: There is also a 1/3 chance that the same number is generated three times (3*(1/3*1/3)). Scratch that; not quite awake yet. That should be a 1/9 chance (3* (1/3*1/3*1/3)). This leaves 2/3 of the time in which at least one

Re: Random sort demonstration

2013-05-23 Thread Geoff Canyon
On Thu, May 23, 2013 at 1:08 AM, Dar Scott d...@swcp.com wrote: The problem is equality in the sort. It keeps the same order in comparison of pairs of items. For example, the items sorted in the last case above as though they were 2,2,3. The first item is still first. So... Use large

Re: start using stack

2013-05-23 Thread Robert Mann
Ok I corrected the loading test stack (put the result in tTheLongIdofTheTargetField does not work!) which is here : goStackURL.livecode http://runtime-revolution.278305.n4.nabble.com/file/n4665298/goStackURL.livecode and which has the test addresses ready to click, and that shows the result

[ON-REV] by the way what happened to on-rev ftp editor?

2013-05-23 Thread Robert Mann
• Last week, on opening on-rev editor version 2 (latest?!) i got a msg kind of a new version is on the way.. just.. go and get a pint of beer! set of! (actually there was new download link but did not work) • Today the editor just freezes (wanted to try an alternative upload to interarchy), no

Re: randomly order a list

2013-05-23 Thread Vokey, John
Shuffling is more complicated than commonly thought. A properly uniform shuffle is given as follows: function scramble x -- scramble lines or items in a row put the number of lines of x into z if z = 1 then put the number of items of x into n else put the number of lines of x into n

Re: start using stack

2013-05-23 Thread Mike Bonner
DOH, sorry yep I misunderstood. However, I have a workaround. Change the name of the file. LC doesn't care what the extension is, but apparently on-rev is set up so that (my guess) that .livecode is an extension that has an action associated with it. Which means that (I think) lc server tries

mApp Framework problems

2013-05-23 Thread Alan Stenhouse
G'day all Am starting to use Monte's mApp framework and have run into a couple of problems: 1. Added a datagrid and this works and displays fine on normal resolution displays but on Retina displays for iPhone + iPad nothing is displayed. Seems sort of strange - just want to check if anyone

Re: randomly order a list

2013-05-23 Thread Dar Scott
Yes, sorting involves picking. But this is assigning a sorting value to each item or line. Each item or line is assigned a value independently; the history of assigning previous values does not matter. Only then is the sorting performed (virtually). It is possible for some lines to be

Re: Random sort demonstration

2013-05-23 Thread Robert Brenstein
On 23.05.2013 at 9:51 Uhr -0500 Geoff Canyon apparently wrote: To Dar's point, here the stable sort means that you should never use this to get a random sort: sort lines of someContainer by random(the number of lines of someContainer) You are almost guaranteed to get less than random results.

Re: start using stack

2013-05-23 Thread Robert Mann
Yeap!! Brilliant!! That is it... the LC server Beast was ruling the file system behind the scene!! So I'think it's going to be a good idea for me to go and append the documentation of go stack url for on-rev users and put a warning for the ones who would try and download a stack from a folder

Re: start using stack

2013-05-23 Thread Mike Bonner
Yeah, would be a good idea to add the note. I bet the reason its set up that way is so that people can't snag your library stacks and pick em apart for site hacking purposes. If you hit the url for a .livecode file directly, it only returns the very first string that designates the stackfile

Re: Escaping the Filter command's wildcards

2013-05-23 Thread Jan Schenkel
For those interested, I started the discussion on the engine contributors forum: http://forums.runrev.com/viewtopic.php?f=66t=15250 Cheers, Jan Schenkel.   = Quartam Reports PDF Library for LiveCode www.quartam.com = As we grow older, we grow both wiser and more foolish at the same

Re: start using stack

2013-05-23 Thread Robert Mann
good idea true, although one could deal with that security issue voluntarily by giving rights to execute only and not download... Note added! thanks again. -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/start-using-stack-tp4665159p4665311.html Sent from the

Re: postgresql bytea (blob?)

2013-05-23 Thread Jose Damaso
Thank you so much Bjornke! Your solution worked great and I can now read the data =) On 5/21/13, Björnke von Gierke b...@mac.com wrote: Hmm maybe x7 could indicate it's base15? They used to store ascii in that encoding, because it's shorter then 8 bits (base16)... Nope, it's not that, and it'd

Re: start using stack

2013-05-23 Thread Mike Bonner
In this case its not executed its read by the engine. But putting it outside the directories that can be hit would work swimmingly. (assuming on-rev allows inclusion type stuff from outside the web folder structure. Pretty sure it does) Either way, WOOP it works! On a different note, it would be

Re: Random sort demonstration

2013-05-23 Thread Dar Scott
Yikes! I was thinking the default was automatic and not text. Good idea! Now, I wonder if it makes a difference in the final probabilities. Maybe performance is influenced. On May 23, 2013, at 10:37 AM, Robert Brenstein wrote: On 23.05.2013 at 9:51 Uhr -0500 Geoff Canyon apparently

Re: Random sort demonstration

2013-05-23 Thread Jerry Jensen
Thanks for pointing that out! I've got some checking to do of old code. Imagine the weighting that would be caused by random(20)... .Jerry On May 23, 2013, at 9:37 AM, Robert Brenstein r...@robelko.com wrote: I wonder why nobody suggests adding numeric parameter to random sorts like above.

Re: mApp Framework problems

2013-05-23 Thread Thomas McGrath III
Alan, I have been working with mApp a lot the past few days. Although I did not see this particular problem I can say that you have to be careful deleting elements after applying rules to them. I ran into something where everything went haywire after deleting a background group. Let us know

Re: scrolling stack I made

2013-05-23 Thread J. Landman Gay
On 5/18/13 5:04 AM, Colin Holgate wrote: While at the conference I found time to figure out a couple of things. I used arrays for the first time (in LiveCode that is), and I found hardware acceleration settings that worked well. The test I did was to have a scene doing parallax scrolling. The

Re: Escaping the Filter command's wildcards

2013-05-23 Thread Peter Haworth
Thanks Jan. Pete lcSQL Software http://www.lcsql.com On Thu, May 23, 2013 at 10:10 AM, Jan Schenkel janschen...@yahoo.comwrote: For those interested, I started the discussion on the engine contributors forum: http://forums.runrev.com/viewtopic.php?f=66t=15250 Cheers, Jan Schenkel.

Re: [ON-REV] by the way what happened to on-rev ftp editor?

2013-05-23 Thread Björnke von Gierke
i suggest you contact supp...@runrev.com On 23.05.2013, at 17:04, Robert Mann wrote: • Last week, on opening on-rev editor version 2 (latest?!) i got a msg kind of a new version is on the way.. just.. go and get a pint of beer! set of! (actually there was new download link but did not work)

Re: randomly order a list

2013-05-23 Thread Björnke von Gierke
So much misinformation in this thread :( The random function works! it uses the same code as many other programs to do random stuff. Of course it's using a semi random list, but the technicalities about when random is not random enough does not come into place for sorting lines. sort the

Continuing a script after cloning a stack

2013-05-23 Thread Peter Haworth
I have a script that clones a substack, followed by some other commands to rename the cloned substack and set it's mainstack. As soon as the clone command is issued, control passes to the cloned stack and the rest of my script is ignored. That's pretty much expected behavior but I'm wondering if

Re: mApp Framework problems

2013-05-23 Thread Peter Haworth
Ummm... what did I miss? What is mApp? Pete lcSQL Software http://www.lcsql.com On Thu, May 23, 2013 at 11:21 AM, Thomas McGrath III mcgra...@mac.comwrote: Alan, I have been working with mApp a lot the past few days. Although I did not see this particular problem I can say that you have

Re: [ON-REV] by the way what happened to on-rev ftp editor?

2013-05-23 Thread Matthias Rebbe
Support email address for on-rev related things is on-...@runrev.com Regards Matthias Am 23.05.2013 um 20:47 schrieb Björnke von Gierke b...@mac.com: i suggest you contact supp...@runrev.com On 23.05.2013, at 17:04, Robert Mann wrote: • Last week, on opening on-rev editor version 2

Re: Continuing a script after cloning a stack

2013-05-23 Thread Jan Schenkel
My guess is something in its scripts (or some backscript) results in an 'exit to top' Have you tried surrounding the clone command with a 'lock messages' / 'unlock messages' pair? If you still need 'preOpenStack' and related messages to run afterwards, you'd have to 'send' them individually

Re: mApp Framework problems

2013-05-23 Thread Thomas McGrath III
Monte has a download link on his website for mApp which is interesting in doing UI scaling and positioning. http://mergext.com/mergext/ Way down at the bottom. Tom -- Tom McGrath III http://lazyriver.on-rev.com mcgra...@mac.com On May 23, 2013, at 3:13 PM, Peter Haworth p...@lcsql.com wrote:

Re: Continuing a script after cloning a stack

2013-05-23 Thread Björnke von Gierke
I think you could do something like this: clone this stack set the name of this stack to my new stack go stack my previously only stack use lock screen and/or go hidden respectively hide stack to reduce screen flickering. On 23.05.2013, at 21:12, Peter Haworth wrote: I have a script that

Re: [ON-REV] by the way what happened to on-rev ftp editor?

2013-05-23 Thread Björnke von Gierke
On 23.05.2013, at 21:21, Matthias Rebbe wrote: Support email address for on-rev related things is on-...@runrev.com i suggest you contact supp...@runrev.com Ah right, email both ;-) -- Use an alternative Dictionary viewer: http://bjoernke.com/bvgdocu/ Chat with other RunRev developers:

Data From MySQL to SQLite

2013-05-23 Thread Devin Asay
Hi all, I have an ongoing need to populate some SQLite tables with data stored in a MySQL database. The parallel table structures in both db systems are created; I just need to move the data. I can figure out how to write the queries, but before I spend a lot of time I thought I'd check to see

Re: randomly order a list

2013-05-23 Thread Geoff Canyon
There is, indeed much confusion here. I, of course, am correct ;-) I simplified the problem to a list of two items: 1,2 That way the sort command has exactly two outcomes. It either reverses the list, or it doesn't. The two outcomes should happen roughly 50% of the time. This script

Re: randomly order a list

2013-05-23 Thread Richard Gaskin
Björnke von Gierke wrote: sort the lines of theList by random(the number of lines in theList) This too works. there's no need to make an arbitrary large number _BECAUSE IT MIGHT IN SOME CASES DECREASE RANDOMNESS_. Mostly when your variable grows bigger then anticipated, so usually you're

Re: randomly order a list

2013-05-23 Thread Dar Scott
I agree, Geoff! Your theory and measurements are consistent with mine for 3. An important part of Geoff's test is this: put originalList into newList Dar On May 23, 2013, at 1:30 PM, Geoff Canyon wrote: There is, indeed much confusion here. I, of course, am correct ;-) I

Re: Continuing a script after cloning a stack

2013-05-23 Thread Richard Gaskin
Peter Haworth wrote: I have a script that clones a substack, followed by some other commands to rename the cloned substack and set it's mainstack. As soon as the clone command is issued, control passes to the cloned stack and the rest of my script is ignored. We could expect focus to change

JSON

2013-05-23 Thread Thomas McGrath III
I have a server project where I need to send some JSON to a URL. I've never done this before. Has anyone got a simple example/explanation of how this is achieved? Thanks in advance. Tom -- Tom McGrath III http://lazyriver.on-rev.com mcgra...@mac.com

Re: randomly order a list

2013-05-23 Thread Thomas McGrath III
LOL…. I just spit my coffee all over my screen…… -- Tom McGrath III http://lazyriver.on-rev.com mcgra...@mac.com On May 23, 2013, at 3:52 PM, Björnke von Gierke b...@mac.com wrote: Fuck me that's correct. :( ___ use-livecode mailing list

Re: mApp Framework problems

2013-05-23 Thread Monte Goulding
Hey folks. I'm nearly home but I probably won't get to look at mApp stuff until late next week. I'm not sure why things would go haywire when deleting anything because it checks the existence of objects in rules before running the rule. Missing objects are ignored. Most likely reason things

Re: JSON

2013-05-23 Thread Richard Gaskin
Thomas McGrath III wrote: I have a server project where I need to send some JSON to a URL. I've never done this before. Has anyone got a simple example/explanation of how this is achieved? I had to do that for a project recently, and I just sent the JSON to the server as the data in a POST

Re: randomly order a list

2013-05-23 Thread Dar Scott
I don't think anybody is claiming that random() does not work. (Some random number generators will break with a bad seed, but that is outside the scope of discussion.) When Chris thought random() was broken, most people suggested he look at his code around the sort. The problem is that

Re: JSON

2013-05-23 Thread Monte Goulding
Take a look at JSON.org for the file format. I have a desktop/server external that does ArrayToJSON and visa versa if that helps. It's utf8 only. It's currently GPL licensed and I intend to do a commercial license when someone wants one ;-) -- M E R Goulding Software development services

Re: randomly order a list

2013-05-23 Thread Björnke von Gierke
Yes, that is why I myself lean towards a feature request. For example the following line could tell the engine to make a unique random number for each of the supplied lines, to not have the problem with lines that come first getting a higher probability: sort theData by random(the number of

Re: randomly order a list

2013-05-23 Thread Dar Scott
On May 23, 2013, at 1:52 PM, Björnke von Gierke wrote: So we do need the sort to actually be for each, instead of random. That will work if what we are looking at is random as far as we can tell. For example, by md5Digest( each ) might scramble in a sense, but it would be the same each

Re: randomly order a list

2013-05-23 Thread Dar Scott
Hmmm. put randomBytes(8) into sortIV sort lines of myVar by sha1Digest( each sortIV ) or resetUniqueRandom sort lines of myVar by uniqueRandom( the number of lines of myVar ) -- where resetUniqueRandom and uniqueRandom are custom handlers Dar On May 23, 2013, at 2:11 PM, Björnke von

Re: randomly order a list

2013-05-23 Thread Dar Scott
I hit send faster than I can think. This will put like lines next to each other. Fail! But a LiveCode function that looks at sortIV and sets it with the current hash should work. (I better hit send fast before I find something wrong with that.) On May 23, 2013, at 2:26 PM, Dar Scott wrote:

Re: randomly order a list

2013-05-23 Thread Alex Tweedly
Indeed you are correct. The maths is simple (even if not very obvious or intuitive). Sorting N lines by random(K) The likelihood of swapping any two lines *should* be 1/2, but (because the sort is stable, and because they are random *integers*), there is a 1/K chance of the two random values

Re: mApp Framework problems

2013-05-23 Thread Scott Rossi
Tom, where is this exactly? Link? Thanks Regards, Scott Rossi Creative Director Tactile Media, UX/UI Design On 5/23/13 12:24 PM, Thomas McGrath III mcgra...@mac.com wrote: Monte has a download link on his website for mApp which is interesting in doing UI scaling and positioning.

Re: mApp Framework problems

2013-05-23 Thread Matthias Rebbe
Scott, http://www.mergext.com under Downloads - Free externals You need to login to see the downloads. Registration is free. Regards, Matthias Am 23.05.2013 um 22:46 schrieb Scott Rossi sc...@tactilemedia.com: Tom, where is this exactly? Link? Thanks Regards, Scott Rossi Creative

Re: JSON

2013-05-23 Thread Andrew Kluthe
I do this a lot in my work. Generally it is up to how the server wants to receive the JSON. There are several ways to do it depending on the verb the server side is looking for. Is this for some kind of public API or do you have any information on the API you are trying to work with? Usually I

Re: Data From MySQL to SQLite

2013-05-23 Thread Dr. Hawkins
Library??? assuming that the names/types are compatible, put revDataFromQuery(tab,vtab,inDbno,SELECT * FROM inTable) into theData put BEGIN TRANSACTION; cr into dcmd set the itemDel to vtab repeat for each item theLin in theData put INSERT INTO outTable VALUES( theLin ); cr after dcmd

Re: Data From MySQL to SQLite

2013-05-23 Thread Mark Schonewille
Hi Richard, Is it possible to execute multiple SQL lines with revExecuteSQL now? -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Use Color Converter to convert

Re: Data From MySQL to SQLite

2013-05-23 Thread Dr. Hawkins
On Thu, May 23, 2013 at 2:17 PM, Mark Schonewille m.schonewi...@economy-x-talk.com wrote: Is it possible to execute multiple SQL lines with revExecuteSQL now? I assume so--at the moment I'm actually doing it with revDataFromQuery(), but I'm trying to convert over (although I really suspect that

Re: Data From MySQL to SQLite

2013-05-23 Thread Ruslan Zasukhin
On 5/23/13 10:31 PM, Devin Asay devin_a...@byu.edu wrote: Hi all, I have an ongoing need to populate some SQLite tables with data stored in a MySQL database. The parallel table structures in both db systems are created; I just need to move the data. I can figure out how to write the

Re: Data From MySQL to SQLite

2013-05-23 Thread Devin Asay
On May 23, 2013, at 3:06 PM, Dr. Hawkins wrote: Library??? assuming that the names/types are compatible, put revDataFromQuery(tab,vtab,inDbno,SELECT * FROM inTable) into theData put BEGIN TRANSACTION; cr into dcmd set the itemDel to vtab repeat for each item theLin in theData put

Re: Data From MySQL to SQLite

2013-05-23 Thread Devin Asay
On May 23, 2013, at 3:06 PM, Dr. Hawkins wrote: Library??? assuming that the names/types are compatible, put revDataFromQuery(tab,vtab,inDbno,SELECT * FROM inTable) into theData put BEGIN TRANSACTION; cr into dcmd set the itemDel to vtab repeat for each item theLin in theData put

Re: randomly order a list

2013-05-23 Thread J. Landman Gay
On 5/23/13 2:30 PM, Geoff Canyon wrote: Here's one result I got: Sorting by random(2) kept the same order 7514 out of 1 times. Sorting by random(9) kept the same order 5014 out of 1 times. If anyone disagrees, come at me, bro. ;-) I never argue with a math guy. :) --

Re: Continuing a script after cloning a stack

2013-05-23 Thread Peter Haworth
Hi Bjornke, Problem is, it never reaches the set the name command because foucs has shifted to the cloned stack Pete lcSQL Software http://www.lcsql.com On Thu, May 23, 2013 at 12:27 PM, Björnke von Gierke b...@mac.com wrote: I think you could do something like this: clone this stack set

Re: Continuing a script after cloning a stack

2013-05-23 Thread Peter Haworth
Hi Richard and Jan Locking messages fixed the problem. This is a general purpose routine so I have to deal with any preOpenxxx and open handlers that might be in the stack. I think I will have to add code to close and re-open the stack after the renaming and setting of the main stack once I

Re: Data From MySQL to SQLite

2013-05-23 Thread Dr. Hawkins
On Thu, May 23, 2013 at 2:36 PM, Devin Asay devin_a...@byu.edu wrote: I didn't mention that my data contains one field with long xml-formatted data, so to avoid conflicts with delimiters I have to use … revDataFromQuery(numToChar(31),numToChar(30) … Can my values list use non-comma

Re: JSON

2013-05-23 Thread J. Landman Gay
I'm working with a web person who wanted me to communicate recently using JSON (and I asked on the list about it like you did.) After looking at a couple of available libraries I thought the format was awkward and unnecessary for what we needed to do. I asked if they could just send and

Re: mApp Framework problems

2013-05-23 Thread Monte Goulding
That's it... But it's not an external so ill change that at some point. -- M E R Goulding Software development services mergExt - There's an external for that! On 24/05/2013, at 7:03 AM, Matthias Rebbe matthias_livecode_150...@m-r-d.de wrote: http://www.mergext.com under Downloads - Free

Re: Continuing a script after cloning a stack

2013-05-23 Thread Richard Gaskin
Peter Haworth wrote: Hi Richard and Jan Locking messages fixed the problem. This is a general purpose routine so I have to deal with any preOpenxxx and open handlers that might be in the stack. I think I will have to add code to close and re-open the stack after the renaming and setting

Re: randomly order a list

2013-05-23 Thread J. Landman Gay
On 5/23/13 3:31 PM, Dar Scott wrote: (I better hit send fast before I find something wrong with that.) LOL. I'm so glad you're back on the list, Dar. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com

Re: Continuing a script after cloning a stack

2013-05-23 Thread J. Landman Gay
On 5/23/13 2:12 PM, Peter Haworth wrote: I have a script that clones a substack, followed by some other commands to rename the cloned substack and set it's mainstack. As soon as the clone command is issued, control passes to the cloned stack and the rest of my script is ignored. That's pretty

Re: Continuing a script after cloning a stack

2013-05-23 Thread J. Landman Gay
On 5/23/13 5:00 PM, Richard Gaskin wrote: Such things are at best confusing, and at worst drive up the cost of developing with LiveCode because you have to build a standalone just to test Or suspend the environment. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive

Re: mApp Framework problems

2013-05-23 Thread Alan Stenhouse
No worries Monte - was hoping that maybe someone else had been using it and perhaps had come across the same thing. I'll keep looking at it and see if I can work it out... and pass on any solutions if I can. Hope you guys enjoyed Paris! :-) Have a good trip home! cheers Alan -- Alan Stenhouse

Re: randomly order a list

2013-05-23 Thread Dave Cragg
On 23 May 2013, at 21:11, Björnke von Gierke b...@mac.com wrote: Yes, that is why I myself lean towards a feature request. For example the following line could tell the engine to make a unique random number for each of the supplied lines, to not have the problem with lines that come first

Re: randomly order a list

2013-05-23 Thread Dar Scott
I did a math. The probability of the first element not moving for a k item list named myList that is sorted by sort items of myList by random( the number of items of myList ) is p(k) where p(k) = sum with i from 1 to k of 1/k * ( i/k ) ^ (k-1) That power increasing with k tends to

Re: Continuing a script after cloning a stack

2013-05-23 Thread Peter Haworth
Hi Jacque, You've probably seen the follow up emails on this, but the noting after the clone command executes. I set a break point right at the clone command and after stepping into the clone statement, the debugger did not advance to the next statement and the script terminated. Pete lcSQL

Re: Data From MySQL to SQLite

2013-05-23 Thread Peter Haworth
I think it depends on the SQL implementation. I don't think SQLite allows it, at least not in the SQLite library included in LC which is many releases old. I wonder waht RunRev plan to do when SQLite 4 is released. Pete lcSQL Software http://www.lcsql.com On Thu, May 23, 2013 at 2:17 PM, Mark

Re: randomly order a list

2013-05-23 Thread Dar Scott
I simplified the expression but didn't change the comment. It should include ...i/k is 1 for only i=k. On May 23, 2013, at 4:31 PM, Dar Scott wrote: I did a math. The probability of the first element not moving for a k item list named myList that is sorted by sort items of

Re: Data From MySQL to SQLite

2013-05-23 Thread Peter Haworth
On Thu, May 23, 2013 at 2:31 PM, Devin Asay devin_a...@byu.edu wrote: Thanks, I'll give that a try. Any idea if this might work for records containing binary data? I have one table with around 74 MB of data that I need to transfer over. Hi Devin, Not knowing much about your data but allowing

Re: randomly order a list

2013-05-23 Thread Alex Tweedly
Yes, that's a good shuffle for small data, but a bit slow for larger data sets. I dug out an old function I wrote a few years ago (and converted it to LC); this would be faster for large data sets (time taken grows linearly rather than by the square of the number of lines). local sA, sIndex

Re: Data From MySQL to SQLite

2013-05-23 Thread Peter Haworth
On Thu, May 23, 2013 at 2:31 PM, Devin Asay devin_a...@byu.edu wrote: Thanks, I'll give that a try. Any idea if this might work for records containing binary data? I have one table with around 74 MB of data that I need to transfer over. Another thought. I think you have my SQLiteAdmin

  1   2   >