Jump to content

Fr0sT.Brutal

Members
  • Content Count

    2268
  • Joined

  • Last visited

  • Days Won

    46

Everything posted by Fr0sT.Brutal

  1. Fr0sT.Brutal

    JCL installation problems in D10.4.2

    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.
  2. The importance of updates is very overestimated
  3. Fr0sT.Brutal

    JCL installation problems in D10.4.2

    File > Open ... - Select package - Build - Install.
  4. O_o How about TStringList.IndexOf ?
  5. Fr0sT.Brutal

    nil v self in form create??

    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
  6. 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.
  7. Fr0sT.Brutal

    JCL installation problems in D10.4.2

    I just can't realize what's the need in 3rd party installers when there's straightforward install process from IDE.
  8. Fr0sT.Brutal

    Build to deploy process

    Why changing properties at build stage? I guess they should be checked before committing to VCS.
  9. Fr0sT.Brutal

    nil v self in form create??

    Nil is when you destroy it explicitly Self is when you leave it until owner is destroyed
  10. Fr0sT.Brutal

    Getting Exception stack trace in 2021

    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;
  11. Fr0sT.Brutal

    What is the correct approach to "phone home"?

    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).
  12. Fr0sT.Brutal

    How and when install the Patches.

    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 ) 😄
  13. Fr0sT.Brutal

    Overloocked Format( ) options

    Sure. Fixed, thx
  14. Fr0sT.Brutal

    Binary data in String?

    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"
  15. Fr0sT.Brutal

    TJsonTextWriter out of memory

    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('}');
  16. VirtualBox is OK for my needs
  17. Fr0sT.Brutal

    Overloocked Format( ) options

    I find useful indexed placeholders: Format('One more %0:s found nearby. Interesting how much %0:ss there are?', ['zombie']);
  18. Fr0sT.Brutal

    Binary data in String?

    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.
  19. Fr0sT.Brutal

    TWSocket.SendTo...

    I personally prefer Pointer( buffer ) over @ buffer [0]
  20. Fr0sT.Brutal

    Help Understanding SQL Parameters Utilization

    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.
  21. Fr0sT.Brutal

    Do bug fix patches really require active subscription?

    If I understand correctly nobody likes to be forced to pay for bugfixes for stuff they already bought.
  22. Fr0sT.Brutal

    Help Understanding SQL Parameters Utilization

    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, '');
  23. Fr0sT.Brutal

    Prevent Alt or Ctrl + Print Screen

    If you worry about copying signatures, you can slightly blur them so they will be readable but look modified.
  24. 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;
  25. protected property InternalStatus read _status write _status public property Status read _status ?
×