Leaderboard
Popular Content
Showing content with the highest reputation on 03/23/21 in all areas
-
My version, is portable. I have installed it on a notebook
-
Not that I know of because the compiler unfortunately does not utilize the cmovxx instruction. This has been reported already (I think there are other reports similar to this one): https://quality.embarcadero.com/browse/RSP-21955 Edit: Here is what clang and gcc generate: https://godbolt.org/z/4hnYrjYM6 And this is what Delphi generates: Project1.dpr.16: Result := min(i, 42); 00408F94 83F82A cmp eax,$2a 00408F97 7E05 jle $00408f9e 00408F99 B82A000000 mov eax,$0000002a Project1.dpr.17: end; 00408F9E C3 ret Project1.dpr.16: Result := min(i, 42); 000000000040D4F0 83F92A cmp ecx,$2a 000000000040D4F3 7F04 jnle Main + $9 000000000040D4F5 89C8 mov eax,ecx 000000000040D4F7 EB05 jmp Main + $E 000000000040D4F9 B82A000000 mov eax,$0000002a Project1.dpr.17: end; 000000000040D4FE C3 ret Yeah yeah branch predictors and all that - but if they are filled up with garbage conditional jumps like this they have less room for the important ones.
-
Am I the only one annoyed that these are in System.Math?
-
I have also found this comparing of the performance: https://github.com/xiadz/cmov
-
I am more annoyed with the unnecessary conditional jumps they generate and the fact they don't inline when using runtime packages
-
_exactly_ Because if someone sees it, he could think I can do math 🙂
-
I have no idea what you are talking about. Those were MinValue and MaxValue. I'm really struggling to find any sense in any of your comments.
-
@Bill Meyer well, then get some rest 😄
-
One of the first things I override. 😉
-
And obviously going blind. Thank you! But that's really odd, as the content of my filename variable has not changed.
-
xlsx or xls?
-
You are writing to .xlsx and trying to query/open .xls...
-
You can reach and thank Brian here @blong directly, so he will be aware that we all love his work ( and sessions he gave ). Looking forward for more of that interesting stuff in the future.
-
Multiple string replace - avoid calling StringReplace multiple times
Dave Novo replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Did you ever have a look at the old faststrings library? It was for ansi strings only, but they had a lot of good ideas. Plus, if you happen to be using ansi strings only for your application (or at least part of it) it is very fast. -
This is covered in the documentation: http://docwiki.embarcadero.com/RADStudio/Sydney/en/10.4_Sydney_-_Release_2
-
Hi @Jean Vandromme, when the client is not a Delphi application it is hard to rely on FireDAC specific features such as delta changes apply mechanism. I would keep the GET methods as you have written them but I would change the POST methods to something like: [POST, Path('/allItems'), Consumes(TMediaType.APPLICATION_JSON)] function postAllItems([BodyParam] const AChanges: TJSONObject):TJSONObject; Then you should go through AChanges JSON object to extract data and apply changes to the DB (using the FD helper object to build some SQL or opening the qItems dataset, making some locate, edit data and post dataset. This is a very basic approach (not so handy IMHO). Another, more convenient IMHO, option is to define a record structure mimicking the JSON structure you want to accept as description of data changes and let MARS materialize it from the client's request. TItem = record id: Integer; name: string end; (...) [POST, Path('/allItems'), Consumes(TMediaType.APPLICATION_JSON)] function postAllItems([BodyParam] const AChanges: TArray<TItem>): TJSONObject; Once you have AChanges materialized automatically by MARS, you can take advantage of the TRecord<TItem>.ToDataSet implementation to apply changes to the dataset (beware of locating the right record in advance or query the record using the id for best performance). Let me know if it is clear enough... If not I can provide some demo to show you what I am suggesting to do. Sincerely, Andrea
-
Inline Variables Coming in 10.3
Stefan Glienke replied to Marco Cantu's topic in RTL and Delphi Object Pascal
The benefit of type inference is that you don't have to state the obvious. If you put the result of let's say GetCustomers into a variable it can explicitly type that variable from the type that GetCustomers returns, if that is a TList<TCustomer>, a TCustomerList or something else it usually does not matter. It also might make refactoring more stable because if you might change that function to return a more special or a more broad type then there is a high chance that the code will still compile and work. -
I am temporarily disabled due to a fractured (bone fully severed at 75° acute angle) upper left arm after slipping on black ice. A nice clean fracture according to the doctors. No surgery or fancy stabilization planned, and the doctors want me to let the body handle it on its own, varying between letting it hang free and using a sling. Typing one handed on Android is somewhat frustrating, so I'll be less active until the worst pain phase is over.
-
Fellow Delphi developers, This is with great pleasure that we announce the immediate availability of HelpNDoc 7.2, an easy to use yet powerful help authoring tool producing CHM help files, responsive HTML 5 and mobile Web Sites, DocX and PDF manuals, ePub and Kindle eBooks as well as Qt Help files from a single source. HelpNDoc is Free for personal use and evaluation purposes and is available at: https://www.helpndoc.com HelpNDoc 7.2 provides many new features and enhancements including the ability to generate Markdown documents; An improved PDF Generator with "keep with next" topic titles; The ability to add page breaks before topics; And many additional enhancements and bug fixes... You can learn more about this update at: https://www.helpndoc.com/news-and-articles/2021-03-23-generate-markdown-documents-improved-pdf-rendering-and-new-force-page-break-option-in-helpndoc-7.2/ Video of some of the new features in HelpNDoc 7.2: Download HelpNDoc now and use it for free for personal and evaluation purposes: https://www.helpndoc.com/download Follow our step-by-step video guides to learn how to use HelpNDoc: Best regards, John, HelpNDoc team. https://www.helpndoc.com
-
- help authoring tools
- helpndoc
-
(and 1 more)
Tagged with: