Jump to content

Leaderboard


Popular Content

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

  1. You need to create vector icons (adaptive icons), and you will need to add those additional files to deployment manually. You can find more about icons formats and deployment folders at https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive
  2. Alexander Sviridenkov

    Need suggestion on developing a custom component

    Here is updated sample <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);} #main > tbody > tr > td:first-child {border-right: solid red 2px} </style> <table width="800" id="main"> <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"><div style="position:relative; left:calc(100%+10)">Row 1 name</div></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"><div style="position:relative; left:calc(100%+10)">Row 2 name</div></td> </tr> </table> </td> </tr> </table>
  3. A couple of observations: 1. TPacketLength = Word; The first thing you write to the stream is the Packet length as a word. PPacketLength(@inData[0])^ := datalen; - but datalen is an integer. TBytes can be larger than 64K, so there are some safeguards missing. 2. If you are transmitting to a different byte order system, the PacketLength needs to be marshalled/demarshalled.
  4. Kazantsev Alexey

    Binary size, how-to make it smaller?

    For XE2 you need explicitly rebuild the three files (for latest versons need some more rtl files be rebuilded): system.pas (with key -Y) system.sysutils.pas (with key -V-) system.variants.pas (with key -V-) (search path should include rtl sources) When project building seach path should include your own custom rtl dcus, and rtl sources after it.
  5. Kazantsev Alexey

    Binary size, how-to make it smaller?

    library rtltest; //{$weaklinkrtti on} uses system.classes; begin TMemoryStream.Create.Free; end. Delphi XE2, x86_64, Release: default - 547840 bytes + weaklinkrtti on - 505344 bytes + custom rtl build with minimal rtti - 256000 bytes
  6. Yeah, writing Boolean(0/1) is really much faster than false/true
  7. Isn't that what I wrote? Guess what I meant when I wrote "interpret" a bool as a number.
  8. Fr0sT.Brutal

    Out parameter is read before set

    Currently "out" is more just a usage hint than real compiler-controlled restriction. But even this state is better than "var". Hoping sometimes in Delphi v.25 Tegucigalpa they will add "use uninit'ed" compiler warning.
  9. 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>
  10. narkotik

    Ortools Import Error

    Problem solved. procedure TForm1.PythonEngine1BeforeLoad(Sender: TObject); begin MaskFPUExceptions(True); end;
  11. Rickard Johansson

    LSP Client

    This component was created for use in RJ TextEd to add language server support. It has been tested with several language servers https://www.rj-texted.se/Forum/viewforum.php?f=23. The client and code is available on GitHub https://github.com/rickard67/LSP-Pascal-Library The LSP client was written to make communication with language servers easier. You can use the client to read or send notifications and requests to and from the server. Handle notifications and request from the server using events. The client component support both stdio and tcp/ip socket communication. The client only works in Delphi. I haven't had time to make it compatible with Lazarus/Free pascal yet.
×