Questions tagged as 'array'

0
answers

Resolved: How to sort an array of objects without sequentially repeating two specific properties in Javascript?

Good evening guys, I'm breaking my head here, but I could not come up with a solution ... next, I have an array of objects: [ {order: 0, from: 'Birigui', to: 'Penápolis'}, {order: 1, from: 'Birigui', to: 'Araçatuba'}, {order: 2, fr...
asked by 07.12.2018 / 23:10
0
answers

Add value in sequence to the end of the value of a php array

I would like to add values in sequence to the end of each value in my array. So that when the loop is executed add values to the end of my array. Example in pseudo code: // Array original $arr = ['1' => '1.','2'=>'2.']; FUNÇÃO QUE ADICIO...
asked by 23.12.2018 / 01:47
1
answer

Insert multiple records into MySQL using NODEJS

How do I add multiple records at once in MySQL by passing an array of, for example, products? HTTP-POST request, where products is an array with an x number of products. FRONT-END addProduct(products: any): Observable<any> { ret...
asked by 04.12.2018 / 16:51
0
answers

How do I get the vector with the smallest "me", and copy it to another vector that the case calls "mnr"

Note: I did not start the code because it does not influence! I'm trying to pass the coordinates of the array that has the smallest number of zeros in your column, row, or quadrant (to make a sudoku solver). Thanks so much! int main()...
asked by 04.12.2018 / 02:18
1
answer

Null Pointer Exception? [duplicate]

In the code snippet below, you are supposed to compare the value of items in array linhas with String entered by user p . It's working, but it always gives the error:    Stack trace - Exception in thread "main" java.lang...
asked by 01.12.2018 / 02:59
0
answers

Angular 5 update with forEach correct only in the first items

I'm trying to run two functions, calculoDes() and desempenhos() , in Angle 5, but strange behavior occurs as a result. The first function calculates in some phases, always generating an object Array for the next step. The steps a...
asked by 09.12.2018 / 01:28
2
answers

how to create vector vectors?

Can anyone tell me how to create a vector vector in java? ie How to make a vector store other vectors with int values Tie this populates a vector with values from 1 to 4 q are directions N = North, S = South, East L =, O = West. for (int i...
asked by 29.11.2018 / 17:24
0
answers

Problems writing two information in the same array position

Well, I'm developing an app with ionic 3 . I am facing problems, as I need to show the product and its value in the same column:    Product - 350 (value) But, it is storing in position 1, the product, and in position 2 its value....
asked by 05.12.2018 / 16:25
1
answer

What is the split method for ionic?

Well, I'm developing an app with ionic 3, and I hear of a method called split, but I've never understood its functionality. I just understood that it is related to arrays. Given this: What is the split method? How is it usability?
asked by 28.11.2018 / 14:45
1
answer

Remove whitespace in Array

Well, I'm developing an app with ionic 3. As I try to write some data to the array, "\ n" appears at the beginning and at the end of the array. Here is the code: element = this.pedido.produto; if (this.vetCarrinhoAux.indexOf(element) === -1)...
asked by 29.11.2018 / 12:18