-
Content Count
2268 -
Joined
-
Last visited
-
Days Won
46
Everything posted by Fr0sT.Brutal
-
Enable the most detailed logs as possible. Is the error constant or random? Is TLS involded?
-
Zepplin ransomeware: made using Delphi
Fr0sT.Brutal replied to DJof SD's topic in Tips / Blogs / Tutorials / Videos
Solid answer to those who say Delphi is dying - see how Delphi is killing 😄 -
AFAIK parameters couldn't be used inside clauses like LIKE
-
Subscribe to a web stream and listen to incoming streams
Fr0sT.Brutal replied to p-samuel's topic in Network, Cloud and Web
The actual stream is still not shown to us but there's chunked encoding header so probably the response is valid HTTP chunked stream which Indy should handle without issues -
Time with TZ is independent from any system settings
-
How to 'disconnect' a TFDQuery keeping the datas.
Fr0sT.Brutal replied to PhilPlus's topic in Databases
Or any memory dataset. I believe Firedac has one -
[Question/Feature] SSL/TLS fallback using magic bytes
Fr0sT.Brutal replied to FearDC's topic in ICS - Internet Component Suite
Probably a proxy with the same port for TLS and plain channel, or some other custom server. -
What's the need in storing differences? Just add asking the server for correct timestamp before generating new key. Moreover, why you need timestamp at all? If you try to unload server from storing and housekeeping current keys and leave it fully to clients, this seems not a good idea (probably OK for 80s when communication was open and built on trust). Not the timestamp itself. Malicious client could try to generate a bad key if the server internally extracts some data from it. F.ex., if it contains expiration period, a client could try to set it to 1000 years. Or to 30.02.<current year>.
-
Subscribe to a web stream and listen to incoming streams
Fr0sT.Brutal replied to p-samuel's topic in Network, Cloud and Web
Rest won't help here but there are THTTPClient, Indy, not talking about many 3rd party libs. At last you can use TNetClient and send manually crafted request -
Subscribe to a web stream and listen to incoming streams
Fr0sT.Brutal replied to p-samuel's topic in Network, Cloud and Web
Create socket, write to socket, read from socket. What's your concrete problem? -
If you absolutely trust your clients, you can send them server's timestamps to use. But I'd advice to store such info in the server itself.
-
A gem from the past (Goto)
Fr0sT.Brutal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
David, Stefan, I was testing with simple assignment of integer loop variable to another integer. Glad to see "try" has been fixed in 10.4 -
A gem from the past (Goto)
Fr0sT.Brutal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Such critical stuff by definition doesn't deal with memory allocations. My benchmark shows 97% slowdown on x32 and 86% on x64. However the delays become noticeable after 1.5-2M iterations. -
How to??? uses {IF EXISTS}CodeSiteLogging;{ELSE};
Fr0sT.Brutal replied to Al T's topic in General Help
End user should build your unit with corresponding define. There's no way to know if a unit is available from inside the unit that uses it -
How to determine whether 32 or 64 bits Firebird was installed on PC?
Fr0sT.Brutal replied to amit's topic in Databases
IBExpert is able to get this info so I think some ServicesAPI could help -
A gem from the past (Goto)
Fr0sT.Brutal replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
In most cases try-finally is OK but for time-critical functions try block in Delphi is damn slow. That's where goto's remain the only option. Or, if possible, inlined sub-functions could help -
Did they make inline record constants available yet? 10.3 that I have at hand can't do this.
-
SOLVED - SEE BELOW I have a control that starts dragging on mouse down and finishes on up. I noticed weird bug - the drag won't start though MouseDown is executed and TControl.BeginDrag is called. Stepping into that method I found this: ... if (DragControl = nil) or (DragControl = FlagControl) then begin DragControl := nil; if csLButtonDown in ControlState then begin GetCursorPos(P); Perform(WM_LBUTTONUP, 0, PointToLParam(ScreenToClient(P))); // ??? end; ... for some reason the method calls my MouseUp which, in turn, finishes dragging. I tried adding a check to my MouseUp (ignore if in dragging mode, finish it in DragOver) but this doesn't work when the dragging starts from MouseDown handler. Of course I could add internal flag field like fCallingBeginDrag := True; BeginDrag; fCallingBeginDrag := False but this looks too awkward. Probably there's any smarter way?
-
[solved] Dragging a control - TControl.BeginDrag oddity
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in VCL
Update: this is unreliable. The event is not called if there was just a simple click. I had to catch DoEndDrag as well. -
[solved] Dragging a control - TControl.BeginDrag oddity
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in VCL
I guess I figured things out. The catch is that when dragging, no "mouse up" event is fired when a user releases the button. I wasn't aware of that. So the solution is: - in MouseUp ignore the event when in dragging mode (it's a MLB Up event fired by TControl.BeginDrag) - in DragOver finish dragging mode when State is dsDragLeave -
Probably he meant that in case of many parameters they are pushed to stack not to registers. Stack is somewhat related to memory 🙂
-
No, just a personal preference. Of course I always try to find balance between object creation atomicity and c-tor complexity. On the one side is an object requiring many properties assigned just to act properly, on the other is CreateProcess. Anyway it's a question of coding style. Style guides recommend wrapping values into a record. However I don't like it much because Pascal's record filling is too verbose compared to, say, JS
-
[solved] Dragging a control - TControl.BeginDrag oddity
Fr0sT.Brutal replied to Fr0sT.Brutal's topic in VCL
Thanks, I'll take a look. I see you are using zero point as null value but it's a valid click point in fact. I'm using to (-1,-1) for this purpose -
Many style guides advice against more than 3 arguments. My personal limit is, I think, 5 args.
-
Adding (CORS) Headers for simple fileserving THttpServer
Fr0sT.Brutal replied to omnibrain's topic in ICS - Internet Component Suite
That will lead to surprising behavior. const Hdr = '...'; serv.PersistentHeader := Hdr; Assert(serv.PersistentHeader = Hdr); // BANG