Hi David,
Are you sure that sImage contains the data you want?
What happens if instead of:
put url imageUrl into sImage
you do: put url("binfile:" & imageURL) into sImage
Kind regards
Bernd
___
use-livecode mailing list
Well the good news (I suppose) is that base64Decode seems to ignore the
carriage returns in the encoded string. The bad news (for me) is that it means
my intermittence issue had nothing to do with the carriage returns.
Bob S
> On Apr 25, 2024, at 8:09 AM, Bob Sneidar via use-livecode
>
Wha THAT may be why I was getting intermittent success with a socket
based file transfer utility I developed! I wonder what base64Decode does with a
base64Encoded string if you remove the carriage returns first? I’m going to
have to research that.
Bob S
> On Apr 25, 2024, at 7:57
The problem may be that base64 encoding inserts line breaks after every 76
chars (a remnant from terminal monitor width restrictions, apparently).
I ran into this a while ago, and cleaning the encoded string with “replace
cr with empty in tString” solved it for me.
I don’t think any
If json need utf8, then the last line needs to be:
put textEncode(base64Image,"UTF-8") into encodedImageData
textEncode will convert the bas64 data (stored in livecode as 16bit characters)
to UTF8
On 4/24/2024 2:45 PM, David Bovill via use-livecode wrote:
I need to put encodeImageData into
I need to put encodeImageData into json (which is utf-8) and then post it
to the api. I'm not sure what aspects of base64 encoding would not be utf8
compatible... seem to remember there are some quirks there to be aware of.
The python code does the decode("utf-8") step at the end - so I guess
On 4/24/2024 1:43 PM, David Bovill via use-livecode wrote:
I'm trying to base64 encode an image and include it into a json file to
post to an api. The python code that accomplishes this is:
image1_data =
base64.b64encode(httpx.get(image1_url).content).decode("utf-8")
When I try to follow the
I'm trying to base64 encode an image and include it into a json file to
post to an api. The python code that accomplishes this is:
image1_data =
base64.b64encode(httpx.get(image1_url).content).decode("utf-8")
When I try to follow the logic in Livecode I get:
put url imageUrl into sImage
put
For extra credit, try writing a handler in LC to convert the python/js code to
LC script.
Bob S
> On Jun 15, 2022, at 02:46 , David Bovill via use-livecode
> wrote:
>
> Thanks Craig - I dug around but no joy. I hate it when you loose code as I
> had a function somewhere… The javascript
Thanks Craig - I dug around but no joy. I hate it when you loose code as I had
a function somewhere… The javascript and python code is not that long, so it
will be an interesting challenge to translate:
Python code:
• https://github.com/volkerp/fitCurves/blob/master/fitCurves.py
Javascript
Björnke-
Wednesday, September 18, 2013, 4:34:20 AM, you wrote:
I'm on Waddinghams side here. Do as other language is
integrated with the alternateLanguages. If something isn't in the
alternateLanguages, it does not belong into do as other
language. So what you'd probably need to convince him
...so your thinking is that modifying the shell function is somehow
better than modifying the do as function?
I haven't been following this much but If you did decide to mess with shell it
would be really handy having a shell command that was safe to use on Windows.
At the moment it's
I'm on Waddinghams side here. Do as other language is integrated with the
alternateLanguages. If something isn't in the alternateLanguages, it does not
belong into do as other language. So what you'd probably need to convince
him (and me) of, is to find a reliable way to get available languages
Greetings!
Anyone have any experience with Python? I am looking to convert some routines
that are written in Python to LiveCode.
What I am tying to do is deal with the RRULE (Recurrence Rule) when reading a
iCal Calendar. I found several projects in PHP and C++ out there, but they are
way to
On 09/17/2013 05:30 PM, Dan Friedman wrote:
Greetings!
Anyone have any experience with Python? I am looking to convert some routines
that are written in Python to LiveCode.
What I am tying to do is deal with the RRULE (Recurrence Rule) when reading a
iCal Calendar. I found several projects
Richmond-
Tuesday, September 17, 2013, 7:37:41 AM, you wrote:
http://newsletters.livecode.com/june/issue50/newsletter1.php
g I'd forgotten about that article. But bear in mind that I have it
on good authority that the alternatelanguages function and the do as
functionality will never be
On 09/17/2013 06:35 PM, Mark Wieder wrote:
Richmond-
Tuesday, September 17, 2013, 7:37:41 AM, you wrote:
http://newsletters.livecode.com/june/issue50/newsletter1.php
g I'd forgotten about that article. But bear in mind that I have it
on good authority that the alternatelanguages function and
Mark Wieder wrote:
Tuesday, September 17, 2013, 7:37:41 AM, Richmond wrote:
http://newsletters.livecode.com/june/issue50/newsletter1.php
g I'd forgotten about that article. But bear in mind that I have it
on good authority that the alternatelanguages function and the do as
functionality
Richard-
Tuesday, September 17, 2013, 9:21:29 AM, you wrote:
Mark Wieder wrote:
Tuesday, September 17, 2013, 7:37:41 AM, Richmond wrote:
http://newsletters.livecode.com/june/issue50/newsletter1.php
g I'd forgotten about that article. But bear in mind that I have it
on good authority that
On 09/17/2013 07:31 PM, Mark Wieder wrote:
Richard-
Tuesday, September 17, 2013, 9:21:29 AM, you wrote:
Mark Wieder wrote:
Tuesday, September 17, 2013, 7:37:41 AM, Richmond wrote:
http://newsletters.livecode.com/june/issue50/newsletter1.php
g I'd forgotten about that article. But bear in
Richard-
Tuesday, September 17, 2013, 10:58:08 AM, you wrote:
You might consider posting an RFP for the conversion to the forums.
IIRC Andre made an iCal library a while back, no?
--
-Mark Wieder
mwie...@ahsoftware.net
___
use-livecode mailing
Richmond-
Tuesday, September 17, 2013, 10:49:56 AM, you wrote:
Well at the moment 'DeadRichmond' is nearer the mark as have
the jolly headache of timetabling as I gear up to the start of my EFL
( English as a Funny Language) school year on Monday.
Ha! For some reason I am reminded of Richard
Dan Friedman wrote:
Thanks for the replies... Since I need to run this on a mobile
device, I don't think installing Python is really an option.
Outside of learning a new language or hiring someone to convert
it, looks like I'm SOL.
You might consider posting an RFP for the conversion to the
Richard-
Tuesday, September 17, 2013, 10:51:44 AM, you wrote:
In the meantime, what could we do with do...as... that we can't do by
calling Python/Perl/etc. from the command line via shell?
To avoid repeating myself, see my last comment in the forum thread.
The tl;dr: probably nothing,
Richmond-
Tuesday, September 17, 2013, 10:15:05 AM, you wrote:
It probably is about time, after all the Hoo-Ha from RunRev anent Open
Source, and us stumping up our crinklies, and they being totally bl**dy
slow about fulfilling their Kickstarter Goals, that some sort of pressure
was brought
On 09/17/2013 08:41 PM, Mark Wieder wrote:
Richmond-
Tuesday, September 17, 2013, 10:15:05 AM, you wrote:
It probably is about time, after all the Hoo-Ha from RunRev anent Open
Source, and us stumping up our crinklies, and they being totally bl**dy
slow about fulfilling their Kickstarter
Mark Wieder wrote:
Tuesday, September 17, 2013, 9:21:29 AM, Richard wrote:
Mark Wieder wrote:
Tuesday, September 17, 2013, 7:37:41 AM, Richmond wrote:
http://newsletters.livecode.com/june/issue50/newsletter1.php
g I'd forgotten about that article. But bear in mind that I have it
on good
Thanks for the replies... Since I need to run this on a mobile device, I don't
think installing Python is really an option. Outside of learning a new
language or hiring someone to convert it, looks like I'm SOL. I'll continue to
search for another answer. My project requires that I list
Dan,
I've done a partial calendar library, but I only did a subset (maybe
even a trivial subset, don't remember) of RRULE cases. I'll dig it up
and see if it has anything useful. If not, I have done quite a lot in
Python, so may be able to help out with a conversion (or even a re-write
29 matches
Mail list logo