Posts by Rodrigo Guiotti • 2,317 points
66 posts
-
1
votes2
answers148
viewsA: function using char and vector in c
There are some problems. The main thing is that your example reads Alor('a',1,10); it doesn’t help you understand what you want to do. 1) The variable grupo needs to be an array for integers. If you…
-
3
votes1
answer234
viewsA: Access computer Bios source code
It is not possible to access the source code and certainly companies will not provide the software in this format. There are very few companies that work with BIOS and charge expensive for them,…
-
0
votes1
answer109
viewsA: Help with C++ bit scrolling
The bit offset moves the bits to the right or left and ends up meaning a multiplication or division by 2 of the value that was there, but it’s a little more complicated than that. To help, we will…
c++answered Rodrigo Guiotti 2,317 -
1
votes1
answer131
viewsA: Problem configuring serial port on C++ on Linux?
I ended up finding the problem in a configuration of the device Tree blob of linux, which had a pin wrongly configured for my hardware.
-
4
votes2
answers616
viewsA: How do I make my C++ programs multi-architecture (32 and 64 bit)?
The binaries will be different, so you can’t take advantage of the same build exactly. It is possible to force the recompilation for both architectures at the same time, but it is generally not…
-
2
votes2
answers194
viewsA: How to read the command line?
The best is to put the two processes (your two programs) to talk to each other. It can be in many different ways, for example: file, shared memory, messages or socket. As you mentioned Windows…
-
1
votes1
answer131
viewsQ: Problem configuring serial port on C++ on Linux?
Description: I have a problem that is the port of a code in C# to C++ does not work because of the serial port. I also noticed that on the /dev/ttyS0 device I am seeing the same bytes as in C++ and…
-
1
votes2
answers102
viewsA: Sort method is not ordering correctly
Really you are not asking to sort the last parameter. Your array has size 3 and when calling Sort, you need to pass size 3 so that it orders not only the first two positions, but also the last one.…
-
0
votes1
answer57
viewsA: My list still has Tail and head as null
Hello, welcome to you. As it is a university job I will keep on some tips just: 1) File2 is covered, but is not added to your list. 2) File is then tried, but without closing the file2, it is…
-
2
votes2
answers3911
viewsA: What is the difference between data types Enum, struct and Union in C?
ENUM It’s quite different from the rest, since it’s a list of numbers with easier names to use. For example, you can create the list with the two types below: typedef enum { TIPO_NM = 0, //numero…
-
3
votes2
answers458
viewsA: Is there a way to create cross Platform programs in C++?
There are several alternatives in C++, allowing to run the same source code on several platforms, but none is "automatic", without having to compile to the final platform as asked. You can compile…
-
2
votes4
answers343
viewsA: Why not always use Optimize Code?
Because the code is changed somehow automatically, even if in theory it doesn’t change much. If all goes well, only disturbs debug (since the code may no longer match the binary) and it should take…
-
2
votes2
answers1377
viewsA: How to identify a USB device?
I will answer here how I ended up solving the problem before I get to talk to each device. 1) libusb This library may be a good solution, but I ended up not testing because I could not keep her…
-
-1
votes5
answers993
viewsA: What is the difference between referencing an attribute directly or by get/set
A good analogy to this problem is the classic of opening the television to change the channel (private variables) instead of using the remote control (methods). Imagine you have a television class.…
-
0
votes1
answer756
viewsA: How does the MVC+ Service layer architecture work?
In this case, the service layer is interpreted as part of the MVC (vision-controller model) architecture and not as something additional. The view shows the user the interface and options he will…
-
6
votes1
answer832
viewsA: Use cases Concept and use cases Process
Short Answer: The difficulty in finding material on the subject is because there is not even this differentiation in the literature. Long Answer Edited with the question edit. Really all this is use…
-
2
votes1
answer799
viewsA: UML - Use Case Specification
The best would be to create a basic use case that is included by the other use cases and create three use cases for each of the actors to be able to do their part (whether to identify themselves…
-
2
votes1
answer32
viewsA: call a locally designated variable
You can allocate null as well. The advantage is that the code gets more predictable. cliente cliente = null; Only it doesn’t seem to have much leverage on catch you try to access the customer,…
-
2
votes3
answers1360
viewsA: Faster way to access properties in a C#list
The two shapes grow linearly with the size of your list, so the difference is small. But the second way is a little worse in terms of performance and memory because despite being just a pointer, you…
-
0
votes1
answer77
viewsA: How to override a class from an external project to call a function
You want to create the Mycielo that inherits from the original Cielo class. In this class you can change any behavior of virtual functions and add new methods smoothly. What you won’t be able to do…
-
2
votes1
answer59
viewsA: Program having unexpected output
1) All three verification methods are wrong. You should put the "Return false" out of the loop for and not inside. Because only if it doesn’t find it inside will it return false. 2) Sentence should…
-
2
votes1
answer221
viewsA: Data sorting: Bubble Sort or Collections Sort method
The Java Sort method uses merge Sort which is guaranteed to act with an efficient complexity (n log n) with any type of data. Which is much better than the Bubble Sort which is N2. Between the two…
-
2
votes2
answers658
viewsA: In C++ what is the command corresponding to Java super()?
There is no direct relationship in C++. It is possible to do something similar if you create a super typedef for all classes that want to use this feature, as in the case below: class Derivada:…
-
8
votes4
answers569
viewsA: In Object Orientation, does an inheritance violate encapsulation?
This means that the coupling is strong and any code change in the base class affects the subclasses. Therefore, it is not recommended to make the inheritance to reuse code. Because if a function…
-
2
votes1
answer89
viewsQ: How to use Facebook login on the universal Windows platform?
I’m trying to build Facebook login into an app so it works using the app or website according to the tutorial: http://facebooksdk.net/docs/windows/config/ There is a similar question, but that does…
-
0
votes3
answers8393
viewsA: Zeroing position of a vector to ensure there is no dirt
It’s a case where I like to use a macro... but at the bottom is a loop: #define INIT_ARRAY(array,value) {\ for(s32 i=0; i<lSIZEOF(array);i++){\ array[i] = value;\ }\ } With this I can make…
-
7
votes4
answers1015
viewsA: Problem with pennies when using the Biginteger type
To continue using the same type, you can multiply all values by 100. Since pennies don’t vary in the number of decimal places, it’s easy to keep all your data consistent and by using a whole type,…
-
0
votes3
answers550
viewsA: Print the Thread ID
currentThread() only works for the currently running thread. Each Thread needs to run this part. Then, you can put something like this into the thread builder to capture the id and keep that code…
-
9
votes2
answers1023
viewsA: Get Screen Resolution C++
On Windows? Use Getsystemmetrics(). #include <windows.h> Int x = GetSystemMetrics(SM_CXSCREEN); Int y = GetSystemMetrics(SM_CYSCREEN); On Linux? #include <X11/Xlib.h> Display* disp =…
c++answered Rodrigo Guiotti 2,317 -
4
votes3
answers41
viewsA: Pointed from Pointed C
The important part to understand this is understanding how pointers work. Let’s imagine that we declare a pointer with the ABC content: const char *c = "ABC"; So, "ABC" is somewhere in the memory…
canswered Rodrigo Guiotti 2,317 -
1
votes1
answer52
viewsA: Enumerator Random
The problem seems to be that the possible values are not all valid. Instead of directly generating the random number, you will need a conversion. Generate the number according to the amount of Notes…
-
2
votes4
answers2291
viewsA: How to do a search inside this vector of objects?
As the search should return data, I will add a slightly different answer. Anyway, the search has to be performed in the contact list and you would need to adapt the getDados() function to do exactly…
-
2
votes3
answers283
viewsA: How to run a great user story or how to split it
You know the remedy already in your question. You really need to divide the epics in a way that makes sense to you and your team. But the division you proposed does not help much and if you intend…
scrumanswered Rodrigo Guiotti 2,317 -
0
votes1
answer88
viewsQ: How to scale images for apps?
I’m starting a project for an app I plan to build that will be compatible with UWP + Android + iOS. Also, I would like it to be compatible with phones, tablets and Desktops. And it’s my first time…
-
0
votes3
answers72
viewsA: Largest number in array, does not display
You should always initialize the variables and initialize a variable with another that has not initialized does not resolve, as done on the line: maior=mat[0][0] The variables in C and C++ will come…
-
1
votes1
answer45
viewsA: Debug c++ in Visual Studio
You can disable incremental linkage to get around the problem or you can upgrade to a more modern version... Project Properties -> Configuration Properties -> Linker (General) -> Enable…
-
6
votes5
answers12645
viewsA: How to create a vector without determining its size in Java?
If you need a list, no set size, use Java.util.ArrayList or LinkedList. Java cannot create a flexible-sized array.
-
0
votes2
answers866
viewsA: Char pointer or char array?
In the part of the two codes, the type function they used is even wrong, so it would be an easy choice by the second type. Using that line right after malloc is an error: x = (char *)NULL //sem ";"…
-
5
votes6
answers2300
viewsA: AJAX is not a programming language. So what is it?
It is a method or process for using Javascript and XML (or JSON) in communicating pages with users.
-
2
votes1
answer215
viewsA: Define an array and the type of a function in C
1) What is the data? The first part is to define a structure that will store the articles and all the information about it you need, which you have already done. // estruturas: typedef struct { int…
-
1
votes3
answers138
viewsA: How to declare variables in for in c?
In the C89 language, it is mandatory to declare variables at the beginning of a code block. Always after an open "{". Whether inside an if or at the beginning of the method. It may be that before…
canswered Rodrigo Guiotti 2,317 -
0
votes3
answers1171
viewsA: Break a txt file into multiple items in a string list
You can scroll through the entire txt with its giant string and feed the list to each found unit. If the separator is n r, scroll through your String looking for this separator and use Substring to…
c#answered Rodrigo Guiotti 2,317 -
8
votes3
answers10756
viewsA: What is a checksum for?
Checksum or checksum serves to help ensure the integrity of communication packets or ensure that a file has not been corrupted. In the header, a pre-arranged calculation is made based on all the…
-
3
votes3
answers203
viewsA: Licensing: How to deal with date/local time tampering of a computer?
It has many ways of doing. One that I recommend is that you mark the date and time of entry and exit of your system. If it comes back more than two hours than the last departure time, you ask it to…
-
3
votes3
answers488
viewsA: What is the 'do' statement’s function?
You should use this sequence right after a while. It serves to limit the chunk of code that will run inside the loop. For example: a=10 while( a < 20 ) do print("valor de a:", a) a = a+1 end…
luaanswered Rodrigo Guiotti 2,317 -
0
votes6
answers2755
viewsA: Is it bad practice to use only static methods in a class?
Looking at the concepts of OOP, yes, static classes hurt the norm and it would be better to use a Singleton to create a utility class. Let me give you an example to help you see the problem. In my…
-
0
votes2
answers763
viewsA: Recover the value of an attribute of a generic object in Java
Create an Objetoxml class that will be common to all of them. Within Objetoxml, you can place a dynamic structure as a Chained List and when creating the object, you populate the list with the…
-
6
votes2
answers1377
viewsQ: How to identify a USB device?
I have two types of devices (A and B) that communicate serial through USB and can be connected to the PC using linux. Is there a way to identify which device is connected without having to talk to…
-
23
votes2
answers28407
viewsA: What is the difference between unit test and integrated test
Unitary Test Description: It’s a way to test individual units of source code. Drives can be methods, classes, features, modules, etc. It depends a lot on what the smallest part of your Software can…
-
2
votes2
answers421
viewsA: What is TDD and what is it for?
TDD comes from "Test Driven Development" which in English means "Test Driven Development". Requires the creation of an automatic test, before making the code, for when it is ready, you make sure it…