Questions tagged as 'iterator'

1
answer

How to manipulate Iterator position

I need to compare all the elements of a list 2 to 2 I'm doing in the following way: List: 1, 2, 3, 4. Comparison: 1 and 2, 1 and 3, 1 and 4, 2 and 1, 2 and 3 ... I'm using this way: Iterator<Policie> p1Iterator = setOfPolici...
asked by 15.09.2015 / 15:42
0
answers

Pass start and end of a vector to the sort function using c ++ method overload

I want to access using overload using node which is an object of the base class method getInicioVetor and getFimVetor within the child class, I wonder if there is a way to do this? I tried it just that it did not work. static boo...
asked by 26.09.2018 / 03:58
1
answer

How to make the answer enter immediately after the question?

I have a form and I want to send the questions and answers to a database. I took the question in the form of text and sent it to an input hidden field and I want to insert the question and answer in the database: <label for="pergunta">...
asked by 04.12.2016 / 19:16
1
answer

because the iteration of the x of the input does NOT interfere in the iteration of the x of the while loop, and is it the same variable?

I'm learning programming logic with Python and I do not understand how the x of the input does NOT interfere with the iteration of the while loop, since it is the same variable. Please, I would like you to explain, valew !!! #!/usr/bin/python3...
asked by 29.03.2017 / 17:42
1
answer

Iterate in multiple text files

Good afternoon. I have the following purpose: I have a series of text files and I want to create a script to iterate over all of them and count how many times certain strings appear in them. I was able to script for a single file. But I'm hav...
asked by 16.03.2016 / 19:33
2
answers

Using a map to store 1 ID for N values? [closed]

EDIT For lack of details, I've reset the question here . The question has been flagged and a moderator will delete it as soon as possible, thanks. I have the following IDs and values, respectively: 1 - 18; 1 - 19; 1 - 20; 3 - 21; 3 - 22;...
asked by 22.05.2015 / 21:02
0
answers

Argument does not support iteration. How to solve?

I'm trying to apply the zip to the x, y, and z lists, but when I run the program, I get the following error: izip argument # 1 must support iteration. Can anyone help me fix my error? from matplotlib.backends.backend_qt4agg import FigureCanvas...
asked by 02.10.2018 / 23:19
0
answers

Create a c ++ iterator to cycle through a hash table (Separate Chaining)

I'm new to c ++ and I'm not able to create an iterator to traverse a hash table. The table is composed of a vector of n linked list positions (created by me). I need an iterator to go from beginning to end, line by line, to be able to access eac...
asked by 23.09.2018 / 01:00
0
answers

Iterators std :: begin and std :: end in the circular list context

The std :: list class creates a circular list. When I create an iterator to go through I find myself with an ambiguous situation, which I exemplify: #include<iostream> #include<list> using namespace std; int main() { list<in...
asked by 28.05.2018 / 17:43
0
answers

What is an iterator? [duplicate]

In PHP, when I need a given class to have certain behavior in the foreach call, I implement an interface called Generator . In Python there also seems to be __iter__ , which changes the behavior of the object relative to...
asked by 21.06.2017 / 18:52