Re: And What About the Internet Date and Time?

2011-08-19 Thread Gregory Lypny
Hi Peter,

Yes, seconds converted from UTC is the only reliable timestamp.  I asked about 
time zone settings in local machines for display purposes.  We may have a 
timestamp that is absolutely correct but if that is to be displayed for the 
user in a LiveCard app on their local machine, say as a confirmation or 
receipt, it will not display the correct time unless the user’s time zone is 
set correctly.

Gregory


On Fri, Aug 19, 2011, at 12:53 PM, use-livecode-requ...@lists.runrev.com wrote:

 AFAIK, It doesn't matter. You can just fetch the universal (GMT) time and 
 convert it to seconds. This will be independent of the time zone the user 
 sets. If someone in Australia submits data one second after someone in New 
 York, the timestamp will be 1313704257 in the first case and 1313704258 in 
 the second case. Ignore the time zone altogether. (Someone correct me if I'm 
 wrong, but I just tested this, changing my time zone in my system settings in 
 between trials, and indeed, the two results were within 30 seconds.)
 
 -- Peter

___
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


And What About the Internet Date and Time?

2011-08-18 Thread Gregory Lypny
Hello again everyone,

Okay, please don’t hate me.  I'm still trying to nail down a reasonably 
accurate system-independent date and time stamp to use in my student client app 
that will submit and retrieve data from my Mac.  I will post a modest 
enhancement to Stephan Barncard’s excellent returnNISTime function shortly.

My question is, How does LiveCode know the local computer’s time zone when we 
ask for the date in the Internet Date format?  My guess is that the computer’s 
owner has to have set it.  And if the person is on the move, it may be 
incorrect even if it was set at their primary location.  Yes?

Gregory





___
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


Redux - Getting the Date and Time From the Internet

2011-08-18 Thread Gregory Lypny
Hello everyone,

Here is a small enhancement to Stephen Barncard’s handler.  If you call the 
function with the option “report” as in 

put nistTime(“report”) into field “Date and Time”

you’ll get a summary.  Set the field’s tabstops to 380 for a nice display.

After playing with it, I’ve come to the conclusion that the only correct, or 
most nearly correct, system-independent timestamp is the seconds as converted 
from a time server such as NIST.  However, even that won’t display correctly in 
any other date-time format on a local machine if the time zone is set 
incorrectly.  That means that the only display format that is sure to be 
correct is NIST’s GMT, uncontaminated by local time zone settings.



Regards,

Gregory



function nistTime pOption
   -- Returns UTC time in RFC-867 (Daytime) format from the NIST
   -- pOption is array or report
   
   /*
   N.B., The only datestamp that is independent of local system settings is the 
seconds converted
   from NIST date and time (see nistSeconds).  The only system-independent date
   and time for display purposes on a local LiveCode app is NIST GMT date (see 
nistGMTInternetDate).
   Converting nistSeconds to any date format will not display the correct date 
and time if the time zone
   in the local machine is incorrect!
   */
   
   -- This part by Stephen Barncard
   put time-C.timefreq.bldrdoc.gov:13 into pServerURL
   set the socketTimeoutInterval to 1000
   open socket to pServerURL
   write  to socket pServerURL
   read from socket pServerURL for 49
   put it into nistDateTime 
   put the result into theResult
   close socket pServerURL
   delete line 1 of nistDateTime -- UTC time in RFC-867
   
   -- From the local computer's system settings
   put the seconds into systemSeconds
   put the internet date into systemInternetDate
   
   -- Convert NIST date and time to other formats
   get word 2 to 3 of nistDateTime
   replace - with comma in it
   replace : with comma in it
   replace space with comma in it
   add 2000 to the first item in it  -- Kludge!  Assume it is the 21st century.
   put comma  0 after it
   convert it from dateitems to internet date -- Will have the correct GMT date 
and time but incorrectly the system's time zone
   put  into the last word of it -- Correct time zone GMT
   put it into nistGMTInternetDate
   convert it from internet date to seconds
   put it into nistSeconds -- The correct seconds which should be close to 
systemSeconds 
   
   -- Correct system Internet date
   put nistSeconds into correctedSystemInternetDate
   convert correctedSystemInternetDate from seconds to internet date 
   
   -- Compare NIST and system seconds
   put (systemSeconds - nistSeconds) into dSeconds -- The simple difference 
generally be less than ten seconds apart if NIST server is working optimally
   
   switch pOption
  case empty
 return  nistDateTime -- default
 break
  case array
 put nistDateTime into theOutput[NIST Date and Time]
 put nistGMTInternetDate into theOutput[NIST Date]
 put nistSeconds into theOutput[NIST Seconds]
 put systemSeconds into theOutput[System Seconds]
 put dSeconds into theOutput[Difference]
 put systemInternetDate into theOutput[System Date]
 put correctedSystemInternetDate into theOutput[Corrected System Date]
 return theOutput
 break
  case report
 put NIST date and time:  tab  nistDateTime  return  \
   NIST GMT date:  tab  nistGMTInternetDate  return  \
   NIST seconds since midnight 1 Jan 1970:  tab  nistSeconds  
return  \
   Local system seconds since midnight 1 Jan 1970:  tab  
systemSeconds  return  \
   Difference (local minus NIST):  tab  dSeconds  return  \
   Local system date:  tab  systemInternetDate  return  \
   Corrected local date:  tab  correctedSystemInternetDate into 
theOutput
 return theOutput
 break
  default
 return nistDateTime
 break
   end switch
   
end nistTime
___
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: Grabbing the Date and Time From a Time Server on the Internet

2011-08-17 Thread Gregory Lypny
I too am scratching my head on that one, Bob.

Gregory


On Tue, Aug 16, 2011, at 6:46 PM, use-livecode-requ...@lists.runrev.com wrote:

 Message: 2
 Date: Tue, 16 Aug 2011 10:31:13 -0700
 From: Bob Sneidar b...@twft.com
 To: How to use LiveCode use-livecode@lists.runrev.com
 Subject: Re: Grabbing the Date and Time From a Time Server on the
   Internet
 Message-ID: 5f787920-e6f0-41c4-b793-3f1b14e60...@twft.com
 Content-Type: text/plain; charset=windows-1252
 
 I see the problem here. The url I use does not return the year! And I cannot 
 just get the year from the system date, because that defeats the whole 
 purpose of a RealTime function. Going to have to do a bit more research. 
 
 Bob
 
 
 On Aug 16, 2011, at 9:33 AM, Gregory Lypny wrote:
 
 Hi Bob,
 
 Good summary, Bob.  It summarizes nicely the issues that I?m dealing with in 
 creating a client-side student helper app.  Your RealTime function works 
 nicely.  The only thing missing is the year, which again, is something that 
 a user could set manually.
 
 Regards,
 
 Gregory
 

___
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: Retrieving Date and Time From a Remote Computer

2011-08-17 Thread Gregory Lypny
Hi Jacqueline,

Yes, the date and time must be embedded in the file.  An example would be that 
of subjects participating in an experiment where the client app is the vehicle 
running it.  The app may be a simple questionnaire or a simulation that tracks 
their choices and activities.  The responses are sent via FTP to the server and 
aggregated in a file whose format might be something like

Subject 8, Date Stamp, Time Stamp, Obs 1, Obs 2, Obs 3, etc.
Subject 1, Date Stamp, Time Stamp, Obs 1, Obs 2, Obs 3, etc.
Subject 1, Date Stamp, Time Stamp, Obs 1, Obs 2, Obs 3, etc.
Subject 2, Date Stamp, Time Stamp, Obs 1, Obs 2, Obs 3, etc.
Subject 3, Date Stamp, Time Stamp, Obs 1, Obs 2, Obs 3, etc.
Subject 7, Date Stamp, Time Stamp, Obs 1, Obs 2, Obs 3, etc.

More complicated experiments might involve subject interactions, where the 
choice of one depends on the choices of others, so the timing is critical.

You might ask, Why not do this on the web using iRev, so that delivery is 
server-side?  The answer is that web deployment is a pain in comparison to a 
standalone deployment.  I’ve done a few experiments on the web using my on-rev 
account, and I find that a standalone gives me much more flexibility and I can 
do it in a fraction of the time.


Regards,

Gregory



On Tue, Aug 16, 2011, at 6:46 PM, Jacqueline Landman Gay wrote:

 I'm not sure if your setup will allow it, but the actual delivery date 
 and time will be listed on the server. Can you just retrieve the date 
 from there, separately from the client app? Does the date need to be 
 embedded in the file itself?

___
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: Using the Detailed Files Function to Get Info From a Remote Machine

2011-08-17 Thread Gregory Lypny
Thank you, Roger.  This ought to do the trick!

Regards,

Gregory


On Tue, Aug 16, 2011, at 6:46 PM, use-livecode-requ...@lists.runrev.com wrote:

 If all you need is the modified date/time of a file from an FTP site, the
 MDTM command works well.
 
 put libURLftpCommand(MDTM   pathToFile, tFtpServer, tFtpUserName,
 tFtpUserPassword) into tMDTM
 answer tMDTM
 
 The commands like LIST, RETR, etc. that need an open socket won't work with
 this form.  Commands which perform an action such as renaming a file work
 well, and return a simple result string.
 
 I wish there was a get the detailedFTPfiles command in LC.
 
 http://www.nsftools.com/tips/RawFTP.htm#MDTM
 
 ?Roger

___
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: Retrieving Date and Time From The Internet

2011-08-17 Thread Gregory Lypny
Much obliged, Scott.

Gregory


On Tue, Aug 16, 2011, at 6:46 PM, Scott Rossi wrote:

 A fun challenge.  Here's one option, limited to a single time (US Eastern),
 with no guarantee of reliability (can any Web-based service truly claim
 this?):
 
 function timeStamp
   put url http://www.atomictime.net/front.html; into temp
   wait 500 millisecs with messages
   put url http://www.atomictime.net/time_tel.html?2; into temp
   repeat with N = number of lines of temp down to 1
  if line N of temp is not empty then return line N of temp
   end repeat
 end timeStamp
 
 The reason for the dual URLs is the host requires initial access through a
 home page.  Only thing I can guess is there's some back-end foolery going on
 that's not accessible (at least I can't see anything that's apparent, but
 maybe that's just me).

___
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: Using the Detailed Files Function to Get Info From a Remote Machine

2011-08-17 Thread Gregory Lypny
Hi Andre,

Sorry, I made a mistake: there are no timestamps for files that have never been 
modified.

Gregory


On Tue, Aug 16, 2011, at 6:46 PM, Andre Garzia wrote:

 Message: 9
 Date: Tue, 16 Aug 2011 15:08:02 -0300
 From: Andre Garzia an...@andregarzia.com
 To: How to use LiveCode use-livecode@lists.runrev.com
 Subject: Re: Using the Detailed Files Function to Get Info From a
   Remote  Machine
 Message-ID:
   CAF3jwTmDYFqk+pH4HvStFD0=8u_5+we-h2vayo33slvp00w...@mail.gmail.com
 Content-Type: text/plain; charset=windows-1252
 
 Gregory,
 
 Are you sure that they don't because they usually return the same output as
 ls which contains such data strange...
 
 andre

___
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


Ask Password and Login Screen

2011-08-17 Thread Gregory Lypny
Hello everyone,

I’m building a startup stack with a sign-in requiring a user ID and password.  
I would use LiveCode’s built-in Ask Password command but that provides only a 
password field.  What I have so far is fine except that I’d like to be able to 
provide privacy for the entry of the password like Ask Password does.  Any 
suggestions would be most appreciated.

Gregory


___
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: Retrieving Date and Time From The Internet

2011-08-17 Thread Gregory Lypny
Hi Stephen Barncard and Andre Garzia,

Cool functions!  Thank you for sharing.  Never thought my original question was 
going to kick up so much dust!

Gregory


___
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: Ask Password and Login Screen

2011-08-17 Thread Gregory Lypny
Thanks Devin,

It’s exactly what I need.  I’ll play with the handler in the behaviour button a 
bit so that it distinguishes between the user ID field and the password field.


Regards,

Gregory



On Wed, Aug 17, 2011, at 1:00 PM, use-livecode-requ...@lists.runrev.com wrote:

 Gregory,
 
 I have a stack on Rev Online called Password Field that demonstrates a 
 technique for password fields that use bullet characters instead of 
 asterisks. It could easily be adapted to non-password fields.
 
 Devin

___
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


Retrieving Date and Time From a Remote Computer

2011-08-16 Thread Gregory Lypny
Hello everyone,

Another date and time retrieval question: How can I retrieve the date and time 
from my remote Mac?

Regards,

Gregory

___
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


Using the Detailed Files Function to Get Info From a Remote Machine

2011-08-16 Thread Gregory Lypny
Hello everyone,

Can the Detailed Files function be used to get file information from a remote 
Mac or am I limited to the listing provided by put url (“ftp://...”)?

Regards,

Gregory


___
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: Using the Detailed Files Function to Get Info From a Remote Machine

2011-08-16 Thread Gregory Lypny
Thanks Andre,

Much obliged.

Gregory


On Tue, Aug 16, 2011, at 11:44 AM, use-livecode-requ...@lists.runrev.com wrote:

 Message: 22
 Date: Tue, 16 Aug 2011 12:20:35 -0300
 From: Andre Garzia an...@andregarzia.com
 To: How to use LiveCode use-livecode@lists.runrev.com
 Subject: Re: Using the Detailed Files Function to Get Info From a
   Remote  Machine
 Message-ID:
   caf3jwtkuuqjektbojjfpq9vc0yx4is2ihgh7bx-fneu82kt...@mail.gmail.com
 Content-Type: text/plain; charset=windows-1252
 
 Gregory,
 
 You can't access remote machines unless they have an FTP server or something
 similar or you can mount their volumes as a disk. If you mount the remote
 machine volumes, then you can use the detailed files but I think that
 appleshare file sharing only works on LAN.
 
 You best option would be to use:
 
 libURLSetFTPListCommand LIST
 put url ftp://myserver/files/;
 
 I think LIST is the default choice, so you should already see something
 similar to the detailed files. If your remote mac has no FTP server enabled
 and it is not on LAN with File Sharing enabled, then unless you have
 something running there, you can't get a file listing.
 
 andre

___
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: Grabbing the Date and Time From a Time Server on the Internet

2011-08-16 Thread Gregory Lypny
Hi Bob,

Good summary, Bob.  It summarizes nicely the issues that I’m dealing with in 
creating a client-side student helper app.  Your RealTime function works 
nicely.  The only thing missing is the year, which again, is something that a 
user could set manually.

Regards,

Gregory



On Tue, Aug 16, 2011, at 11:44 AM, use-livecode-requ...@lists.runrev.com wrote:

 Message: 1
 Date: Mon, 15 Aug 2011 17:04:42 -0700
 From: Bob Sneidar b...@twft.com
 To: How to use LiveCode use-livecode@lists.runrev.com
 Subject: Re: Grabbing the Date and Time From a Time Server on the
   Internet
 Message-ID: 71dfe006-b408-43b4-8cec-ab4f1fe20...@twft.com
 Content-Type: text/plain; charset=us-ascii
 
 The Internet Date returns the date and time, along with the current time zone 
 set in your preferences. If the user changes his date and time manually 
 though, it will faithfully return whatever the user enters. Querying a time 
 server on the internet will always return the real date and time. 
 
 Suppose you had a trial scheme which expired the license after 30 days. The 
 easiest way to defeat that would be to always set the clock back whenever you 
 used the software. But that would be to no avail if you check the RealTime 
 (as I named my function). 
 
 Also, Windows Clients are sometimes configured to get the date and time from 
 an internal time server running on the network. If that time server service 
 stops functioning and the admin doesn't know it, the time can drift quite a 
 bit aver several weeks. Any app that was critically dependent on knowing the 
 exact time might not work correctly. 
 
 Someone mentioned that if you were using sql, that you could query the sql 
 server for the date and time. This actually has a real advantage over a time 
 server, as NTP or even HTTP could be blocked by a personal firewall using 
 ports or a blacklist, but no one could firewall off the sql server you need 
 to run your application! 
 
 Bob

___
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: Retrieving Date and Time From a Remote Computer

2011-08-16 Thread Gregory Lypny
Hi Bob,

No, just my office Mac a few kilometres away.  I was thinking of other ways of 
not relying on the date and time settings of users who would FTP data to me.  
If my client app can grab the date and time from my office make, then I have a 
consistent timestamp that I can rely on.


Gregory



On Tue, Aug 16, 2011, at 11:44 AM, use-livecode-requ...@lists.runrev.com wrote:

 Message: 24
 Date: Tue, 16 Aug 2011 08:24:30 -0700
 From: Bob Sneidar b...@twft.com
 To: How to use LiveCode use-livecode@lists.runrev.com
 Subject: Re: Retrieving Date and Time From a Remote Computer
 Message-ID: 3fcb9ed9-3960-40b9-b391-9abf6dbac...@twft.com
 Content-Type: text/plain; charset=us-ascii
 
 Remote as in a different time zone?? If they are both set to query a time 
 server, then the remote mac will ALWAYS have the same time as the local one. 
 If it is always in the same time zone, calculate it. 
 
 Apart from that, I suppose you would have to ssh in which means setting up 
 firewalls (ick). Or else you would have to set up some kind of server that 
 could be queried, but still firewall issues. 
 
 Bob

___
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: Retrieving Date and Time From a Remote Computer

2011-08-16 Thread Gregory Lypny
Hi Stephen,

Yes, and Bob Sneidar has kindly provided us with a function that does that (see 
Re: Grabbing the Date and Time From a Time Server on the Internet”).  The only 
thing it lacks at the moment is the year.  I asked about doing the same with a 
remote computer only to explore an alternative.

Regards,

Gregory



On Tue, Aug 16, 2011, at 1:00 PM, Stephen Barncard wrote:

 Wouldn't it be better to get time data from a place that's mission-critical
 consistent, like the NAVY and WWV? Then you wouldn't have to maintain it or
 deal with outages.


___
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: Using the Detailed Files Function to Get Info From a Remote Machine

2011-08-16 Thread Gregory Lypny
Thanks Andre,

The LIST option returns what url (“ftp://...”) does in the absence of 
libURLSetFTPListCommand, so I guess the idea of the command is to toggle 
between LIST and NLST.  Unfortunately, neither returns the creation or 
modification dates of the files.

Regards,

Gregory


On Tue, Aug 16, 2011, at 11:44 AM, use-livecode-requ...@lists.runrev.com wrote:

 Gregory,
 
 You can't access remote machines unless they have an FTP server or something
 similar or you can mount their volumes as a disk. If you mount the remote
 machine volumes, then you can use the detailed files but I think that
 appleshare file sharing only works on LAN.
 
 You best option would be to use:
 
 libURLSetFTPListCommand LIST
 put url ftp://myserver/files/;
 
 I think LIST is the default choice, so you should already see something
 similar to the detailed files. If your remote mac has no FTP server enabled
 and it is not on LAN with File Sharing enabled, then unless you have
 something running there, you can't get a file listing.
 
 andre

___
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: Grabbing the Date and Time From a Time Server on the Internet

2011-08-15 Thread Gregory Lypny
Thanks for this, Bob.  I did some more poking around myself and this seems to 
work.  Not too difficult remove the HTML.

on mouseUp
   put url (http://tycho.usno.navy.mil/cgi-bin/timer.pl;)
end mouseUp



On Mon, Aug 15, 2011, at 3:45 PM, use-livecode-requ...@lists.runrev.com wrote:

 Message: 3
 Date: Mon, 15 Aug 2011 10:25:06 -0700
 From: Bob Sneidar b...@twft.com
 To: How to use LiveCode use-livecode@lists.runrev.com
 Subject: Re: Grabbing the Date and Time From a Time Server on the
   Internet
 Message-ID: 5ec0da15-9be3-41d9-b047-250e2733c...@twft.com
 Content-Type: text/plain; charset=iso-8859-1
 
 This returns a ton of html, from which the date time can be filtered using 
 H2*, but since it takes about 30 seconds to run, and returns 32 entries, 
 I am not sure how useful this would for him, if he wanted an exact time 
 (within a second or two). 
 
 Time servers are NTP:\\ aren't they? Looks like the revURL library does not 
 support NTP, or not that I can see. Any attempt to use it in a URL returns 
 empty in it and invalid URL: in the result. 
 
 A quick browse for http based time servers came up dry. 
 
 Bob

___
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: Grabbing the Date and Time From a Time Server on the Internet

2011-08-15 Thread Gregory Lypny
Thanks Stephen,

I too came across this one today.  Looks pretty easy to parse.

Gregory


On Mon, Aug 15, 2011, at 3:45 PM, use-livecode-requ...@lists.runrev.com wrote:

 Message: 14
 Date: Mon, 15 Aug 2011 11:57:24 -0700
 From: stephen barncard stephenrevoluti...@barncard.com
 To: How to use LiveCode use-livecode@lists.runrev.com
 Subject: Re: Grabbing the Date and Time From a Time Server on the
   Internet
 Message-ID:
   CAFmQfH+BdsdJb3Dmzz3TbmTm=ete4mdrxjyykx3w0xug0bx...@mail.gmail.com
 Content-Type: text/plain; charset=UTF-8
 
 Bob, I don't see a ton of html at
 http://tycho.usno.navy.mil/cgi-bin/timer.pl
 It's just about as simple as it could be presented. It took just a few lines
 of Livecode to scrape. Determine AM and PM and one could even translate to
 24 hour clock. There's about a half second of latency.
 
 I just see this html:
 
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 3.2 Final//EN
 html
 body
 TITLEWhat time is it?/TITLE
 H2 US Naval Observatory Master Clock Time/H2 H3PRE
 BRAug. 15, 18:52:50 UTC Universal Time
 BRAug. 15, 02:52:50 PM EDT  Eastern Time
 BRAug. 15, 01:52:50 PM CDT  Central Time
 BRAug. 15, 12:52:50 PM MDT  Mountain Time
 BRAug. 15, 11:52:50 AM PDT  Pacific Time
 BRAug. 15, 10:52:50 AM AKDT Alaska Time
 BRAug. 15, 08:52:50 AM HAST Hawaii-Aleutian Time
 /PRE/H3PA HREF=http://www.usno.navy.mil; US Naval Observatory/A
 
 /body/html
 

___
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: What to Do Since FTP No Longer Supported in Mac OSX Lion?

2011-08-14 Thread Gregory Lypny
Agreed.  And I don’t think it would be a stretch for the Rev team to throw an 
SFTP command into LiveCode.

Gregory


On Sun, Aug 14, 2011, at 10:01 AM, use-livecode-requ...@lists.runrev.com wrote:

 Certainly the more protocols supported, the better ;) Since Apple could have 
 used SFTP earlier, but didn't, I wonder if one might ask what good reason 
 they had for 
 using FTP until now. I think the good reason for the current change is that 
 SFTP is more secure and that sounds real good and clearly fits the model of 
 enhanced 
 security in 10.7. How relevant this additional security is to what percentage 
 of users who have been using OS X's built-in file sharing in the FTP mode, 
 considering 
 the who, what, how and why, is something that could be debated. (Definitely, 
 though, a trivial pursuit since the decision has been made.) 
 
 Warren

___
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: What to Do Since FTP No Longer Supported in Mac OSX Lion?

2011-08-13 Thread Gregory Lypny
That would be great, Andre. 

Gregory



On Sat, Aug 13, 2011, at 1:00 PM, use-livecode-requ...@lists.runrev.com wrote:

 I have a barely working SFTP external for mac will release an alpha
 soon.
 
 :-)
 
 PS: On the end of my vacations, that is why I am silent...

___
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


Grabbing the Date and Time From a Time Server on the Internet

2011-08-13 Thread Gregory Lypny
Taking another kick at the cat here.  I’d like to use something like

get url (http://[time server address])

to grab the current date and time from an official time server.  This would be 
used in a LiveCode standalone distributed to collaborators and grad students 
who would use it to export time-sensitive data.  I want the data to be date- 
and time-stamped, and I cannot count on their computer clocks being accurate.

I suppose an alternative would be to get the creation date and time of the file 
once it is received via FTP (or better still, SFTP) use the the server date and 
time as the standard.

Anyone?  Please?


Regards,

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


What to Do Since FTP No Longer Supported in Mac OSX Lion?

2011-08-12 Thread Gregory Lypny
Hello everyone,

I was building a nice app with LiveCode the other day.  It used PUT URL and FTP 
to download files from my remote Mac.  Worked like a charm until yesterday when 
I updated the OS on the remote Mac to Lion.  Now I get socket timeout messages. 
 I then read on the web that FTP is not enabled in Lion but SFTP works if 
Remote Login is enabled in the Sharing pane of System Preferences.  I confirmed 
that SFTP works by trying it with Interarchy.  How can I make SFTP work in a 
LiveCode handler?

Regards,

Gregory

___
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


Storing Data in Standalone Apps

2011-08-11 Thread Gregory Lypny
Hello everyone,

My apologies in advance for the lame question but I need a little refresher as 
it has been ages since I’ve deployed standalone apps.  To save data in them, 
and that would include custom props, I need to do it in stack files that are 
not sub-stacks of the main stack.  In other words, any data to be saved, such 
as preferences or ongoing work, must be put in a stack other than the one being 
converted to a standalone.  Is that correct?


Regards,

Gregory
___
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: FTP To and From My Mac

2011-08-10 Thread Gregory Lypny
Hi Dave Cragg and Mark Schonewille,

Thank you both for your responses.  Problem solved with a unexpected fix!  I 
tried all of your suggestions, learned a lot about the various libURL commands, 
which will be useful in my project, but unfortunately, none solved the problem 
not being able to download that particular 183 KB file.  The FTP log told me 
the download was complete, indicated the correct number of bytes, and that the 
socket had been closed.  But the variable into which the file had been loaded 
had zero lines in it and did not appear in the field into which I put it.  I 
tried many other files, some as big as 2 MB, and they downloaded fine and in a 
jiffy.  It then occurred to me that this was the only file created with 
LiveCode using RETURN to delimit line endings, and that perhaps something gets 
messed up when it is transferred to the remote Mac server.  I went through my 
old Revolution tips and found an email from you, Dave, from 2005, explaining 
how to clean line endings.  Worked like a charm!!!

on cleanLineEndings @pText
   replace crlf with return in pText
   replace numToChar(13) with return in pText
end cleanLineEndings


Thanks again,

Gregory



___
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


Questions About LiveCode Apps That Connect to the Internet

2011-08-10 Thread Gregory Lypny
Hello everyone,

I’m building a standalone for my students.  It will allow them to upload 
quizzes and small assignments to my Mac via FTP as well as participate in 
various experiments and surveys.  I have a few Internet-related questions that 
I hoping someone can answer.

Is there a handler I can include in the stack that would allow it to detect 
whether the user is connected to the Internet?  That would allow me to give 
them the option of working offline.

How can I get the current date and time from either a time server or my remote 
Mac?  I need to timestamp student submissions and want the time coming from one 
source, not their own machines.

What is the best way to catch common FTP errors, such as a file not existing, 
so that I can relay a message back to the users?



Much obliged,

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


FTP To and From My Mac

2011-08-09 Thread Gregory Lypny
Hello everyone,

I’ve got my Mac at work running as a server of sorts and would like to be able 
to read and write files to it via FTP.  I used the simple GET URL command below 
and it worked for a 6 KB file but not for a 200 KB file.

get url ftp://username:password@serverAddress/Users/me/Documents/pathToFile”

How can I get it working for bigger files?  I also tried

libURLSetFTPMode “active”

but it didn’t get me the bigger file.  Also, it would be nice if the date and 
time could be retrieved from the remote Mac or from a time server, but I don’t 
know how to do that.

Any advice would be much appreciated.

Regards,

Gregory



___
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


Rev Customer Databased Hacked?

2011-07-11 Thread Gregory Lypny
Hello everyone,

Have any of you received this message from Heather?  Implications?

Gregory


 Dear Gregory Lypny,
 
 I need to inform you that over the weekend we experienced an attack on our 
 customer database. Although we caught this very quickly I regret that some 
 information may have been compromised. A small number of accounts were 
 affected, unfortunately yours was one of them.
 
 The information concerned includes your name, email address, on-rev username 
 and the server you are hosted on. It does not include your password, or any 
 postal address or billing information. This information alone does not 
 represent a security risk. However, if you have any concerns at all that your 
 password for your on-rev account is not secure, you should change it 
 immediately. cPanel offers a secure password generator that includes numbers 
 and punctuation in a random string, we strongly advise you use this service.
 
 We deeply regret this breach of our security procedures.  We felt it 
 important to inform you of it as quickly as possible as a precautionary 
 measure.
 
 We have already traced and fixed the exploit that made this possible and can 
 assure you that the same error will not happen again in the future.
 
 
 Regards,
 
 Heather Nagey
 Customer Services Manager
 http://www.runrev.com/
 LiveCode - Realize fast, compile-free coding
___
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


Part II of Re: On-Rev Web Form Dropping Data

2010-12-02 Thread Gregory Lypny
Hi Everyone,

Yesterday I posted a long question (sorry about that) concerning data lost from 
a web form submitted through my On-Rev site, where two students appear to have 
submitted quiz answers from the same IP address at virtually the same time.  
Bob Sneidar replied asking whether I had accounted for the possibility that 
more than one person could sign on to my site from the same IP, and I had said 
that I have not prohibited that.

Well, I have since spoken to the students who submitted blank quizzes, and it 
turns out that they live together, share a wireless network, and each has her 
own computer.  This probably means that they have their router set to share a 
single IP address or some such thing.  I guess what I should do is revise by 
sign-in script to disallow multiple sign-ins from the same IP.

Regards,

Gregory



___
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


<    1   2