Questions tagged as 'array'

1
answer

Compare values of several arrays contained in an array in PHP

<?php $productos = array( 'producto1' => array( 'preco'=> 25, 'quantidade' => 5 ), 'producto2' => array( 'preco'=> 20, 'quantidade' => 50 ), 'pro...
asked by 27.11.2017 / 10:33
1
answer

Use toLowerCase () in an array of strings - AngularJS 5, TypeScript

I am trying to transform an array with strings inside in lowercase using toLowerCase, but it seems that it does not work with an array and only with a string ... How do I solve this? items: Array<{tag: string[], image: string, page}>; t...
asked by 25.11.2017 / 04:32
0
answers

How to split two values from an array?

I have the following code, where only index 0 is string: $row[0] = $row[0]; $row[1] =(float) $row[1]; $row[2] =(float) $row[2]; $row[3] =(float) $row[3]; $row[4] =(float) $row[4]; $row[5] =(float...
asked by 23.11.2017 / 13:55
1
answer

Use data from an array from one class to another

How can I use the palavra_vetor array in another class. public class Lista{ String palavras_leitura [] = new String[50]; String palavra_vetor[] = new String [4]; String palavra; public void ler_lista(){ String caminho_a...
asked by 28.11.2017 / 18:58
0
answers

Array in a PHP mosaic

I have a mosaic mounted in html and css, what I need is to mount an array bringing the last posts of the database, and list in it, going through all the divs in sequence, I always programmed an array for a DIV only, I'm using PHP instead of PHP....
asked by 29.11.2017 / 14:02
1
answer

Logic error with MOD (%)

Good evening, I have a code that shows me wrong values, in my opinion, my logic is correct, but when I request results, what is shown has nothing to do with the ultimate goal of the code. I have an activity that requests the name of the custom...
asked by 19.11.2017 / 06:56
0
answers

Error with array passing in foreach

function preencherJason() { document.getElementById('json_prod').value = ''; var arrayProduto = []; var table = $('#products_table'); table.find('tr').each(function() { var nodesTd = $(this).children(); var array =...
asked by 01.12.2017 / 05:41
1
answer

How to separate values from a json response and sum your results?

I have the following AJAX response: [{"valor":"100","dt_month":"11"}, {"valor":"150","dt_month":"11"}, {"valor":"1324.50","dt_month":"9"}, {"valor":"12.35","dt_month":"5"}]' I would like to split into two arrays, with valor adding...
asked by 30.11.2017 / 17:30
2
answers

How to validate an upload by filename?

I'm trying to validate the upload of a file, and it should always be called new.mpg , otherwise the program will not work. function validarNomeArquivo(){ //variavel que recebe o nome do arquivo var oImg = "bgs/newFile.mpg";...
asked by 30.11.2017 / 17:31
1
answer

How to get my array in the JSP page

public void Pesquisar(){ try { Class.forName("com.mysql.jdbc.Driver"); try { Connection conexao = DriverManager.getConnection("jdbc:mysql://localhost/CadastroProdutos", "root", "maquinarafa"); Statement comando = conexao.c...
asked by 10.11.2017 / 23:44