-
Content Count
2268 -
Joined
-
Last visited
-
Days Won
46
Everything posted by Fr0sT.Brutal
-
YouTube playback & control using WebView2 on Delphi 7
Fr0sT.Brutal replied to Yaron's topic in Windows API
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 ;) -
Which implementation of this is easier to understand?
Fr0sT.Brutal replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
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 -
YouTube playback & control using WebView2 on Delphi 7
Fr0sT.Brutal replied to Yaron's topic in Windows API
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. -
Why??! (they've changed the way main menu works in the IDE).
Fr0sT.Brutal replied to Lajos Juhász's topic in Delphi IDE and APIs
Are you programmer or what? Write your own keyboard filtering app 😄 -
Why??! (they've changed the way main menu works in the IDE).
Fr0sT.Brutal replied to Lajos Juhász's topic in Delphi IDE and APIs
You mean, Insert key doesn't work anymore?? -
Had successful experience with freeware DriveXML. And I also transferred W7 from one PC to completely another with built-in Windows tool Angus mentioned
-
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.
-
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))
-
Twitter will fit better IMHO
-
Good luck running on US machines
-
enable/disable the internet connection?
Fr0sT.Brutal replied to David Schwartz's topic in Windows API
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 -
Yup, I just added that remark to not assert things about ancient D versions that I wasn't using
-
Nope. And it never was, at least since D7
-
Also have something alike here Haven't tested with something newer than XE2 though
-
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(..)).
-
Delphi 11.0 Alexandria produces more compact x64 executables than 10.4.2 Sydney !
Fr0sT.Brutal replied to A.M. Hoornweg's topic in Delphi IDE and APIs
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. -
Calling inherited in Destroy
Fr0sT.Brutal replied to pyscripter's topic in RTL and Delphi Object Pascal
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 -
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.
-
Installer (Innosetup) - welcome page yes or no?
Fr0sT.Brutal replied to Mike Torrettinni's topic in Delphi Third-Party
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 -
Best way to replace D11 distributed Indy with latest Git Indy?
Fr0sT.Brutal replied to Ian Branch's topic in 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 -
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.
-
How to manage feature changes during release cycle?
Fr0sT.Brutal replied to Mike Torrettinni's topic in General Help
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 -
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
-
Best way to replace D11 distributed Indy with latest Git Indy?
Fr0sT.Brutal replied to Ian Branch's topic in 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. -
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.