Search found 208 matches
- Wed Sep 29, 2021 7:31 am
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: What algorithm for random() function?
- Replies: 26
- Views: 8626
Re: What algorithm for random() function?
And it's worth noting that the only reason it's come up here isn't related to building anything in LiveCode, but a battle of wits with someone else who isn't here and isn't using LiveCode. If there's a project-related reason why knowing the algo is important I'd help you find it. But for just settl...
- Wed Sep 29, 2021 7:17 am
- Forum: Talking LiveCode
- Topic: counting occurrences
- Replies: 17
- Views: 14877
Re: counting occurrences
I know this is an ancient thread, but people will still find it when searching, so here's a pretty simple way to count occurrences. The trick is that itemDelimiter can be more than one character. put "a million balloons were allowed" into myString set the itemdelimiter to "ll" -- (two lowercase L's)...
- Tue Jul 13, 2021 9:55 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: What algorithm for random() function?
- Replies: 26
- Views: 8626
Re: What algorithm for random() function?
I just told you. It's literally every sentence of my reply. That was the whole point.richmond62 wrote:And what was that reason?
- Tue Jul 13, 2021 5:55 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: What algorithm for random() function?
- Replies: 26
- Views: 8626
Re: What algorithm for random() function?
Because I rarely find what I'm looking for in the docs. That's why when I went to look up random(), I thought, "They're not even gonna bother to mention what algorithm they use." I was right for a reason.
- Tue Jul 13, 2021 2:50 am
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: What algorithm for random() function?
- Replies: 26
- Views: 8626
Re: What algorithm for random() function?
A few years ago a professor created a new algorithm, PCG. On her website she details the various qualities desirable in an algorithm, and how the existing algorithms aren't as good as PCG. Granted that she could be biased, but I haven't seen any reputable criticism of her work or her claims. I'd lov...
- Mon Jul 12, 2021 6:45 am
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: What algorithm for random() function?
- Replies: 26
- Views: 8626
What algorithm for random() function?
I was not at all surprised that the Dictionary is completely silent about what algorithm the random() function uses.
For example, for Javascript, it depends on the web browser, but most seem to use xorshift128+.
Anyone know what algorithm LiveCode uses?
For example, for Javascript, it depends on the web browser, but most seem to use xorshift128+.
Anyone know what algorithm LiveCode uses?
- Sun Feb 14, 2021 4:13 am
- Forum: Databases
- Topic: "The database disk image is malformed"
- Replies: 1
- Views: 3207
Re: "The database disk image is malformed"
It apparently was a corrupt database. I found the new "recover" command, which fixed the problem. Running from the MacOS Terminal:
Now I know how much hibiscus to use to make my tea.
Code: Select all
sqlite3 corruptedFile.sql .recover | sqlite3 recoveredFile.sql
- Sun Feb 14, 2021 3:35 am
- Forum: Databases
- Topic: "The database disk image is malformed"
- Replies: 1
- Views: 3207
"The database disk image is malformed"
When running this query in my stack: SELECT id,noteName,noteData from noteTable WHERE noteData LIKE "%hibiscus%" I get the error: revdberr,Database Error: The database disk image is malformed If I open the db in the MacOS app "DB Browser for SQLite", the query runs just fine. Also, my queries *used*...
- Fri Jan 15, 2021 5:49 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Overflow text in a Data Grid table?
- Replies: 4
- Views: 2404
Re: Overflow text in a Data Grid table?
Well, that’s what I want: when there’s no data in the next cell, I’d like the first cell to overflow into the next.
- Fri Jan 15, 2021 12:12 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Overflow text in a Data Grid table?
- Replies: 4
- Views: 2404
Overflow text in a Data Grid table?
I don't suppose there's an easy way to get long text in one cell to overflow into the next cell in a Data Grid table, the way it would naturally in a spreadsheet?
- Wed Jan 13, 2021 5:04 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Various ways of matching a line
- Replies: 14
- Views: 8115
Re: Various ways of matching a line
It seems like the advantage of using an associative array, if there is one, is to make the code more readable. Referring to the cells this way makes sense: fruit[id] >> returns name, where "id" is a variable fruit[fName] >> returns id, where "fname" is a variable fruit[id]["quality"] >> returns qual...
- Wed Jan 13, 2021 2:55 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Various ways of matching a line
- Replies: 14
- Views: 8115
Re: Various ways of matching a line
Thank you very much. I can see that it works, but I'm having a hard time wrapping my head around it. Before you posted, I went ahead and made the functions with lineOffset, so at least that works too.
- Wed Jan 13, 2021 8:37 am
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Various ways of matching a line
- Replies: 14
- Views: 8115
Re: Various ways of matching a line
I'm facing a problem which reminded me of this thread. I'm unsure whether to use arrays or lineOffset, and unfortunately the documentation for multidimensional associative arrays is pretty meagre. Say I have a table of data (a string): 1 apple 3 2 banana 5 3 cherry 4 4 date 2 The columns are ID, nam...
- Tue Jan 12, 2021 2:24 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: See both variables and code in the debugger?
- Replies: 51
- Views: 20806
Re: See both variables and code in the debugger?
Thank you all very much for the help.
- Mon Jan 11, 2021 2:34 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: See both variables and code in the debugger?
- Replies: 51
- Views: 20806
Re: See both variables and code in the debugger?
I've mentioned 3 times that I'm running MacOS. Specifically, it's 10.13.6, not that it should matter.
It may be that Variable Monitor didn't cause my problems, but given all the downtime I had trying to get that and LC working, I'm not going to risk trying it again until I really need it.
It may be that Variable Monitor didn't cause my problems, but given all the downtime I had trying to get that and LC working, I'm not going to risk trying it again until I really need it.