-
Content Count
198 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Alexander Elagin
-
The interfaces in Delphi are bad?
Alexander Elagin replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
You mean something like CORBA interfaces as implemented as FreePascal? They are exactly this: a set of methods, not refcounted. -
Difference between Pred and -1
Alexander Elagin replied to John Kouraklis's topic in RTL and Delphi Object Pascal
Pred() and Succ() are simple iterators defined for enumerable simple data types. If only they could be overloaded for other data types (lists, collections, whatever... maybe even for yield support) their usefulness would be much higher. -
There is nothing difficult. You can use a serial port (if the host PC doesn't have one, a simple USB-to-COM adapter will do) as a simple communication channel - serial data exchange has been used for decades in multiple industrial applications built with Delphi. In fact, this is the area (custom hardware control / monitoring) where Delphi is used in many companies, but of course most of these applications never appear in public.
-
what is the possibility of having a rest/soap webapi in Delphi 2007
Alexander Elagin replied to Ugochukwu Mmaduekwe's topic in Network, Cloud and Web
There is well known RemObjects SDK which I think still supports even Delphi 7. Some interesting information regarding JSON support is here: https://talk.remobjects.com/t/how-to-call-rest-server-with-json/18771 . A standard SOAP support has been a part of Delphi RTL since forever and usually works without problems. -
I have been using HxD since.. well... 2009 or 2010, I think. This is an excellent tool!
- 31 replies
-
- hex editor
- disk editor
-
(and 3 more)
Tagged with:
-
FireDAC Postgresql performance vs ADO SQL/Server performance
Alexander Elagin replied to Martyn Spencer's topic in Databases
ExpressQuantumGrid by default (in the Bound mode) fetches all data from the database table and then uses it for the fast local filtering / sorting / etc functions without further database operations (unless an update is required). There is another mode (Server mode) where data is fetched as needed but in this mode local grid filtering is limited. -
You haven't tried to use the Linux debugger yet, have you? The 64-bit debugger in 10.1 is a piece of cake compared to 10.3 Linux one...
-
Any Good tutorial on Parallel Programming Library?
Alexander Elagin replied to Tommi Prami's topic in RTL and Delphi Object Pascal
The problem is that OTL is unfortunately Windows only, where it wins hands down. On the other hand, PPL with all its quirks is cross-platform. When porting to Linux, I had to write two versions of the same code, ifdef'd to use OTL on Windows and PPL on Linux. Not an elegant solution but I did not want to touch the working Windows code... -
As a Delphi expert, do you ever need to refactor or improve your code?
Alexander Elagin replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
I always remember the Peter Gottschling's description of a program comment from his book "Discovering modern C++": -
Ok, I knew somebody must have implemented it already: https://blog.grijjy.com/2017/04/20/cross-platform-timer-queues-for-windows-and-linux/
-
Look at CreateTimerQueue / CreateTimerQueueTimer. Nothing too difficult but needs a callback and probably an event and thread to wait on it.
-
Why can't I install this monospaced font in Delphi ?
Alexander Elagin replied to A.M. Hoornweg's topic in Delphi IDE and APIs
Because this font family (JetBrains Mono) does not have some internal flag marking it as "monospace". Visual Studio / Windows terminal also do not recognise it as such. Let's wait for a service pack 😉 There is a discussion on this topic in Russian (https://habr.com/ru/company/jugru/news/t/484134/). In fact, I did not like the look of this font when I tried it in Notepad++, YMMV. -
How to share data between apps
Alexander Elagin replied to Tom F's topic in Algorithms, Data Structures and Class Design
I'd probably use a combination of shared memory and global event object. I.e. the sender and receiver both create a shared memory using CreateFileMapping() and MapViewOfFile(), then the sender fills the buffer located in the shared memory and sets the event, the receiver waits for this event and when it is activated grabs the data from the buffer and resets the event. The sender can also check the state of the event and if it is set (i.e. the receiver has not read the data yet) skip writing the next frame, etc. I do not think that the implementation is going to be too difficult. -
Load a String from a file - returns strange char set
Alexander Elagin replied to bernhard_LA's topic in Algorithms, Data Structures and Class Design
Like this? var S: String; F: TFileStream; B: TBytes; begin S := ''; F := TFileStream.Create('test.txt', fmOpenRead); try if F.Size > 0 then begin SetLength(B, F.Size); F.Read(B[0], Length(B)); S := TEncoding.ANSI.GetString(B); WriteLn('S = ', S); end; finally F.Free; end; end; -
How to use Open Street Maps with Delphi - cross platform?
Alexander Elagin replied to mawg's topic in FMX
DevExpress also offers a map control which supports OSM: https://www.devexpress.com/products/vcl/map/ -
Yes, PAServer is needed to pull the necessary tools and libs from the target Linux machine. After this stage it is needed for deployment/debugging (but the Linux debugging in Delphi is a joke, simple WriteLn's in code can do better...) The best documentation I've seen so far is here: http://docwiki.embarcadero.com/RADStudio/Rio/en/Linux_Application_Development and here: https://chapmanworld.com/2016/12/29/configure-delphi-and-redhat-or-ubuntu-for-linux-development/
-
Deja vu
-
EMBT: Code Central is going away
Alexander Elagin replied to Lars Fosdal's topic in Tips / Blogs / Tutorials / Videos
Maybe it is the time for someone with decent resources make a backup of the codecentral content (and structure, if possible)? I do not think that the data size is too huge given that it is built on the two decades old technologies. Probably it is just the matter of parsing the database and replicating it on something modern, probaly creating a better frontend. -
Best components for creating windows service apps
Alexander Elagin replied to microtronx's topic in VCL
The latest DDService version on the Torry site is dated 06 Oct 2013 : https://torry.net/authorsmore.php?id=7142 It contains packages up to XE5. -
Call to create a form to return a value?
Alexander Elagin replied to Ian Branch's topic in General Help
That's because the form must have a field or property of this type (like Customer: TCustomer), otherwise there is no place to copy the data from. Alternatively, if the form already has all the necessary data, you can manually fill the resulting record: .... if Result then begin Value.name := F.SomeNameField; Value.age := F.SomeAgeField; end; .... -
Call to create a form to return a value?
Alexander Elagin replied to Ian Branch's topic in General Help
It should have been class function Execute(out Value: TCustomer): Boolean; and TCustomer declared before the form, then everything would work. -
Call to create a form to return a value?
Alexander Elagin replied to Ian Branch's topic in General Help
Glad that it worked. Btw, now there is no need to have the FormClose handler with Action := caFree - the form will be freed by the calling class function (note the F.Free call), so you can remove this method too. -
Call to create a form to return a value?
Alexander Elagin replied to Ian Branch's topic in General Help
Please check the controls in TCurrentCustJobsForm. The OK button (or whichever control is closing the form) must have ModalResult property set to mrOk or mrYes. -
Call to create a form to return a value?
Alexander Elagin replied to Ian Branch's topic in General Help
type TCurrentCustJobsForm = class(TForm) .... public class function Execute(out Value: Integer): Boolean; end; ...... class function TCurrentCustJobsForm.Execute(out Value: Integer): Boolean; var F: TCurrentCustJobsForm; begin F := TCurrentCustJobsForm.Create(nil); try Result := IsPositiveResult(F.ShowModal); if Result then Value:= F.SomeFieldOrPropertyOrEtc; finally F.Free; end; ...... if TCurrentCustJobsForm.Execute(iRecord) then (* Value selected and valid *) else (* user closed the form without selecting anything *) -
Rules for changing cursor to HourGlass and back
Alexander Elagin replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
Today one cannot write two simple methods and be happy. There must be classes, interfaces, factories, patterns etc - that's the serious approach . Have you seen the FizzBuzz Enterprise Edition ?