Questions tagged as 'soma'

5
answers

Sum of hours greater than 24h

I have a variable with the value '18: 00 ', which corresponds to a duration received through two-time calculations. $tempo = '18:00'; // queria somar 8:00 Answer: $temposomado = '2:00'; Desired value: $temposomado = '26:00' How ca...
asked by 20.04.2018 / 18:35
2
answers

r - sum of one variable in relation to the values of another variable in a data frame

I have a multi-column dataframe. How do I add the values of a column within an element of another variable? I want to do this to summarize the data of each species within each campaign. I have already tried using the summarize function of the pl...
asked by 11.07.2018 / 02:47
2
answers

Error adding each row of a 5x3 array

Hello, I'm having a problem adding up each of the rows in my array and storing it in a vector My code is like this: #include <stdio.h> int conta(int * matriz[5][3], int * vet) { for (int i = 0 ; i<5; i++) { for (int j =...
asked by 06.11.2018 / 23:15
1
answer

Sum (SUM) of a column with irregular formatting

In my MySQL table I have a column called "weight". This column has the following values: 19.325 14.369 15.325 15.369 17.698 19.258 18.098 I simply need to do the sum, but when I run select sum(peso) from tabela it returns me the valu...
asked by 18.06.2018 / 15:58
1
answer

Adding records separated by commas - PHP + MYSQL

In the mysql database I have the following table: Notethatthecolumnfieldisinjsonformat.Ihavemultiplerecordsinasinglefield.Ineedascripttocounteachrecordseparatedbycommasandaddandassigntoavariable.Inthiscasethevariablewouldbesetto6.Inthecodebe...
asked by 07.10.2018 / 23:06
3
answers

Sum of an array and concatenation of PHP value

I have a dynamic array, it contains keys that duplicate (TAG): [0] => Array ( [0] => Array ( [tag] => 5x1 Acessori Kids [pedido] => 6701622409...
asked by 12.02.2018 / 20:53
1
answer

Add values from an array of different criteria each

0 : {idPVI: “10”, idPV: “3”, descri: “Portuguesa”, preco: “32” } 1 : {idPVI: “10”, idPV: “3”, descri: “Portuguesa”, preco: “32”} 2 : {idPVI: “13”, idPV: “3”, descri: “Calabresa”, preco : “35”} 3 : {idPVI: “11”, idPV: “5”, descri: “Bord...
asked by 27.07.2018 / 22:09
1
answer

Add multidimensional PHP array

Good morning, I have the following array: Array ( [0] => Array( [data] => 2018-06-08 [grupo] => 1 [maq] => 1 [segundos] => 10089 ) [1] => Ar...
asked by 13.06.2018 / 15:56
0
answers

Adding Select value, however Adding new Selects with (Java Script)

Personal Wave, Add selection is already working, a new select is opened at the bottom, and you can delete it ... but now I need each of these to disappear with the others ... if you delete, the sum is taken. .. and if you add another select...
asked by 13.05.2018 / 14:15
2
answers

Add values from the same PHP array

It seems to be simple but I could not, I would like to add the following array (there are two arrays inside one, it is split with the array_chunk): $arr = [ [1, 2, 3, 4, 5], [6, 7, 8, 9, 0] ]; I would like the result to be this: A...
asked by 11.06.2018 / 18:20