Questions tagged as 'array'

0
answers

(PHP / Laravel) Error adding a second item in the array does not increase the quantity of the second item

My Controller public function Adicionar(Request $request) { $id_produto = $request->get('botao'); $itens = $this->carrinho->getItens(); //dd($itens); try{ foreach($itens as $item){ $est = Produto::...
asked by 11.10.2017 / 01:25
2
answers

Vector by Parameter in C

I need to pass the position of Vector per parameter as follows code, my function receives the address and directly modifies the variable passed by parameter. However the program stops working and closes during compilation. Can someone help me ??...
asked by 10.10.2017 / 15:10
1
answer

Compare two arrays of numbers

I'm having a hard time comparing PHP between two arrays . I have Array HORA_INICIAL and HORA_FINAL what I need to do: In the Initial Time array compare the Hora Inicial < Hora Final and display the End...
asked by 03.10.2017 / 21:41
1
answer

How to put information of a class in an array?

To save lines of code, I do the following: PictureBox[] pic = { pictureBox1, pictureBox2, pictureBox3, pictureBox4, pictureBox5, pictureBox6, pictureBox7, pictureBox8 }; And I have a class called InformationLetters , whose same has se...
asked by 11.10.2017 / 07:59
1
answer

Array saving data in the bank with a field written array

I have two fields which saved in the database (in this case would be to review the application in magento, but that does not matter much). These fields are being saved correctly, but with a problem, it saves one of the fields written array...
asked by 11.10.2017 / 21:43
1
answer

Select values from another table with more than one row in WebSQL

I'm using Ionic + Cordova + WebSql. I have basically these tables, partners and partnerEnderecos. The address table can contain more than one row for each partner. How do I return these values? I create the tables like this: databaseValues....
asked by 22.09.2017 / 17:38
1
answer

Doubt about sum of information

I'm doing exercises on composite variables and I got stuck in my code, which at first I can not seem to solve even though it seems to be something simple. At the time of the result display, the student's notes are not being displayed individu...
asked by 01.10.2017 / 16:36
1
answer

Use SearchView to search a populated model class with firebase

Good evening!   I'm stuck with a problem, in this I have a list of items I get from the firebase, in this list I have visibly 3 attributes of the model class (idAtivity, title and time), so I would like the searchview that I implemented searched...
asked by 26.09.2017 / 02:32
1
answer

Error in Python2

I'm practicing using Python 2, but I do not know the reason for this error. Below is my code with the error. And numpy and scipy are installed, because when I give the import no more error appears. vaca1= [1,1,0] vaca2= [1,1,0] v...
asked by 15.09.2017 / 04:43
1
answer

Batteries with sequential allocation

I'm having trouble implementing the code in a stack using vectors: typedef struct pilha pilha; struct pilha { int *v; int topo; int tam_max; }; void Inicializar_Pilha (pilha pi, int tam_max) { pi.v=new int [tam_max]; p...
asked by 15.09.2017 / 07:21