Posts by Magno • 97 points
11 posts
-
-1
votes1
answer97
viewsQ: How to count objects more cleanly?
I would like to know how to count the same objects and return an array with the respective amounts of times it appeared. I’m using several "for" to do this, and I don’t know how to do it with "map,…
javascriptasked Magno 97 -
0
votes1
answer1098
viewsQ: If condition inside the map function
How can I put a condition if in my function for it not to return a value undefined? This is my job: keys.map(key => ({ key, value: data[key] })) She returns this: [ { key: 'a', value: 2 }, { key:…
javascriptasked Magno 97 -
0
votes1
answer49
viewsQ: Adding values for equal properties to an object
I would like to know how to add values to a "property", when an array displays different values for the second "property" and the same value for the first "property". For example: Entree: array1: {…
-
1
votes1
answer793
viewsQ: Graphics for Node.js
I am developing a program in Node.js that generates reports in . pdf, with tables and graphs. I’ve been searching the internet and found several packages to generate these graphics, such as: D3.js…
-
3
votes2
answers124
viewsQ: How to know how many times an object appeared in the array
I would like to know how to return the amount of times each object appeared in an array, for example: Entree: array1 = [ {nome: joao}, {nome: maria}, {nome: joao}, {nome: carlos}, {nome: joao},…
-
0
votes0
answers36
viewsQ: Move span with jquery
I’m making a span move when I put the mouse over a button, and when I take the mouse it goes back to initial position. I am using the jquery’s Animate class, the only problem is that when I pass the…
-
3
votes1
answer45
viewsQ: How to get the edge of the line drawn with Graphics in Java straight?
I made a program that traces lines on the screen, but the line is very deformed (image 2) in certain links. I wanted to know if there is a way to leave straight (image 1) the edge of the line in…
-
0
votes2
answers563
viewsQ: Div shows no picture
I’m learning how to create websites now and I’m having trouble inserting image by css. When I use the tag ;img src="image.jpg", in the file . html the image appears, but if I put it in the . css…
-
0
votes1
answer53
viewsQ: How to update Jtextarea automatically
I created a program that has a for, this for generates different values, what I need is to print the values in a JTextArea as 8 values are generated. I did the following: int tp=2; int pop[][] = new…
-
0
votes1
answer934
viewsQ: Change the size of an array at runtime
I’m making a java application, and I used netbeans to build the screen. On this screen I have a button that generates random numbers and puts them inside an array, but I can’t change the size of it…
-
0
votes2
answers259
viewsQ: How to return a vector to another vector in Java?
I’m doing a program that applies hill climbing, but the value I need to compare to see if the previous one is better than the next one is a vector double My method to find the best value returns an…