Tagged Questions
0
votes
2answers
42 views
Why does this code for shifting left in a 2D array not work and shifts left 2 instead?
This code is to shift a 2D array "arr" to the left completely once it runs through, but for some reason, the elements are shifting over by two.
public static void shiftLeft()
{
...
0
votes
1answer
33 views
How to Sort a 2D array based on 1D array
So i have something like this
011 - 50
111 - 75
001 - 25
This is my program :
public class Urut {
public void Sort (int [][] input1,int[] input2){
for (int i = 0; i < 5; i++){
...
0
votes
1answer
58 views
projections and index on 2D nested arrays in mongodb
> db.foo.save({'foo': [{f0: 'a', f1: 'b'}, {f0: 'c', f1: 'd'}]})
> db.foo.save({'foo': [{f0: 'a', f1: 'e'}, {f0: 'f', f1: 'g'}]})
> db.foo.save({'foo': [['a', 'b'], ['c', 'd']]})
> ...
0
votes
1answer
271 views
Prind index of 2D Array using the click event
The code below display the index of each button when clicked the buttons are in an array but all this is done in form load. But I want to do the same thing in the click event and not in the form load ...
0
votes
0answers
24 views
Transform a text file into a 2D multidimensional array
After looking around on the website I could not find a working answer for file I/O of a text file and turning it into a 2D array.
My text file looks something like this:
400,45.4563,-79.4322
...
0
votes
0answers
62 views
2D side scroll infinite terrain assistance
I have done research and it all surggests to use arrays.
I have tried using ArrayLists, LinkedLists etc.
I have had no success.
Can someone help me?
public static int worldW = 25, worldH = 25;
public ...