Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 06/29/21 in all areas

  1. Actually no, compression is not performed in the project in which this class was used. Data packet is a JSON object which gets serialized and encrypted... size is usually between 80-140 bytes, which only increases after compression. The reason I didn't include a version in the header is the packet itself: if a new version adds a new field this easily can be detected during deserialization. I know the code is not completely universal. I kept it as simple as possible to do it's job in this context and nothing more - keeping the logic easy to read and understand. If your packets are usually larger than 64k, it's enough to change TPacketLength = UInt64; for example, the rest of the code should take care about this automatically. P.s.: I just read your first answer again and realized that I'm indeed copying an Integer in a TPacketLength which is definitely not right! I'll fix this and move the size check from my program to this class so I can reupload. I should also mention the size limit in the "Keep in mind" section I assume 🙂 P.s.p.s.: There was a network loss between just the other day and about 90k of buffer was received by the server upon reestablishment containing a number of ~140 byte packets. The code worked flawlessly, separated and processed each of these without errors. So yeah, I'm happy 🙂
  2. wuwuxin

    Need suggestion on developing a custom component

    Exactly my impression - the HTML Component Web Site is quite confusing, about what that component is capable of . The samples/demos are good, but honestly, not visually impressive/captivating at all - no offense they all look something from the 1990's. Sorry. But from the "small" example presented with this thread, it seems quite (interestingly) powerful (thanks to @Kas Ob. for pointing to HCL's capability and to @Alexander Sviridenkov kindly providing detailed examples addressing my questions). Does HCL have the potential to be something like, WPF/XAML, or QT/QML? Maybe too much but the official website definitely underplays its potential power, while missing the range of more creatively exciting use cases.
  3. Lars Fosdal

    Delphi compatibility with Windows 11?

    To check your current TPM status, Win+R and start tpm.msc To check your UEFI status, Win+R and start msinfo32.exe - look at BIOS mode There seems to be some loopholes with regards to TPM, but too early to be definitive about it. Edit: It seems that some BIOS firmware based solutions are accepted? https://www.windowscentral.com/best-trusted-platform-modules-tpm
  4. Dalija Prasnikar

    Delphi compatibility with Windows 11?

    Define compatibility... Delphi applications work, IDE works... MS has good track record in providing backward compatibility for existing applications. Minor tweaking to embrace new OS features are always possible. You can find more information here: https://blogs.embarcadero.com/windows-11-a-beautiful-meteor-will-wipe-out-the-dinosaurs/
  5. It's also pointless to use SetLength in this code because you then throw that array away and replace with a new one.
  6. If you don't want to rely on 3rd party wrappers, it is not very overly complicated to redirect the output and read it manually. Just create a pipe, assign it to the STARTUPINFO passed to CreateProcess(), and then read from the pipe. MSDN documents this task: Creating a Child Process with Redirected Input and Output
  7. Any chance of adding IBM MQ to the list of MQs? See also: https://developer.ibm.com/articles/mq-downloads/
  8. Alexander Sviridenkov

    Need suggestion on developing a custom component

    Zero lines of Delphi code, just one HtPanel: (artefacts on video are from GIF compression) HTML: <style> body {padding: 20px} td {height: 20px; resize: horizontal} .gauge1 {background: linear-gradient(to bottom, steelblue, blue);} .gauge2 {background: linear-gradient(to bottom, lightgreen, green);} </style> <table width="800"> <tr> <td width="50%"> <table width="100%"> <tr> <td class="gauge1" width="70%"></td> <td class="gauge2"></td> </tr> </table> </td> <td> <table width="100%"> <tr> <td class="gauge1" width="70%"></td> <td class="gauge2"></td> </tr> </table> </td> </tr> <tr> <td> <table width="100%"> <tr> <td class="gauge1" width="70%"></td> <td class="gauge2"></td> </tr> </table> </td> <td> <table width="100%"> <tr> <td class="gauge1" width="70%"></td> <td class="gauge2"></td> </tr> </table> </td> </tr> </table>
  9. wuwuxin

    Delphi books

    I rate myself as an "intermediate-level" Delphi programmer (as compared to the experts I found in this forum; I also use C/C++, .NET/C#/F#, FORTRAN). The following is the list of Dephi books that I've collected over the years. These are all great books by great writers - I'd like to thank them all for their books accompanying my Delphi journey over the years. For Learners: Inside Delphi 2006 (Ivan Hlandi) - the first Delphi book I read, by which I learned Delphi. I found this book very good for picking up Delphi. It covers not only Delphi but C++ Builder (for cross referencing Delphi features). Object Pascal Handbook (Marco Cantu, 2021) - classic, and continuously updated, with the latest one being for Sydney 10.4.2. Delphi XE2 Foundations (Chris Rolliston, 2012) - a well written book covering the Delphi language and other aspects. Comprehensive: Mastering Delphi 7 (Marco Cantu, 1996) - classic of the classics. Old but still relevant. Of all of Marco's books, I think his "Master Delphi XXX" series are really well written, impeccable text-book style. Expert Delphi (Pawel Glowacki, 2017) - another good Delphi book. Delphi Cookbook (Daniele Teti, 2018) - cookbook style, and good as a desktop reference to check out the tips occasionally. Delphi GUI Programming with FireMoney (Andrea Magni, 2021) - on the GUI programming using FMX, haven't finish reading it. Seems a comprehensive one. Delphi in a Nutshell (Ray Lischner, 2000) - my favorite book. Very well written, concise, and no non-sense. I like the "nutshell" style. I really hope Oreilly could update this book to the recent Delphi editions. For COM/ActiveX developing in Delphi: Delphi COM Programming (Eric Harmon, 2000) - the classic for Delphi COM programming. Oldie but goodie. A must-have if you are still doing COM programming. For Delphi Component Development: Delphi Component Design (Danny Thorpe, 1996) - the classic for component developers. Oldie but goodie. The author is Danny Thorpe after all. Even if you don't read it, you can save the book for the old times' sake. A nostalgic item to keep. Developing Custom Delphi 3 Components (Ray Konopka, 1997). Old, but still relevant. Well-written. For Database: Delphi in Depth - Client Dataset (Cary Jensen, 2014) - Not sure ClientDataSet is still a good option nowadays. But the book provides comprehensive coverage on ClientDataSet and its under-the-hood. Delphi in Depth - FireDAC (Cary Jensen, 2015) - a must-have if you want to learn FireDAC systematically. Introducing Delphi ORM (John Kouraklis, 2019) - An interesting little book about ORM, with a focus on TMS Aurelius. Enterprise Delphi Database with mORMot (Erick Engelke, 2016) - the only book on mORMot (except mORMot's own manual). Neither well-written, nor carefully proofread. It can be useful before driving you lunatic with the various typos, typesetting errors, or out-of-no-where examples. Still appreciate the book for being the only mORMot book, though. Multi-threading/Parallel Programming Parallel Programming with OmniTheadLibrary (Primoz Gabrijelcic, 2019) - A systematic book on the wonderful OmniThreadLibrary. Delphi Event-based and Asynchronously Programming (Dalija Prasnikar, 2020) - a very well written book on the subject. Design Patterns Hands on Design Patterns with Delphi (Primoz Gabrijelcic, 2019) - A very nice book of implementing various design patterns in Delphi. Coding in Delphi, More Coding in Delphi, Dependency Injection in Delphi (Nick Hodges, 2015) - the three books by Nick Hodges on implementing design patterns in Delphi. Primarily about the Spring4D. The books have a very enthusiastic writing style, together with a lot of filler jokes (not my style but I can appreciate Nick's enthusiasm trying to make things lighter and fun). MVVM in Delphi (John Kouralkis, 2016) - a book on implementing MVVM in Delphi. The first couple of chapters are quite academic but interesting. Delphi Performance/Memory Management/Algorithms Delphi High Performance (Primoz Gabrijelcic, 2018) - a fairly unique book on writing performant Delphi code. Delphi Memory Management (Dalija Prasnikar, 2018) - a very interesting book, well written too. Delphi Algorithms and Data Structures (Julian Bucknall, 2001) - A unique book on algorithms and data structures in Delphi language.
×