Posts by jorge saraiva • 478 points
16 posts
-
2
votes2
answers433
viewsA: How to indicate how many equal numbers there are between two vectors?
Simple solution could be to compare each value of the vector with each value of the vector 2, if found, uses a counter that increases if it finds an equal. int contador = 0; for(int i = 0; i <…
javaanswered jorge saraiva 478 -
0
votes1
answer24
viewsQ: How to associate an Imageview to a Class?
Although it is something generic, to try to clarify my doubt, I will give an example. For example, I have a HashMap<Integer, Piece> with size 64, in which Integer would position and Piece,…
-
1
votes0
answers47
viewsQ: How to add 13.10 after reading string ?
I’m trying to record a 40x20 character array, doing 2 cycles, where the character reads the character guard in a buffer, but I know we have to add 13.10 to change line and the cursor goes back to…
assemblyasked jorge saraiva 478 -
1
votes1
answer36
viewsQ: Is there any way to wipe the screen without cycling with ' n' ?
I would like to know if there are other possibilities besides for example executing a series of ' n'. public void clrscrn(){ for (int i = 0; i < 50; ++i) System.out.println(); }…
javaasked jorge saraiva 478 -
1
votes1
answer393
viewsQ: How can I move an element from an Arraylist to the last element ?
I would like to know if there is any method to perform the operation, other than to concatenate manually. Example of what you wanted: [1,2,3,4] -> [1,3,4,2]
-
1
votes1
answer442
viewsQ: What is the difference between a state (State Machine) and a class?
Would you like to know how to differentiate a state, an interface of a class, what are its main differences? How can I distinguish them?
-
6
votes2
answers7914
viewsQ: What is the difference between Java Keywords extends and Java Implements?
I would like to know when they should be used and how we can distinguish them. I know that basically Implements, means that this class implements a class or an interface. E extends can access the…
-
0
votes1
answer67
viewsQ: What is this about Stringbuffer being synchronized ? What is the advantage of Stringbuilder?
I know the difference between stringBuffer and stringbuilder is that one is synchronized and one is not, and that both represent strings that can be changed, but what synchronized means in practice?…
javaasked jorge saraiva 478 -
5
votes1
answer130
viewsQ: In operating systems, what is the difference between I/O and I/O operations?
I have some doubts in distinguishing these two operations, they are similar but I think not the same, although both have to do with input and output of something "something".
-
1
votes1
answer4452
viewsQ: What is the correct way to remove a vector element? C++
Could the way be the same to erase an integer vector, or an object vector? Every time an element is deleted, the vector position has to be changed ? The situation is the same by eliminating at the…
-
3
votes1
answer289
viewsQ: What is the difference between using #include "stack. h" or using the class statement ?
Having these two classes in two files .h distinguished. a. h class um { //(...) }; two. h #include "um.h" //opcao 1 class um; //opcao 2 class dois{ public: void f1(um * p); }; What is the difference…
-
3
votes3
answers603
viewsQ: How to check any received type (upper or lower case)?
How can I make upper and lower case be ignored to compare with default word? Ex: stack(default word to compare) Words that could be received: "Stack" "Stack"
c++asked jorge saraiva 478 -
0
votes1
answer67
viewsQ: How do Overload the assignment operator into a class that contains vector?
I would like to do the allocation operator’s Overload (operator=), I know I have to reserve memory, and copy data from one to the other, however I do not know how to copy one vector to the other…
-
2
votes2
answers909
viewsQ: How to use Operator= to copy a pointer vector?
Having this class, I would like to implement, operator =, copy the pointer vector to int for another vector, it is obligatory to reserve memory before doing so? What’s the difference between making…
-
3
votes1
answer193
viewsQ: Difference between pointer vector for a class and vector for a class?
When is pointer to class will we have to allocate memory space? What is the difference between the following two statements and when they should be used ? Vector <class*> nameOfVector; Vector…
-
4
votes2
answers607
viewsQ: What is the difference between initializing a constructor or doing attribution within the constructor?
What is the difference between the two examples below? I should also assign the value within the constructor in this class even if I initialized? example 1: class sof{ int teste; public: sof(int t)…