-
Content Count
3483 -
Joined
-
Last visited
-
Days Won
114
Everything posted by Lars Fosdal
-
atomic setting of a double variable
Lars Fosdal replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
Correct. Which ones that one can trust to be. Which ones that can be made to be - and how. The impossible ones. Perhaps even a set of cookbook examples on how to do atomic exchange of different variable types, and what to do if you can't do them atomically due to misalignment. -
atomic setting of a double variable
Lars Fosdal replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
Someone should author the definitive article on the memory alignment of variables. Which ones always are? Which ones may not be, and how to fix it? Which ones, if any, are out of your control? -
How to create a "HOLE" in a form and align it to HOLE in another form (Hole by Hole)
Lars Fosdal replied to a topic in VCL
Would it not be nice if the whole thing was on GitHub, GitLab, BitBucket or similar where it could be easily shared and modified, instead of a wall of code on a forum? -
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.