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

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 pItem

Re: Random sort demonstration

2013-05-23 Thread Dick Kriesel
On May 23, 2013, at 12:41 AM, Jacques Hausser 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 first" in the c

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 wrote: > As I understand the sort command the syntax is something like: > sort this_group _

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 a écrit : > > On May 23, 2013, at 12:41 AM, Jacques Hausser wrote: > >> and something like >> >> "scramble lines of myVar", instead of "sort lines of myVar random(xxx)

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

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 > Hello, > > I know, ho

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 [mailto:use-livecode-boun...@lists.runrev.co

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 uniencode

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 corr

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 answ

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 suc

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. 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 : > 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

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 bein

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 in

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 t

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 scriptl

Re: Random sort demonstration

2013-05-23 Thread Dr. Hawkins
On Thu, May 23, 2013 at 6:51 AM, Richard Gaskin 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 posts right, that won't be a

Re: Random sort demonstration

2013-05-23 Thread Dr. Hawkins
On Thu, May 23, 2013 at 7:36 AM, Dr. Hawkins 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 combination of lin

Re: Random sort demonstration

2013-05-23 Thread Geoff Canyon
On Thu, May 23, 2013 at 1:08 AM, Dar Scott 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 values fo

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 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 b

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 repe

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 t

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 els

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 ass

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. I

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 "c

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 form

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: 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 sam

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 R

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 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 be (n

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 b

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 wrot

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 wrote: > > I wonder why nobody suggests adding "numeric" parameter to random sorts like > above. After all, t

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 wha

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 in

Re: Escaping the Filter command's wildcards

2013-05-23 Thread Peter Haworth
Thanks Jan. Pete lcSQL Software On Thu, May 23, 2013 at 10:10 AM, Jan Schenkel wrote: > For those interested, I started the discussion on the engine contributors > forum: > > > Cheers, > > Jan Schenkel. > > = > Qua

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 wor

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 lines

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 On Thu, May 23, 2013 at 11:21 AM, Thomas McGrath III wrote: > 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 carefu

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 : > 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?!)

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 afte

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 wrote: > Ummm... wha

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 t

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 demonstrates

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'r

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 simpl

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 to

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: JSON

2013-05-23 Thread Thomas McGrath III
This is what i will need to send: => Data Json Array :- (1 - Android , 2- Iphone, 3 - Ipad for Device Type) {"data": {"appuser_details": { "name":"abc", "email":"a...@gmail.com", "device_type":"1", "dentist_id":"71", "device_token":"___15fa92fe928bf5d071a921f21003ed0f873cbe271ced016630e433d49"

Re: randomly order a list

2013-05-23 Thread Björnke von Gierke
Fuck me that's correct. :( So we do need the sort to actually be "for each", instead of random. Would you guys say this is a bug, or that a feature request for making sort use a unique random value instead of an arbitrary one? On 23.05.2013, at 06:20, Dar Scott wrote: > Easy mistake to make,

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 wrote: > Fuck me that's correct. :( ___ use-livecode mailing list use-livecode@lists.run

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 migh

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 POS

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 rand

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 mergE

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 lin

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 ti

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 Gierk

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" wrote: >Monte has a download link on his website for mApp which is interesting in >doing UI scaling and positioning. http://mergext.com/me

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 : > Tom, where is this exactly? Link? > > Thanks & Regards, > > Scott Rossi > Creative Director > Tactil

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 jus

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 aft

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 CM

Re: Data From MySQL to SQLite

2013-05-23 Thread Dr. Hawkins
On Thu, May 23, 2013 at 2:17 PM, Mark Schonewille 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 they map to the same underlying

Re: Data From MySQL to SQLite

2013-05-23 Thread Ruslan Zasukhin
On 5/23/13 10:31 PM, "Devin Asay" 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 queries, but > befo

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 th

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 th

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. :) -- Jacqueli

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 On Thu, May 23, 2013 at 12:27 PM, Björnke von Gierke wrote: > I think you could do something like this: > clone this stack > set the name

Re: Data From MySQL to SQLite

2013-05-23 Thread Mark Schonewille
Hi Devin, Yes, you can use any ASCII character as delimiter. These delimiters are used by LiveCode and not by SQL and therefore this isn't a problem. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter

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 h

Re: Data From MySQL to SQLite

2013-05-23 Thread Dr. Hawkins
On Thu, May 23, 2013 at 2:36 PM, Devin Asay 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 delimiters? > I use

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 receive

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 wrote: > http://www.mergext.com under Downloads -> Free externals > > You need to login to

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 of

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 m

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 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 > getting

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 make

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 Softw

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 On Thu, May 23, 2013 at 2:17 PM, Mar

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 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 for as many got

  1   2   >