Jump to content

Jacek Laskowski

Members
  • Content Count

    263
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Jacek Laskowski

  1. Jacek Laskowski

    Delphi IDE on AMD cpu?

    I'm working on Ryzen 5900X, the computer after switching from i7 3770 got such wings that I close the windows to keep it from flying away πŸ˜‰ I work in a virtual machines (vmware), currently I have 2 machines open. The system on the host is Ubuntu, which has very low requirements and low overhead. The ram usage (including the two virtuals) is currently at 10 GB (and I have Firefox open with many tabs, Slack, Telegram and many background services). I strongly recommend AMD
  2. Is it possible to automatically convert the entire Firebird database from win-1250 to UTF-8 encoding? Are there any tools for this purpose? Or using backup/restore?
  3. I am testing the DEC library and the AES algorithm (Rijndael). To check the correctness of the result I use other sources of ciphertext. And I encountered a small problem. I used two online generators and wrote a script in Python, but the results (ciphertext) has different length in each of them: #devglan #B623A479FC657E31F219287CD191075575B2FB56485D0C22E9168A2BF2289C7165CDA67586A486E14115C754ABA158A84A8C3B521E0DF87505D77649A8F1CB52A03D41E205849F28BCA2DE189A9C65CDB648DBC9F7D49AF2F1704B491E9E2DE6FC357ADC8E15733394C3C75B45570AE77A2A6CB6CC4418A558A78313C0C16478A7D61538B88B486BCAE89235D8FCEEB8 #domain tools #B623A479FC657E31F219287CD191075575B2FB56485D0C22E9168A2BF2289C7165CDA67586A486E14115C754ABA158A84A8C3B521E0DF87505D77649A8F1CB52A03D41E205849F28BCA2DE189A9C65CDB648DBC9F7D49AF2F1704B491E9E2DE6FC357ADC8E15733394C3C75B45570AE77A2A6CB6CC4418A558A78313C0C16478 #python #B623A479FC657E31F219287CD191075575B2FB56485D0C22E9168A2BF2289C7165CDA67586A486E14115C754ABA158A84A8C3B521E0DF87505D77649A8F1CB52A03D41E205849F28BCA2DE189A9C65CDB648DBC9F7D49AF2F1704B491E9E2DE6FC357ADC8E15733394C3C75B45570AE7 The common part agrees, but what are the extra bytes? #devglan: https://www.devglan.com/online-tools/aes-encryption-decryption #domain tools: http://aes.online-domain-tools.com/ Python script: import pyaes, binascii key = b'01234567012345670123456701234567' plaintext = 'Some short description with looooooooong additional data like polish diacritical chars... Ε‚Γ³ΕΌΕΊΔ‡Δ™Γ³Ε‚ and digits 0123456789' encrypter = pyaes.Encrypter(pyaes.AESModeOfOperationCBC(key)) ciphertext = encrypter.feed(plaintext.encode('utf-8')) print('Encrypted:', binascii.hexlify(ciphertext).upper()) Initialization vector is set to 16 zeroes.
  4. Jacek Laskowski

    AES and different result length

    Yes, you're right... it's about the padding. I didn't specify it explicitly and the default was used, hence there is a difference in the two libraries. Thanks!
  5. Jacek Laskowski

    Casting pointer to TBytes

    I have a method (from external code) that takes an array of TBytes as a parameter: procedure Something(const aData : TBytes); and I need to pass to it a (read-only) memory area, allocated by GetMem(). Is it possible to cast this to TBytes (or some other trick) without copying the memory to a separate variable of type TBytes?
  6. Jacek Laskowski

    Casting pointer to TBytes

    Simplified version of the question: is it possible to pass a memory area (pointer) to a method that accepts an array of bytes (TBytes) without copying? If it's not possible, there's no trick, that's too bad. I'm looking for another solution. Thanks for the help...
  7. Jacek Laskowski

    When will IDE Editor support more fonts?

    See my discovery in other thread about rendering fonts...
  8. Jacek Laskowski

    MMX 15.0.18 - font bug

    I'm updating the MMX, setting the cursor on the method, press ctrl+E and... The same thing happens when I try to enter the MMX options (menu MMX -> Properties...) I've traced that MMX looks for FontName and FontSize in the registry, in the IDE settings in the Theme subnode, if there are no FontName and FontSize, this is an exception. I don't have these settings. I've written it down and it works, but... something is wrong. Delphi 10.3
  9. Jacek Laskowski

    MMX 15.0.18 - font bug

    I don't think I've written anywhere, but with me practically 99% of classes implement the interface, so there is always an interface behind the class and problems with moving methods to the beginning of the class were ALWAYS present in classes implementing the interface. Yes: I am very happy that I will enter 2021 without this frustrating affliction Happy New Year!
  10. Jacek Laskowski

    MMX 15.0.18 - font bug

    Unfortunately, after editing many methods, the problem appeared again, so this value has no effect 😞
  11. Jacek Laskowski

    MMX 15.0.18 - font bug

    Perhaps the line width is important for this problem. I had 140, now I set 80 and for now the situation has not repeated, I will test for some time, although I want 140 eventually.
  12. I don't use Indexer on a daily basis, but I thought I would use it because I wanted to look for many things in the code quickly. I opened its window, indexed the project and started searching. But after hovering the mouse cursor over the name in the indexer window I get AV. This is related to the hint window, as shown in the log. The error is repetitive, every hovering the cursor generates AV: [5005FD90]{rtl260.bpl } System.TObject.InheritsFrom (Line 18239, "System.pas" + 6) + $0 [134F6ABF]{mmx_bds20.dll} VirtualTrees.TBaseVirtualTree.GetDisplayRect (Line 26992, "VirtualTrees.pas" + 40) + $32 [50060298]{rtl260.bpl } System.TMonitor.CheckOwningThread (Line 19020, "System.pas" + 2) + $0 [5005FDDF]{rtl260.bpl } System.TObject.Dispatch (Line 18324, "System.pas" + 11) + $0 [50D15292]{vcl260.bpl } Vcl.Controls.TControl.WndProc (Line 7420, "Vcl.Controls.pas" + 91) + $6 [0EC92198]{CnWizards_D103R.DLL} CnWizNotifier.TCnWizNotifierServices.DoMsgHook$qqrp20System.Classes.TListt1p6HWND__rx24Winapi.Messages.TMessage (Line 1948, "CnWizNotifier.pas" + 1) + $19 [0EC9224B]{CnWizards_D103R.DLL} CnWizNotifier.TCnWizNotifierServices.DoMsgHook$qqrp20System.Classes.TListt1p6HWND__rx24Winapi.Messages.TMessage (Line 1959, "CnWizNotifier.pas" + 12) + $15 [50060079]{rtl260.bpl } System.@AfterConstruction (Line 18814, "System.pas" + 2) + $5 [50060308]{rtl260.bpl } System.TMonitor.Destroy (Line 19042, "System.pas" + 0) + $0 [5005F98D]{rtl260.bpl } System.TObject.CleanupInstance (Line 17680, "System.pas" + 37) + $0 [5005A264]{rtl260.bpl } System.@FreeMem (Line 4839, "System.pas" + 20) + $0 [5005FBE2]{rtl260.bpl } System.@IsClass (Line 17942, "System.pas" + 1) + $8 [13542CDE]{mmx_bds20.dll} MMSuperHints.TMMSuperHintWindow.GetObjectHint (Line 164, "MMSuperHints.pas" + 2) + $8 [13542BAD]{mmx_bds20.dll} MMSuperHints.TMMSuperHintWindow.GetHeaderAndDetails (Line 145, "MMSuperHints.pas" + 6) + $E [0EC91F24]{CnWizards_D103R.DLL} CnWizNotifier.TCnWizNotifierServices.AppEventNotify$qqr32Cnwiznotifier.TCnWizAppEventTypepv (Line 1854, "CnWizNotifier.pas" + 16) + $15 [13542A59]{mmx_bds20.dll} MMSuperHints.TMMSuperHintWindow.CalcHintRect (Line 113, "MMSuperHints.pas" + 1) + $10 [50ECE926]{vcl260.bpl } Vcl.AppEvnts.TMultiCaster.DoShowHint (Line 600, "Vcl.AppEvnts.pas" + 9) + $3 [50E7050C]{vcl260.bpl } Vcl.Forms.TApplication.ActivateHint (Line 11796, "Vcl.Forms.pas" + 46) + $18 [50E6FF3D]{vcl260.bpl } Vcl.Forms.TApplication.HintTimerExpired (Line 11552, "Vcl.Forms.pas" + 8) + $4 [50E6C69A]{vcl260.bpl } Vcl.Forms.HintTimerProc (Line 9191, "Vcl.Forms.pas" + 3) + $5 [50E6EC33]{vcl260.bpl } Vcl.Forms.TApplication.ProcessMessage (Line 10747, "Vcl.Forms.pas" + 23) + $1 [50E6EC76]{vcl260.bpl } Vcl.Forms.TApplication.HandleMessage (Line 10777, "Vcl.Forms.pas" + 1) + $4 [50E6EFA9]{vcl260.bpl } Vcl.Forms.TApplication.Run (Line 10915, "Vcl.Forms.pas" + 26) + $3 [0051D022]{bds.exe } bds.bds (Line 214, "" + 7) + $7
  13. Jacek Laskowski

    Issue with Indexer and VirtualTree paint

    Now is okey, thanks! πŸ™‚
  14. Jacek Laskowski

    Reversing from CloneCursor method

    Firedac datasets have the method DestDataset.CloneCursor (SrcDataset : TFDDataset...), which clones the cursor from the dataset given as a parameter. After performing this method internally both datasets have the same buffer with records. Is there any way to reverse/cancel the result of this method, i.e. break the links to the "foreign" buffer and recreate the original cursor/buffer? I mean especially TFDMemTable.
  15. Jacek Laskowski

    Adding lookup fields to active dataset, how?

    Is there any way to add a lookup or calculated column to an open dataset? Normally a dataset needs to be closed, but in my case I lose data (this is TFDMemTable), so I would like to add columns on the active dataset. I will add that lookup fields are not data fields and are not included in the data buffer, so there should be some way to add them.
  16. Jacek Laskowski

    Firebird ODS converter

    A tool to convert database files from Firebird 2.x to 3.x, in other words a database file structure converter (ODS) from version 11 to 12. An editing tool for both Windows and Linux, in the form of scripts. No need to install Firebird server! I invite you to use it. Firebird version 3 is already very mature and it is time to migrate from version 2.x πŸ˜‰ https://github.com/jaclas/Firebird-ODS-11-to-12-converter
  17. Jacek Laskowski

    Adding lookup fields to active dataset, how?

    This is not the solution I am looking for, I can save and load a dataset content without such "tricks". I'm interested in ADDING a new lookup field with an ACTIVE dataset.
  18. I have simple table: CREATE TABLE WORKSTATION ( IDWORKSTATION INTEGER, MACHINEID VARCHAR(32) ); I create TFDQuery with simple select SQL: SELECT * FROM WORKSTATION w WHERE W.MACHINEID = :PARAM When I set as param string longer than 32 chars then I get error: "arithmetic exception, numeric overflow, or string truncation" I set StrsTrim2Len option to True: http://docwiki.embarcadero.com/Libraries/Rio/en/FireDAC.Stan.Option.TFDFormatOptions.StrsTrim2Len ...but the error still occurs. How to properly config Firedac to eliminate this problem?
  19. Jacek Laskowski

    [Firedac] Truncation error on Firebird select query

    @c0d3r I guess you write to me. Well, you're wrong. The database has declared UTF8 type for text fields. The connection is also made with the parameter UTF8.
  20. Once, in Delphi 10.2, I had an identical problem, the cause of which I could not trace. The problem was that the Options window (menu Tools->Options...) was blocked by an exception. To enter Options I had to use GExperts to deactivate all the experts, restart the IDE, enter Options, set what I needed, reactivate all the experts in GExperts and restart the IDE. I did not know what caused this problem. I haven't had this problem since I migrated to Delphi 10.3... until now. I just installed the Selective Debugging expert 😞 Additionally, I see that in D10.3 this exception does not appear, as it used to, every time, but sometimes. For example, a moment ago I entered the options without any problem. ps. I'm sorry to write about it here, but I don't know where it would be better to report it.
  21. Jacek Laskowski

    Selective Debugging propably has a issue

    I guess I was in too much of a hurry with this report. I guess that's because I was very annoyed by this mistake before. Now, after restarting the machine, the bug doesn't appear anymore, even though I have already entered the settings several times. If something happens, I will let you know.
  22. Jacek Laskowski

    My custom component becomes NI>

    FastMM in full debug mode + properly configured .inc file
  23. Jacek Laskowski

    Delphi AES encryption/decryption

    Maybe it is worthwhile to move the 'crypto' library to a new, separate repository? In a common, large repo it is difficult for anyone to find it
  24. Jacek Laskowski

    [Firedac] Truncation error on Firebird select query

    @Dmitry Arefiev Maybe now you can reply to this issue? I still fight with it.
Γ—