

Shrinavat
Members-
Content Count
46 -
Joined
-
Last visited
-
Days Won
1
Shrinavat last won the day on January 16 2019
Shrinavat had the most liked content!
Community Reputation
8 NeutralRecent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Clever Internet Suite and AddSubmitFile method
Shrinavat replied to Shrinavat's topic in Network, Cloud and Web
Thanks to the author of the library we were able to find a solution: https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials/tree/master/vcl/SendTelegramPhoto -
Hello, I know there are advanced Clever Internet Suite users here who might be able to help me with advice. To send an image to a Telegram channel, I use the following code: const urlTGSendPhoto = 'https://api.telegram.org/bot%s/sendPhoto'; BOT_API_KEY = 'xxxxxxxxxxxxxx'; CHANNEL_NAME = 'xxxxxxxxxxxxxx'; ... clHttpRequest.AddFormField('chat_id', CHANNEL_NAME); clHttpRequest.AddSubmitFile('photo', 'chart.png'); var s := clHttpTG.Post(Format(urlTGSendPhoto, [BOT_API_KEY]), clHttpRequest); where 'chart.png' is the name of the image file on disk. It works great. Can someone please tell me how to use a stream (TMemoryStream/TFileStream) or TPngImage/TJPEGImage/TBitmap instead of a file (that is, without the need to save the file to disk)?
-
Exactly right! I'm sorry, my bad.
-
@Uwe Raabe What am I doing wrong? Why aren't the units grouped by group prefix?
-
Isn't that the reason you are here? https://quality.embarcadero.com/browse/RSP-28708
-
How to gracefully get rid of the use of dictionaries?
Shrinavat replied to Shrinavat's topic in General Help
Thank you all, you put me on the right track! -
How to gracefully get rid of the use of dictionaries?
Shrinavat replied to Shrinavat's topic in General Help
You are correct. The code uses expressions like: cx := E or W; grid[ny, nx] := grid[ny, nx] or S; -
There is current code, in which I think the use of dictionaries is redundant: const N = $1; S = $2; E = $4; W = $8; var DX, DY, OPPOSITE: TDictionary<Integer, Integer>; // init dictionares DX := TDictionary<Integer, Integer>.Create; DX.Add(E, 1); DX.Add(W, -1); DX.Add(N, 0); DX.Add(S, 0); DY := TDictionary<Integer, Integer>.Create; DY.Add(E, 0); DY.Add(W, 0); DY.Add(N, -1); DY.Add(S, 1); OPPOSITE := TDictionary<Integer, Integer>.Create; OPPOSITE.Add(E, W); OPPOSITE.Add(W, E); OPPOSITE.Add(N, S); OPPOSITE.Add(S, N); // Usage of these dictionaries is shown below in the example code: var nx := x + DX[dir]; var ny := y + DY[dir]; grid[ny, nx] := grid[ny, nx] or OPPOSITE[dir]; To improve performance, I would like to avoid using dictionaries and use a simpler code instead... but I don't know which one? Any help in this arena would be greatly appreciated.
-
Alas, "Omnia orta cadunt"
-
Maybe it makes sense to add graphics32 to "Delphi Third-Party" section?
-
Looks great, is there any chance of animation support (like SVGMagic do)?
-
Maybe something like https://www.rebasedata.com/convert-interbase-to-sqlite-online ?
-
OExport - XLSX/XLS/ODS/CSV native Delphi/Lazarus import/export library - https://www.kluug.at/kluug-net/xlsx-ods-delphi.php I use Template engine: automatically process user-defined XLSX/XLS templates.
-
Saving a large project takes soooo Loooonnnnggg..
Shrinavat replied to Ian Branch's topic in General Help
The latest version is in the attachment. It supports the latest version of RAD Studio. -
How to pass a parameter to a certain stage of the pipeline?
Shrinavat replied to Shrinavat's topic in OmniThreadLibrary
@Schokohase Thank you, it's works! I wonder if there is another solution? Without creating an extra class?