Posts by Giovani • 2,875 points
88 posts
-
1
votes1
answer1996
viewsA: How to update a jTable that displays BD data after registering a new item?
You can try to put your method as static and call it when the BD insert is finished. public static void windowOpened(java.awt.event.WindowEvent e) { The flame goes like this:…
-
1
votes1
answer894
viewsQ: How to insert image in Mysql using Hibernate?
I am using java with Hibernate and would like to know how to insert an image in the mysql database. I have several information being persisted with Hibernate, missing only the image.
-
1
votes1
answer1547
viewsA: Error C++: E2034 Cannot Convert 'wchar_t *' to 'const char *'
To resolve, I converted to Ansistring: Before: strcpy(buffer, EdCommand->Text.c_str()); Afterward: strcpy(buffer, AnsiString(EdCommand->Text).c_str());…
-
1
votes1
answer1547
viewsQ: Error C++: E2034 Cannot Convert 'wchar_t *' to 'const char *'
When executing a C++ code these two problems occur: - [BCC32 Error] USerialCommunication.cpp(96): E2034 Cannot convert 'wchar_t *' to 'const char *' - [BCC32 Error] USerialCommunication.cpp(96):…
-
1
votes1
answer343
viewsA: Printed using Ireports
As answered in the comments: In iReport the Format menu has an option called Page Format, in this option vc can use a standard size, for example from A0 to A7, or have a custom size by selecting the…
-
2
votes1
answer134
viewsA: I cannot load Firebird data into Delphi XE2 using Tzquery
I managed to solve in a very interesting way, that I saw in this video: https://www.youtube.com/watch?v=Tp8D9tYRX34 To solve, I went to the property to stop the components and created a call Tfilial…
-
0
votes1
answer134
viewsQ: I cannot load Firebird data into Delphi XE2 using Tzquery
I have a Tzquery created, and I try to load the fields SEQ_CTE and SERIE_CTE according to the code below: ZQuery1.sql.text := 'select * from C000004 where filial = '' + frmprincipal.spanel1.caption…
-
5
votes4
answers15410
viewsA: Mysql Workbench 6.1 CE no longer starts
I had a very similar problem and I was able to solve it in the following way: 1) Open windows services: 2) Locate the Mysql service and go to the Logon tab 3) Modify the user by placing the user you…
-
1
votes1
answer1081
viewsQ: Doubts creation, manipulation and elimination of form
I have the following doubts: When creating a form, according to the code below, I need to destroy it somehow when it is finished by the user? F_pesqcli := Tf_pesqcli.Create(self);…
-
0
votes3
answers5915
viewsA: Struct and chained list
My solution to your problem was as follows (Person. h): #ifndef Pessoa #define Pessoa struct pessoa{ char nome[25]; char sobrenome[25]; int registro; }; typedef struct no{ struct Pessoa dados;…
-
0
votes2
answers2590
viewsA: Struct member access error passed by reference
I found the problem. In the line I define the salary: *p.salario = 4000; // errado (*p).salario = 4000; // correto
-
0
votes2
answers2590
viewsQ: Struct member access error passed by reference
I have the code below that has a function to define the salary = 4000, but it returns me the following error: [Error] request for Member 'salario' in Something not a Structure or Union The error…
-
2
votes2
answers5634
viewsA: How do I call another screen in java, I’m not getting
In your code the class 'Telacadastro' is extending from a 'Jinternalframe', in order to use this type of frame you must add it in a Jdesktoppane, this is the problem of your code, at first. I…
-
1
votes1
answer743
viewsA: How to close the app console?
As mentioned by user Zuul: Go to Projects > Run and uncheck "Run in Terminal"
-
2
votes1
answer112
viewsA: How to search for . exe?
I recommend using recursion to do this, take a look at the code below that I removed from the site: http://www.mkyong.com/java/search-directories-recursively-for-file-in-java/ In the example, he is…
-
0
votes3
answers1558
viewsA: Jcombobox update from another Jcombobox
You need to use the entry of items at runtime, for this use the addItem method. To be clearer: if(comboBox1.getSelectItem.toString.equals("Frutas"){ comboBox2.addItem("Maçã");…
-
3
votes2
answers4752
viewsA: Run a precedent from a Java application
The database commands you want to use in your Java application should be done via "Connector JDBC", which a library makes it much easier to connect to the database you need. In your case, you can…
-
1
votes1
answer1103
viewsA: I can’t find my mistakes
Next, in his statement: int leitura(int i, int q_numeros, int *vetor[1000]); Notice that you are asking for an array pointer. The identifier of an array is already a pointer (pro first address of…
-
3
votes1
answer81
viewsA: Qsharedpointer Definition and Function
After much reading I could understand. But it is necessary to know what is a Qpointer. According to QT documentation: The Qpointer class is a model class that provides pointers reserved to Qobject.…
-
4
votes1
answer81
viewsQ: Qsharedpointer Definition and Function
From what I understand, the Qsharedpointer is a smart Pointer, ie, a pointer that offers automatic garbage collection. If possible I would like a code that better explains this, including when I…
-
3
votes1
answer277
viewsA: Doubt in strcmp
The strcmp method tests the equality of strings. Returns a negative number if string1 is less than string2; Returns zero if the two strings are equal; Returns a positive number if string1 is greater…
-
3
votes1
answer111
viewsQ: Doubt in dynamic memory allocation
In the code below, release B memory also releases from A? int* A = new int[4]; int *B = A; delete[] B;
-
1
votes1
answer977
viewsA: C++ function Error: cannot be used as a Function
Your code has the following errors: Missing a key at the end of the code } On line 32 you are passing an incorrect parameter Your code: quadrados(n1.n, i, desvio_qualquer, &quadrados); Correct:…
-
4
votes1
answer1164
viewsA: Error: cannot Convert float* to float
Remember that when you want to change the value of a pointer you should use * So the line goes like this: *quadrados = (desvio_qualquer * desvio_qualquer); In your case you were trying to give a…
-
3
votes2
answers3335
viewsA: Print special characters on windows console
As you can find on the site: http://linguagensdeprogramacao.wordpress.com/2011/07/16/resolvendo-problema-da-acentuacao-no-dev-c/ To solve this problem just use the command of C regionalization so…
-
4
votes1
answer213
viewsQ: Repaint screen every little time without crashing - C++
I have the following situation: I have to repaint the screen every little while so that objects on the screen move on their own, but this has to occur so that the program does not lock. I tried to…
-
8
votes3
answers2053
viewsA: Why do 64-bit versions of programs have better performance, stability and security?
Before quoting the topics you would like to understand, I would like to summarize by saying that x64 software takes advantage of what the x64 OS (operating system) provides, because x32 software in…
-
3
votes2
answers155
viewsQ: Convert Qvector<Qstring> to int in C++
I have a Qvector and I want to convert it so I can make comparisons to find out which one is bigger. I tried to do this but it doesn’t work: QVector<QString> vector; std::atoi(vector.value…
-
1
votes1
answer215
viewsA: mysql connection error with c. Unknown type name 'SOCKET'
I managed to find the error, it is necessary to give the Socks include before mysql. In my case it’s like this: #include <stdio.h> #include <winsock2.h> #include <windows.h>…
-
0
votes1
answer215
viewsQ: mysql connection error with c. Unknown type name 'SOCKET'
I have this code and is generating error. #include <stdio.h> #include <mysql.h> #include <windows.h> #include <sys\socket.h> void main(void) { //parâmetros para Conexão char…
-
6
votes4
answers1095
viewsQ: Why can’t I release memory?
I have the following code: #include "iostream" int main(){ int* A = new int[4]; int* B = A; delete[] A; delete B; if(B == NULL) std::cout << "B = NULL" << std::endl; else std::cout…
-
0
votes5
answers20688
viewsA: How to verify similarity between strings?
In java you have the contains() method of the String class makes the comparison to see if one string is present in the other: String a = "Teste123"; String b = "123"; if(a.contains(b) == true){…
-
0
votes2
answers3301
viewsQ: How to "capture" Webservice (XML) data in Java SE?
I am a layman in the subject webservice and need to capture the data of a webservice that returns some little information. The webservice is this:…
-
9
votes4
answers459
viewsQ: What happens when I convert int to char?
A whole has 4 bytes, whereas a char has only 1 byte. When I make that definition: int a = 1000; // 1111101000 char b = (char) a; I believe it will take only 1 byte of data, but what I want to know…
-
3
votes2
answers437
viewsA: How to access jTextField statico created with swing?
The problem is that your variables are not static, just put as static that solves your problem. If you are using Netbeans and the "drag components" option configures as below: If manually making the…
-
1
votes1
answer709
viewsA: How to take data from two different txt, Java
A nice way is to use Filewriter methods to create/edit the file and Filereader to read. public void gravar() { FileWriter fileWriter; BufferedWriter bufferedWriter; try { fileWriter = new…
-
10
votes3
answers2325
viewsQ: How does the rotation of Bits in C work?
I would like to know how the bit rotation works, because the content I was able to find on the Internet does not explain for sure. Note: The structure is as follows: unsigned _rotl(unsigned…
-
2
votes3
answers2192
viewsA: Incompatible date format when importing data from Excel to Mysql (00-00-0000 VS 0000-00-00)
You can both go in excel file and change the column format so that the date is in format ISO 8601, Mysql default, or even use a substring in Java. For excel you can use the customize option and use…