Jump to content

Brian Evans

Members
  • Content Count

    360
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Brian Evans

  1. Brian Evans

    array

    Using SQL to query <100k records in a memory table shouldn't be slow on even a 300Mhz Pentium 2 with spinning rust with even a small number of indexes to help. I wonder what you are doing to make it so slow. Something like SQLite is well optimized and shouldn't be slow at this, especially if you load the data into in-memory tables and add an index or two.
  2. Brian Evans

    PAServer docker output

    Work on describing the problem. Start with conditions where it occurs, Where does it not occur? Describe "What" the problem is. Develop a small test case or program you can share that reproduces the problem. Reproduce the problem yourself in varied environments.
  3. There are events your app can receive. WM_POWERBROADCAST Messages - Win32 apps | Microsoft Learn WM_POWERBROADCAST message (WinUser.h) - Win32 apps | Microsoft Learn
  4. Brian Evans

    Codesnip 4 data files??

    A quick search I see that information at codesnip-faq/UsingCodeSnip.md at master · delphidabbler/codesnip-faq · GitHub in part of the answer to FAQ 3 What changes does CodeSnip make to my system?
  5. You must manually enter the "fixed set of choices" that populate the list. Just like an TDBEdit shows one field value from the current record the TDBListBox highlights the value of one field from the current record in the list. A DBLookupListBox also sources the values for the list from another query / datasource.
  6. It shows live data. For ONE field of ONE record (the current record of the dataset) it shows a list of values (from the items property) with the current field value highlighted. A customer record might have a Country field: hooking it up with the list having values for Canada, USA, Mexico it would highlight the list value matching that of the current record. If the user clicked a different list value, then the field would change value to that.
  7. You need to put the list of values to choose from in the list's items property. If you want the list of values to come from the database you would use a DBLookupListBox.
  8. Brian Evans

    how to recognize cards drawn from a deck?

    Python has more bindings and tutorials for stuff like this and can be used from Delphi once you get it working in Python. Retraining an image classification model on the set of cards would be a good start. Some starting points: Image Recognition and Classification in Python with TensorFlow and Keras (stackabuse.com) TensorFlow Lite | ML for Mobile and Edge Devices
  9. Brian Evans

    Show executable size after successful build?

    After doing a build, on the Projects pane you can right click the active build configuration and select "Show in Explorer" to look at the files. A few times I have done it to check the size but mostly it is to copy the file to the Windows Sandbox for some testing.
  10. Brian Evans

    Android 15 and edge-to-edge enforcement

    The Android version / SDK targeting requirements are a year behind releases. Only on 31 Aug 2024 are new apps and updates required to target Android 14 / API 34 (with extension to November on request). Delphi has often barely made this more relaxed requirement so I wouldn't expect Android 15 / API 35 support anytime soon. Target API level requirements for Google Play apps - Play Console Help
  11. Brian Evans

    Avoid parameter evaluation

    Having the logging expressions compiled and executed on a regular basis means they are less likely to break unnoticed and cause issues when you need them. Building logging strings is usually a small fraction of execution time so keeping things simple is a valid choice.
  12. Brian Evans

    Debugging with Linux target

    Not sure what your setup is - what Linux has PAServer on it to run/debug executables written in Delphi? Are you using your Ubuntu 24.04 host? It is best to use a supported distribution, so Ubuntu 22 or Ubuntu 20.04 LTS if you prefer Ubuntu when debugging. Supported Target Platforms - RAD Studio (embarcadero.com)
  13. Brian Evans

    OSX universal binary file

    You follow: https://docwiki.embarcadero.com/RADStudio/Athens/en/Delphi_Considerations_for_Multi-Device_Applications#Universal_Binaries ?
  14. Brian Evans

    Trying to end a process but failing

    The DLL it is running, and its location should give some hints as to what it is as will the contents (strings at least) of that DLL. Best to figure out what it is and uninstall or disabled it. Sometimes software is installed as a device driver, I remember an annoying piece of Lenovo software that was like that. Other things that can eat a lot of disk IO would be Windows Search indexing.
  15. Brian Evans

    Breakpoints in Debug + Android 64-bit mode.

    They are disabled by default on Android devices. You must enable development mode and then also enable USB debugging. Having them enabled has security implications.
  16. Brian Evans

    'View as Text' command menu item?

    Another issue is IDE insight is blind to context menu commands. This means things only available in a context menu are harder to find.
  17. Brian Evans

    Quality Portal: View my reports?

    The person silhouette in the top right, Requests then in the results change the All drop down to Created by me.
  18. Brian Evans

    TControlList — need help!

    Making a Windows API call for every cell to get the text height will be slow period. The call is required since the text needs to be re-flowed when the width changes. It does all cells to get a new total height. As I mentioned for speed you need a different approach that doesn't need to calculate total height.
  19. Brian Evans

    TControlList — need help!

    A scroll bar that is based on # of rows instead of height and only using enough labels to fill the visible area - swapping/drawing content, as necessary. The drawback is jumpy scrolling instead of smooth due to row at a time vs line at a time, but it is orders of magnitude faster. A lot more work to do it with a ControlList but most grids that support variable row height will do all it for you.
  20. Brian Evans

    Delphi app using Access database very slow on network drive.

    Huge slowdowns on a file server can often be due to failed write cache battery backup on a raid controller with spinning disks attached. With two different customers seeing the issue this is less likely the cause. A local SSD or even HD can hide issues with queries and indexes - scanning a 1GB table is nothing from a local SSD but will be much slower going over the network to a spinning disk. Same if antivirus scans the MDB on first open - much faster locally vs across the network. Can check Resource Monitor and see how much disk reads are required when the application does a query.
  21. Another approach: Code like that suggested by Dave but in the form's MouseMove and leave MouseLeave for the panel blank. procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Single); var LPoint: TPointF; begin if (ParentPanel.Fill.Color = TAlphaColorRec.Red) then begin LPoint.X := X; LPoint.Y := Y; if not ParentPanel.AbsoluteRect.Contains(LPoint) then ParentPanel.Fill.Color := $FFE0E0E0; end; end; procedure TForm1.ParentPanelMouseEnter(Sender: TObject); begin ParentPanel.Fill.Color := TAlphaColorRec.Red; end; procedure TForm1.ParentPanelMouseLeave(Sender: TObject); begin // ParentPanel.Fill.Color := $FFE0E0E0; end;
  22. In 64bit RAX does not contain the first parameter of your Int2Hex function, RCX does. Looks like there are also other problems with the 64 bit ASM code like where the return value is stored: it should end up in RAX, Ref: Using Inline Assembly Code - RAD Studio (embarcadero.com) Ref: Assembly Procedures and Functions - RAD Studio (embarcadero.com)
  23. Brian Evans

    C++ Builder 11.3 / RenameFile() not working?

    I read the question too fast, the code that should have GetLastError added to see any errors specific to the rename (like file open) is commented out. Delphi equivalent pattern is: if RenameFile(oldName, newName) then ShowMessage('File renamed OK') else ShowMessage('File rename failed with error : '+ IntToStr(GetLastError));
  24. Brian Evans

    C++ Builder 11.3 / RenameFile() not working?

    Normal practice to use GetLastError to see what the problem is when some Windows APIs fail. GetLastError function (errhandlingapi.h) - Win32 apps | Microsoft Learn
×