indy | Continuously poll node.js/io.js and time the eventloop delay | Analytics library
kandi X-RAY | indy Summary
kandi X-RAY | indy Summary
Fancy having your own Dr. Henry Walton "Indiana" Jones, Jr? Now you can!. The default dispatcher will log the example output using console.log as an example. A statsd version of this is available at tomgco/indy-statsd to use, or to base off of your own metrics sink hole.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of indy
indy Key Features
indy Examples and Code Snippets
Community Discussions
Trending Discussions on indy
QUESTION
I am trying to loop through a dataframe but I am getting a for row in i["Attachments"]: TypeError: list indices must be integers or slices, not str
My JSON file has Attachments yet it is giving me errors. I have possibly tried all ways from Stackoverflow to get this issue solved, but to my dismay none of them really worked.
this is my Json file
idx.json
...ANSWER
Answered 2021-Jun-02 at 13:15I've modified the code a little and have used dictionary for easier access and it is working great.
QUESTION
I'm having trouble sending attachments via stream. I use Indy 10.6.2 and Delphi Berlin. The mail consists of html with attached images, plus one or more PDF files inserted directly from the database. I don't get any errors in the process. Mail is sent seamlessly, but attached PDFs are not received.
I look forward to comments
...ANSWER
Answered 2021-May-26 at 21:39TIdMessageBuilderHtml
supports adding attachments via streams, as well as via files. However, those streams have to remain alive for the duration that the TIdCustomMessageBuilder.Attachments
collection is populated, which is not an option in your case since you are looping through DB records one at a time, thus you would only be able to access 1 DB stream at a time.
You could create a local array/list of TMemoryStream
objects, and then populate the TMessageBuilderHtml
with those streams, but you will end up wasting a lot of memory that way since TIdMessageBuilderHtml
would make its own copy of the TMemoryStream
data. And there is no way to have TIdMessageBuilderHtml
just use your TMemoryStream
data as-is in a read-only mode (hmm, I wonder if I should add that feature!).
The reason why your manual TIdAttachmentMemory
objects don't work is simply because TIdCustomMessageBuilder.FillMessage()
clears the TIdMessage
's body before then re-populating it, thus losing your attachments (and various other properties that you are setting manually beforehand).
You would have to add your DB attachments to the TIdMessage
after FillMessage()
has done its work first. But, then you risk TIdMessageBuilderHtml
not setting up the TIdMessage
structure properly since it wouldn't know your DB attachments exist.
On a side note, you are not using TIdAttachmentMemory
correctly anyway. Do not call its CloseLoadStream()
method if you have not called its OpenLoadStream()
method first. Calling its LoadFromStream()
method is enough in this case (or, you can even pass the TStream
to TIdAttachmentMemory
's constructor). Do note, however, that you are leaking the TStream
returned by dm.GetDataBlbStrm()
.
So, in this case, you are probably better off simply populating the TIdMessage
manually and not use TIdMessageBuilderHtml
at all. Or, you could derive a new class from TIdMessageBuilderHtml
(or TIdCustomMessageBuilder
directly) and override its virtual FillBody()
and FillHeaders()
methods to take your DB streams into account.
QUESTION
I'm sending a number of parameters to an API using the TIdHTTP.Get()
method.
I pull values for the actual API parameters from string
variables or component Text
properties (like a ComboBox
, for example). Everything is fine until any of those values contains a space.
For example, one of the parameters is a full name field (example: 'John Smith'
)
Since it contains a space between the first and last name, once I send it to the API using te TIdHTTP.Get()
method, it throws a 400 Bad Request
error and fails.
If I eliminate the space from the value for that/any particular parameter, it goes through fine.
Code I'm using to test:
...ANSWER
Answered 2021-May-25 at 15:57You have stated that you are submitting the data as Content-Type: application/x-www-form-urlencoded
That format does not allow spaces. You need to properly encode what you are submitting.
Two ways you can do this:
With Indy:
QUESTION
I have the following SQL which works just fine:
...ANSWER
Answered 2021-May-18 at 12:46Unless you have an aggregation query (which you don't), this should work:
QUESTION
How can logstash be executed? (error occured)
run logstash on AWS Linux. but error occurred while executing.
- my Linux(Ubuntu Version: 20.04)
- elasticsearch installed.(execute successfully)
- kibana installed.(execute successfully)
- logstash installed. (execute error occured)
my .conf file code
ANSWER
Answered 2021-May-14 at 08:54There is an error on line 16.
incorrect code
QUESTION
I have an app that reads a JSON data string from disk to create a string grid listing stocks (ticker, number held, cost) and then calls a stockbroker API to fill in current price and value. It works but the code below is causing memory leaks but whilst there are many internet posts on how to access data in a JSONArray none I could find discuss how to free allocated memory. Can anybody help ? I use Delphi Berlin 10.1 and Indy 10.6 if it matters. There are 3 pages of data, some stocks are on 2 pages, sTickers is a stringlist populated with each stock ticker (about 10 of them) and there are about 14 total stock holdings on the 3 stringgrids (tabGrids[0..2] which are on a page control.
The problem code is:
...ANSWER
Answered 2021-May-10 at 12:45You mention 3 pages of data. You are leaking 2 x TJasonArray
, and you are freeing one TJasonArray
on the last line right after an end;
that doesn't have a corresponding begin.
From that I draw the conclusion that you have a loop (that you did not show) that you run three times. On each time you create a TJasonArray
but you free only one, after the loop end;
, Move the JSonArray.Free;
to before the end;
.
QUESTION
I am trying to run logstash on Windows.
Just installed Java. Then ran logstash as descirbed here.
Also validated the java install as described in the same page.
And then when I run logstash manually, it first started, but then immediately shutdown, spitting this right on my face.
What am I missing?
...ANSWER
Answered 2021-Apr-10 at 16:31The message "No config files found in path" indicates that when logstash had finished reading all the configuration files it did not have any configuration. That could because your syslog.conf is empty, or it contains invalid UTF-8 characters (so it was skipped), or possibly logstash was unable to read it.
If you add --log.level debug
to the command line you should get a "Reading config file" message for that file. If you do not then logstash was unable to find it (e.g. it does not exist or the directory is not readable by the user running logstash).
QUESTION
I am sending a JSON with Indy http component to the stripe API but it is not received by the API as it is meant to be received as I receive a "Bad Request" response:
...ANSWER
Answered 2021-May-06 at 18:08The CURL example provided in the Stripe documentation is not sending the data in JSON format at all. It is sending name=value
pairs in application/x-www-form-urlencoded
format instead, per the CURL documentation:
-d, --data
(HTTP MQTT) Sends the specified data in a POST request to the HTTP server, in the same way that a browser does when a user has filled in an HTML form and presses the submit button. This will cause curl to pass the data to the server using the content-type application/x-www-form-urlencoded. Compare to -F, --form.
Use the TStrings
overload of TIdHTTP.Post()
when posting an application/x-www-form-urlencoded
request, eg:
QUESTION
I want to use TIdTCPClient
to connect to Redis from a web server application made with Delphi and TWebModule
.
Currently on WebModule creation I create a new TIdTCPClient
and connect to Redis, e.g.:
ANSWER
Answered 2021-May-05 at 17:02No, Indy does not provide anything for pooling TCP connections. You will have to implement your own pool of TIdTCPClient
objects in your own code.
QUESTION
In an application developed with Borland C++Builder 6, I am using TIdSMTP
and TIdMessage
to send email messages. Due to problems for external applications with the usual mail server in the configuration, I am defining the connection data through my Gmail account as follows:
ANSWER
Answered 2021-Apr-26 at 18:10The TIdMessage.ReplyTo
property has no effect on the Return-Path
header. The ReplyTo
is only used for the Reply-To
header, which recipients use to reply back to the sender. The Reply-To
header is not used by the receiving SMTP server at all.
The Return-Path
header is generated by the receiving SMTP server using the address specified in the sending client's SMTP MAIL FROM
command. You can specify that address in the TIdMessage.Sender
and TIdMessage.From
properties (in that order), or by using one of the other overloaded TIdSMTP.Send()
methods that has an AFrom
parameter.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install indy
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page