Posts by Guilherme Lima • 3,129 points
137 posts
-
2
votes1
answer168
viewsQ: bar spacing in a barcode
I have the code below that generates me a copy of bars from a number inserted, but I think that the bars are very close, there is a way to leave them with a larger spacing between them? below the…
delphiasked Guilherme Lima 3,129 -
4
votes1
answer80
viewsQ: Showmessage presents the message 2 times
I have the following code below: for i := 1 to form1.variavel do with form1 do if TEdit(FindComponent('edt_variavel'+IntToStr(i))).Text = '' then begin showmessage ('Preencha os campos em branco')…
delphiasked Guilherme Lima 3,129 -
0
votes2
answers2042
viewsQ: Remove penultimate character from a string
I have an application that by clicking on labels one edit receives his caption as follows: Edit1.Text := Edit1.Text + TLabel(Sender).caption+ ' '; After that I click ok, and this information passes…
-
8
votes1
answer461
viewsQ: Is it possible to work with shp files in Delphi?
I would like to assemble an application that would have the function of a GIS (QGIS for example), that instead of developing a plugin that depends on it from the software to work, generate in Delphi…
delphiasked Guilherme Lima 3,129 -
1
votes1
answer505
viewsQ: Edit receive caption from several Abels
I would like a TEdit received the value of a TLabel and clicking on another TLabel the property caption concatenaria what was received before. Ex : edit.text := valorlabel1 valorlabel2 valorlabel3…
delphiasked Guilherme Lima 3,129 -
1
votes1
answer50
viewsQ: Syntaxerror when unpacking elements of iterables
line = 'nobody:*:-2:-2:Unprivileged User:/var/empty:usr/bin/false' uname, *fields, homedir, sh=line.split(':') print fields I was doing studies in Python and I will stop with the line so, when…
-
2
votes2
answers156
viewsQ: Login screen acting incoherent
I set up a login screen where the user must enter login and password with the code below: procedure TFMLogin.Img_confClick(Sender: TObject); var verif: boolean; begin FMHome.ADOLogin.SQL.add('Select…
-
1
votes1
answer223
viewsQ: SQL Query Shows All Records
I have an application that should show in a dbgrid only id that is equal to the service order and that has the same id in another table: To ID_OrdemServico comes from the table ordem_servico by…
delphiasked Guilherme Lima 3,129 -
4
votes1
answer360
viewsQ: Display Average in an SQL query
I want to conduct a search in a query So far I have only been able to display the total value of the records. the idea is to show the spending average. Then it would be the (total / quantity)…
-
2
votes1
answer96
viewsQ: DBGRID does not display result
I have a table that has data registered in SQLServer, but in the application they do not appear in the dbgrid. DATASOURCdo dbgrid -> UDM.DSPecas_ordem_servico When opening the form: procedure…
-
0
votes1
answer48
viewsA: Working on Python 2.7
Install the Termcolor: Termcolor import sys from termcolor import colored, cprint text = colored('Hello, World!', 'red', attrs=['reverse', 'blink']) print(text) cprint('Hello, World!', 'green',…
python-2.7answered Guilherme Lima 3,129 -
2
votes1
answer133
viewsQ: Data insertion error in Sqlserver + Delphi
I have the following problem, when trying to register a new record in the database it presents me the following error below follows the codes: open the form for registration. procedure…
-
2
votes1
answer55
viewsQ: Sqlserver does not check information correctly in Delphi application
I have a login screen on Delphi + Sqlserver where the goal is to compare the data sent with the data held in the database! first Setting: If I add incorrect password and correct login. shows error!…
-
12
votes3
answers8338
viewsQ: What does %=mean?
I have a code that contains the situation below: id %= 1000 But I don’t know the function of that operator.
-
3
votes2
answers1883
viewsQ: How to remove spaces at the beginning and end of an XLS output
I have the code below, for him to open a spreadsheet on XLS and show me the header. however I would like the left and right spaces to be removed and the internal spaces to be replaced by underline…
-
4
votes1
answer279
viewsQ: Do not let user have access to script data
I have a script generated in python and calls functions in R. At first it was developed for internal use, but now they are thinking of releasing for customer use. However, they do not want users to…
-
2
votes1
answer149
viewsA: Why does OFF SET slow down SQL?
It is normal to decrease performance, having that the research needs to count the first offset + limit. The higher the value, the longer the search will take. The search does not go straight to…
-
1
votes5
answers9719
viewsA: Copy data from one database to another postgress
You can simplify using this code by changing the values of the tables $ pg_dump -U postgres -aD -t tb_tabela1-t tb_tabela2 database
postgresqlanswered Guilherme Lima 3,129 -
1
votes2
answers23393
viewsA: How to install numpy and other modules?
Install miniconda At the command line, type: $ conda install numpy With this you will probably get all libraries and packages. Anaconda includes 125 packages.…
-
0
votes2
answers97
viewsA: Log all of an Activity’s touch events?
onCreate(){ setContentView(R.layout.activity_main); View view = findViewById(R.id.main); view.setOnTouchListener(new View.OnTouchListener() { @Override public…
androidanswered Guilherme Lima 3,129 -
1
votes3
answers99
viewsQ: Conditions do not return expected values
I have a simple HTML and php application, which consists of 2 fields, where they will be received in a php page by the method $_POST. If I add the values to the field, it goes correctly. However if…
-
4
votes2
answers116
viewsQ: How to add font to a select?
I have the following link: <link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800">…
-
0
votes2
answers3582
viewsQ: Required does not work
I would like the fields not to be sent in empty, so I tried using the required.. but it is not working. What is the reason why? <form action="https:/----Site---" method="POST"> <input…
-
1
votes1
answer59
viewsQ: Combobox does not return Sqlserver columns
In the following code, it should present me the columns of a table I have on my system, but when clicking to display the options in the combobox nothing appears. However if I start typing the name…
-
1
votes1
answer326
viewsQ: Error sending email function
I have the following code to send an email to Delphi, but it gives an error (attached) at the end of the code after the last end. I’m using the latest version of Delphi and it informs me if the…
delphiasked Guilherme Lima 3,129 -
2
votes1
answer138
viewsQ: Is it possible to display a form through a Messagedialog?
With the MessageDialog, would like to create components (buttons) at runtime and set the size and text of the buttons of this MessageDialog. Besides, I need to show you some Forms according to the…
delphiasked Guilherme Lima 3,129 -
2
votes3
answers113
viewsQ: Query in Sqlserver
I have the following problem: I would like the person to type the number of Ribbons in an Edit and these values are compared with the values in the database and when they are equal. present them in…
delphiasked Guilherme Lima 3,129 -
1
votes2
answers822
viewsQ: Destroy Tedits at runtime
I have an application that creates Tedits from 1 to 15 I wish they would disappear, but when the person clicks on the button to create they come back.. they were created as follows: ArrayEdit[x] :=…
delphiasked Guilherme Lima 3,129 -
0
votes2
answers864
viewsQ: Remove fields created at runtime
I have the following function to clear edits common: for I := 0 to componentCount-1 do begin If(components [i] is Tedit) then Tedit(components[i]).Text := ''; end; but I do own edits created at…
delphiasked Guilherme Lima 3,129 -
4
votes1
answer2941
viewsQ: Add an if with 2 conditions
I have the following variables declared: n_var:= strtoint (En_var.Text); n_raster := strtoint (En_raster.Text); And I would like you to make a condition by comparing their values for example: if…
delphiasked Guilherme Lima 3,129 -
0
votes1
answer269
viewsQ: Add specific inline text with repetition
In the image below we have the following case the person types in the two fields of Edit. And click Generate recommendation values are written in a Tmemo. The second step would be to type a new…
delphiasked Guilherme Lima 3,129 -
2
votes2
answers3787
viewsQ: Show Tabulated in HTML Table
My problem is this, I can only display the results in one alert, how I would put the values inside a table? <title>-Calcular tabuada</title> <script type="text/javascript"> <…
-
1
votes1
answer37
viewsQ: Loop Loop on Tmemo
I’m using a Tmemo which receives data from an Edit, but this data will be inserted x times, the question is as follows: By pressing the button the Tmemo received the data as follows: Memo1.Lines[10]…
delphiasked Guilherme Lima 3,129 -
1
votes1
answer1693
viewsQ: Add lines in a certain place of Tmemo
I have some variables that receive some data from a common DIT. My doubt is the following, the person will click the button and Tmemo will receive the data, I would like in this action it cleaned…
delphiasked Guilherme Lima 3,129 -
2
votes2
answers701
viewsA: Create Tedit Array at Runtime;
The values for some variables were added, according to the necessary index. Very simple, but in my case it was this. res := ArrayEdit[1].text; res2 := ArrayEdit[2].Text; res3 := ArrayEdit[3].text;…
delphianswered Guilherme Lima 3,129 -
5
votes2
answers701
viewsQ: Create Tedit Array at Runtime;
With the following code, I create an X amount of edits: var x : integer; var2: integer; begin var2 := strtoint(edit2.Text); for x := 1 to var2 do begin ArrayEdit[x] := TEdit.Create(Self);…
delphiasked Guilherme Lima 3,129 -
1
votes1
answer678
viewsQ: Two actions on the same button
I would like to know if for example there is a way to do the following: Click on a button and the form, and click again on the same button and the form close. I’m sorry I can’t explain very well, I…
javascriptasked Guilherme Lima 3,129