Generating Random numbers to conform a distribution (David V Glasgow)

2022-06-08 Thread Hillen Richard via use-livecode
Perhaps this helps:

I needed lists of samples that obeyed a certain distribution for a few random 
experiments.

I created these with help of built-in Excel-functions and then imported them 
into Livecode.

Richard.
___
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


How to Do: Download per http

2022-04-01 Thread Hillen Richard via use-livecode
Helo Paul,
It works! Thank you!
Richard.

> 
> 
> On 3/31/2022 3:00 PM, Hillen Richard via use-livecode wrote:
>> Hello,
>> 
>> My Mac is by usb connected to an iPhone, on which is running the 
>> data-aggregator Phybox.app and aggregates the sensor-data of the internal 
>> acceleration-sensor.
>> 
>> On Mac, when I write into the Safari address bar
>> "http://192.168.178.66/export?format=1?,
>> I receive the sampled data in a .xls-file by download from the iPhone-app.
>> 
>> I would like to download this file by LiveCode. But  I have no plan, how to 
>> do it.
>> 
>> May you help? I am very grateful for tips.
>> 
>> Richard.
>> 
> 
> I think you can do:
> 
> put URL "http://192.168.178.66/export?format=1"; into URL 
> ("binfile:"&tLocalFile) -- where the variable tLocalFile contains the 
> file path to a new .xls file, such as 
> "/Users/Fred/Documents/mySensorData.xls"


___
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


How to Do: Download per http

2022-03-31 Thread Hillen Richard via use-livecode
Hello,

My Mac is by usb connected to an iPhone, on which is running the 
data-aggregator Phybox.app and aggregates the sensor-data of the internal 
acceleration-sensor.

On Mac, when I write into the Safari address bar
"http://192.168.178.66/export?format=1“,
I receive the sampled data in a .xls-file by download from the iPhone-app.

I would like to download this file by LiveCode. But  I have no plan, how to do 
it.

May you help? I am very grateful for tips.

Richard.
___
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: Has anyone experience of GPS on iPhone?

2020-05-06 Thread Hillen Richard via use-livecode
Hello Graham,

20 years ago I started to use GPS-technique and found the same mysteries as you 
do now.

I learned that there a two main reason for the variation of location data:

Atmosperic density variations cause short term runtime variations and
Different relativ positions of satellites cause long term triangulation errors.

So I sampled at a constant location over some days the position data delivered 
from a gps-receiver taken every 10 seonds.

First I plotted the data and found that there were local shorttime-variations 
around a center, which was wandering slowly over the plot-area. The 
shorttime-fluctuations were most in a range of +-5m, the longtime-area showed - 
if I remember right - a radius from +-20m.

After that I started to calculate time-series of mean-values over different 
minute-intervalls and learned by plotting the result again, how to smooth my 
data best.

Nowadays you will of course get smaller short-time variations using the more 
intelligent gps-receiver of an iphone, but it probably gives you an impression 
about what is going on there.

Richard.



> 
> Message: 17
> Date: Wed, 6 May 2020 15:09:16 +0200
> From: Graham Samuel 
> To: How to use LiveCode 
> Subject: Re: Has anyone experience of GPS on iPhone?
> Message-ID: <074980d0-f69d-45af-9891-5ceb351f3...@mac.com>
> Content-Type: text/plain; charset=utf-8
> 
> Bill, I think you are confirming that there is some mystery here. There are a 
> lot of apps that seem to get location, and measures derived from location, 
> almost completely right, whereas I am having trouble doing so with what must 
> be the same essential data.
> 
> Take the problem of measuring the length of a country walk (I mean a walk not 
> in a straight line). My basic approach is to process locationChanged 
> messages, which unsurprisingly are triggered every time the GPS-measured 
> location changes. So as not to get overwhelmed with very small, frequent 
> changes, I only process a locationChanged message every 3 seconds - I know at 
> least one other app that does this. As a person probably walks up to two 
> metres a second, this fits in with what we know about accuracy, I think. The 
> method is very simple. Every time we respond to a locationChanged message, we 
> work out the straight line distance delta as in
> 
>  delta = (where we were 3 seconds ago) - (where we are now)
> 
> Ignoring the sign of the result, of course. This can be done by Haversine or 
> similar algorithms for measuring short distances on the Earth?s surface - 
> it?s essentially a Pythagoras calculation. Then we add up all the deltas and 
> we know how far we walked on the trip with a fair if not complete degree of 
> accuracy - easy! 
> 
> Only there are complications. Of course if any delta is zero, it doesn?t 
> contribute to the trip; but what if it?s **nearly** zero - is it sensible to 
> ignore very small deltas on the grounds that they are due to GPS wobble, or 
> should we put them all in? 
> 
> Here?s what happened when I tried to do it: first I calculated the deltas to 
> two decimal places, and I found that I was badly underestimating the distance 
> walked; so then I pushed up the accuracy of the calculation to 5 decimal 
> places. Sure enough, the measured route got longer in kilometers, until I 
> noticed that if I simply put the phone on the grass and left it, so it wasn?t 
> moving at all, in about 45 minutes I?d accumulated a completely spurious half 
> a kilometre of walking! The small variations in the GPS signal (what I call 
> the wobble) must have been responsible, since there was no other source of 
> data but the GPS reading.
> 
> How then to avoid either under- or over-estimating the trip distance? Plenty 
> of apps have done it but I just can?t see how, although I keep tinkering with 
> the parameters. Of course I can never forget that my scripting might just be 
> plain wrong, but so far my incremental method hasn?t worked sufficiently 
> well, in the sense that if run the app and choose to walk in an exact 
> straight line, I can compare a single measure of distance from the starting 
> point with my integral approach. So far the result is not even close. As you 
> say, intensive Internet searches are called for.
> 
> I wish all this were easier.
> 
> Graham
> 


___
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: use-livecode Digest, Vol 196, Issue 13

2020-01-13 Thread Hillen Richard via use-livecode
Hello Brian, Hello Phil


> Message: 4
> Date: Sun, 12 Jan 2020 17:00:58 -0500
> From: Brian Milby 
> To: How to use LiveCode 
> Subject: Re: shell() and pdftotext
> Message-ID: <565b0e85-464e-4a5b-9227-c6ab100b64ca@Spark>
> Content-Type: text/plain; charset="utf-8"
> 
> My guess is that shell can?t find your executable. ?Try using full paths.
> 
> Thanks,
> Brian


> Message: 6
> Date: Sun, 12 Jan 2020 17:48:09 -0800
> From: Phil Davis 
> To: Brian Milby via use-livecode 
> Subject: Re: shell() and pdftotext
> Message-ID: <5579e9a4-86c8-c8ed-defe-1e24422c5...@pdslabs.net>
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> To find the full path, this may work - open Terminal and type:
> 
> ??? which pdftotext
> 
> and it should display the path to the copy of pdftotext that the OS runs 
> when you type the 'pdftotext' command.
> 
> Phil Davis

a) using the full path worked. 

b) asking for the path didn´t work, but see a)

Thank you for your quick and usefull help!
Richard.
___
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


shell() and pdftotext

2020-01-12 Thread Hillen Richard via use-livecode
Hello,

I want to extract .txt from a pdf-file using Livecode 9.5 on macOS Catalina.

Therefore I installed from http://www.xpdfreader.com/
the xpdf-tools-mac-4.02 
and using the Terminal with „pdftotext /Users/hillen/Desktop/inter.pdf“ 
I get a clean text-file inter.txt. Wonderful!

So I hopefully wrote in Livecode:
 
——
 put "/users/hillen/Desktop/inter.pdf" into fn
 put "pdftotext " & fn into Kommando
   
if there is not a file fn then
  answer  „no SourceFile!"
  exit to top
 end if

get shell(quote & Kommando & quote)
   
answer it & return & the result
——

But extracting doesn´t work and I get the answer:

/bin/sh: line 1: pdftotext /users ……pdf: No such file or directory

and the result ist 127.



Typing to Terminal „pdftotext“ I get a List with command-options. 

With 
get shell(„pdftotext“) with and without quotes

I get the answer „/bin/sh: line 1: pdftotext: command not found“



What is wrong? May you please help?

Richard.
___
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


Livecode 9.5, BrowserWidget, Community Edition

2020-01-08 Thread Hillen Richard via use-livecode
Hello,

I want to show a .pdf with url httpAdress, so I got a fresh widget named 
„Browser“ and did a button with the script

on mouseup

put 
"https://programmausdruck.br.de/radio/br-klassik/programmkalender/br-klassik120.jsp?day=2020-01-09";
 into httpAdress

set the url of widget "Browser" to httpAdress

end mouseup


After mouseup download starts, stops, but nothing is to see in the browser 
window. Why?

May you help?

Thank you,
Richard.

  
___
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


Get only Pathname of a dragdropped Object

2018-04-23 Thread Hillen Richard via use-livecode
Thank you all for your help!
Richard.

___
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


Get only Pathname of a dragdropped Object

2018-04-22 Thread Hillen Richard via use-livecode
Hello list,

I´m looking for a solution to get the path to a Folder by dragdropping it into 
my (macOS)app without that the whole Folder is copied  in the drgdrop-process.


Is there a solution?


Thank you in advance,
Richard..



___
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 can?t save Standalone

2017-12-11 Thread Hillen Richard via use-livecode
Hello, 

thank you for your helpfull answers.

-> Richard Gaskin: syserr is 2, wrong adress

-> Mike Bonner: Standalone tries to save the datastack in folder Contents/MacOS 
of the App-Package; I changed the folder to Resources/_MacOS and it worked ok.

Richard H.
___
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



can´t save Standalone

2017-12-09 Thread Hillen Richard via use-livecode
Hello,

There is - in splash screen method - a very simple stack Main with a substack 
Data, used since 2007.
Stack Main opens stack Data. In stack Data there is a button "Save" with script 

"save this stack
if the result is not empty then answer the result"

Using this proved datastack-method in the development environment, it´s ok;
But after making a new standalone with "substacks moved in separate stackfiles" 
if I press the Save-button in stack Data I get "can´t open stack backup file".

So I cant´t save changed data.

I have built the stack from button up again with the actual LC-Version, but 
same Error.
Is there any help outside?

Thank you for your helpful hints ,
Richard.

(macOS 10.13.2, Livecode 8.1.8 Community Edition)


___
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