Re: mySQL and primary key

2023-04-30 Thread Monte Goulding via use-livecode
If you can connect remotely to the server then try using MySQL workbench 
(available from Oracle) if not then you will need to SSH to the server, login 
to mysql on command line and do it there.

> On 29 Apr 2023, at 9:40 pm, jbv via use-livecode 
>  wrote:
> 
> Hi list,
> 
> I have a mySQL table with 1350 entries that weights
> almost 20 Gb.
> I need to create a primary key on the "id" column.
> I have tried in phpMyAdmin as well as in a script with
> "ALTER TABLE myTable ADD PRIMARY KEY(id)", but each time
> I get a "504 Gateway Timeout" error, and no index is created.
> 
> What else can I try ?
> 
> Thank you in advance.
> jbv
> 
> ___
> 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: mySQL and primary key

2023-04-30 Thread Ralph DiMola via use-livecode
JBV,

This looks like a server timeout. There is a mySQL server ini file parameter
"ExecTimeLimit" There is also a phpMyAdmin ini file "LoginCookieValidity"
timeout parameter. If you can't get those changed(especially "ExecTimeLimit"
so you can do it by script) you will be forced to create a new table with a
primary key and copy the data over in chunks small enough to avoid a
timeout.

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 jbv via use-livecode
Sent: Saturday, April 29, 2023 7:40 AM
To: How to use LiveCode
Cc: j...@souslelogo.com
Subject: mySQL and primary key

Hi list,

I have a mySQL table with 1350 entries that weights almost 20 Gb.
I need to create a primary key on the "id" column.
I have tried in phpMyAdmin as well as in a script with "ALTER TABLE myTable
ADD PRIMARY KEY(id)", but each time I get a "504 Gateway Timeout" error, and
no index is created.

What else can I try ?

Thank you in advance.
jbv

___
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: mySQL and primary key

2023-04-30 Thread Mike Kerner via use-livecode
is this a local table?
the 504 sounds like you're connecting via an api

On Sat, Apr 29, 2023 at 7:41 AM jbv via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi list,
>
> I have a mySQL table with 1350 entries that weights
> almost 20 Gb.
> I need to create a primary key on the "id" column.
> I have tried in phpMyAdmin as well as in a script with
> "ALTER TABLE myTable ADD PRIMARY KEY(id)", but each time
> I get a "504 Gateway Timeout" error, and no index is created.
>
> What else can I try ?
>
> Thank you in advance.
> jbv
>
> ___
> 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
>


-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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: Creating 'read only' text files

2023-04-30 Thread Paul Dupuis via use-livecode
I don't know of a Livecode syntax per se to do this (i.e some syntax 
like: set the permissions of file tFile to read-only)


You can do this in Livecode using the shell() function (see the 
dictionary) to issue applicable mac or win command lines. For eample a 
Google search shows the command line to change a file's permissions on 
Windows is:


attrib +r file.txt

so you could code something like (not tested):

switch platform()
  case "Win32"
    set the hideConsoleWindows to true -- prevents windows console 
window from appears when the shell command executes
   put "attrib +r " & quote & tFile & quote into tCommand -- were tFile 
is the file (path and name with native \ delimiters) you want to make 
read-only

   put shell(tCommand) into tResult
   break
  case "MacOS"
    -- use chmod 744 apple.txt for you to have full access and everyone 
else read-only OR

    -- use chmod 444 apple.txt for everyone, you included, to be read-only
   put "chmod 444 " & quote & tFile & quote into tCommand -- were tFile 
is the file (path and name) you want to make read-only

   put shell(tCommand) into tResult
   break
end switch

This code may need some tweaking but I think this is the general 
approach to do what you want.


On 4/30/2023 7:35 AM, David V Glasgow via use-livecode wrote:

Hi folks,

Really simple question that I can’t see having been asked before, so here goes…

I have a stack that outputs small text files.  Each includes a hash value 
referencing part of itself that can be checked subsequently, so any change to 
the text can be flagged.

Is there a way I can easily create read-only files (Mac & Win) to discourage 
accidental user changes?  No need for encryption or hiding information anywhere, I 
just want to deter casual oopsies.

Thanks in anticipation...

Best Wishes,

David Glasgow
Honorary Professor, Nottingham Trent University
Sexual Offences, Crime and Misconduct Research Unit
Consultant Forensic & Clinical Psychologist
Carlton Glasgow Partnership
Director, Child & Family Training, York


LinkedIn 
___
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: Weird window behavior

2023-04-30 Thread David V Glasgow via use-livecode
Only just catching up with this (been walking in Scotland)…

Probably not tremendously informative now, but I’m not using Levure, I am using 
backdrop, and on Ventura.

I’ll check the state of RaiseWindows when I can - would it be expected to 
change depending on backdrop use?


Best Wishes,

David Glasgow
> On 28 Apr 2023, at 1:30 am, Marty Knapp via use-livecode 
>  wrote:
> 
> Bingo - it was “raiseWindows” being set to true. Setting that to false has 
> resolved the issue. Weird that it works fine on previous macOSes previous to 
> Ventura.
> ---
> Marty Knapp
> 
>> On Apr 27, 2023, at 2:35 PM, Mark Waddingham via use-livecode 
>>  wrote:
>> 
>> Okay that is strange - but the fact it is happening when levure is loaded 
>> suggests it is some property or mechanism it is adding.
>> 
>> The engine only really has three things (that I can think of) which change 
>> window stacking order…
>> 
>> The backdrop - which makes the engine *try* to keep all the windows next to 
>> each other, with the backdrop window immediately behind the bottom one; 
>> 
>> The ‘raiseWindows’ global property which is basically the same as the 
>> backdrop feature - except the backdrop has zero width and height.
>> 
>> The go command which raises a stack to the top (amongst those with same 
>> mode).
>> 
>> So i’m not sure how a script in levure could cause that effect - unless it’s 
>> setting ‘the raiseWindows’ to true (thus making the problem you are seeing 
>> the same as the backdrop issues that others are on Ventura).
>> 
>> Anyway, the fact it requires levure to be loaded for it to happen means we 
>> can track it down!
>> 
>> Warmest Regards,
>> 
>> Mark.
>> 
>> Sent from my iPhone
>> 
>>> On 27 Apr 2023, at 19:58, Marty Knapp via use-livecode 
>>>  wrote:
>>> 
>>> No, not using the backdrop feature. I did try the suggestion on bug 24200 
>>> to change the system setting "Group Windows By Application" in the "Desktop 
>>> and Dock System Setting" preference pane to true. Same behavior, even after 
>>> a restart. And it is happening in both the IDE and in a standalone. The 
>>> standalone is built with the Levure framework. In the IDE the issue only 
>>> happens *after* I’ve loaded the Levure framework.
>>> ---
>>> Marty Knapp
>>> 
 On Apr 27, 2023, at 9:39 AM, Mark Waddingham via use-livecode 
  wrote:
 
> On 2023-04-19 19:25, Marty Knapp via use-livecode wrote:
> Ever since I updated to Ventura on my Mac I've had this weird behavior 
> both in the IDE and in two different standalones - if I have more than 
> one stack open, when I click on a stack that is behind another stack to 
> bring it to the front, it very briefly comes to the front (flashes), then 
> goes back behind everything, even windows from other apps. If I click on 
> the title bar it does not do this. In the menubar is still indicates that 
> I'm in my app. It's not happening with any non-Livecode apps and it's 
> occurring on two different Macs. I’m not seeing this behavior on OSes 
> previous to Ventura.
> Am I going crazy?
 
 Do you (or anyone else who has chimed in on this list) have the backdrop 
 feature enabled?
 
 The reason I ask is that the behavior you describe is similar to this 
 report https://quality.livecode.com/show_bug.cgi?id=24199 (I think at 
 least) - which has now reduced to being due to the backdrop - 
 https://quality.livecode.com/show_bug.cgi?id=24200.
 
 Warmest Regards,
 
 Mark.
 
 -- 
 Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
 LiveCode: Build Amazing Things
 
 ___
 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

___
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-livecod

Creating 'read only' text files

2023-04-30 Thread David V Glasgow via use-livecode
Hi folks,

Really simple question that I can’t see having been asked before, so here goes…

I have a stack that outputs small text files.  Each includes a hash value 
referencing part of itself that can be checked subsequently, so any change to 
the text can be flagged.  

Is there a way I can easily create read-only files (Mac & Win) to discourage 
accidental user changes?  No need for encryption or hiding information 
anywhere, I just want to deter casual oopsies.

Thanks in anticipation...

Best Wishes,

David Glasgow
Honorary Professor, Nottingham Trent University
Sexual Offences, Crime and Misconduct Research Unit
Consultant Forensic & Clinical Psychologist
Carlton Glasgow Partnership
Director, Child & Family Training, York


LinkedIn 
___
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