Posts by AndersonBS • 3,194 points
49 posts
-
1
votes1
answer87
viewsQ: Qt Qdebug does not work (does not display messages)
I own the Fedora 23 operating system and use Qt to develop graphical interfaces (GUI), however my Debugger does not work: I’m trying to print messages on console using qDebug(), but nothing is…
-
1
votes1
answer87
viewsA: Qt Qdebug does not work (does not display messages)
Very simple! qDebug() messages have been disabled by default in Fedora. To enable them, you must add the following line of code to your program:…
-
1
votes3
answers1952
viewsA: How to get a text from a Qlineedit in Qt?
Basically what you need is create a function in your program to be called every time a button-click event is issued. Following is a complete and commented code example: Qlineedit.pro QT += core gui…
-
1
votes1
answer60
viewsA: Cvrtrees function parameters::Train() - Opencv / C++
You are using an outdated version of opencv! Download the latest version here, for in it all the part concerning Random Trees was reformulated to facilitate use, as can be seen in Documentación…
-
2
votes2
answers955
viewsA: Putting a background color after recognizing and cropping people’s faces
Image to be processed: Image to be copied: Upshot: Follow the commented code: #include <iostream> #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui/highgui.hpp" #include…
-
2
votes1
answer132
viewsA: Netbeans Calculator - Problems with Decimal Operations
The *= means that you are doing a multiplication operation and assigning the result to the variable preceding the operator. That way: inteiro *= 10; Is the same as: inteiro = inteiro * 10; As to why…
netbeansanswered AndersonBS 3,194 -
1
votes1
answer845
viewsA: Physical and logical tcp/ip address protocol?
This question of yours doesn’t seem to be about programming, but here are some curiosities that might help you to understand better: MAC address It is a unique identification that each network card…
-
5
votes1
answer4972
viewsA: Print data from a dynamically allocated two-dimensional matrix
Its function imprime must have a two-dimensional loop to be able to print all elements one by one: for (l = 0; l < linhas; l++) { for (c = 0; c < colunas; c++) printf("%.2f ", matriz[l][c]); }…
canswered AndersonBS 3,194 -
0
votes2
answers582
viewsA: How to create a function that returns the lowest expiration date between batches of a given product?
Using function: delimiter $ create function getMenorDataValidade(p_codProduto integer) returns date begin return (select min(loteproduto.dtValidade) from loteproduto where loteproduto.codProduto =…
-
2
votes1
answer47
viewsA: How to turn a cv::Mat into ipcMatrix<ipcRGB>?
With the help of @karlphillip got come up with a solution: cv::cvtColor(mat_input, mat_rgb, cv::COLOR_BGR2RGB); int sz = mat_rgb.rows * mat_rgb.cols * mat_rgb.channels(); unsigned char* imageBuf =…
-
2
votes1
answer47
viewsQ: How to turn a cv::Mat into ipcMatrix<ipcRGB>?
Does anyone know if there’s an easy way to turn a cv::Mat in ipcMatrix<ipcRGB>?…
-
8
votes1
answer4248
viewsA: How to create a daily event in Mysql 5.6?
You can create a EVENT! CREATE [DEFINER = { user | CURRENT_USER }] EVENT [IF NOT EXISTS] event_name ON SCHEDULE schedule [ON COMPLETION [NOT] PRESERVE] [ENABLE | DISABLE | DISABLE ON SLAVE] [COMMENT…
mysqlanswered AndersonBS 3,194 -
4
votes1
answer1459
viewsA: Place icon inside jLabel on jTextField
Your image does not appear because you set label.setOpaque(true); and that’s covering her up! Suggestion: I already implemented the click event for you, now just manipulate it to edit the JTextField…
-
5
votes4
answers584
viewsA: How to verify the efficiency of these 2 functions in C++?
Improving performance: In g++ there is a flag -Ofast that makes several modifications during the build phase of your algorithm and, most of the time, it gets much more efficient! Already reduced…
-
5
votes2
answers3558
viewsA: How to view a. txt file in a Jtextarea automatically
You must create the JTextArea inside the builder! Follow an example: Demojtextarea.java public class DemoJTextArea { public static void main(String[] args) { Janela jn = new Janela();…
-
1
votes1
answer571
viewsQ: Problem with cursor in Mysql
Good afternoon! I am successfully creating the following cursor: declare v_cursor cursor for select idCliente, max(dataVenda) from Cliente left join Venda on idCliente = cliente_idCliente group by…
-
4
votes2
answers1867
viewsA: How to pass an array to a Jtexfield?
Creating the array JTextField array[] = new JTextField[100]; Each index of this array can store one JTexfield. Accesses normally work as in an integer array. The "add a new student, delete and…
-
2
votes1
answer43
viewsA: How to insert into bank with Prepared statements? Problem with ID
Utilize NULL before the name parameter. The AUTO_INCREMENT takes care of the rest! $stmt = $pdo->prepare('INSERT INTO wp_contato VALUES(NULL, :nome, :email, :telefone, :celular, :cidade,…
-
1
votes1
answer208
viewsA: Opencv Error: Assertion failed (ssize.area() > 0)
This error indicates that the source image is empty (invalid image). Try to follow the following steps: Make sure the opencv libraries are properly linked; Test with an image loaded directly from…
-
2
votes2
answers1269
viewsA: Parameter varchar in Store Procedure
Parameters in stored procedures can be of two different input types (IN) or leaving (OUT). The type of the parameter must be informed when creating the parameter: CREATE PROCEDURE nome_procedure(IN…
-
3
votes1
answer250
viewsA: How to use Foreign key in SQL statements?
That way it should work: CREATE TABLE axitech20.tb1_pais ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT ); CREATE TABLE axitech20.tbl_estado ( id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, id_pais INT…
-
3
votes3
answers1585
viewsA: Background image 100%
You can do it for the CSS like this: body { background: url(caminho_para_a_imagem); background-size: cover; } cover: Resize the image to completely fill the background area while maintaining the…
-
2
votes2
answers137
viewsA: How to return 2 decimals in a monetary value with jQuery?
There are great answers on the subject in the English SO. You can even format your output using functions like: toFixed(2); toPrecision(12); sprintf("%.2f", number); round(number, 12); However, as…
-
10
votes1
answer5452
viewsQ: Basic image editing using Opencv
Hello, I’m learning to use the features that Opencv offers for image processing and the following question has arisen: How do I edit only a predetermined area of an image? To facilitate the…
-
2
votes1
answer168
viewsA: Android Widget - Permission Denial
Hello, I researched a little and found several people with the same problem as yours asking for clarification on stackoverflow.with, where the best answer can be accessed here. She says the…
-
3
votes2
answers2156
viewsA: Eclipse Startup Problem
According to that one OS response, you are not using compatible versions. You need to have the set: 64-bit OS (Operating System) 64-bit Java 64-bit Eclipse Or: 32-bit OS (Operating System) 32-bit…
-
7
votes1
answer1155
viewsA: Calculator - operations with decimals
First congratulations! You’ve come very close to a 100% functional implementation... As I mentioned in your first question (Eclipse Java Calculator) there were still some bugs to be fixed. And one…
javaanswered AndersonBS 3,194 -
15
votes3
answers28595
viewsA: Calculator with Java Graphical Interface
First of all congratulations on your initiative to the rest of the class and, not least, welcome to the Stack Overflow community! Now let’s get down to business... I realized that your problem is…
-
1
votes2
answers967
viewsA: How to read a random amount of integers in C?
I made some small changes to your code and tested using CTRL+Z to stop reading the integers, it worked perfectly: #include <stdio.h> #include <stdlib.h> int main() { long int numero, i =…
canswered AndersonBS 3,194 -
1
votes1
answer150
viewsA: What exactly do "linkability" (linkability) and "traceability" (Traceability) mean in the context of private traffic networks?
Hello, I’m going to make some comments that I believe may help you better understand the terms based on my CCNA studies, but I can’t guarantee 100% that I’m not mistaken. In my view, within the…
-
5
votes2
answers804
viewsA: Why does this code loop infinity?
To complement @Lucas Nunes' reply: The value stored in buffer of Scanner has the character \n (enter) that you typed at the end of the last reading of keyboard characters, this makes the Scanner…
-
2
votes2
answers1199
viewsA: Gzip compression using Apache server
Hello, I think this article may own what you are looking for: How To Optimize Your Site With GZIP Compression You should add in your htaccess the following code: # comprimir texto, html, javascript,…
-
3
votes4
answers11111
viewsA: Converting float to char array in C/C++
A possible solution would be: float flt = 123.456; char mybuff1[50]; sprintf (mybuff1, "%f", flt); char *c [] = {mybuff1}; There is a post explaining better in stackoverflow.com: how can i assign…
-
1
votes4
answers167
viewsA: problem with C code conversion
To represent the expression E(and) in C, there is the operator &&, thus: if (MEDIA >=6 && FALTAS <=10) Already I’m going to advance here, when you need to use OR in C, there is…
canswered AndersonBS 3,194 -
3
votes3
answers121
viewsA: Problem with the C
Try to replace: if (VF/VS)<=5 for if ((VF/VS)<=5) The mistake happens because the if is hoping to find an expression like Boolean (true or false) within the parentheses that follow, and in…
canswered AndersonBS 3,194 -
20
votes7
answers3901
viewsA: What does incrementing mean?
It looks like you’re starting to program or learning programming logic, right? When I went through this phase, I heard quite a lot of the term increase studying loops where in a loop do up for…
terminologyanswered AndersonBS 3,194 -
2
votes1
answer739
viewsA: Pick up date time device phonegap
It seems to me that a possible solution would be the following: var date = new Date(); var hour = date.getHours(); var min = date.getMinutes(); var seconds = date.getSeconds();…
-
11
votes2
answers17877
viewsQ: What are the syntax of the for loop in java?
Hello! Everyone programming in Java should be tired of using loops for, that almost always has a syntax similar to this: for (int x = 0; x < y; x++) { ... } I was analyzing some codes and came…
-
0
votes2
answers3621
viewsA: Integrating Paypal Expresscheckout in PHP
I believe that explaining all the steps of creating an API (Application Program Interface) is not feasible. If you want to spend money to learn, there are some courses like this: Course Creating and…
-
5
votes2
answers2189
viewsA: Convert Date dd/mm/yyyy to ISO 8601 format (yyyy-mm-dd)
Here is an example that should help you, I will copy it below to facilitate: Link. How to convert a string into a Datetime (Programming Guide in C#) It is common for programs to allow users to enter…
-
8
votes1
answer7789
viewsA: How to sign documents with digital certificate?
Reply withdrawn from that link. Signing XML documents with CAPICOM and Delphi Microsoft makes available for Windows a library with COM technology to handle the creation and manipulation of XML…
-
17
votes1
answer2380
viewsA: XSS attacks, how does it happen?
The information below was taken from the book Hacking: The Next Generation. Content Injection using Cross-Site Scripting (XSS) Cramming the entire load of XSS into a chain of commands can be…
-
1
votes1
answer116
viewsA: Creating Scaffold’s for plugins in Redmine
Just create a project rails independently with Scaffold and then copy models / views / controllers in your Redmine plugin! I found that answer in this link.…
-
18
votes2
answers6312
viewsQ: Doubts about the toString() method of the Object class
I’ve been doing some tests with the method toString() class java.lang.Object and found that the obtained result changes with each execution, as the example below: Excerpt from the tested code public…
-
21
votes3
answers8791
viewsA: What is the difference between checked (checked) and unchecked (unchecked) exceptions?
Exceptions not checked (unchecked): Represent defects in the program (bugs). Are subclasses of RuntimeException and are typically implemented using IllegalArgumentException, NullPointerException or…
-
2
votes3
answers9148
viewsA: Query in two tables without INNER JOIN
Apparently it makes no difference when the searches are small, because for the user the end result is the same. However, the INNER JOIN has been developed not only to visually improve code syntax,…
-
8
votes5
answers2467
viewsA: Is it feasible to define mandatory fields in the application instead of the database?
The best would be to first ensure the Integrity Rules (RIE and RIR) in the database itself, to maintain the consistency of the database. This ensures that even if your application is changed or…
-
1
votes1
answer107
viewsA: Problems with Dev-cpp
You are probably using Windows 32 bits and compiling for Windows 64 bits. Even though the compiler will run in 32 bits, the created executable will not work. Try selecting a 32bit profile in Tools…
-
28
votes3
answers15467
viewsA: What is Boilerplate code?
The term derives from steel manufacturing, where Boilerplate is steel rolled into large plates for use in steam boilers. In information technology, "Boilerplate code" is a chunk of code that can be…