-
Content Count
332 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Serge_G
-
Not really related to the question! Check in the file firebird.conf if IPv6V6Only is not set to 1 (around line 712) Check also AuthServer and AuthClient values (chapter around line 397) To have IP_V4 only I Found this explanation But, systemd configuration files ⁉️ I don't think you will find them (this explanation was for CENTOS 7) I don't think changing the RemoteServicePort value to 0.0.0.0:3050 (around line 667) should be a good idea, (idea I can't check), but you can have a try Now, according to this https://www.firebirdsql.org/file/documentation/html/en/firebirddocs/isql/firebird-isql.html#isql-connect-connection-string-url So if you use INET4 to connect to your database instead of INET you will certainly have IP_V4 address in your MON$ATTACHMENTS table. How ? Certainly 2 ways - modifying firebird.conf RemoteBindAddress (around line 725) setting it to INET4 but this should be restricting I think - by delphi code at connexion (depending on components used)
-
Hi, You can backup your database even if there are users connected ("warm backup") Yes
-
Reflexion 1- as I remember , FreeReport is an ancestor or fork of FastReport Reflexion 2- BDE can still be installed (you have to download it from your registered product panel
-
Hi, I report my success on my full Ubuntu PC upgraded to Ubuntu 20.4 I failed installation of 20.4 for WSL (not installation but XFCE4 don't work fine, no terminal !) So I will still investigate about 18.04 version failure.
-
Hi Vincent, Well I test with WSL and a full Ubuntu PC but always with 18.04, Have this one now ! I use the GitHub SKIA version installer (not the getit one). OK so, next step for me : installing Ubuntu 20.04 (it's time 😉) first on my WSL.
-
Hi, Freanch Delphi Entreprise 11.1 (patch 1 now) and Ubuntu 18.04 is my target. Well, it's not a blank one (only a SkiaLabel added), I'll investigate further for this zlib1g-dev and test a blank project in debug mode. Thanks
-
Trying to change a speedbutton background color, but having problems
Serge_G replied to alank2's topic in FMX
Hi, Change the "Windows 10 Desktop" style to "Default". The best way to do that is to remove "Default" style and then rename "Windows 10 Desktop" to blank -
Hi, It worked as expected on Android, but I can't test on Ubuntu I first have a problem of a lacking package I think it was zlib1g-dev, I install this one. But, if now I can deploy my project or the demo the program don't run. What did I miss ? Is there any doc/help for a "good" deployment ?
-
Not so, but I try to be 😉 And did you finally find the Arlésienne Yes, I don't remember where I was confronted to that checkbox. I think it was a question in www.developpez.net/forums and don't report it to my blog Ah finally, I see where https://www.developpez.net/forums/blogs/138527-sergiomaster/b8177/fmx-selection-delements-tlistview/ I.3 part The mayor part is here, but I skipped the OnclickEx part (sorry)
-
Ha, sorry to miss this one yesterday (still in Yeu). I wrote something like that in my blog, in a tutorial or in a response in a forum, I don't remember exactly where, only the image I used for demo. But, as I remember, I don't use positions but the ItemObject name
-
Have a look at http://www.fmxrtl.com/info.php
-
Hi Some useless .00000 here ! You have to learn about how Firebird do the job with scales don't remember where I read this in doc, but you can see here some instructions So if you use the SQL you have, before casting, a 13 scaled variable ! SELECT CAST(10 / 0.3048* 14.7776 AS NUMERIC(13,2)) FROM RDB$DATABASE This work also
-
Well, your SQL is the first and easy way to get the line with Firebird < 3.0 With Firebird 3+ perhaps a windows analytical function can be used WITH C AS (SELECT CUSTNO,LAST(TDATE) OVER (ORDER BY TDATE) D FROM MYTABLE WHERE CUSTNO=:CUSTNO ) SELECT M.TDATE,M.AA,M.BB FROM MYTABLE M LEFT JOIN C ON C.CUSTNO=M.CUSTNO AND M.TDATE=C.D But IMO, advantage is null, and if you have more than one line with CUSTNO,TDATE identical you will get more than one line
-
Delphi 10.3.3. - problem with adding customized view
Serge_G replied to CRO_Tomislav's topic in Cross-platform
Or you can edit DevicePresets.xml file in C:\Users\<user_name>\AppData\Roaming\Embarcadero\BDS\22.0 But I think you have to restart your IDE to have changes applied -
You're welcome
-
Not tested on 11.1 yet but I wrote this unit (for FMX) unit ImageUtils; interface uses System.SysUtils, System.UITypes, System.UIConsts , System.Math, System.Classes, FMX.Types, FMX.Graphics, FMX.Utils; type Talgorithm = (algnone,algluminosity,algaverage,alglightness, alpow); function ConvertToGrayscale(const aBitmap: TBitmap; const aMethod : TAlgorithm=algnone) : TBitmap; overload; function ConvertToGrayscale(const FileName : String; const aMethod : TAlgorithm=algnone) : TBitmap; overload; function ConvertToGrayscale(const aStream : TMemoryStream ; const aMethod : TAlgorithm=algnone) : TBitmap; overload; implementation function Colortogray(const aColor : Talphacolor; const aAlgo : TAlgorithm=algnone) : Talphacolor; var H,S,L : Single; C : TAlphacolorRec; gris : Integer; // https://www.johndcook.com/blog/2009/08/24/algorithms-convert-color-grayscale/ begin c.Color:=acolor; case aAlgo of algluminosity: gris:=Round((0.2126*c.R) + (0.7152*c.G) + (0.0722*C.B)); algaverage: gris := (c.R + c.G + c.B) div 3; alglightness: gris:=Round((maxvalue([TAlphacolorRec(aColor).R,TAlphacolorRec(aColor).G,TAlphacolorRec(aColor).B]) + minvalue([TAlphacolorRec(aColor).R,TAlphacolorRec(aColor).G,TAlphacolorRec(aColor).B])) / 2); alpow : gris:=round(power(( 0.2126*power(c.R,2.2)+0.7152*power(c.G,2.2)+0.0722*power(c.B,2.2)),1/2.2) ); else begin RGBToHSL(aColor,H,S,L); Exit(HSLtoRGB(0,0, L)); end; end; exit(Makecolor(gris,gris,gris)); end; function ConvertToGrayscale(const aBitmap: TBitmap; const aMethod : TAlgorithm=algnone): TBitmap; var X, Y: Integer; bd1, bd2: TBitmapData; p1, p2: PAlphaColorArray; begin Result := TBitmap.Create(Round(aBitmap.Width), Round(aBitmap.Height)); if (aBitmap.Map(TMapAccess.Read, bd1) and Result.Map(TMapAccess.Write, bd2)) then begin try for Y := 0 to (aBitmap.Height - 1) do begin p1 := PAlphaColorArray(bd1.GetScanline(Y)); p2 := PAlphaColorArray(bd2.GetScanline(Y)); for X := 0 to (aBitmap.Width - 1) do begin p2[X] := Colortogray(p1[X],aMethod); end; end; finally aBitmap.Unmap(bd1); Result.Unmap(bd2); end; end; end; function ConvertToGrayscale(const FileName : String; const aMethod : TAlgorithm=algnone): TBitmap; var X, Y: Integer; bd1 : TBitmapData; p1 : PAlphaColorArray; begin if not FileExists(FileName) then exit(nil); result:=TBitmap.CreateFromFile(FileName); if Result.Map(TMapAccess.ReadWrite, bd1) then begin try for Y := 0 to (Result.Height - 1) do begin p1 := PAlphaColorArray(bd1.GetScanline(Y)); for X := 0 to (Result.Width - 1) do begin p1[X] := Colortogray(p1[X],aMethod); end; end; finally Result.Unmap(bd1); end; end; end; function ConvertToGrayscale(const aStream : TMemoryStream ; const aMethod : TAlgorithm=algnone) : TBitmap; overload; var X, Y: Integer; bd1 : TBitmapData; p1 : PAlphaColorArray; begin if aStream.Size=0 then Exit(nil); aStream.Position:=0; result:=TBitmap.CreateFromStream(AStream); if Result.Map(TMapAccess.ReadWrite, bd1) then begin try for Y := 0 to (Result.Height - 1) do begin p1 := PAlphaColorArray(bd1.GetScanline(Y)); for X := 0 to (Result.Width - 1) do begin p1[X] := Colortogray(p1[X],aMethod); end; end; finally Result.Unmap(bd1); end; end; end; end. as a quick test, left number is speed, effet is using Monochrome effect instead of function try with TmonochromeEffect.Create(nil) do try ProcessEffect(nil,aBitmap, 0); finally Free; end; image6.Bitmap:=abitmap; finally aBitmap.Free; watch.Stop; lblEffet.Text:='Effet '+Watch.ElapsedMilliseconds.ToString; end;
-
Hum, take care, install is a bit buggy if you don't use the "standard" install path for Delphi https://quality.embarcadero.com/browse/RSP-36785 installed you have to install the package dclbde280.bpl in the C:\Program Files (x86)\Embarcadero\Studio\22.0\bin
-
Forgot this one, better IMHO, for Firebird<3 using a CTE and JOIN WITH c as (Select count(1) nb from appose) select c.nb,t.* from c full join appose t on 1=1
-
First what a strange query, a count without Grouping clause ! Try this (before fb 3, solution). Really disliking this "subselect" ! SELECT (SELECT COUNT(1) FROM ATABLE) AS TOT,DOCNO,DOCTYPE FROM ATABLE Or use a window (analytical) function (here SUM(1) OVER () is the window function) (Wow now FB3+ have analytical functions 😲) SELECT SUM(1) OVER () FULLCOUNT, DOCNO,DOCTYPE from ATABLE
-
@Dalija Prasnikar solution is also my way to solve this recurrent problem.
-
Why ! ? It's not like VCL has no numerous other Grids purposed by tiers
-
delphi 10.4 Filter DBGrid by row (record) selected in another DBGrid
Serge_G replied to PjDS's topic in Databases
1- It's possible but not the correcr approach 3- only one connection 2- use a parametrized query like SELECT * FROM <table> WHERE <fieldname>=:<fieldname of AdoQuery1> (note : really not easy without the relation fieldnames !) and set Adoquery1.mastersource to datasource2 -
Yes that's also a way, but I was attempting to use SQLite functions defined in UFonctionSQlite.pas see chapter Extending SQLite Engine/Custom Functions https://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_SQLite_with_FireDAC I also go to explore collation in the same chapter but not in the github program
-
Oh, databasename was not supposed to be changed (autocreation) And no, it's not a Delphi version problem it was the challenge, using a "text date" ( 'AAAAMMJJ' *) and getting a date value from a "SQLite function" (in " " because using Firedac SQLite functions) * IMHO a really bad Patrick Premartin's habit