Posts by Ramon Ruan • 1,018 points
66 posts
-
-1
votes1
answer54
viewsQ: Perform the reshape of different arrays
Hello! Follow down my doubt: array_a = [1,2,3] array_b = [1,2,3] array_c = [1,2,3] I’d like them to look like this: array_reshaped = [[1, 1, 1], [2, 2, 2], [3, 3, 3]] Could I perform this operation…
-
0
votes0
answers62
viewsQ: I cannot run a query inside a socket event using Node.js (socket.io), why?
Follow what I did initially: var http = require('http'), express = require('express'), mysql = require('promise-mysql'), mysql2 = require('mysql'), parser = require('body-parser'), path =…
-
1
votes3
answers347
viewsQ: Form Inheritance created in Runtime
Follow the code below: type TfObject = class(TForm) private procedure FormShow(Sender : TObject); procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure…
-
4
votes1
answer893
viewsQ: File Exists PHP
I am using this function to check if the file exists: <?php header('Content-Type: text/html; charset=utf-8'); //header('Accept-Ranges: bytes'); $nome_real = $_FILES["Arquivo"]["name"];…
-
2
votes1
answer961
viewsA: Post Idhttp FIREMONKEY Delphi XE7
Gentlemen, I believe it was some string name conflict, because in my private I was using the name ScriptUP, after the change to the name ScriptUpload, He got the Host, it looks like it has nothing…
-
4
votes1
answer961
viewsQ: Post Idhttp FIREMONKEY Delphi XE7
Following previous question: Previous question on the same subject. Now what he’s showing is: http/1.1 404 Not Found. Code used: Functional in VCL: function TForm1.UploadArquivo(server, script,…
-
3
votes1
answer9927
viewsQ: Post Idhttp com Delphi
I can do an HTML post quietly, but when I try to do it with Delphi, it presents me with this mistake: http/1.1 406 not acceptable Follow the code below: function TForm1.UploadArquivo(server, script,…
-
2
votes1
answer81
viewsQ: File Upload
I have the following code below: PHP: <?php $nome_temporario = $_FILES["Arquivo"]["tmp_name"]; $nome_real = $_FILES["Arquivo"]["name"]; copy($nome_temporario, "/public_html/publico/$nome_real");…
-
4
votes1
answer2211
viewsA: Adjust columns of a Dbgrid
Friends, I got it right. Goes below: procedure TfrmPrincipal.AjustarColunas(DBGrid : TDBgrid); var ColumnCount, RowCount : integer; DataSetTemp : TDataSet; DataSourceTemp : TDataSource; contCol,…
-
0
votes1
answer2211
viewsQ: Adjust columns of a Dbgrid
I’m having a problem to get a function where do the same as Excel (Resize columns). For example: Watch the columns spacing, huge and needless. I would like a solution in the form of a function to…
-
1
votes1
answer713
viewsA: Tclientdataset Temporary Table
Then, after much research, I learned that the ApplyUpdates(0); does not work in temporary tables, IE, all I did was define the fields I want in TClientDataSet after this, right click and…
-
1
votes1
answer713
viewsQ: Tclientdataset Temporary Table
Good night. My question is the following, I have a temporary table created on TClientDataSet. However, I need to record the data from the temporary table in an XML file and then read again in…
-
0
votes1
answer1212
viewsQ: Check if There is a Service
Goes below: function TfPrincipal.ServicoExiste(maquina, servico : PChar) : Boolean; var SCManHandle, Svchandle : SC_HANDLE; {Nome do computador onde esta localizado o serviço} sComputerNameEx :…
-
1
votes1
answer510
viewsQ: Desktop App + DB Online (Hosting)
Good afternoon, Guys, my question is the following, in my connection of a desktop application with online database: 1st question: What is the best way to stay safe the connection made with the…
-
3
votes1
answer1361
viewsQ: View video from IP Camera
Gentlemen, I’m no expert in PHP, I’m starting now, and would like a direction on how to display the video of my IP Camera - P2P snapshot.php <?php…
-
1
votes1
answer1456
viewsQ: Failed to Change Directory - Indy 10 - Idftp
The ftp folder is existing, I checked manually and even then this error occurs. Folder on ftp: Then follow the code: with IdFtp2 do begin Host := edtServFTP2.Text; Port := StrToInt(edtPorta2.Text);…
-
1
votes1
answer647
viewsQ: Error sending e-mail by Indy 10
The following error appears when trying to execute the send email function: Não há um programa padrão de e-mail associado para realizar a ação solicitada. instale um programa de e-mail ou, caso já…
-
2
votes1
answer50
viewsQ: Match lines of two Dbgrids
I have 2 dbgrids in separate locations. However, the first Dbgrid contains all the information (all the titles I searched for). And in the second Dbgrid, it contains the specific information about…
-
0
votes1
answer2033
viewsQ: Enable/Disable GPS via Delphi
There’s some specific code to enable the GPS, but I haven’t found it yet. What I saw online was: Post na Stack - On/Off GPS however, this code is in JAVA. Whatever he could ride in Delphi was: var…
-
1
votes1
answer107
viewsA: Delphi XE5 error
Well, eventually I discovered that it was a little system that I use called Castalia V2013.2, where this error lived, of course, with the release of version 2013.4, this error was solved. Apparently…
-
0
votes1
answer107
viewsQ: Delphi XE5 error
Can anyone understand why this has been happening? In fact, it’s not just that there, there’s much more, whenever I type a special character ";" or other things, he doesn’t recognize and keeps…
-
0
votes1
answer1069
viewsQ: When repairing causes error - 'Lost Connection to Mysql server During query' - An idea?
Follows the code: ZQuery1.Close; ZQuery1.SQL.Clear; ZQuery1.SQL.Add('SHOW TABLES FROM '+zConnRepara.Database); ZQuery1.Open; ZQuery1.First; Progressbar1.Max := ZQuery1.RecordCount; lTemp := '';…
-
1
votes1
answer897
viewsA: Argox Label Printer: A_prn_text - Variable Is Error
while not DMRetaguarda.QConItem.eof do begin for i := 1 to strtoint(edit5.text) do begin A_Prn_Text(200, 360, 1, 9, 5, 1, 1, 'n', 2,…
delphianswered Ramon Ruan 1,018 -
0
votes1
answer897
viewsQ: Argox Label Printer: A_prn_text - Variable Is Error
Follows the function: function A_Prn_Text ( x,y,ori,font,typee,hor_factor,ver_factor:integer;mode:char;numeric:integer;data:String):integer;stdcall;external 'WINPPLA.DLL'; Follows the code: while…
delphiasked Ramon Ruan 1,018 -
1
votes1
answer78
viewsQ: Access Violation in Code
Gentlemen, I have this code, it lies in my Form Activate, then, it serves to identify my running software, and consequently update it, ie it is an auto updater. if servidor = false then //se o…
delphiasked Ramon Ruan 1,018 -
2
votes1
answer753
viewsA: How to Treat a Blob value that is empty
var Streamalt, Streamalt2 : TStream; Jpegalt, Jpegalt2 : TJPEGImage; Bmpalt, Bmpalt2 : TBitmap; begin if not DMretaguarda.QConItemftpec1.IsNull then begin Streamalt :=…
delphianswered Ramon Ruan 1,018 -
1
votes1
answer753
viewsQ: How to Treat a Blob value that is empty
var Streamalt, Streamalt2 : TStream; Jpegalt, Jpegalt2 : TJPEGImage; Bmpalt, Bmpalt2 : TBitmap; begin Streamalt := DMretaguarda.QConItem.CreateBlobStream(DMretaguarda.QConItemftpec1, bmRead); try…
delphiasked Ramon Ruan 1,018 -
0
votes2
answers234
viewsQ: Input point location error in MYSQL
What could be this mistake? I tried everything and I couldn’t fix it...
mysqlasked Ramon Ruan 1,018 -
2
votes1
answer1846
viewsQ: Storing images in Mysql and treating by file size
I was able to store images in my bank, the problem now is just to treat so that the images only enter the bank to a certain size, assuming: 800kb. How to proceed? Follows the code: Botão Gravar:…
-
0
votes2
answers1379
viewsA: Fortes Report + Masks
Gentlemen, I managed to solve this problem with Wesley’s help. The only problem was the moment I was picking up the values, the Forts has 2 steps, Prepare and Show... so, in my code above, I was…
delphianswered Ramon Ruan 1,018 -
0
votes2
answers1379
viewsQ: Fortes Report + Masks
Does anyone know how to format a CPF/CNPJ in a report in the Forte Report? procedure TFRelMenLac.RLBand4BeforePrint(Sender: TObject; var PrintIt: Boolean); var ltemp : string; begin ltemp :=…
delphiasked Ramon Ruan 1,018 -
0
votes1
answer61
viewsQ: Doubt about MYSQL Code + Delphi
Follows the code: DModuleGrid.qtudo.close; DModuleGrid.qtudo.sql.clear; DModuleGrid.qtudo.sql.add('select numcupom from tabc460 where cderr <:mc'); DModuleGrid.qtudo.parambyname('mc').asinteger…
-
1
votes1
answer85
viewsA: Configuration XML
Follow a very good website for first reading xml, http://www.macoratti.net/10/08/vbn_xml1.htm Just to improve the explanation, XML is made up of parents and children, that is, in your XML has:…
-
1
votes1
answer87
viewsA: Saves more records than Needed in my DB
Eventually I found out for myself. Follows the code: // Leitura Dados Itens da Nota Fiscal... // Aqui eu peço para encontrar a primeira ocorrencia da Tag <det>> xmlNCab :=…
-
2
votes1
answer87
viewsQ: Saves more records than Needed in my DB
Follows the code: // Leitura Dados Itens da Nota Fiscal... xmlNCab := NoPrinc.ChildNodes.FindNode('det'); while not (xmlNCab = Nil) do begin inc(l); sgProds.RowCount := l;…
-
0
votes2
answers1380
viewsA: Access Violation When Selecting XML File - Nfe
Follow the answer, code working : procedure TfrmDataB.sbtnAbrirClick(Sender: TObject); var xmlNCab, xmlNItm, NoPrinc, NoXML , NoPai : IXMLNode; //Nota Fiscal cNF, nNF, dEmi, verProc, serie : String;…
-
1
votes2
answers1380
viewsQ: Access Violation When Selecting XML File - Nfe
I’m trying to select the nós, but is making an error of Access Violation, what I could improve on this code so there is no error? procedure TfrmDataB.sbtnAbrirClick(Sender: TObject); var xmlNCab,…
-
1
votes1
answer220
viewsQ: Insert data from a TXT into a DB
Even making all these conditions, my database is responding in a strange way, because literally what I am selecting, is in every line of my file .txt, returns everything, including empty spaces,…
-
3
votes2
answers821
viewsA: Association of a Clientdataset and a Tzquery (Zeoslib)
DModuleGrid.ZQuery2.Close; DModuleGrid.ZQuery2.SQL.Clear; DModuleGrid.ZQuery2.SQL.Add('SELECT * FROM tabc460 LIMIT 0, '+IntToStr(treg)); DModuleGrid.ZQuery2.Open; DModuleGrid.ClientDataSet1.Open; It…
delphianswered Ramon Ruan 1,018 -
2
votes2
answers821
viewsQ: Association of a Clientdataset and a Tzquery (Zeoslib)
I have a question about the association of a ClientDataSet and a TZQuery. I wanted to associate the same table I selected in my TZQuery, with my ClientDataSet, because I want to generate a file…
delphiasked Ramon Ruan 1,018 -
1
votes2
answers3065
viewsA: Mysql Nicknames in Inner Join
SELECT DISTINCT ff.ccf AS ffccf, ff.numcup, ff.impcaixa, t46.ccf AS t46ccf, t46.numcupom, t46.NSerie FROM finafim AS ff INNER JOIN tabc470 AS t46 ON (ff.numcup = t46.numcupom) AND (ff.ccf = t46.ccf)…
mysqlanswered Ramon Ruan 1,018 -
9
votes2
answers3065
viewsQ: Mysql Nicknames in Inner Join
I tried to do this internal merge in SQL to connect two tables in my report. What I’d be doing wrong, why is giving "ffccf column unknown", even though I nicknamed the column? Follows the code:…
mysqlasked Ramon Ruan 1,018 -
6
votes1
answer817
viewsQ: Fortesreport at Delphi
Someone would have some mini application to let me know how Fortes Report works? I’ve already made a report with the strong report, but what I’m getting wrong, is that I have to put a Bane…
delphiasked Ramon Ruan 1,018 -
0
votes2
answers1043
viewsA: Progress Bar locks application
I did a while just to count the amount of records found, follow the code: //contando registros AssignFile(txt, frmSelection.FileListBox1.FileName); Reset(txt); while not eof(txt) do begin…
delphianswered Ramon Ruan 1,018 -
1
votes2
answers1043
viewsQ: Progress Bar locks application
I’m trying to raise a progressbar within my repeating structure, however the progressbar always locks the application. I will demonstrate here, follows the code: It would be correct to try to use…
delphiasked Ramon Ruan 1,018 -
1
votes1
answer1901
viewsQ: Shellrun using CMD to open mysql
Gentlemen, I’d like to ask you if you can use the command cmd to run mysql.exe on it, let me use a line of code: ShellExecute(Handle,'open',PChar('cmd.exe'),PWideChar('/k cd\mysql\bin &…
-
0
votes1
answer47
viewsQ: Repair in Checkadas tables
Follows the code: status := DataModule1.ZQuery2.FieldByName('Msg_text').AsString; while not DataModule1.ZQuery1.Eof do begin if status <> 'OK' then begin DataModule1.ZQuery3.Close;…
-
1
votes1
answer649
viewsA: First Stringgrid (Delphi) line information
Below is the answer: procedure TfrmGrid.sgCuponsDblClick(Sender: TObject); var txt: TextFile; l, mp, i: integer; lTemp, CCF, COO: String; cont, valorTotal, valorPago, troco: double; begin CCF :=…
delphianswered Ramon Ruan 1,018 -
1
votes1
answer82
viewsQ: Check the tables that appear on my first Dbgrid
Follows the code: var i : integer; begin i := 0; DataModule1.ZConnection1.Database := edtDB.Text; DataModule1.ZConnection1.HostName := edtLocal.Text; DataModule1.ZConnection1.User := 'root';…
-
1
votes1
answer7056
viewsQ: Select Dbgrid Line and Stringgrid recognize the line NUMBER
Would you know to tell me if there’s a possibility when I select a line from the DBGrid, my StringGrid just recognize which line I selected? I’m not doing functions: I’m just doing this kind of…
delphiasked Ramon Ruan 1,018