Posts by Luiz Vieira • 34,160 points
330 posts
-
4
votes1
answer756
viewsA: Changing integer array to image filter
Your code works (although there are some potential problems, such as the width and height of the image being passed by parameter but being fixed in the code in the array definition imagem), and your…
-
7
votes2
answers1841
viewsA: How to forecast values of a variable?
You offered few examples of your problem, so I did the best I could with them. At least in these data, the temperature drops throughout the day in a fairly linear way. Thus, you can try to produce a…
-
4
votes1
answer116
viewsA: Usability of grid actions
Your question is not very clear and perhaps some images with the options you imagine would have been useful. To try to help I am considering that in your system (Accounts Receivable) you have a list…
usabilityanswered Luiz Vieira 34,160 -
27
votes5
answers680
viewsA: What to do when a UI element cannot be used by a user?
@Onosendai has already responded very well, but I would like to complement with some things that I think are important. 1 Lets user use it and displays an error message indicating that he cannot do…
uxanswered Luiz Vieira 34,160 -
3
votes2
answers604
viewsA: Transforming place into zip code
An alternative to Carlos' answer is for you to load a (acquired) ZIP database and search directly into it. I used the example CSV file from the site Qualocep (I do not know the site, and I believe…
-
2
votes1
answer66
viewsA: Cursor is the size of input height
A quick and easy solution is to use line-height: normal instead of fixing a line size (original source of this solution here). Tested and worked well on Chrome (Jsfiddle here).…
cssanswered Luiz Vieira 34,160 -
16
votes2
answers6739
viewsQ: What are Usability Principles?
In Interface and Interaction Design, what are (and what are) the principles of Usability?
-
18
votes2
answers6739
viewsA: What are Usability Principles?
Usability Principles (also called Heuristics) are guides or "expert advice" regarding good practices in user interface design. They come from a method called Heuristic Evaluation (proposed by Jakob…
-
7
votes1
answer358
viewsQ: "Geographic" location of devices in indoor environments
In external environments, the geographical location, made by GPS or triangularization with cell antennas, is already practically a "problem solved", counting on resources and facilities available in…
mobileasked Luiz Vieira 34,160 -
6
votes4
answers793
viewsA: Simple Teaching of Pointers
Simple didactics, right? So nothing like a short example accompanied by an image. :) Illustration Code #include <iostream> int main() { /*** DECLARAÇÃO ***/ int *i; int j; char c; char *s;…
-
4
votes2
answers336
viewsA: How to check the number of users who have accepted an event on facebook using the Graph API
The reply from @Felipeavelar is correct, it was not included the attending at the end of the query. Anyway, I’ve prepared an example with based on my other answer. There is important additional…
-
31
votes4
answers3366
viewsA: Are getters and setters an illusion of encapsulation?
Use a Setter is not an illusion of encapsulation because the idea is that the class itself has all control over the alteration of its properties. If a property is naturally public, this control is…
-
6
votes2
answers1470
viewsA: What is the real meaning of using ε-transitions in NFA?
Anthony’s answer is perfect, but I was already writing so I’ll post it because it might be complementary help. The two automata (1) and (2) are equivalent. The difference well explained by Anthony…
automataanswered Luiz Vieira 34,160 -
11
votes2
answers4848
viewsA: Time format: 12 vs. 24
On the Conventions First of all, it is important to note that both the display formats of the hours and the amount of hours itself in a full day (or in periods of night and day) are conventions…
-
3
votes2
answers517
viewsA: Problem loading file to memory
The problem is that you’re guarding the pointer received directly into its structure, which means to save the pointer to the string contained in the variable name. Therefore, when the pointed…
-
5
votes1
answer1746
viewsA: Progress and Time Bar
A progress bar is just a representation visual of any scale to indicate the progress of any activity. It uses a scale to represent this progress, but the information presented can be of time (when x…
-
8
votes1
answer8916
viewsQ: Rows with same height in table in Latex
I need to play in Latex a table with 3 columns and 5 rows. It should use the entire paragraph width, center the cell contents both horizontally and vertically, and auto-adjust longer texts. But most…
latexasked Luiz Vieira 34,160 -
7
votes1
answer2260
viewsQ: How to include visual progress information in a Powerpoint presentation via VBA
I have a Powerpoint presentation and would like to build a program in VBA to count the slides and include in each of them a kind of "progress bar", in order to indicate to the public the progress of…
-
4
votes1
answer2260
viewsA: How to include visual progress information in a Powerpoint presentation via VBA
A simple solution is to count the number of slides (N) in the presentation and include in each of them a rectangle (object of the type Shape) whose length w' (extracted from property width) is equal…
-
3
votes1
answer7604
viewsA: Excel 2007 - Buttons to Create / Remove Rows
Credit the original idea of unlocking, altering and blocking the user @Strokes. What you can do is keep the sheet protected and in the button code use the following order: Strip the sheet using the…
-
2
votes1
answer246
viewsA: Improve code to avoid slow particle collision
For illustration purposes, consider a simple division in which your canvas is broken into 4x4 smaller squares, as in the figure below: Your code tests the collision within the method…
-
12
votes1
answer9351
viewsA: What are the differences between Wireframe, Prototype and Mockup?
Although these artifacts are sometimes used as synonyms, there are important differences between them. Wireframes According to the Cambridge Dictionary (in free translation), the English word…
-
15
votes1
answer9351
viewsQ: What are the differences between Wireframe, Prototype and Mockup?
In the contexts of Interaction Design, Usability and User Experience, there are differences between the artifacts called Wireframe, Prototype and Mockup? If yes, what are?…
-
4
votes3
answers3487
viewsA: What are the ways to measure a programmer’s knowledge?
In Brazil, and specifically in the academic sphere, there is a unified proof (that is, applied throughout the national territory - and in some neighboring countries, such as Peru) called National…
methodologyanswered Luiz Vieira 34,160 -
2
votes3
answers237
viewsA: Different outputs on different compilers
When building your program in C++ you have some options for declaring the call input function main. The two most common are: 1 - Do not worry about receiving and handling binary/executable command…
-
4
votes2
answers1301
viewsA: How to open a C++ image using SFML?
I don’t know the SFML in depth, but because it is a library for access to multimedia resources I believe it has no resources to facilitate the request of the file name to the user (or at least it…
-
20
votes1
answer446
viewsA: Easeljs isometric map, code problem, can identify
The main problem of your code is that its loops (commands for) are not processing all map items, since you have limited them in 2. In addition, the positioning in x and y does not take into account…
-
25
votes2
answers298
viewsA: Does the syntax '//' have any special meaning?
This three-bar set is commonly used by some programs for formatting code documentation (such as the Doxygen), as a way to indicate that a single line comment should be included in the generated…
-
1
votes1
answer2623
viewsA: Moving circle on the screen with thread and jFrame’s Paint method
As I had already mentioned in the comment, that other answer will be quite useful to you, mainly because there I describe a number of needs (including mainly the issue of painting with double…
-
10
votes3
answers1491
viewsA: Strategies to prevent software regression
As already mentioned in the existing optimal responses, regression (understood simply as something that worked as expected to stop working) is a natural phenomenon in complex systems, to the point…
-
2
votes1
answer244
viewsA: Sublime Text Plugin - Automatically post files to another folder
I use a build system. It’s fast, easy and simple. :) I use Windows 8, but the principle is the same for other operating systems (and there are more details in the documentation I referenced above):…
sublime-text-2answered Luiz Vieira 34,160 -
10
votes3
answers1531
viewsA: How to identify heat regions in thermal images?
The @karlphillip user already provided an excellent response, but I wanted to complement with some remarks and suggestions but the comment field was small. So I decided to add my own answer. The…
-
22
votes3
answers5730
viewsA: When should we declare a method static?
By definition, a static attribute or method is one that does not require an instance to be used. This means that a static method, as in your example, can be run freely without the need for…
-
4
votes3
answers1134
viewsA: Retrieve statistics from a website
I spent a little time to "translate" the information from basic tutorial of Google Analytics and so who knows how to help. Basically the idea is this: Your web application (I did it in Javascript,…
-
3
votes2
answers1026
viewsA: Loop with options
Well, come on. Your code has a few mistakes until common. First, on line 25 (the loop condition) you are using: while (Opcao != opcao4){ This condition will check whether the variable Opcao is…
javaanswered Luiz Vieira 34,160 -
2
votes1
answer554
viewsA: Dynamic source of graph data
In your question it is not clear how you organized your data, but I understood that the graph is in a spreadsheet (tab) separate from the data and so you get the reference date of cell Q2 (now,…
excelanswered Luiz Vieira 34,160 -
7
votes5
answers20688
viewsA: How to verify similarity between strings?
Here is a fairly simple solution proposal (I made in Java): public class Teste { protected static float checkSimilarity(String sString1, String sString2) throws Exception { // Se as strings têm…
-
9
votes1
answer765
viewsA: How do I search for profiles with characteristics similar to the interests of another profile on a relationship site?
The first thing you need to define is how you will represent the compatibility between two individuals A and B. You yourself mention the term "percentage" in your question, then I think the most…
algorithmanswered Luiz Vieira 34,160 -
3
votes1
answer450
viewsA: The parachute descends head down. How do you reverse it?
Here’s a hint of how you can do whatever you want (sorry, I did in C# by custom, but it’s trivial to convert to javascript): using UnityEngine; using System.Collections; public class Disparar :…
-
10
votes2
answers665
viewsA: How to determine the smallest number of small areas to render?
You didn’t specify the domain of your application, but you can imagine that this is something in which frames are rendered in sequence (like a video, or more likely, a video game) in a restricted…
-
26
votes2
answers6588
viewsA: How can I pause and play a gif?
I’d like to suggest an alternative solution. It gives you a little more work, but gives you more control over the animation (allowing you not only to pause, but to change the speed or even reverse…
-
5
votes2
answers1084
viewsA: How to write a string in a stream using physical files?
According to the function documentation scanf: Whitespace Character: the Function will read and ignore any whitespace characters encountered before the next non-whitespace Character (whitespace…
canswered Luiz Vieira 34,160 -
6
votes8
answers2292
viewsA: Why create an object using the superclass?
His example is not exactly to "create" an object using the superclass, but to create an object using a subclass and manipulate it through the superclass. To explain in a simpler way, I will start…
-
5
votes1
answer832
viewsA: How to implement a chart using amCharts?
You can try to use only one dataset (a node graph). For example, in XML Data use something like the following: <chart> <series> <value xid="0">Entidade 1</value> <value…
-
3
votes4
answers2018
viewsA: How to use a class-specific thread with multiple threads?
As @rdllopes already mentioned in his reply, it is not a good practice to make your objects run in different threads, as it is very common that games have many objects and it is quite costly for the…
-
56
votes8
answers5453
viewsA: Why in some if’s situations are considered bad?
I begin by quoting a comment given in original English OS question: if statements are evil in the way Hammers are evil. Some people Might misuse them, but they’re an Essential tool. - Dominic Rodger…
-
2
votes2
answers9832
viewsA: Transform Rotation with Unity3d
Assuming you want to fix the y-axis (that is, make your object rotate along the x-z plane only), you just run the Transform::LookAt passing as parameter a new vector in which the coordinates x and z…
-
7
votes1
answer1225
viewsA: VBA - Backpack problem
As I mentioned in the comment, your problem is not exactly the backpack problem classic, because you’re not looking for an optimal solution (like the minimum number of shopping carts to accommodate…
-
13
votes2
answers780
viewsA: setTimeout attached to an onload does not work
The problem is that as you put it directly window.location = ... within the call of setTimeout, Javascript will try to evaluate the content within the parentheses immediately, and so the page is…
javascriptanswered Luiz Vieira 34,160 -
13
votes2
answers4725
viewsA: Image rotation in java
The answer from @Rodrigodebonasartor works perfectly and the big takeaway is that the algorithm makes an adjustment considering the corners of the image that are "hidden" after the rotation, as a…