mikerabat
-
Content Count
36 -
Joined
-
Last visited
-
Days Won
1
Posts posted by mikerabat
-
-
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;
-
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?
-
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
-
You can check out:
https://github.com/mikerabat/mrmath
It provides a set of different random number generators:
* Standard delphi ( linear congruential )
* Mersenne Twister
* BCrypt (or actually os dependent)
* If the cpu supports it: the x86 RDRAND instruction
- 1
-
Hi there!
There is the C library libFido2 around in form of a dll. I took the liberty to put arround a Delphi library that supports
FIDO2 keys around that library including a little project that shows how one could do WebAuthn logins.
check out:
https://github.com/mikerabat/DelphiFido2
https://github.com/mikerabat/DelphiCBOR
for further reading.
kind regards
Mike
- 3
-
Hi!
You could use the regression functions from here:
https://github.com/mikerabat/mrmath
and the regression example from here:
http://www.mrsoft.org/home/downloads.html
- 1
-
Cool thanks for the info!
-
Thanks for the hint! I will definitely look into that 🙂
-
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
-
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
- 1
- 5
SysUtils, AnsiString
in VCL
Posted
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?