Jump to content

mikerabat

Members
  • Content Count

    36
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by mikerabat


  1. 23 minutes ago, David Heffernan said:
    
    TEncoding.UTF8.GetBytes

    Sorry but can you elaborate that? I actually cannot see how I get there a string converted to a field in the record...

    what am I missing here?


  2. 4 minutes ago, David Heffernan said:
    
    TEncoding.UTF8.GetBytes

     

     

    You don't need to use AnsiString.

    You mean I don't need AnsiCharacters to communicate with a device that only understands Single Byte characters?

     

    So... how is that?

     

    And tell me then how to use GetBytes to fill a structure like:

     

    type

      TPatData = packed record

         SurName : Array[0..31] of AnsiChar;

         FirstName : Array[0..31] of AnsiChar;

      end;

     

    var pat : TPatData;

          formSurName : String;

    begin

            FillChar(pat, sizeof(pat), 0);

           

           // code to be filled here....

     

    end;

     


  3. 16 hours ago, Stefan Glienke said:

    Yes, ditch AnsiString.

    haha...

    I'd love to but I have file and communication structures that need good old ansi strings.

     

    Or do you actually have a better idea than:
    str8 := UTF8String(SurName);
    System.AnsiStrings.StrLCopy(@patData.surname[0],PAnsiChar(str8), length(patData.surname));

     

    to bring a normal delphi string (SurName) to a structure (patData) that contains single byte characters?

     

     

     


  4. Hi!

     

    I'm currently migrating our projects from Delphi2010 to Delphi 10.4. One of my biggest

    changes is actually using StrLCopy and other Ansistring functions that used to be in SysUtils.

    They are now marked as deprecated and moved to System.AnsiStrings so ... I followed the compiler hint.

     

    Now the base problem is that the compiler is confused which function to use so I always prefix the call

    with

    System.AnsiStrings.StrLCopy ...

    which fixed that.

     

    But that looks actually very "ugly" and I have the feeling that this is not the way to go idera ment to go.

     

    Is there a "best" or anticipated way to handle this?

     

    kind regards

      Mike

     


  5. Hi Folks!

     

    I hope anyone can give me some hints on this topic: Firebird Data encryption and encryption of the data sent.

    Especially the "over the line" encryption of data is going to be mandatory for our next projects since there are

    a few attack vectors we didn't really anticapte that this would ever be a problem: an attacker has access to an internal

    network (e.g. a hospital) and reads the communication from between our program and the remote database.

     

    So... data encryption ala SSL, TLS would be a great thing to have. So far the FAQ from firebird only suggest to

    use an SSH tunnel or similar to connect to the database but ... is this feasable or even performant?

    Has anyone any experience with such a problem or is there anything some Delphi components could do?

     

    kind regards

       Mike

     

     


  6. Hey guys!

     

    I wanted to share my matrix library with you

    basically it contains tons of function for matrix manipulation (add, sub, mult, inverse)

    and higher order functions (SVD, CCA, PLS and tons more)

     

    The library is highly optimized (handoptimized assembler, AVX, SSE, FMA support) and can be multithreaded.

     

    Check out the repository on

    https://github.com/mikerabat/mrmath

     

    and check some tiny examples on:

     

    http://www.mrsoft.org/home/downloads.html

     

    hope you have fun with that ;)

     

    kind regards

       Mike

     

    • Like 1
    • Thanks 5
×