Jump to content

Fr0sT.Brutal

Members
  • Content Count

    2268
  • Joined

  • Last visited

  • Days Won

    46

Everything posted by Fr0sT.Brutal

  1. Source code is not needed if OP would create a DLL with some of these options. I added clarification to make you and Emba's lawyers calm ;)
  2. Choosing between several Break/Continue/Exit's and numerous nested begin-end's, I prefer the former. procedure TBla.SearchValidEntry(out _UtcValid, _TimeByUtc: TMeasurementTime); var i: Integer; Utc: TMeasurementTime; begin for i := 0 to FReader.Count - 1 do begin FReader.Seek(i); Utc := FReader.Data.Time; if Utc.IsZero then Continue; _UtcValid := Utc; _TimeByUtc := FReader.MeasurementTime(i); Exit; end; raise EMyException.CreateFmt(_('%s has no valid entry'), [FReader.DataFilename]); end; I'd do it as above
  3. This sounds weird to me. Well, "support" is very likely just a wrapper unit, I guess you can borrow* it from 10.4 ISO. Or try 10.4 CE. ----- * borrow (here): read unit's source, close it, wait for several days and write your own implementation surely not using any 1:1 original code except for a pure inspiration.
  4. Are you programmer or what? Write your own keyboard filtering app 😄
  5. You mean, Insert key doesn't work anymore??
  6. Fr0sT.Brutal

    Reinstalling Delphi 10.4 after PC Crashed

    Had successful experience with freeware DriveXML. And I also transferred W7 from one PC to completely another with built-in Windows tool Angus mentioned
  7. Fr0sT.Brutal

    SQL date problem

    From 10 of wise coder's commandments: DO NOT store dates and floats as strings in DB. NEVER. If you do, you're wrong. Sub-commandment: If you have to serialize dates and floats, use formats carved in stone. F.ex., there are ISO formats for dates that allow sorting as strings to get exactly the same order as if were sorting as dates.
  8. Fr0sT.Brutal

    SQL date problem

    Well, your original question is " I want to filter only the date 03/10/2021. Although I have also the time in the record. " so the answer is one of: - Find time-stripping function in your DB's SQL (let's name it DATEOF) and use 'WHERE DATEOF( MyDateTime ) = :Date' & Qry.Param['Date'] := DateOf(SomeDateTimeValue) - Construct range checking SQL with Start-of-day-to-filter and start-of-next-day: 'WHERE MyDateTime >= :StartOfThisDay AND MyDateTime < :StartOfNextDay' & Qry.Param['StartOfThisDay'] := DateOf(SomeDateTimeValue) & Qry.Param['StartOfNextDay'] := IncDay(DateOf(SomeDateTimeValue))
  9. Fr0sT.Brutal

    Maximum static memory

    Twitter will fit better IMHO
  10. Fr0sT.Brutal

    SQL date problem

    Good luck running on US machines
  11. Fr0sT.Brutal

    enable/disable the internet connection?

    VM usually has much more convenient control over any network adapter. Moreover, there are means of disabling auto-update. And you can try the option I used since XP - just disabling a winupdate service
  12. Fr0sT.Brutal

    Maximum static memory

    Yup, I just added that remark to not assert things about ancient D versions that I wasn't using
  13. Fr0sT.Brutal

    Maximum static memory

    Nope. And it never was, at least since D7
  14. Fr0sT.Brutal

    Where is Ctrl-F3 coming from?

    Also have something alike here Haven't tested with something newer than XE2 though
  15. Fr0sT.Brutal

    General JSON question

    In general, you can't losslessly map a wider set of values to a tight one (well, thanks Cap'n Obvious). Integer is MinInt..MaxInt and JSON value is MinInt..MaxInt + null + undefined/non-existing. So you either got to make assumptions based on subject (f.e.x, if you're reading naturals - -1 could indicate any missing/invalid value) or to check actual value before each assignment (if JSONDoc.GetValue(..)).
  16. In the same time even System has much more stuff included than any C runtime. And with modified runtime binaries are really small. Alas, binary size optimizing was never a goal for RTL architects so we have really good stripping linker and such weird decisions as Exception living in Sysutils that adds ~150 kB including whole Unicode plane and base TStream living in Classes that add ~400 kB even if not used at all.
  17. Fr0sT.Brutal

    Calling inherited in Destroy

    I'd call it weird. It would only have somewhat > 0 sense if destroying VERY big number of objects. But this big number must be created first and dyn allocs will eat much more time than call to empty method, even to virtual one
  18. Fr0sT.Brutal

    splitting interface + implementation

    REGION ruleZ! However, it's not about code navigation. It's about code structuring. I examined Delphi RTL units that use all-in-one approach and have large inactive/unfoldable pieces for non-current platforms and examined FPC sources which are assembled from numerous small platform-specific chunks. Both options aren't ideal but FPC one is a nightmare if you want to find something concrete. However, this simplifies navigation.
  19. Fr0sT.Brutal

    Installer (Innosetup) - welcome page yes or no?

    Back in old times when I was trying lots of soft, I had numerous setup files sometimes named like BWDSQHSetup.exe which I downloaded months ago and I was really glad to see a welcome screen which not only mentioned it will install "MookaWooka Pro" but also contained a few words about what the hell that soft is
  20. Fr0sT.Brutal

    Best way to replace D11 distributed Indy with latest Git Indy?

    The even simplest option is to just rename Indy folder. But anyway one has to deal with design packages (ensure they're replaced by new ones). Well, it depends on whether he intends to use built-in Indy or not
  21. Fr0sT.Brutal

    Internationalizing Applications

    While using default phrases as keys looks nice at 1st glance, such nuances just kill all benefits of this approach IMHO. Not talking about a case of key phrase modification. I prefer another approach when each phrase has its artificial code. This one is used in all Android apps so does pretty well.
  22. Fr0sT.Brutal

    How to manage feature changes during release cycle?

    Rebase is nice for having a branch up-to-date, its final merge commits look very tidy in history. But be aware - rebasing rewrites commits so there's a chance some changes could be lost, especially if there are merge conflicts. If this is the case, a periodic merge from master to your branch could help better. And when a feature is ready, rebase and merge back. This should help avoiding any new conflicts. Luckily Git is smart enough to skip identical commits when rebasing so the branch's history won't be flooded with merge commits
  23. Fr0sT.Brutal

    splitting interface + implementation

    Well... intf procedure DoXPlatformStuff impl procedure DoXPlatformStuff {$ifdef windows} do lots of Windows stuff {$endif} {$ifdef lunix} do lots of Linux stuff {$endif} {$ifdef macos} do lots of MacOS stuff {$endif} ... repeat for all 100 platforms FPC supports and do it for EVERY platform-specific function Compare with includes: intf procedure DoXPlatformStuff impl {$ifdef windows} {$I 'dowindows.inc'} {$endif} {$ifdef lunix} {$I 'dolinux.inc'} {$endif} {$ifdef macos} {$I 'domacos.inc'} {$endif} ... repeat for all 100 platforms FPC supports
  24. Fr0sT.Brutal

    Best way to replace D11 distributed Indy with latest Git Indy?

    Just remove all built-in Indy's paths from Library and Search. To be 100% sure just rename Indy's folder adding "_" or something alike.
  25. Fr0sT.Brutal

    splitting interface + implementation

    This was likely advised by an ill C-er to spread the C-style madness over another languages. AFAIK no language uses this mechanism besides C which kinda alludes. Yes and it makes source examining a real nighmare. Alas, there's no better option to avoid code duplication.
×