-
Content Count
3504 -
Joined
-
Last visited
-
Days Won
115
Everything posted by Lars Fosdal
-
Generics compiler Error "Incompatible Types"
Lars Fosdal replied to luebbe's topic in Algorithms, Data Structures and Class Design
Is there a tidy way to avoid this conundrum? -
Perhaps post a suggestion on https://quality.embarcadero.com ?
-
Good point.
-
Datasnap Connection Too Slow When No Other Software is Connected to the Database on the Server
Lars Fosdal replied to MikeMon's topic in Network, Cloud and Web
BTW: What is the setting of this one? https://docwiki.embarcadero.com/RADStudio/Sydney/en/Server_Class_LifeCycle -
Datasnap Connection Too Slow When No Other Software is Connected to the Database on the Server
Lars Fosdal replied to MikeMon's topic in Network, Cloud and Web
I'd try to find the classes that handles DB connectivity and see where in the codepath you are when the connection is dropped. Somewhere in that callstack there must be a logical explanation. Otherwise, add a watchdog connection that keeps things alive? Brute force, I know... but... -
Datasnap Connection Too Slow When No Other Software is Connected to the Database on the Server
Lars Fosdal replied to MikeMon's topic in Network, Cloud and Web
Surely there must be some sort of mechanism that governs the lifetime of a DS session? -
Datasnap Connection Too Slow When No Other Software is Connected to the Database on the Server
Lars Fosdal replied to MikeMon's topic in Network, Cloud and Web
I am talking about the server-side KeepAlive setting? -
Nice idea, @chkaufmann and nglthach. I had to change it around a little to get it to work, as I instantiate the menu items at runtime. Since I don't assign an OnClick handler, I don't need to disable the entry. I mucked around with colors for a while. Currently using Bold White on DarkGrey which works "ok" for both light and dark themes. type TMenuItemGroup = class(TMenuItem) protected procedure DoAdvancedDrawItem(Sender: TObject; ACanvas: TCanvas; ARect: TRect; State: TOwnerDrawState); public constructor Create(AOwner: TComponent); override; end; constructor TMenuItemGroup.Create(AOwner: TComponent); begin Inherited; OnAdvancedDrawItem := DoAdvancedDrawItem; end; procedure TMenuItemGroup.DoAdvancedDrawItem(Sender: TObject; ACanvas: TCanvas; ARect: TRect; State: TOwnerDrawState); begin ACanvas.Brush.Color := TColors.Darkgrey; // TColors.SysHighlight; // TColors.Darkblue; ACanvas.FillRect(ARect); ACanvas.Font.Color := TColors.White; // TColors.SysHighlightText; // TColors.White; ACanvas.Font.Style := [fsBold]; ACanvas.TextRect(ARect, ARect.Left + 3, ARect.Top + 3, StripHotkey(Caption)); end;
-
Datasnap Connection Too Slow When No Other Software is Connected to the Database on the Server
Lars Fosdal replied to MikeMon's topic in Network, Cloud and Web
It may be because the datasnap server tears down the connection when nobody is using it. It may be configurable. What is the setting of Server.KeepAlive ? -
need something like a Windows Registry that runs as a web service
Lars Fosdal replied to David Schwartz's topic in Network, Cloud and Web
https://firebase.google.com/docs/reference/rest/database -
Is there an elegant way in Delphi to prevent instantiating a class?
Lars Fosdal replied to wuwuxin's topic in Algorithms, Data Structures and Class Design
I wish the "class abstract" declaration would have prevented .Create instantiation. -
need something like a Windows Registry that runs as a web service
Lars Fosdal replied to David Schwartz's topic in Network, Cloud and Web
https://cloud.google.com/datastore/pricing -
I prefer my PS shells to be native. There is so much functionality that can be lost otherwise.
-
Anon function with undefined result yields no warning
Lars Fosdal posted a topic in RTL and Delphi Object Pascal
Is this a known issue? If you assign an anonymous function to a property, there is no warning if the result of the function is not defined. Normally, a function where Result is not set will yield a warning. program anon_method_func_result; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; type TConvertFunc<T> = reference to function(const invalue: string; out outvalue: T): Boolean; TValue<T> = class private FConverter: TConvertFunc<T>; public property Converter: TConvertFunc<T> read FConverter write FConverter; constructor Create; end; constructor TValue<T>.Create; begin FConverter := function(const inValue: string; out outvalue: T): Boolean begin outvalue := Default(T); // Would have expected a warning here // since Result is never set end; end; begin try try var V := TValue<Integer>.Create; V.Free; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; finally {$ifdef Debug} Write('Press Enter: '); Readln; {$endif} end; end. -
Question about Delphi class (static) constructor
Lars Fosdal replied to wuwuxin's topic in Algorithms, Data Structures and Class Design
It exists to balance out my inherent sense of imminent doom. -
If a user has modified the behaviour or installed an app that causes the "open" verb to behave differently than the default behaviour - that is a user problem, IMO. If you want to open a .pdf file, "open" is the way to go.
-
I prefer regulation over learning that my debt has increased 500% the last week.
-
If the parent process runs at a higher security level than your own, you will have a hard time gleaning info from the process without elevating your own process. Since CreateProcess explicitly can specify a different working directory than the current (i.e. the parent) - there is no bullet-proof way of knowing the actual working directory of the parent process.
-
It is hard to have stability without regulation. Ref. crypto volatility.
-
Encryption - are multiple keys possible ?
Lars Fosdal replied to david_navigator's topic in General Help
Looks like you are describing a mix of public key encryption (PKE) and access control. PKE only has one encryption key and a one decryption key. Would it not be easier if Harry simply has both keys - one for the driving license and one for the passport? That would mean - one document, one encryption key, and one decryption key, with a list of people that has access to the decryption key for each document. Or - you could turn that around - one encryption key, one decryption key for each document owner and a list of people who has access to which documents (the documents share the same decryption key). -
One great benefit of switching to a regulated digital currency is that it will make corruption more difficult.
-
I haven't seen any of that. There are rules here which govern how the APIs can used. I am not 100% certain, but it seems the APIs can only be accessed in the user's context, so the "other" bank doesn't actually "see" the numbers.
-
Question about Delphi class (static) constructor
Lars Fosdal replied to wuwuxin's topic in Algorithms, Data Structures and Class Design
Circular references create a lot of fun. -
So, you want openness to go only in your favor? 😉
-
Open banking is no joke - although I think the interpretation of the term varies with the country you are in. Among other things, open banking allows the banks to hook into each other's APIs so that I, as a client of bank 1 and bank 2, open my page in the UI of bank 1, I can also see the account balances from my account(s) in bank 2. Typically, banking fees are fairly low here and there is no surcharge for this cross bank service.