Questions tagged as 'array'

1
answer

Revert output from print_r to its original PHP array

This question I ask because of a difficulty that I find especially answering questions right here. When sharing the result of print_r of an array, for example: Array ( [0] => Array ( [dim1] => Array...
asked by 18.05.2018 / 01:32
2
answers

Because in the console it indicates an arrangement of 3 objects, but when displaying its information, it only has 2 objects?

I have this situation: in this image I print an arrangement that as you will see it says 3 objects but when displaying its information it only has 2 objects and when crossing it effectively it returns the information of 3 objects. Which may be?...
asked by 10.10.2018 / 00:38
1
answer

FULLCALENDAR (SHOW SPECIFIC EVENTS)

My problem is that I want to obtain specific events according to a value, and all the information of the events is retrieved from the db successfully from a file with the following code: header('Content-Type: application/json'); $conexion = ne...
asked by 04.10.2018 / 06:11
1
answer

Reverse order of Multidimensional Array

I need to invert the positions of an Array, where the first pass to the last the second to the penultimate and so on. For example, I have a 3-position Array: [1,1.00,2300] [2,1.00,4500] [3,1.00,2340] and this should be your result: [3,...
asked by 08.05.2018 / 08:13
1
answer

Build associative array with txt lines

Hi, I have a txt that has the following structure [HEADER] 7894=12.01 1124=456 2234=1.0 2222=2.3 [DATAOUT] 1235=7 1006=10.0 1007=10 [ENDOFFILE] I'm reading it from PHP like this: $archivo = fopen('archivo.txt','r'); $data_archivo=array();...
asked by 27.04.2018 / 22:47
1
answer

Life time of a variable within a class

how I have a project where you read a csv file of thousands of lines a column of the CSV I save it and send it to a class where a list feeds my question is how long life has that list. once finished it will restart. or how would the lifetime of...
asked by 25.01.2018 / 20:18
1
answer

Characters with tilde in a char type arrangement

I have this code: include <stdio.h> define TAM 64 int main(int argc, const char **argv) { char cadena[TAM] = {0}; while (fgets(cadena, sizeof(cadena), stdin) != NULL) printf("%s\n", cadena); } When I run it in the...
asked by 19.10.2017 / 17:42
2
answers

Problem with array

I have a very simple and strange problem in an array in which I declare it for example: $scope.pactUpdates = []; The problem is when I push on that array and I want to assign the value of a control that is empty. $scope.pactUpdates.push({...
asked by 12.07.2017 / 18:02
1
answer

C ++, execute binary from a byte array

I am trying to use function pointers pointing to a binary stored in byte array, but it always results in segmentation fault. unsigned char byteProg[] = {0x7F,0x45,0x4C,0x46,0x02,0x01,0x01,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x02,.......
asked by 29.07.2017 / 20:34
1
answer

Create Array in javascript reading from local file

I need to create an array in javascript of the style var data = [1,2,3,4]; to represent that data on a canvas. The data would be collected from a file on the desktop with an input of the file type. The content of the file would be: 1 2 3 4...
asked by 09.05.2017 / 13:53