Posts by Lucas Augusto Coelho Lopes • 399 points
28 posts
-
1
votes3
answers101
viewsA: Return value corresponding to date
Try it this way. SELECT CASE WHEN data_saida is null THEN 10 ELSE custo_saida END AS custo_saida FROM tabela
-
0
votes2
answers127
viewsA: Total nodes of a perfect binary tree
Accordingly http://wiki.icmc.usp.br/images/9/93/ArvoresBin%C3%A1rias_parte2.pdf, formula for this calculation is: N = 2 h - 1 N = 2 10 - 1 N = 1024 - 1 N = 1023…
answered Lucas Augusto Coelho Lopes 399 -
1
votes2
answers44
viewsA: HOW TO ADD UP THE VALUE OF A PRO CLIENT COLUMN
select pro_nome , sum(ven_pro_quantidade) , ven_dataVenda from tblvendas as a INNER JOIN tblclientes as b ON a.fk_cliente = b.idCliente INNER JOIN tblvendas_produtos as…
-
0
votes1
answer322
viewsA: Insert data into a foreign key database
I did not understand why put the ids as null in Insert. If you set the id to null in the table creation it is not necessary to put value to it. I suggest you first run the insertion scripts of…
-
-1
votes2
answers107
viewsA: Don’t I have to worry about the frontend?
I suggest you validate both the backend and the frontend. The validation made in frondend prevents error messages that the user does not understand from appearing to him and the validation made in…
-
0
votes2
answers280
viewsA: Select from 3 related SQL Server tables
SELECT * FROM Cartao INNER JOIN Registo ON Registo.ID_Cartao=Cartao.ID_Cartao INNER JOIN Clientes ON Registo.ID_Cliente=Clientes.ID_Cliente WHERE…
-
0
votes1
answer141
viewsA: Problem with PHP numbers
Try to input 58000.20 instead of 58,000.20. I think it is necessary to validate the entry of this data because in PHP the floating points are in this format: 1.0 or 5.44 and not 4.2 or 5.6. Moreover…
-
1
votes1
answer64
viewsA: Group result through a conditional
The clause HAVING can be used for this as an example below: SELECT * FROM tabela GROUP BY status HAVING status = 'true'
-
6
votes3
answers1899
viewsA: Repetition of if/Else how to reduce and improve code?
if ((Lstr_Resultado1 == "Verdadeiro") || (Lstr_Resultado2 == "Verdadeiro") || (Lstr_Resultado3 == "Verdadeiro")){ Lint_TotalVerdadeiro++; } else{ Lint_TotalFalso++; }
c#answered Lucas Augusto Coelho Lopes 399 -
0
votes1
answer78
viewsA: Development environment for Reactjs
You can place the npm commands at the windows command prompt itself. You only need to enter the project folder. The default for installing packages in React is IDE-independent.
-
2
votes2
answers1025
viewsA: Access private attributes of a class within another class
Declaring the attribute as private cannot be accessed directly from another class. You will only be able to access this attribute indirectly through a method. In the above example, to be able to…
-
1
votes2
answers47
viewsA: How to Filter specific values with Excel and add them in another table?
Put in J3: =SE(F3='A';'A';'') Replicate to other cells.
excelanswered Lucas Augusto Coelho Lopes 399 -
0
votes2
answers865
viewsA: Stop running a javascript function, inside jQuery each?
function Salvar(element){ //$(element).parent().parent().children("td:nth-child(1)").css({"color": "red", "border": "2px solid red"}); var par = $(element).parent().parent(); var date =…
-
-1
votes1
answer721
viewsQ: How to pass data from a table to a PDF report using React and JSPDF?
Follows my code: exportar = () => { var doc = new jsPDF() var d = new Date(); var texto = "Generator PDF" var mes = d.getMonth() + 1; doc.setFont('times', 'bold') doc.setFontSize(14) doc.text(10,…
-
-1
votes1
answer120
viewsQ: Close modal Ant Design with ESC
I need to close an Ant Design modal with ESC. I am using React. I have this function that closes the modal, but I’m having difficulties to implement in the code. Can you help me? handleOk = (e)…
-
0
votes1
answer672
viewsQ: I can’t open project in Laravel
I have a project in Laravel that after I formatted the computer I can no longer open it. The following steps have been performed: Installation of XAMPP and change the default path to the project…
-
0
votes2
answers2798
viewsQ: Validation of CEP Javascript
Good morning. I need to validate the typed ZIP code in an input. If the ZIP code is equal to 35000-000, you must clear the input and send an Unavailable ZIP message. Is there a way to do this using…
-
0
votes2
answers644
viewsA: How to include data from a multi-line query in a memo using Delphi?
Good afternoon to all. The problem was solved by placing a Myquery.next at the end of while, as below. MyQuery.Close; with MyQuery.SQL do begin clear; add(' select TOP 8 nuentrada, dstpleitu,…
-
0
votes2
answers644
viewsQ: How to include data from a multi-line query in a memo using Delphi?
Good afternoon. Work on a legacy system and need to put query information into a single memo object. Code follows. MyQuery.Close; with MyQuery.SQL do begin clear; add(' select TOP 8 nuentrada,…
-
0
votes1
answer50
viewsA: SQL Foreign Tables and Attributes
select cdaluno, nmaluno from Aluno inner join Bairro on Aluno.cdbairro = Bairro.cdbairro where sexo = 'M' and nmbairro = 'CENTRO'
sqlanswered Lucas Augusto Coelho Lopes 399 -
1
votes1
answer211
viewsQ: How to work with Foreign Keys in C# ASP . NET Core?
Good night, you guys. I am a beginner in C# ASP . NET Core and I am facing problems with Foreign Key. I need to popular a combobox with data from a database table. Next is my Seller model using…
-
3
votes1
answer52
viewsQ: How to disable a Ttimer object when clicking a button that opens another form and re-enable it when the other form is closed?
Good morning. I have a timer running on a form that calls several others. When this form opens another the timer should be stopped and when the form that was opened is closed the timer should be…
-
0
votes2
answers91
viewsA: When inserting into a vector always overrides the previously inserted value
The program is inserting the contact at the cont position of the vector, which has the fixed value of 1, so it will always add the record at the same vector position. It is necessary to use a…
-
0
votes3
answers787
viewsA: Questions about activity diagrams
The activity diagram can have more than one beginning and more than one ending. It describes the execution flow of a specific system activity and may cover another activity as long as that second…
diagramanswered Lucas Augusto Coelho Lopes 399 -
1
votes2
answers118
viewsQ: How to improve the performance of an xls file generator in my Delphi 4 + SQL Server 2000 application?
I implemented the following procedure in an application made in Delphi 4, but the time to generate an xls file with Dataset data is 55 seconds and the dataset has approximately 50 lines. Any tips on…
-
-1
votes1
answer392
viewsQ: Check if record already exists in DB Grid Delphi
Good afternoon, you guys. The language I’m using is Delphi 4. I have a question on how to check if a record already exists in DB Grid. The values I want to enter in Dbgrid will be typed in a DB…
-
3
votes2
answers520
viewsQ: How to find all '>' characters of a memo and store in an array using Delphi?
I have a field edit in the Delphi and need to travel it in search of the character > and store the position of all characters > in a vector. By doing this I can only get the position of the…
-
0
votes2
answers651
viewsQ: Laravel - How to configure project to open in XAMPP?
I have a project in Laravel, but for a specific reason I had to uninstall XAMPP and install again. Now I can’t remember what to change in the XAMPP configuration files to make the project run. I’ve…