Der schöne Günther
Members-
Content Count
658 -
Joined
-
Last visited
-
Days Won
12
Everything posted by Der schöne Günther
-
Cast an array of numbers to array of bytes without re-allocating
Der schöne Günther replied to Der schöne Günther's topic in Algorithms, Data Structures and Class Design
It will overwrite the second half of the existing data with zeroes because it considers it "newly allocated" System.SetLength - RAD Studio API Documentation (embarcadero.com) -
That does not sound typical at all. I don't know about Android, but on iOS you can either scroll by swiping on the space key, or by tap and holding within the text area. It is not a problem at all.
-
Does anyone know how to get the filesystem for usb mass storage?
Der schöne Günther replied to wilsonning's topic in FMX
Since he/he said "FMX" and an posted an Android screenshot, I think a "Windows only" solution will not help. -
Strange Benchmark Results; Am I Missing Something?
Der schöne Günther replied to Joseph MItzen's topic in I made this
Just for your information, the following snippet in Rust was around 1250 ms on my system. Compilation about 1 second. fn main() { let mut total: u64 = 0; for number in 1..=1000000000 { if ((number % 3) == 0) || ((number % 5) == 0) { total += number; }; } println!("total is {}", total); } The Delphi implementation was around 7.5 seconds on this machine. -
Doesn't TIniFile fall back to some extremely ancient Windows methods? I would have expected an encoding problem with your text file. Can you provide the original .ini file?
-
Where did you get a 12 year old .NET 4.0 from?
-
What is good replacement for FastReports?
Der schöne Günther replied to GreatDayDan's topic in General Help
We are using FastReport and have no plans to change it, but FortesReport seems interesting, I have never heard of it before. Github links to their homepage www.fortesreport.com.br which simply doesn't exist. Does anybody have more information? -
I am still logged in, and it works for me.
-
Get memory used by a Memtable record??
Der schöne Günther replied to Ian Branch's topic in General Help
I don't think comparing "memory usage before" and "memory usage after" in a release build is going to yield anything useful. There might be a lot of other things going on in separate threads. -
Get memory used by a Memtable record??
Der schöne Günther replied to Ian Branch's topic in General Help
I had the same question a few years back. The TClientDataSet had a somewhat plausible DataSize property, but the FireDAC memory table had no such thing. A rather desperate approach would be saving the entire memory table into a stream and then determining the stream size which is rather silly and does not necessarily reflect how much the data actually takes up in your memory. -
DPROJ changes: SourceTree vs Beyond Compare
Der schöne Günther replied to Mike Torrettinni's topic in General Help
It's just a text file. My guess is that either the file encoding or line breaks have changed. If you can provide a file "before" and "after", I'm sure we can find what's up. I don't know about SourceTree, but diff editors often have an option whether line breaks or whitespace changes should be taken into account. -
Requests to local api very slow with TRESTClient
Der schöne Günther replied to Karbot's topic in Network, Cloud and Web
I remember also having this! localhost first ran into a 2000 ms timeout, but 127.0.0.1 was normal. After we made our local server listen for ipv6 connections as well, that timeout was gone. -
Analyze strings for common parts
Der schöne Günther replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
You are looking for regular expressions. I would like to point you to Delphis documentation, but it has been offline for weeks now. Everything you need is in the unit System.RegularExpressions. -
DocWiki.Embarcadero.com does Russian Roulette.
Der schöne Günther replied to A.M. Hoornweg's topic in General Help
If this was some kind of individual and super complex system that is has integrations with a dozen other systems, I'd probably understand. But this is just a wiki! How difficult could it possibly be? -
The WebView2 runtime is already included in Windows 11. Can you reproduce your issue in a clean VM?
-
Good question. The title page states but that's listed under FMX. Does it apply to VCL as well?
-
Your documentation is outstanding. Very interesting to read, pictures, and shows how to get started, step by step. Clearly some effort was put into this. Many libraries often make it very hard to get started.
-
How do you actually detect that something has now gone wrong? Some component (like a DBGrid) displays a TDataSet that contains gobbledegook? Or is there more to detect it? How do you know it's memory corruption (like writing out of bounds), and not generally using a stale pointer? Have you tried compiling the application with a memory manager like full FastMM and enabled runtime checks?
-
simple SFTP-like server for Windows?
Der schöne Günther replied to David Schwartz's topic in General Help
Only the Typescript version, not the Delphi one, unfortunately. -
simple SFTP-like server for Windows?
Der schöne Günther replied to David Schwartz's topic in General Help
For many, many years, I have used HFS. Not FTP, but HTTP. Just a portable .exe that hosts a http server that allows clients to download files and folders, and also upload. https://github.com/rejetto/hfs2 https://www.rejetto.com/hfs -
Class properties: Wins prettyness over functionality ?
Der schöne Günther replied to Rollo62's topic in Algorithms, Data Structures and Class Design
If you just get a value, you call it getX(). If you retrieve a value from somewhere, it's called retrieveX(). If you calculate something, it's calcX(). That's the convention we've been using. I'm always glad I directly know, just by the name of it, whether it's a potentially blocking call, a simple getter or resource intensive calculation. A simple property X tells me nothing. -
Class properties: Wins prettyness over functionality ?
Der schöne Günther replied to Rollo62's topic in Algorithms, Data Structures and Class Design
My first "serious" languages were C++, then Java. They both do not have properties. Maybe I'm biased. My brutally honest opinion: No one needs properties, especially with how limited they are in Delphi. Disadvantages include You cannot fine-grain access (public read access, protected write access) Delphi's code completion does not even show you if a property is writeable or not. You cannot pass them by reference (var or out parameters) like you can with fields It hides performance impacts. Is it just syntax sugar for directly reading a field? Or is it using a getter method that first locks something, then accesses a resource, calculates it, and then finally returns it? When performance matters, I do not know. I have to look at the implementation. They can do nothing a regular getter/setter cannot. Which you will have to write anyway. Tl;dr: Lose some advantages of using fields, lose some advantages of using getters/setters. Gain nothing, except saving three letters for "get" or "set". -
Windows Software Development Kit - why?
Der schöne Günther replied to Dave Novo's topic in General Help
On my last Delphi 11.0 installation, I completely cancelled the SDK installation. Delphi works fine. Maybe it's required for C++ Builder. -
So looking at #395 Adding hcPATCH to THTTPCommandType · IndySockets/Indy@4813ee0 (github.com) that means my code for determining isPutOrPatch will now fail. I don't see any release numbers tied to the code, how can I know which Indy version will include this change?
-
On rare occasions, I also like to print source code on paper, and go through it, and make notes. However, I never print directly from the IDE. I copy the parts that I want and paste it into Visual Studio Code (because it has more advanced syntax highlighting). I then print from there, or paste it into a Word document and print from there. It takes a few seconds, but the results are top notch.