Posts by Luiz Vieira • 34,160 points
330 posts
-
3
votes2
answers3708
viewsA: How to prevent Item started on one page from continuing on another in Latex?
You can try using one minipage to force the contents of an item to be always on the same page. Not much better than your current solution, in the sense that you need to use this command along with…
latexanswered Luiz Vieira 34,160 -
3
votes3
answers3929
viewsA: Limit the size of a String?
The problem is precisely the fact that the function scanf does not check whether the size of the string read "fits" within the reserved area. Therefore, when reading more than allocated, the…
-
5
votes2
answers475
viewsA: Malloc improperly reserving memory?
"What’s unusual about this code?" Nothing unusual, but very wrong. Pointer arithmetic is a widely used feature in C language when one wants to manipulate directly the contents in the memory. So it’s…
-
2
votes2
answers3369
viewsA: How to do Multiple Linear Regression?
Since you did not provide sample data from your problem domain (although I requested it twice), I had to use some publicly available data source on the Internet. I chose to use data from the rabbit…
-
10
votes1
answer2529
viewsA: Doubts about using Stratified K-Fold in Scikit Learn
The goal of testing with a classifier is to check your quality in predicting the ranking for one or more new examples of problem domain data of interest (I don’t know how well you know the subject,…
-
8
votes2
answers5978
viewsA: Best practices when presenting Android loading screen
Your question has already been very well answered by Mr @ramaral. And, incidentally, the main point of the colleague’s answer is this: Whatever the chosen form it must ensure that it does not block…
-
5
votes3
answers257
viewsA: Error in formula with OR
Heed: I don’t know if this is due to the Excel version, but in my Excel in Portuguese (version 14.0.7149.5000 32 bits of Office 2010) nay exists a function called CONTAR.SE.S. The function that…
excelanswered Luiz Vieira 34,160 -
2
votes1
answer128
viewsA: How to take the number separated by the whole function just below and sort it correctly as described in the main doubt in bold in the question in C++
It is not clear in the question, but it seems that its difficulty is how to relate pairs of values (the student’s enrollment and his grade, for example, or a player’s score to his ID, etc). For…
c++answered Luiz Vieira 34,160 -
7
votes3
answers1812
viewsA: Questions about Latex
1) Latex elements for example (summary) are editable ? by example, I can change the summary name and put Index ? or change the numeration by Roman numerals? Yes. Just reset the commands (within the…
latexanswered Luiz Vieira 34,160 -
4
votes2
answers1854
viewsA: How to make so that after reading a file "txt" it read another one then
Another way, as suggested on the SOEN issue that I mentioned in the comments, is to use the header "dirent. h". It is standard in Unix and can be downloaded from Windows (and used together with your…
c++answered Luiz Vieira 34,160 -
17
votes2
answers445
viewsA: E-mail marketing, theoretical
First, a little theory First of all, it is important to make it clear that on principle any mass email communication has great potential to be considered SPAM by any decent filter. Simply because it…
emailinganswered Luiz Vieira 34,160 -
8
votes2
answers509
viewsA: Is using version control on the production server a good practice?
My answer will be given independently of development technology. Your essential question is: "How do we know who put a code in the production environment?" Ideally, the system running in the…
-
3
votes1
answer116
viewsA: Template error when returning value
The problem is the use of explicit in the definition of the copy constructor. This clause exists to prevent the compiler from making conversions (casting) implicit that, although they may be useful…
-
2
votes1
answer290
viewsA: Difficulty with loop (repetition) in portugol
You have a loop to request the type of mills. Your control condition is: até (cont = nu) being nu the number of power plants entered by the user. The variable cont is your loop counter, which you…
portugolanswered Luiz Vieira 34,160 -
3
votes1
answer4307
viewsA: Apply icon depending on the text value in the cell
The problem seems to be really the fact that this kind of conditional formatting (Icon Set) only work for numerical data types. But I did not find official confirmation for this suspicion anywhere…
conditional-formattinganswered Luiz Vieira 34,160 -
21
votes1
answer3265
viewsA: How to program Artificial Intelligence with Minimax
First of all, it is important to understand the concept of State space. The state space of a problem is the tree or graph of the possible states of the problem along its resolution, with each action…
-
16
votes2
answers2562
viewsA: How to implement the hidden layer in a character recognition neural network?
About the Layers Your neural network needs to be at the very least the input and output layers, since the input layer is responsible for receiving the problem values (the "pulses") and the output…
-
19
votes1
answer2902
viewsA: How does google’s "Search for similar image" feature work?
I can’t tell you how it works exactly the specific Google algorithm, but I can offer a help on how it is the basic principle of image search by content. This area is commonly called CBIR…
-
18
votes3
answers31930
viewsA: Make an algorithm to calculate the number of days elapsed between two dates in c++
WARNING: You say clearly that this is a college job. So there is all this need to understand how work the calculations and implement them manually. In the "real world" it would be easier already to…
-
15
votes2
answers1688
viewsA: Design Patterns in C?
As I have already commented, this is a great question, although a little difficult because it can be addressed in some different ways. There are a very similar question (if not exactly the same) in…
-
8
votes1
answer22467
viewsA: Macro to access site with login
As I’ve commented before, can do using libraries Microsoft HTML Object and Microsoft XML, V6.0. They need to be referenced within the VBA (in the code window, access the menu Ferramentas ->…
-
8
votes1
answer5287
viewsA: Stackoverflow
The answer is very simple: If you not check If a given number already exists in your list, your code will remain running recursively forever. And how recursive calls involve creating another item in…
javaanswered Luiz Vieira 34,160 -
7
votes2
answers2880
viewsA: How can I print only the fractional part of the number
A simple suggestion is to make a type casting from the number to an integer, and then subtract that integer value from the original number. For example: printf("%f", A - ((int) A)); Thus, if the…
canswered Luiz Vieira 34,160 -
22
votes2
answers1620
viewsA: When to use icon, or text, or more text icon?
Here’s a really hard question (but, you know,, Challenge accepted!). :) Inevitably I need to start with a little theory. Semiotics The discipline that deals with the meaning of images and texts is…
uxanswered Luiz Vieira 34,160 -
9
votes2
answers7034
viewsA: How to play sound in a java program?
This is an example where the program plays a sound in the . wav format (the source is that answer in the SOEN): import java.net.URL; import javax.swing.*; import javax.sound.sampled.*; public class…
javaanswered Luiz Vieira 34,160 -
3
votes3
answers2449
viewsA: How to do terminal loading effect on just one line?
If you are using Linux (as seems to be the case given your attempt to call clear), an interesting solution* is to use the X-Term commands to clear the screen and move the cursor to row 0 and column…
canswered Luiz Vieira 34,160 -
14
votes1
answer1779
viewsA: UX best practices for signage and form usability
Your example is not exactly one of the best because, as already commented, a login form is sufficiently simple and standardized to the point that virtually every user already accustomed to services…
uxanswered Luiz Vieira 34,160 -
17
votes3
answers854
viewsA: How to cancel a cancellation?
I will substantiate my answer based on this image, taken from your good example that the problem is more common than it may seem (I thought better to reproduce the image here to make it easier for…
-
120
votes3
answers21628
viewsA: Definition of the "Big O" notation
Here’s an informal (and visual). The idea of notation Big-O is to describe the overall behavior (also called asymptotic, as it is the behavior at the boundary as data grows) of the algorithm in…
-
4
votes5
answers19696
viewsA: Removing the last name of a cell
A way using only native Excel functions (the original source is this answer in Soen) that’s how it is: =DIREITA(A2;NÚM.CARACT(A2)-PROCURAR("|";SUBSTITUIR(A2;"…
excelanswered Luiz Vieira 34,160 -
7
votes2
answers110
viewsA: Why does the order of these scanf’s make a difference in the outcome?
The problem is that your variables are declared as char, but you do the reading as int. Thus, the function scanf reads more than 1 byte and invades variable memory x2 (that as it was stated later,…
-
32
votes7
answers1131
viewsA: Too many screens or a screen with too much information?
TL;DR Really gets in the way of having a lot of information? Why? In theory, yes. Because the capacity of human attention is limited. The user may not realize what they should, and even if they do…
-
5
votes1
answer391
viewsA: Error Pointer to pointer in c++!
In addition to the potential problems already mentioned in comments, you are using a pointer to pointer (**mat) to manipulate the data, only it was not properly initialized. So when you reference…
-
3
votes1
answer875
viewsA: Sum quarterly data in columns
Use the function SOMASE to make the conditional sum for each year. To make it easier, create a row (in my example I called "Hidden") to contain only the year of each date, in each column. You can…
excelanswered Luiz Vieira 34,160 -
16
votes4
answers4453
viewsA: What are the practical advantages of using object orientation in the day-to-day life of a development team?
I begin with the following definition of Paradigm, extracted from Wikipedia: Paradigm (from the late Latin paradigm, from the Greek παράδειγμα, derived from παραδείκνυμι «show, present, confront»)…
-
27
votes6
answers2483
viewsA: Why is Drag-and-Drop programming rarely used?
Your question is somewhat broad in the sense that drag-and-drop can mean a lot in the context of system development. For me, for example, what comes to mind in the very first place is the pattern of…
-
12
votes3
answers2082
viewsA: Documentation at the beginning of a project working alone
The object-oriented analysis and design you are studying is just one of the subjects (perhaps the most popular, say) within the discipline of Software Engineering. Like any other engineering, the…
-
11
votes1
answer172
viewsQ: Difficulties with selecting items in a Qtreeview
Setting: I have an application that manages a list of images of human faces with prototypical emotional expressions. I created a class inherited from QAbstractListModel to provide the model (model)…
-
2
votes1
answer154
viewsA: Build error "A new Expression requires() or [] after type"
After performing some tests, the problem seems to be related to the characters used in the code. As you said yourself, you copied the code from a web page and pasted it directly into the Unity…
unity3danswered Luiz Vieira 34,160 -
6
votes3
answers2670
viewsA: Know the frequency of words
I don’t know if there’s a function for it, but once I used the suggested code in this tutorial to make this count. The final code of the tutorial is this (not exactly the code of the tutorial, but…
ranswered Luiz Vieira 34,160 -
1
votes1
answer398
viewsA: Formula Excel Custom List
On the last sheet (called, for example, "Total"), create a column for each month, keeping the names of the participants in the first column. For example: Then, in each month cell, use the following…
excelanswered Luiz Vieira 34,160 -
25
votes7
answers2649
viewsA: Should people’s names be stored in two or just one column?
Modeling From a modeling point of view, this choice does not seem to bring much distinction. The space occupied by one or the other (whether in memory, in attributes of an object, or in a table in a…
-
3
votes1
answer92
viewsA: Allocation in C - Object was probably modified after being Freed
I have the strong impression that the problem is the sizeof(Dic) in the allocation of your last code. It will return the pointer size in the variable Dic and not the size of the structure (as…
canswered Luiz Vieira 34,160 -
12
votes2
answers417
viewsA: Planning of user interface
In a very simple and direct way, I would say that there are three criteria that need to be observed: 1. Functionality If your web application is a commercial or scientific system, it is natural that…
-
2
votes1
answer243
viewsA: Use of bitmap font in Haxeflixel
After poking around a bit I discovered the problem. Apparently there was (or there, it’s not very clear to me yet) a difficulty/error in converting UTF8 characters in native builds (so it works in…
-
2
votes1
answer387
viewsA: Create a c-language game with the MCU 8051 IDE
So much start as end are initialized with zero (0) at the start of their function main. They were not declared with a type (does the compiler you use not generate any warning of this?) or did you…
-
4
votes1
answer243
viewsQ: Use of bitmap font in Haxeflixel
I’m working on a game using the framework Haxeflixel 2D and I’m having some difficulties using bitmap fonts to render accented characters. But to make it easier I’m going to divide the question into…
-
6
votes2
answers846
viewsA: Count line in the matrix that have repeated numbers
Suggestion of a simple solution: For each "line" of your image, add the pixels. If the sum is zero (0) the line is "all black". If the sum equals the number of pixels on the line, the line is "all…
-
5
votes1
answer2341
viewsA: How to put a soundtrack?
There is not much secret about using audio in Unity. The tool is very nice and makes it enormously easy. The whole point is that you must necessarily have an audio source (that is, an object that…
unity3danswered Luiz Vieira 34,160 -
32
votes1
answer2595
viewsA: Explain the SVR algorithm
Decision Process: Characteristics Selection and Classification Imagine the following example (taken from the classic book Pattern Classification). You need to develop a system to automatically…