Posts by Tmc • 2,548 points
66 posts
-
2
votes2
answers146
viewsA: Assignment of value to variable
In Delphi the code is executed line by line so if you have the following code: A := 5; B := A; showmessage('A=' + IntToStr(A) + '; B=' + IntToStr(B)); Message: A=5; B=5 You are setting the same…
-
1
votes0
answers42
viewsQ: Difference between /> and </
What’s the difference between using /> and </ to close an HTML tag? Example1: <div> <img src="caminho"/> </div> Exemplo2: <div> <img src="caminho"></img>…
-
1
votes2
answers41
viewsA: Login form returning error!
The error is in the choice of fields to show your query is poorly built, try changing SELECT * senha_para_login as senha, as valor, for SELECT *. When using the * will return all table columns,…
-
1
votes2
answers63
viewsA: How to run server with loopback?
As mentioned by @Sergio in the comments, just run the following command: npm install You can see more information on Stackoverflow.…
-
3
votes2
answers1455
viewsA: What is the difference between Angular 2 and Angular 4?
There are no big differences just corrections and improvements, actually Angular 4 is Angular 2. The first version of the framework was Angularjs javascript writing. after appeared Angular without…
-
1
votes1
answer896
viewsA: Identify the type of variable received in a generic function
To know the type of variable we have in the function you can use the following procedure, example: procedure TForm1.ShowBasicVariantType(varVar: Variant); var typeString: string; basicType :…
-
6
votes3
answers2531
viewsA: How to select all columns except one in particular?
You can call the fields you want by doing so, example: SELECT campo1, campo2, campo3, campo4 FROM wp_rw_programacao WHERE id = $id The only fields that will be returned will be: campo1, campo2,…
-
0
votes2
answers8319
viewsQ: Is there a way to hide a url on a web page?
Let’s go by parts, I’m making a site where I will read a database URL and then I will use it in an image, by clicking on it(image) will open this URL (within an iframe or in a new tab). In the code,…
-
0
votes1
answer241
viewsA: Receive JSON string via Socket
With the following code will organize JSON this way, example: age:0camera:0Direction:===id:12 Plate:DEMOPLATEStrength:0.66 - 1.00 0.90 1.00 0.66 1.00 0.90…
-
4
votes2
answers12357
viewsA: How to make an INNER JOIN between two different databases on the same server in MYSQL?
All I had to do was remove the first **colunaA** you have in query, simple example: SELECT * FROM banco1.tabela1 INNER JOIN banco2.tabela1 ON banco1.tabela1.campo1=banco2.tabela1.campo1 You just…
-
0
votes1
answer227
viewsA: Change text in select field with Woocommerce
Since you didn’t publish codes I’ll give you my help as I can, a good way is to use the f12 keyboard and then pricing this icon: After pressing this icon click on combobox(choose an option), and the…
-
1
votes1
answer168
viewsA: Query 2 tables in a sql database and display repeated values
One way to do maybe not the best but nevertheless possible would be to do the following: SELECT `pessoas`.`name`, `pessoas`.`dez1` FROM resultado INNER JOIN pessoas ON…
-
1
votes1
answer217
viewsA: Abort Program Exit Procedure
The only thing you need to do is change the values of the no case leave the example: case SaveResp of 6: SaveDocument; //idYes 7: ; //Nothing //idNo 2: Abort; //idCancel end; Complete list of values…
-
6
votes1
answer610
viewsQ: What is the difference between REPLACE INTO or ON DUPLICATE KEY UPDATE
I am with the following doubt what is the difference between using REPLACE INTO or ON DUPLICATE KEY UPDATE in mysql, do not both serve the same purpose to make a change to a field or more in the…
-
1
votes4
answers1882
viewsA: Count substrings within a string
Try it this way: procedure TForm1.Button1Click(Sender: TObject); var AWord, AText: String; begin AText := 'Na Microsoft prioriza-se a qualidade, por isso a Microsoft é a melhor.'; AWord :=…
-
0
votes4
answers3002
viewsA: How to store Memo content in variable string in Delphi?
Can be done in the following 3 ways, can create two memos and a botão at the event onClick of the button passes the following code to it: procedure TForm1.Button1Click(Sender: TObject); var i:…
-
0
votes2
answers411
viewsA: Extract emails from a Memo
From the example you left in the comment it seems that the emails are separated by spaces between the text, it was enough to search line by line for the blank spaces for each word you find we passed…
-
1
votes3
answers69
viewsA: How to read only Formatdatatime numbers
I will give the example of two ways to do it, in the first use the function FormatDataTime, example: var VHora, VMinuto: integer; Begin VHora := StrToInt(FormatDataTime('hh',now)); VMinuto :=…
-
3
votes2
answers287
viewsA: How to disable windows update in Delphi
Try this code I used before, to disable or enable Winodws update, I use the command line to get it. In a new project create a button and a memo in the button call the procedure ChangeWindowsUpdate.…
-
5
votes2
answers1003
viewsA: How to display total rows of a table in a label
It is possible to do by SQL, through a count, example: SELECT COUNT(campo_tabela) AS total FROM tabela The only thing that will return is the total records, more information see Mysql. To show…
-
3
votes1
answer1350
viewsA: Make image responsive in Delphi
There are two ways of doing, in time design or by code, let’s go the first option. Design Time: As mentioned by @lucaswmolin, click on the TImage and in the properties will set first of all the…
-
3
votes1
answer62
viewsA: In Crystal it is possible to connect to a Websocket
I found this on the Keepcoding that helped me to resolve my doubt, can still consult the link of Github for more information: socket = HTTP::WebSocket.open("example.com", "/connect") socket.send…
-
8
votes1
answer1962
viewsA: Create a global variable in Delphi
You can do it this way: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Edit1: TEdit; Button1:…
-
1
votes1
answer680
viewsA: Move the mouse via programming
It can be done as follows: procedure TForm1.BtnClicarClick(Sender: TObject); begin //Chama a função e passa o controller que desejar MouseaParaController(BtnAqui); end; Procedure…
-
2
votes2
answers221
viewsA: If there is hint or Warning the compiler cancels the compilation
Every time you click the keys Shift + F9 used to make a Build of the project, a Messages where it is possible to view the hint and warning of the project, where available MISTAKES the Delphi does…
-
0
votes1
answer85
viewsA: Replace words when importing in Listview
You can use the following code, in which I used two memos and a botão to simulate what you need, just adapt to your code. I tried to detail the code as much as possible but some doubt communicate.…
-
2
votes1
answer5179
viewsA: Discover user password through Select or View?
If the passwords are encrypted then it will be very difficult to be able to read them, one way of resolution in this case would be to have access to the project or code, where the encryption of…
-
0
votes3
answers1616
viewsA: How to create a button inside an iframe to close it
With the help and response of @Andersoncarloswoss I managed to reach this result: function closeiframe() { document.getElementById("nav").style.display = "none"; } function openiframe() {…
-
2
votes3
answers1616
viewsQ: How to create a button inside an iframe to close it
I needed to create a button inside a iframe in a corner to close it. I have an image gallery and clicking on an image will open a iframe, the following code already does this. But now I needed to…
-
5
votes1
answer204
viewsA: Linux image in Docker?
There are two ways to create custom images with commit and with dockerfile. Commit: We first need to create some container: docker run -it --name containername ubuntu:16.04 bash Now that we are in…
-
1
votes1
answer244
viewsA: Google Search + Delphi 10.2 Tokyo Results
As @David said, you should read the google developers., is a very good help. There is also a second option which is to use a component, I leave the example of a Cloud Pack that belongs to the…
-
2
votes1
answer62
viewsQ: In Crystal it is possible to connect to a Websocket
I’m starting at the Crystal and I want to try to create a connection of a Websocket server with Crystal as client, it is possible to do so, there is some bookstore for this or the Crystal language…
-
2
votes2
answers498
viewsA: Trying to Quickly Open a Huge Table with Fdtable
If your goal is just to limit the number of records to open for example to 5,000 you only need to use the following code: SELECT FIRST 5000 * FROM tabela ORDER BY id DESC; Unlike the Mysql that we…
-
0
votes2
answers212
viewsQ: How to copy a piece of text within a textarea
I have a text written in <TextArea> on a page html and liked in php read the text and remove a piece of it and write in another <TextArea>, tried to use the preg_match but I couldn’t…
-
1
votes1
answer81
viewsA: How to sync two Tlistviews?
If you use a version higher than Delphi XE 8, click on Events listview1 and then click on the event OnScrollViewChange and adds the following code: Listview2.ScrollViewPos :=…
-
3
votes1
answer612
viewsA: How to disable and enable a network adapter with Delphi?
Through the following code is possible enable and disable a no choice network card, sending commands to the command line and treating its output, I tried to detail everything that happens in the…
-
0
votes1
answer2525
viewsA: How to convert utf-8 text to ANSI. Delphi 2006
Try using the following code, according to the answer given to this question in Stackoverflow the problem was solved using the internal function of the Delphi UTF8toAnsi and one more function I…
-
3
votes1
answer71
viewsA: Email invitation is not enough - Gitlab
There are several ways to view, edit, add and remove members of a project, to make changes you need to access Settings > Project members: Add user: Right next to People, start typing the name or…
-
0
votes3
answers625
viewsA: Set shadow in email HTML table
Just use this code CSS: table { box-shadow: 10px 10px 5px #888; } For more information you can consult the following website or this. If after trying this doesn’t work, edit the question and join…
-
0
votes1
answer1391
viewsA: I unintentionally deleted all Mysql users phpMyAdmin
Try what is in the answer to this other question from a user in an identical situation to that referred by you. HERE! The solution presented is to execute a file .bat in the folder of xampp or if…
-
5
votes1
answer296
viewsQ: What are the main differences between Ruby and Crystal?
I saw some information about the Crystal language a few days ago, but I would like to understand a little better what the main differences with Ruby. Examples: Which is faster and lighter in…
-
10
votes1
answer2503
viewsQ: What are the main features of the Go language?
I started to hear a lot about Golang and is increasingly gaining ground among the most widely used programming languages. As far as I know, I think it’s a programming language. So, What are the main…
-
1
votes2
answers1140
viewsA: Return last record of each object
If what I needed was to get the value of each id where the year was higher, if that’s what it is, try the following code. try this code: SELECT * FROM imovel WHERE id=1 AND item=201 ORDER BY year…
-
10
votes3
answers2456
viewsQ: How do I know if I’m on an anonymous or normal Chrome page?
I’m making a page html for use locally on my PC with Windows, but I needed some way to know which way I am in the browser Chrome. I wanted to present a phrase that would change according to the way…
-
-1
votes1
answer437
views -
7
votes3
answers463
viewsA: What is the correct option to instantiate a PHP class?
Is to use option 2 that way: $atleta= new Atleta(); More information can be found here php.net…
-
2
votes3
answers820
views -
0
votes1
answer258
viewsQ: After resize form event
I have a project in delphi 2010 in which I am trying to create an event after resize. Is there any way to create the event in a project form? The goal would be to execute a code only after resizing…
-
-2
votes3
answers2377
views -
1
votes2
answers321
viewsA: Does the Mysql Select command differentiate numbers that have zero on the left?
Try this code: Select * from Codigos where Codigo LIKE '%123'; % Takes zero or more characters – Takes only one character Any further questions let me know, I hope I’ve helped.…