-
Content Count
3250 -
Joined
-
Last visited
-
Days Won
107
Everything posted by Lars Fosdal
-
Delphi Event-based and Asynchronous Programming eBook complete version released
Lars Fosdal replied to Dalija Prasnikar's topic in Tips / Blogs / Tutorials / Videos
Ordered ePub + Paper. -
Comunicate with POS terminal (Ingenico)
Lars Fosdal replied to boris.nihil's topic in Network, Cloud and Web
That protocol looks more like a Serial cable protocol, than a TCP protocol? What happens if you send it as binary bytes instead of text hex? I.e. each hex value converted to a byte. -
Native Svg parsing and painting in Windows
Lars Fosdal replied to pyscripter's topic in RTL and Delphi Object Pascal
Nice, Carlo. I use the SVG preview capability from https://docs.microsoft.com/en-us/windows/powertoys/file-explorer -
Global variable : why the compiler don't complain about this ?
Lars Fosdal replied to mderie's topic in General Help
Scoping can lead to some weird scenarios. F.x. type TBase = class private public Data: Integer; end; TChild = class(TBase) private public Data: string; end; But, being able to "hijack" methods, simply by introducing them to the visible scope, is also kinda useful. A set of hints would be nice, though, so that you don't do it by accident. -
Casting pointer to TBytes
Lars Fosdal replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
Nothing beats pointers to arrays for InterOp - even today. -
Casting pointer to TBytes
Lars Fosdal replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
By "need to pass it to a (read only) memory area" - what do you actually mean? Do you want to get data from aData or put it to aData? Edit: ok, I read that again. What you want to do, is to allocate your TBytes array instead of using GetMem. SetLength(MyData, Size); Whatever fills your GetMem block, should also be able to fill @MyData[0] with the length you have preallocated? You then pass that as Something(MyData); -
Shutting down TidTCPServer (kbmMWTCPIPIndyServerTransport)causing Window Service timeout
Lars Fosdal replied to c0d3r's topic in Indy
Here is how our TIdTCPServer shutdown code looks. That exception doesn't really happen anymore, though. 🙂 -
Inherited on Properties and co.
Lars Fosdal replied to Attila Kovacs's topic in RTL and Delphi Object Pascal
Ah - Brain fog cleared. Thanks, guys. -
Inherited on Properties and co.
Lars Fosdal replied to Attila Kovacs's topic in RTL and Delphi Object Pascal
If it is public, why do you need to use inherited? I think the point just wooshed over my head here. (Not the first time) -
Object Pascal Handbook - Delphi 10.4 Sydney Edition - Marco CantĂą (2020) - 571pg
Lars Fosdal replied to a topic in Tips / Blogs / Tutorials / Videos
@Marco Cantu I wish I as a subscriber could download it without having to reenter information already in your systems. -
Inherited on Properties and co.
Lars Fosdal replied to Attila Kovacs's topic in RTL and Delphi Object Pascal
I guess private is not private - unless strict private? -
How to set version number for all the projects in a project group
Lars Fosdal replied to Soji's topic in Delphi IDE and APIs
We use Continua CI + FinalBuilder to manage versions.- 11 replies
-
- build version
- configuration manager
-
(and 3 more)
Tagged with:
-
Inherited on Properties and co.
Lars Fosdal replied to Attila Kovacs's topic in RTL and Delphi Object Pascal
That is interesting - and a little disturbing. -
How to determine the subjective brightness of my screen?
Lars Fosdal replied to Der schöne Günther's topic in Algorithms, Data Structures and Class Design
BTW; Wouldn't this do the job without putting extra load on the PC? https://www.philips-hue.com/en-nz/p/hue-play-hdmi-sync-box-/8718699707248 -
Voted and watched too.
-
How to determine the subjective brightness of my screen?
Lars Fosdal replied to Der schöne Günther's topic in Algorithms, Data Structures and Class Design
True, although he may need to take into the consideration whether the monitor and game is using HDR or not? -
How to determine the subjective brightness of my screen?
Lars Fosdal replied to Der schöne Günther's topic in Algorithms, Data Structures and Class Design
@Der schöne Günther I.e. the overall luminosity of the image? https://stackoverflow.com/questions/7964839/determine-image-overall-lightness Unsure if there needs to be something additional in the equation as mathematical and perceived luminosity might not be the same? -
Congratulations, @Attila Kovacs 🙂
-
First rule of fight club - you never talk about fight club. Same thing for beta versions.
-
If the initial description is accurate - you don't really have a record - but a stream? I.e. the length of the string is variable, not fixed and #0 padded? [int flags][int dummy][shortish string#0][int padding][int flags][int dummy][this is a lot longer string#0][int padding] Decoding the stream would have to be done element by element, and it would be necessary to know the format of the string - is it ASCII, ANSI (if so, what codepage) or UTF-8. To put it into a more manageable format, you could use your initial record - but you would have to read it element by element to stuff that record or object structure. This can be done in a number of ways - such as a TFileStream or by going old school BlockRead. A well designed stream would have had the string length as an int before the string - but now you instead have to scan for that #0 termination.
-
Self-repairing problems are the best, Totte 🙂
-
There is a workaround in the following thread.
-
Install recent Delphi versions on Windows XP
Lars Fosdal replied to dummzeuch's topic in Delphi IDE and APIs
We've replaced a lot of expensive industrial PCs with WinMate and Surfaces tablets. They are so much cheaper that the economy of possibly having to replace them more often is a no-brainer. The only exception are trucks that need to operate in -27°C - that is when you need those industrial solutions. Having those tablets on vanilla Windows 10 is a bonus. -
@Hans♫ - How performant is the M1 compared to the i5?
-
Hashing Street Addresses ?
Lars Fosdal replied to david_navigator's topic in Algorithms, Data Structures and Class Design
There is one way that can avoid duplicate "hashes" or in this case - ensure a unique key - but it is not super performant, since lookup a database is expensive - but it will give you a fixed length unique identity for a signature. Create a signature table in a DB and add a text field for the signature and a constraint for it to be unique. Add an identity column as either an auto incremented int field, or an auto-generated GUID field. The identity column will be your unique "hash". Edit: If the "hash" will be exposed to third party - the GUID is recommended - since you cannot easily inject randoms GUID to access data - as compared to a sequential id which are predictable.