Posts by Victor Tadashi • 1,219 points
44 posts
-
4
votes2
answers2189
viewsA: Edit Currency Delphi Firemonkey
Follow the method for formatting: function TForm1.DisplayFormatter(AValue: double; ADisplayFormar: String): String; begin Result := FormatFloat(ADisplayFormar, AValue); end; I wouldn’t advise using…
-
5
votes2
answers787
viewsA: How do I check if there is a directory, if there is a request to report a new directory? I am using innosetup to create an installer
Simple. You will put a [Code] tag. Then create a validation process. Now create a method to be launched before installation: Beforeinstall. Inside Beforeinstall Voce will call your validation…
-
0
votes0
answers132
viewsQ: How to edit the Full Path property of the file in Visual Studio
I added an existing file to my project. With this, it fixes the Full Path of my file, and I can no longer change. What I need to do is edit this value by using variables such as $(SolutionDir), so…
-
1
votes3
answers2481
viewsA: Find a component by name
Well, I built a prototype with RTTI that looks better. Follow the code: unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,…
-
4
votes2
answers790
viewsA: Inputbox lock CTRL+V
I believe there’s no such thing as InputBox. You can create your own InputBoxand with that you will be able to define the events you want. In this case we create a new Unit, which will be our class,…
-
1
votes1
answer1450
viewsA: How to pass parameters to run on a Delphi thread
First of all, I see no links between FName and Name. For this you need to implement this section in your class: public property Name: string read FName write FName; With this you will be telling the…
-
0
votes1
answer106
viewsA: pg_dump with Plink.exe(Putty)
The solution to this problem was to put the entire application way. Ex.: /opt/postgres/bin/pg_dump. I still don’t know why, but it doesn’t recognize any of these external commands when run by…
-
0
votes1
answer106
viewsQ: pg_dump with Plink.exe(Putty)
I need to run some ssh commands on my linux server, from a windows machine via cmd. For this I am using Plink.exe Commando: plink -ssh [email protected] -pw 12345 -m script Script: pg_dump -U master…
-
0
votes1
answer148
viewsA: Use database data for authentication
In this case, it is easier to create a password field, in this same table, and play the guy’s CPF for this field (as default), it is up to you to encrypt this password or not. Use and create…
-
2
votes1
answer408
viewsA: Send email by calling Outlook 2013
Based on the comments. an alternative solution to your problem would be to run a shell or . bat command with "mailto:" Ex.: ShellExecute(0, 'open', 'mailto:', '', nil, SW_HIDE);…
delphianswered Victor Tadashi 1,219 -
2
votes1
answer739
viewsA: Deserialization of Object JSON morMot
In order for the framework to recognize its objects, (in this case the phone) it is necessary that the Object and Object List are of the type Collection and CollectionItem. Code: unit Unit1;…
-
1
votes1
answer308
viewsA: How to identify the Firebird Server Operating System via SQL?
I used the following command to check the Operating System: select rdb$get_context('SYSTEM', 'DB_NAME') from rdb$database With this return, I can know if the platform is Windows or Linux: Windows…
firebirdanswered Victor Tadashi 1,219 -
2
votes1
answer308
viewsQ: How to identify the Firebird Server Operating System via SQL?
In postgresql we have the table version where all the data I need will be in it. Ex.: SQL: Select * from version() Upshot: PostgreSQL 9.2.3 on x86_64-unknown-linux-gnu, compiled by gcc (SUSE Linux)…
firebirdasked Victor Tadashi 1,219 -
2
votes3
answers633
viewsA: Tdictionary, how to destroy it
Using your example, the code would have the following changes: New class: TMyCustomDictionary = TObjectDictionary<integer, TCliente>; New use of the object foDict: foDict: TMyCustomDictionary;…
-
5
votes2
answers615
viewsA: Doubt with cursor in memo
I wouldn’t advise you to do that, 'cause you’re one hell of a tramp. But if you want to take a look follow the code: unit Unit2; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils,…
-
4
votes1
answer241
viewsA: Develop PDF417 with Delphi
Taking into account that just add the functionality of generating the barcode and format PDF417 with the "Pdf417lib", follows toturial: No need to install dpk that comes along, unless you want to…
-
4
votes1
answer224
viewsA: Buttons with different appearance at design and runtime
Press Ctrl+Shift+F11 to open the project options. This is probably happening because you have this option unchecked:
-
5
votes1
answer793
viewsA: Delphi Decimal Converter for Hours
I know these options: procedure TForm1.Button1Click(Sender: TObject); var MyDate: TDateTime; begin MyDate := 0.0159722222222222; //Com Cast ShowMessage(TimeToStr(MyDate)); //Com Format…
-
2
votes2
answers1390
viewsA: Is Locating a Clientdataset very expensive?
Here is a simple example of using the Dictionary. unit Unit2; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms,…
delphianswered Victor Tadashi 1,219 -
0
votes1
answer77
viewsA: C library Function in Postgresql
To solve the problem: Remove extern "C" of the archives; Place PGDLLEXPORT Datum sysmoroundtoabnt(PG_FUNCTION_ARGS) in the file . h; Change the Double for Float8 and Int for Int32 in the file . c; I…
-
2
votes1
answer77
viewsQ: C library Function in Postgresql
I am using Visual Studio 2015 to create a function in a dll, and when I try to use it in Postgres, I get the following message: server closed the Connection unexpectedly This probably Means the…
-
-1
votes1
answer4309
viewsA: Generate JSON Delphi 7 file
As mentioned in the comments, Voce will have to work with lists to generate JSON, follow a code as an example: procedure TForm2.Button1Click(Sender: TObject); var JsonFull: TlkJSONobject;…
-
0
votes1
answer131
viewsA: How to get the "console output" from Jenkins
I believe that as the Log is a very generic end result, the Jenkins makes it available in a different and simple way. And as I was seeking a JSON, I didn’t realize it right away. To access the build…
jenkinsanswered Victor Tadashi 1,219 -
0
votes1
answer131
viewsQ: How to get the "console output" from Jenkins
I use the REST API of Jenkins to get all the information I need with: /api/json?pretty=true. Now I need to get the logs that are on /console, and would like to know if he possesses something…
jenkinsasked Victor Tadashi 1,219 -
1
votes1
answer44
viewsA: How to Return Results with Integers and Nulls?
It was almost colleague, try it: SELECT * FROM tabela WHERE campo IN (23, 32) OR campo IS NULL;
-
4
votes2
answers1301
viewsA: Size difference (Release/Debug)
Debug It is the build form used to debug the application. It will generate a larger executable because of this, because to debug some things, it is necessary to have the reference points of the…
-
-1
votes1
answer365
viewsA: String combination in SQL
Follows a skeleton of a Function in PostgreSQL: create type RET_TEXTO as ( RIdentificador numeric(18,0), RTexto varchar(500) ); create or replace function MONTAR_TEXTO( ) returns setof RET_TEXTO as…
-
1
votes1
answer733
viewsA: Slow to compile project in Delphi XE7
As stated in the comments, one way to help would be the use of Fix Pack, which is a collection of unofficial fixes of some Delphi bugs and performance gain.…
delphianswered Victor Tadashi 1,219 -
-1
votes1
answer144
viewsA: Corrupted file while copying from one folder to another
I took your code, and I added some Begins and Ends just to compile, and worked perfectly for xls files. In your message, you are trying to open an extension file .dbf by Excel, and that’s the…
-
1
votes1
answer132
viewsA: Android Graphic Data Listing
Has the Teechart Steema’s very good, but it’s not a free tool. Although some of its features are already available with the installation of some versions of Delphi.…
-
1
votes2
answers1153
viewsA: Add a bmp or jpg figure to a canvas in Delphi
It depends on where the image you want to insert in is bCan. Say it is in a directory, you can use the command bCan.LoadFromFile Take a look at the variations of the command LoadFrom... of TBitmap…
-
1
votes2
answers363
viewsA: Error '15.0' is not a Valid floating point value when saving . xls
The problem is that the THojaCalc while saving, try to grab the App version OleObject, which in your case is Excel, and play that version for a Extended, and the version of your Excel is '15.0'.…
-
5
votes3
answers956
viewsA: Because there are two uses in Delhi
I believe that the leaner the uses in Interface, the better. This is because you’ll be able to make more explicit what your interface really needs, and what your code will implement The classes…
delphianswered Victor Tadashi 1,219 -
3
votes2
answers384
viewsQ: Code Review at compilation time
I need to do an automatic Code Review on my codes. We used the Jenkins that triggers the compilation with some other validations every day, but at non-commercial times. As the project is very…
-
1
votes1
answer168
viewsQ: 404 when setting an app.route in Flask
I have this simple code available on the Flask page: from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == "__main__": app.run() As the…
-
1
votes2
answers199
viewsA: Compare Sqltimestamp type field
Try to use the .AsDateTime instead of .AsSQLTimeStamp, and tell if the result was positive.
delphianswered Victor Tadashi 1,219 -
2
votes1
answer1190
viewsA: How to send data from a clientdataset via post in Delphi
Try it this way: procedure TForm1.Button1Click(Sender: TObject); var MyIdHTTP: TIdHTTP; oStringList: TStringList; sResponse: String; begin oStringList := TStringList.Create;…
delphianswered Victor Tadashi 1,219 -
2
votes1
answer249
viewsA: What is Prevayler for?
It’s a different data persistence library than conventional. First, the persistence of data, is a way to save the information, to be able to use it later, be it in databases, or logs, as is the case…
-
5
votes2
answers729
viewsA: How to view data in a dbgrid
Make sure the components are configured correctly: SQLConnection: Driver configuration and base path; SQLDataset: With a valid SQL command, and with the Connection set to SQLConnection;…
-
1
votes2
answers3135
viewsA: Clientdataset 'Insufficient memory for this Operation'
This usually happens when you have a lot of data to return. As it is not explicit what you intend to do, I suggest trying to use the FetchAll. SQLConnection1.Params.Values['FetchAll'] := 'False';…
-
1
votes1
answer229
viewsA: Doubt Client-server system migration, Firedac to more than 1 database?
Yes, Firedac can do that. We went through the same situation, but in my case, it was decided to use the components of Devart. I suggest that first, you create custom connection components, so you…
-
0
votes2
answers163
viewsA: Error message when closing the application
The problem is the way you are implementing it. Note that if Rec is = 1, you will create the application, it will interrupt the process. A simple test to do is to put a breakpoint on . Run, with…
-
2
votes2
answers397
viewsA: Doubt to "check" a radiobutton by clicking on an image
Implements the following code: procedure TForm1.Image1Click(Sender: TObject); begin RadioButton1.Checked := Sender = Image1; RadioButton2.Checked := Sender = Image2; RadioButton3.Checked := Sender =…
-
2
votes2
answers612
viewsA: Add a third-party program to an installer
Yes, it is possible. Basically you can add the installer 'R', as a resource on your own installed, and treat so that your process awaits the installation of 'R'' Here is an example, where dotnetfx35…