-
Content Count
2268 -
Joined
-
Last visited
-
Days Won
46
Everything posted by Fr0sT.Brutal
-
JCL installation problems in D10.4.2
Fr0sT.Brutal replied to TurboMagic's topic in Delphi Third-Party
Well, I'm not a fan of components doing tons of things before they are able to install (frequently they even unconditionally install themselves to paths THEY like). Adding DCU's to libpath - yes, that's a drawback but not a big one. -
virtualization VMWare Workstation PRO vs MS Hyper-V
Fr0sT.Brutal replied to Drewsky's topic in Delphi IDE and APIs
The importance of updates is very overestimated -
JCL installation problems in D10.4.2
Fr0sT.Brutal replied to TurboMagic's topic in Delphi Third-Party
File > Open ... - Select package - Build - Install. -
StringList container with ignore duplicates, non-sorted
Fr0sT.Brutal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
O_o How about TStringList.IndexOf ? -
Well, I don't consider it effective talking about integrals in answer to question "2+2=?". Anyway these 30% is much greater than 0% in David's answer :D
-
virtualization VMWare Workstation PRO vs MS Hyper-V
Fr0sT.Brutal replied to Drewsky's topic in Delphi IDE and APIs
The same, or even much worse, situation is with MS VS. I use it from time to time to build some opensource projects so I've installed express 2010 and, for some old stuff, 2008. I assure you it's always a torture. VS destroys paths, messes up frameworks and gives mysterious errors that you have to search for. Moreover, even if you set up things correctly, it could just break some day because of some other system change. Dedicated VM's are the real salvation here. -
JCL installation problems in D10.4.2
Fr0sT.Brutal replied to TurboMagic's topic in Delphi Third-Party
I just can't realize what's the need in 3rd party installers when there's straightforward install process from IDE. -
Why changing properties at build stage? I guess they should be checked before committing to VCS.
-
Nil is when you destroy it explicitly Self is when you leave it until owner is destroyed
-
Getting Exception stack trace in 2021
Fr0sT.Brutal replied to Wagner Landgraf's topic in RTL and Delphi Object Pascal
FWIW, there's a poor man's OS-based solution that gets addresses only const DBG_STACK_LENGTH = 32; type TDbgInfoStack = array[0..DBG_STACK_LENGTH - 1] of Pointer; PDbgInfoStack = ^TDbgInfoStack; {$IFDEF MSWINDOWS} function RtlCaptureStackBackTrace(FramesToSkip: ULONG; FramesToCapture: ULONG; BackTrace: Pointer; BackTraceHash: PULONG): USHORT; stdcall; external 'kernel32.dll'; {$ENDIF} {$IFDEF MSWINDOWS} procedure GetCallStackOS(var Stack: TDbgInfoStack; FramesToSkip: Integer); begin ZeroMemory(@Stack, SizeOf(Stack)); RtlCaptureStackBackTrace(FramesToSkip, Length(Stack), @Stack, nil); end; {$ENDIF} function CallStackToStr(const Stack: TDbgInfoStack): string; var Ptr: Pointer; begin Result := ''; for Ptr in Stack do if Ptr <> nil then Result := Result + Format('$%p', [Ptr]) + sLineBreak else Break; end; function GetExceptionStackInfo(P: PExceptionRecord): Pointer; begin Result := AllocMem(SizeOf(TDbgInfoStack)); GetCallStackOS(PDbgInfoStack(Result)^, 1); // исключаем саму функцию GetCallStackOS end; function GetStackInfoStringProc(Info: Pointer): string; begin Result := CallStackToStr(PDbgInfoStack(Info)^); end; procedure CleanUpStackInfoProc(Info: Pointer); begin Dispose(PDbgInfoStack(Info)); end; procedure InstallExceptionCallStack; begin SysUtils.Exception.GetExceptionStackInfoProc := GetExceptionStackInfo; SysUtils.Exception.GetStackInfoStringProc := GetStackInfoStringProc; SysUtils.Exception.CleanUpStackInfoProc := CleanUpStackInfoProc; end; procedure UninstallExceptionCallStack; begin SysUtils.Exception.GetExceptionStackInfoProc := nil; SysUtils.Exception.GetStackInfoStringProc := nil; SysUtils.Exception.CleanUpStackInfoProc := nil; end; -
What is the correct approach to "phone home"?
Fr0sT.Brutal replied to Der schöne Günther's topic in Project Planning and -Management
HTTP(S) POST is the best when firewalls/proxies come to the scene. FTP is nightmare for gateways. Making upload server for this primitive task is easy, I even believe only NGinx will be enough without any coding (not sure though). -
How and when install the Patches.
Fr0sT.Brutal replied to Juan C.Cilleruelo's topic in Delphi IDE and APIs
Knowing where an app resides in the XXI century? Knowing where an app's settings reside in the XXI century? Knowing what a "file" is in the XXI century? Surely there's still pretty much to un-know (OS vendors seem to be doing everything for this ) 😄 -
Overloocked Format( ) options
Fr0sT.Brutal replied to Rollo62's topic in RTL and Delphi Object Pascal
Sure. Fixed, thx -
Binary data in String?
Fr0sT.Brutal replied to aehimself's topic in Algorithms, Data Structures and Class Design
Funny. I wasn't aware of that. I wonder why these holes exist, did their creators thought "OK, we already have all the characters we need, let's leave some lacunas here and there" -
TJsonTextWriter out of memory
Fr0sT.Brutal replied to jhoward1801's topic in RTL and Delphi Object Pascal
Pseudocode fileStream.WriteLn('{'); fileStream.WriteLn('"arrOfObjects": ['); while GetObject(obj) do begin JSONWriter.SaveToStream(fileStream, obj); fileStream.WriteLn(','); // Note - avoid writing comma after the last record, I'm too lazy to do this here end; fileStream.WriteLn(']'); fileStream.WriteLn('}'); -
virtualization VMWare Workstation PRO vs MS Hyper-V
Fr0sT.Brutal replied to Drewsky's topic in Delphi IDE and APIs
VirtualBox is OK for my needs -
Overloocked Format( ) options
Fr0sT.Brutal replied to Rollo62's topic in RTL and Delphi Object Pascal
I find useful indexed placeholders: Format('One more %0:s found nearby. Interesting how much %0:ss there are?', ['zombie']); -
Binary data in String?
Fr0sT.Brutal replied to aehimself's topic in Algorithms, Data Structures and Class Design
AFAIK usually ANSI codepage has all 1..255 bytes mapped to some character so ANSI=>UTF16=>ANSI conversion results in the same data. That's why it worked. -
I personally prefer Pointer( buffer ) over @ buffer [0]
-
Help Understanding SQL Parameters Utilization
Fr0sT.Brutal replied to Gary Mugford's topic in General Help
Contrary, I changed all of my "SQL.Add(s)" to "SQL.Text := s". Even if I construct query conditionally, I collect it first as variable and then assign it to SQL. -
Do bug fix patches really require active subscription?
Fr0sT.Brutal replied to David Heffernan's topic in General Help
If I understand correctly nobody likes to be forced to pay for bugfixes for stuff they already bought. -
Help Understanding SQL Parameters Utilization
Fr0sT.Brutal replied to Gary Mugford's topic in General Help
BTW, you might wish to get rid of some SQL constructing to have the query text solid with such kind of conditions: Qr.SQL:='SELECT ... FROM SomeTable WHERE ( (:CheckFoo = 1) AND (SomeTable.Foo = :Foo) )'; Qr.ParamByName['CheckFoo'].Value := Ord(chbCheсkFoo.Checked); Qr.ParamByName['Foo'].Value := IfThen(chbCheсkFoo.Checked, eFoo.Text, ''); -
Prevent Alt or Ctrl + Print Screen
Fr0sT.Brutal replied to Henry Olive's topic in RTL and Delphi Object Pascal
If you worry about copying signatures, you can slightly blur them so they will be readable but look modified. -
Read-write protected, but read-only public property?
Fr0sT.Brutal replied to aehimself's topic in Algorithms, Data Structures and Class Design
I didn't investigated deeply but that code in your post seems already doing what you want type TParent = class private FFoo: byte; strict protected property Foo: byte read FFoo write FFoo; end; TChild = class(TParent) property Foo: byte read FFoo ; end; procedure TForm1.Button2Click(Sender: TObject); var par: TParent; ch: TChild; begin par := TParent.Create; par.Foo := 1; // err ch := TChild.Create; ch.Foo := 1; // err end; -
Read-write protected, but read-only public property?
Fr0sT.Brutal replied to aehimself's topic in Algorithms, Data Structures and Class Design
protected property InternalStatus read _status write _status public property Status read _status ?