Questions tagged as 'array'

1
answer

Print message when loaded csv file is larger or smaller than 9 columns

My application reads a csv file and convert it to pdf. For this I have the frontend in html to load the file. I would like to know how do I show the user a message stating that the file is invalid. The file will be invalid when the number of col...
asked by 03.10.2018 / 16:05
2
answers

How do I join results from different foreach in an array?

I'm getting movie info from a movie site using Simple Html Dom. <?php include("simple_html_dom.php"); $html = file_get_html("http://arcoplex.com.br/?lang=059"); To get the titles of the movies I do: foreach($html->find('.Cartaz .f...
asked by 24.09.2018 / 19:15
1
answer

Item reallocation in array key

Good afternoon! Although I have researched the subject and searched the documentation, I still can not come up with a solution to the following problem .. I have an array brought from the bank with titles and items. The array looks like this:...
asked by 24.09.2018 / 22:34
1
answer

Change attribute of an array of objects in the state in the application

To try to make an attribute of one of the objects in an array of objects switch between true and false follow code: Initial status: constructor(props) { super(props) this.state = { post: [{ nome: '',...
asked by 17.07.2018 / 15:55
1
answer

jQuery function to select values in divs and play to an array

I'm getting the values of several <div> s with the same class name and trying to play to an array in jQuery, but as I'm starting in the language I'm not getting it, I already searched the internet and nothing I found gave me a solut...
asked by 23.07.2018 / 04:04
1
answer

Problem in programming C - Vectors

The problem is:    Write an algorithm that reads 3 vectors A[1..10], B[1.10] e C[1..10]   and writes the elements that are in A and B (intersection) but are not   Write the values in the order they appear in vector A.   three vectors s...
asked by 10.07.2018 / 19:41
1
answer

Transform object into array while maintaining index

Good evening Friends who can help me? I have this Array of objects, I needed to make this Object in list more while keeping the index as it is UsingMapitchangestheindex: I then needed to access each item to perform calculations, but the...
asked by 04.07.2018 / 20:40
1
answer

Get string size inside the array with PHP

I have the following problem, in the program below, I get the forms of a website, but I have to specify the exact size of the line that has the form (96), would have the possibility to pick up this number without having to specify manually . &...
asked by 25.07.2018 / 00:09
1
answer

How to start an array with the value that the user type is possible?

If all allocated memory is defined at compile time, then how is this possible: int num{0}; cin >> num; int array[num]; As far as I understand, this could only be possible if you use dynamic memory allocation.     
asked by 19.06.2018 / 15:14
1
answer

I can not start an array with foreach

I can not print my array when I put a different key, it gives the error Warning: Invalid argument supplied for foreach (), how to proceed? for ($i=0; $i < 2; $i++) { $use[$i]['outrachave'] = 'some valor'; for ($j=0; $j < 2 ;...
asked by 21.06.2018 / 15:30