Questions tagged as 'array'

2
answers

How to transfer table data to python?

Hello, I have a table with lots of data, a lot of Astrophysics data, tables with approximately 20 columns and more than 1000 rows. I need to send this table with this data (contained in the columns and rows) to python 2.7 in my linux but I can n...
asked by 13.10.2016 / 21:53
1
answer

How to read multiple TXT files and save strings in an NSArray?

Scenario explanation: Read the contents of several .txt extension files and save the strings of each file separately to a NSArray , in this case, in each array index. Obstacle: - There are more than 60 different files,...
asked by 24.09.2014 / 18:56
1
answer

undefined index array pdo

I'm trying to get the id of a user that logged in and saved it in the session, but it's not working, I make a query in the database at the time of logging and I transform the result into an array to get the id and store it in the session , but t...
asked by 14.07.2016 / 01:21
2
answers

How do I get the values inside an array?

0 => {#557 ▼ +"nis": 1 } 1 => {#561 ▼ +"nis": 16192248487 } I have this array, I want to get the values: 1 and 16192248487 , and throw them in a variable to give dd and print them on the screen and show only:...
asked by 06.12.2017 / 14:17
2
answers

Check the diagonal of a specific index

I wanted to know how to check the diagonal of a particular index, for example, put 1 in all diagonal numbers of row 2, column 2 0 1 0 1 0 0 1 0 0 1 0 1 1 0 0 0     
asked by 11.12.2015 / 15:27
2
answers

how to transform an array of arrays into a single array in javascript? [duplicate]

Given the array: [[1,2,3], [4,5,6]] How to transformer in: [1,2,3,4,5,6]     
asked by 26.07.2018 / 21:09
1
answer

Function that makes $ foo [array_rand ($ foo)] direct

Is there a native PHP function that does this without having to use array_rand in the array key? While working fine and being a simple slice, here is a simplified example of the doubt: //Declarando um Array com um Array dentro $array...
asked by 01.10.2015 / 19:55
2
answers

Popular PHP dropdown error with array

Hello, I have the following function that returns me the data needed to populate my dropdown: function listaRedes($conexao){ $dados = array(); $resultado = mysqli_query($conexao, "SELECT DISTINCT rede FROM evolucao_originacao")...
asked by 02.12.2016 / 14:29
2
answers

Add a new literal object to an array of objects!

I would like to add a new item in my array of objects through a method, but I do not know how to do it. public products: Array<Object> = [ {prodName: 'product 1', prodElement: 'element 1', prodAttribute: 'Attribute 1', attrValue: 'valu...
asked by 21.09.2018 / 18:25
1
answer

How to compare numbers in vector list?

I have an integer vector list in java (ArrayList ListVet). public static ArrayList<Integer> ListVet; And I need to make a comparison between two numbers in that same vector list. So I did like this: for (int i=0; i<ListVet.size()...
asked by 20.11.2018 / 04:49