The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,225 other subscribers

Archive for October 24th, 2019

use the JVCL’s TJvXxxAppStorage to store float values as strings while controlling the decimal separator…

Posted by jpluimers on 2019/10/24

For my link archive: [WayBack] Is there a way to use the JVCL’s TJvXxxAppStorage to store float values as strings (e.g. “10.152”) rather than hex dumps and also control the decimal separator… – Thomas Mueller (dummzeuch) – Google+ with a solution by Achim Kalwa:

+Thomas Mueller You may try this:

type
  TMyStorage = class(TJvAppRegistryStorage)
  protected
    procedure DoWriteFloat(const Path: string; Value: Extended); override;
  end;
  TJvAppRegistryStorage = class(TMyStorage);
...
Implementation

{ TMyStorage }

procedure TMyStorage.DoWriteFloat(const Path: String; Value: Extended);
var
  SValue : string;
  FS     : TFormatSettings;
begin
  FS := TFormatSettings.Create;
  FS.DecimalSeparator := '.';
  FS.ThousandSeparator := #0;
  SValue := FloatToStr(Value, FS);
  DoWriteString(Path, SValue);
end;

And you need to set
StorageOptions.FloatAsString := False;

–jeroen

 

Posted in Delphi, Development, Software Development | Leave a Comment »

OpenSuSE: the relation between /etc/var/named.d and /var/lib/named

Posted by jpluimers on 2019/10/24

For first time BIND named users on OpenSuSE there is often confusion on the relation between these directories:

  • /etc/named.d/
  • /var/lib/named/

For example here someone else struggled: [WayBackRe: Fwd: Re: [opensuse] Split DNS? Solved

This is how I inferred the workings:

The /etc/named.conf.include is re-generated at named start by running /usr/share/bind/createNamedConfInclude by including files that both match NAMED_CONF_INCLUDE_FILES in /etc/sysconfig/named and exist in the /etc/named.d/ directory.

At named startup, it also copies everything from /etc/named.d to /var/lib/named/etc/named.d

For details see

–jeroen

Posted in *nix, *nix-tools, bind-named, Linux, openSuSE, Power User, SuSE Linux | Leave a Comment »

When the Delphi IDE gets slow…

Posted by jpluimers on 2019/10/24

A few tips for when the Delphi IDE gets slow, try these step by step:

  1. Install Delphi Fix-Pack by Andreas Hausladen (a.k.a. Andy)
  2. Disable “Error Insight”
  3. Disable or install LiveBindings related packages

The first can be hard to find as his site disallows search engine indexing, but I’ve written about it before site:wiert.me delphi fixpack andy.

The second step is not a package, but an IDE setting:

The last step involves packages like these (package path followed by package description in the order of the registry):

$(BDSBIN)\dclBindCompFireDAC220.bpl            LiveBinding Expression Components FireDac
$(BDSBIN)\dclbindcomp220.bpl                   Embarcadero LiveBindings Components
$(BDSBIN)\dclbindcompvcl220.bpl                Embarcadero LiveBindings Components VCL
$(BDSBIN)\dclbindcompdbx220.bpl                LiveBindings Expression Components DbExpress
$(BDSBIN)\dclbindcompfmx220.bpl                Embarcadero LiveBindings Components FireMonkey

In those, $(BDSBIN) and $(BDS)\Bin point to the same directory.

Parts via: [WayBack] EDIT: Pretty sure Fix-Pack solved the speed issue, as I installed it and things started flying. I was trying to be as stock as possible, in order to und… – Vin Colgin – Google+

–jeroen

 

Posted in Delphi, Development, Software Development | 1 Comment »

 
%d bloggers like this: