Questions tagged as 'java-processing'

1
answer

Multiply value in array

How do I multiply the elements of an array? What am I doing wrong? For example, if I have: int numbers[]={1,2,2,4,5,6}; and my card_block is 2, the remainder would give 1x4x5x6 = 120; int countCards(int [] cards, int BLOCK_CARD){ int...
asked by 19.03.2018 / 00:51
0
answers

Error returning next value to be removed in array

How do I remove a value from an array by putting -1 in place, and return the next index that has a value to be removed? Since this function should already return a position that has a value to be removed, I would not need to either verify and on...
asked by 28.03.2018 / 18:21
0
answers

Print on-screen array as text

How do I print the contents of an array on the screen using text () in the processing language? I have the array parts: final int MAX_SIZE=56; char[] pecas= new char[MAX_SIZE]; I added 6 in the array. The rest is empty. When I use a loo...
asked by 14.03.2018 / 00:08
1
answer

Character search function

I am trying to write a function that returns the index of the character. For example, I want to fetch the 'a' index the fifth time it appears in the text. This is my code: int buscaChar (String text, char c, int n) { int index=0; int co...
asked by 16.02.2018 / 18:19
0
answers

Make the mouse act with a joystick

My code must make the mouse act with a joystick to direct a ball on the screen. It should work as follows: if the mouse is in the crosshairs, the ball does not move. If the mouse is to the right or to the left, the ball moves to the right or to...
asked by 23.01.2018 / 20:54
1
answer

Function execution sequence

I have a question about the execution sequence of functions. For example, in the code below, because it prints y = 2.0 and not y = 4.0 and because it prints w = 0.5 and not w = 2.2. The y = 2.0 understand that it looks for the value that are clo...
asked by 20.11.2017 / 02:21
1
answer

Bibloteca for Processing [closed]

I have the source code below, but to function I need a library I can not find, what can I do to solve it? import ddf.minim.*; import ddf.minim.analysis.*; import processing.opengl.*; import javax.media.opengl.*; import netscape.javascript.*; i...
asked by 29.04.2014 / 19:25