Questions tagged as 'array'

2
answers

Make array search using more than one word

I want to search a array and use more than one word, the problem is that I want it to only return something if all words in array exist and not just one, I'm doing the following form but it is not working: <?php if(isset($_P...
asked by 26.09.2016 / 18:56
1
answer

How do I know address of each position of the vector in C?

I'm having trouble knowing the vector address and address of each vector position. #include <stdio.h> int main(){ int vec[]={52,13,12,14}; printf("Endereço de vetor %d",&vec); printf("vec[0]%d,vec[1]%d,vec[2]%d,vec[3]%d\n", &v...
asked by 26.09.2016 / 23:16
1
answer

Construct an array through a vector

I put nine digits in the vector but my array comes out with random numbers, I would like my array to come out with the numbers that are in the vector below below my code: #include <stdio.h> #include <locale.h> int vetor [9]; int m...
asked by 07.06.2016 / 23:39
1
answer

How to rotate an array in Java?

I have a two-dimensional array, size M x N, that stores tiles of a map, in the following format: [1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12] And I want to rotate in 90º (ie rotate the map so that the North is in the East). The rotated...
asked by 08.03.2017 / 05:48
2
answers

How to create dynamic columns with Bootstrap and PHP?

I have 30 itens that will come in alphabetical order. I need to distribute these items in 3 columns in alphabetical order VERTICAL . The problem is that in Bootstrap , the blocks will marry next to each other causing the...
asked by 12.01.2016 / 21:03
1
answer

Negative return of Array.BinarySearch ()

I needed to make a comparison of the genre of methods normally created as inList or something of the sort. Searching the Microsoft documentation, I found Array.BinarySearch(T[], T) . I made this operation in my code and I was in dou...
asked by 01.02.2016 / 18:44
1
answer

How to compare vectors in C

Hello, I would like to understand why my code does not work. I'm trying to develop a galaxy application and I can not seem to get the letter typed to be compared to the letter in the vector, what am I doing wrong? Follow the code: #include&...
asked by 18.10.2017 / 20:23
2
answers

Inserting index and value into a two-dimensional array

I have a two-dimensional array (it contains data coming from the database). To traverse this data, I use a foreach (). I need to add an index and a value to this index at the end of each iteration of foreach (). Imagining as if it were an arr...
asked by 19.10.2017 / 18:40
2
answers

Wrapping text

I'm trying to do a line break in a Array , however I'm not having success trying to run split() , in short, I want to make a table of 10 rows with 2 columns that get the values of list and list2 public class Ultimos10...
asked by 20.09.2015 / 17:06
1
answer

Problem in language C, question with prime numbers

I'm solving exercises, in C language, on vectors. The exercise is as follows: Make an algorithm that uses a menu with the following options: order a vector of 5 increasing positions, order a vector of 5 decreasing positions and store in a vector...
asked by 01.08.2016 / 00:32