Posts by Luiz Vieira • 34,160 points
330 posts
-
2
votes1
answer215
viewsA: Assistance with Rotationing(Quaternion.Slarp) in Unity
First error: Slerp misuse First, you should not have read the function documentation carefully Quaternion.Slerp and so did not understand correctly how the third parameter works. This function makes…
-
2
votes2
answers384
viewsA: How to make a ranking of the best buyers through Excel?
Do so: Create a new tab. In this new tab, make a column of unique buyers' names from their original tab (help source tip:…
excelanswered Luiz Vieira 34,160 -
3
votes1
answer513
viewsA: How to remove noises and hairy image lines?
If you are already using morphological operations, why not directly use a lock to eliminate hairs? You will need to know more or less their average thickness for the generation of the structuring…
-
6
votes1
answer1959
viewsA: calculate a row-by-line list media in python
Simple: move the line of code soma=0 for after your tie for. Thus: arq=open('notas_estudantes.dat','r') conteudo=arq.readlines() arq.close() for item in conteudo: soma=0 nom=item.split() for x in…
-
4
votes2
answers74
viewsA: Questions about ID in the register of a web system
The key point of your question is this: "[...] all registrations have the registration (ID or Code) and they are very important for customers to use to relate a register with the other [...]" Yes,…
uxanswered Luiz Vieira 34,160 -
3
votes1
answer96
viewsA: Procedures after errors should stay in the services/validations or in the controller?
Code Quality View From the point of view of the quality of the code, it should use the form 2. The reason arises from two questions that I, the programmer who inherited his code for maintenance, for…
-
3
votes1
answer38
viewsA: How to scale a bitmap quickly
The process of scaling an image is quite costly, especially when you want to enlarge the image. To reduce, scaling algorithms can simply apply an average (something like: the pixel of the…
-
13
votes1
answer2331
viewsA: What is it and what is PCA, LDA, ICA for?
First of all, the Viola-Jones algorithm has been explained in this other answer. In fact, this answer deals especially with the difference between detection and classification (the second term is…
-
4
votes1
answer97
viewsA: Place final line in a Latex Table
As I commented, missing a \\ in the last row of the table (that is, the line with the contents: 2 & Posição das Peças & \textbf{passosToPosition}). In general Latex errors are not the most…
latexanswered Luiz Vieira 34,160 -
16
votes1
answer1704
viewsA: What are the terms "Cascade" and "Classifier" in relation to computer vision?
Classifiers A classifier is a computational system that, having some input data that characterizes an example of something, classifies this something among some options. The use of classifiers in…
-
4
votes1
answer52
viewsA: How to make a temporary powerup?
You can keep a second private attribute of the class to "count" the elapsed time in the same way you count nextFire. This second time would be counted up to the value you set for the power-up…
-
4
votes1
answer5572
viewsA: Pandas - select lines
Use the property loc. For example, for the following CSV: Year;Make;Model;Description;Price 1997;Ford;E350;"ac, abs, moon";3000.00 1999;Chevy;"Venture ""Extended Edition""";"";4900.00…
-
4
votes1
answer1337
viewsA: How to move and rotate where the mouse click is?
You are using scale changes (size) of the object with negative value on the X-axis to simulate left-right rotation. I mean, in doing transform.localScale = new Vector3 (-1, 1, 1);, you simply "flip"…
-
5
votes2
answers1138
viewsA: How to change property of another object?
You need to have a local reference for the objects you want to manipulate. There are several ways to get this reference: You can create two public objects of the type fighter and assign, via Unity…
unity3danswered Luiz Vieira 34,160 -
7
votes4
answers351
viewsA: What is gamification in the context of software?
I have already given my insight into what gamification is in another related question. So I want to focus here on the second part of your question: what is the relationship with software. As a tool…
-
19
votes2
answers383
viewsA: Is gamification the same as competition?
TL;DR Gamification is the same thing as competition? Definitely these concepts are not the same thing. Competition is an element that can be used in a gamified process, but it is not the only…
-
6
votes1
answer817
viewsA: Unity change the order of a game Object via code by C#
It’s quite easy. Here’s an example of code, which puts item "9(Clone)" before item "7(Clone)": Transform pf = GameObject.Find("Party Frames").transform; Transform c9 = pf.Find("9(Clone)");…
-
7
votes2
answers300
viewsA: heuristica h(n)=0 is permissible for algorithm A*
If you remember the basic principle of algorithm A*, it decides the next node of a graph to "pursue" based on an evaluation function f(n) given by: f(n) = g(n) + h(n) Where: g(n) = cost up to the…
artificial-intelligenceanswered Luiz Vieira 34,160 -
1
votes1
answer113
viewsA: Opencv: How to import automatic lib
There are several ways. You can create a script file (Batch on Windows, Bash on Linux, for example) to automate this build. You can also use a Makefile. But I suggest you use a configuration manager…
-
0
votes2
answers488
viewsA: C# - XML Serialization error
What is happening is that the XmlSerializer expects a class that is inherited from IEnumerable, that is, store and handle collections of items. The list (List), for example, it is one of them, but…
-
7
votes2
answers795
viewsA: What is the best way to implement a loading bar?
How best to implement it, what is the operational limitation preventing such percentage control? The main cause of limitation is very simple: there is no way to know the "total" of the processing…
-
8
votes3
answers1348
viewsA: Should systems force the user to create a strong password?
As you have already responded very well from a technical point of view, I will reply from the UX point of view. Why some systems require such strong passwords? Because there’s a concern legitimate…
-
8
votes2
answers471
viewsA: Theoretical doubt about while and indentation
You asked why in the code below: (1) i = 6 (2) while (i > 0): (3) i = i - 3; (4) print (i) The output is 3 and 0 and not only 3. The answer is simple, but requires you to consider how Python…
-
4
votes1
answer737
viewsA: Unity open external link
Your question is not clear, but from what I understand you did a project on Unity3d, compiled for the web (that is, generated the version in Webgl), put it to run on a page of your, and then tested…
-
7
votes2
answers439
viewsA: Python graph does not display values correctly
Simply set the x-axis boundaries using the function set_xlim, as in the example below: # . . . plt.title("Grafico do numero de Conexoes por segundo antes do Ataque") plt.ylabel("Numero de conexoes…
-
18
votes3
answers478
viewsA: Can Garbage Collector language be used for games?
I started learning C# and even Java for interest in developing games. But I know that many are developed with C++, mainly for not having a Garbage Collector. This is not necessarily true. Many games…
-
11
votes1
answer673
viewsA: Detect collision between corners of objects
In the case of this game, what you want to do is very simple. When your collision happens, the ball is necessarily touching the top of the staff (paddle). Thus, the axis value y doesn’t matter. You…
-
4
votes1
answer1617
viewsA: How to show content captured by camera in full screen in Opencv?
Yes, there is a way. Create the window before using, setting its size to normal. Then use the function setWindowProperty to set the window as full screen. Example of commented code: import cv2 #…
-
39
votes2
answers4966
viewsA: How does an artificial neural network work?
Brief Review You should remember the algebra and geometry classes of the college where you studied about linear functions (in which the variables - x, mainly - are always in the first grade) and…
-
4
votes2
answers397
viewsA: Calculate how many Nan in each Python time
The answer you have is correct, but does not use the Pandas (which was what you used and asked). Here’s one that uses the Pandas then. :) Basically the idea is to make the grouping defining labels…
-
5
votes2
answers811
viewsA: Printing specific lines from a text file
I don’t know what your problem is (would it be a college exercise?), but if you’re trying to build an agenda or something like that, I would suggest using a more appropriate and easy-to-manipulate…
-
2
votes1
answer53
viewsA: Employee research, multiformulary or single form?
I was left with the following doubt, I do everything in a single form and use javascript to go showing one question at a time, or do several form, one for each question? In principle it should be…
-
2
votes1
answer1113
viewsA: Compare all Rows and Columns of two Df, update and add differences at the end of Rows and Columns
You can do it like this: Read both files in different Dataframe’s. Concatene the Dataframes directly, using the operator +. You can include a string with the comma in the middle. This operator will…
-
7
votes2
answers1499
viewsA: Remove all line breaks from just one column of a csv file on Linux
I know you requested help for "awk" and "sed" (based on the tags used). But, if I may suggest, why don’t you do it in Python? It’s quite simple because you treat the file as CSV itself (which also…
-
1
votes1
answer72
viewsA: Help with regular expression
What I meant in the comments is that if you want to separate the numerical values between brackets, you should look directly for them instead of separating first by spaces and then separating the…
-
7
votes1
answer2500
viewsA: How to take the maximum/minimum value of an integer in the C language
There is no function, but there are macros defined in the header limits.h of standard library of C. Code example printing minimum and maximum values of an integer: #include <stdio.h> #include…
-
5
votes2
answers856
viewsA: Database graph does not show python matplotlib
Your code has some potential problems: The data variables x and y are only filled within the function read_data, that is never called. So the data is empty and the graph shows nothing. Run the…
-
3
votes1
answer546
viewsA: Python Pandas: regravando pd.read_table() with original comments
The problem is that comments are simply being ignored in reading. Pandas does not represent comments internally because this is something specific to this storage format (i.e., CSV; if you save the…
-
1
votes1
answer53
viewsA: CS00103 The name 'flashspeed' does not exist in the Current context
Probably the error occurs on this line: damageImage.color = Color.Lerp (damageImage.color, Color.clear, flashSpeed * Time.deltaTime); You will notice that the attribute in this line is as flashSpeed…
-
5
votes1
answer1160
viewsA: Find equal values between 2 columns of . csv and refresh another column X
Do it this way: Read the data of both files in a dictionary. The best way to do this is, in my opinion, by using the DictReader. Process each dictionary item created from CSV2, and add/update the…
-
3
votes1
answer1548
viewsA: Condition python Matrices
The simplest way is to use the Numpy, because there you can compare if the format (shape) of the matrices is different, and if it is to return False as you wish. Example code: def soma_matrizes(m1,…
pythonanswered Luiz Vieira 34,160 -
3
votes1
answer55
viewsA: Other ways to make matrix
Yes. For example, this form: def imprime_matriz(minha_matriz): for linha in minha_matriz: print(' '.join(str(i) for i in linha)) minha_matriz= [[1,2,3],[4,5,6],[7,8,9]] imprime_matriz(minha_matriz)…
pythonanswered Luiz Vieira 34,160 -
4
votes1
answer9329
viewsA: Excel - Create QR Code with 4 cell data
Like me previously commented, there are direct ways to do this in VBA and the project Barcode VBA Macro Only on github can help you. However, there is a simple way to get what you want, if the…
-
1
votes1
answer57
viewsA: Problems transferring data type from Msproject to Excel
Your operating system is probably configured in American English, since it is in this configuration that the date is expected to be provided month before day (i.e., in the format mm/dd/yyyy). The…
-
4
votes1
answer975
viewsA: How to identify whether the area of an object is within another area desired by the user, drawn by the mouse
After much arguing I finally understood what you wanted do (and it was not on its own merit, let it be said in passing; therefore, it remains the tip: in the future, focus on the problem instead of…
-
4
votes1
answer136
viewsA: canvas - Fill a semi smile with the color red
If you want to fill the Snowman’s smile, missed the call to ctx.fill() after drawing it. See the code (the inserted row is indicated with a comment): var canvas =…
-
8
votes1
answer4065
viewsA: Python, clone the lists
In Python, everything is object. And parameters are passed by assignment (which more or less means that references to objects are passed by value). So if you make a change to the variable of the…
-
4
votes2
answers12804
viewsA: Counter in python
Your code is not very clear. You define a variable cont with the value 1 and then uses a variable c in a loop (without using the range), but increases it within the loop.....? If you know the number…
-
2
votes1
answer148
viewsA: How to create sublists with pairs of elements (x,y), in which the first of them (x) is in a sequence?
I I suggested you open another question because I understood that the problem was another. But he is essentially the even if that of your question original, you just committed the mistake of not…
-
4
votes1
answer1063
viewsA: How to create a sub-matrix from an array in Python?
Simple: use the package Numpy and make slicing. Example: import numpy as np matriz = np.array([ [13, 28, 45, 50, 26, 10], [27, 24, 22, 33, 88, 11], [90, 25, 85, 23, 76, 55], [77, 15, 31, 29, 13,…