Most voted "queue" questions
Queue is a data structure that implements the FIFO principle (first in, first out).
Learn more…56 questions
Sort by count of
-
5
votes2
answers1821
viewsHow to implement a queue using two stacks
Hello, I need to implement a queue using two stacks, IE, I need to insert an integer on stack 1, and when removing an element all items on stack 1 should be transferred to stack 2, making it look…
-
4
votes2
answers684
viewsProblems assigning values to variables in an object
I need to pass variable data to another class called Fila.java. There I have a vector of the type that receives objects, so in the main class I created an object that I initialized as follows :…
-
3
votes3
answers1080
viewsOne process at a time PHP
I would like to know if there is a way to create a process queue. For example, whenever I have the file run processar.php, if it is already running, it would wait to be executed after the end of the…
-
3
votes1
answer563
viewsSidekiq rails in production
I’m trying to put and produce an APP that uses Redis and Sidekiq to queue up. In development it works as follows. I run the command on the terminal: bundle exec sidekiq -q default I’ll keep it…
-
3
votes1
answer148
viewsDo not wrinkle data in the queue
In my program, I need to use a queue storage function inside another function, but I can’t run it, it doesn’t store it. I switched from Devc++ to Codeblocks and this appears: "expected 'struct Fila'…
-
3
votes2
answers679
viewsWhat determines a variable as a Python array?
I’m studying about lines in Python and I’m using the object deque module Collections. So, in Python I can access the values of an array by simply writing: array = [1, 2, 3] arra[0] # 1 However, the…
-
3
votes4
answers1053
viewsPython Queue Code - How to check if there is an element with a specific name in the queue and its index position?
I’m making a queue code from a bank where you need to type the name, age, weight and gender class Person and class Queue and this code has some options that must be entered according to the user’s…
-
2
votes1
answer354
viewsCancel Javascript/Jquery event queue
So, I have a loop that will awaken some 10 functions that are AJAX requests, in the functions, which encompasses AJAX requests is a setTimeout(), what happens is, the loop is done on the hour, and…
-
2
votes1
answer2918
viewsStudent Queue. Help in structuring code
My doubt is in the case 1, how to include items in the queue, in case, mat and media. Follows code below: #include <iostream> #include <cstdlib> #define tamanho 20 using namespace std;…
-
2
votes1
answer282
viewsProblem inserting elements in a queue
I made a function using the concept of static queue to insert an element, however, it is not running when I call it in main. I do not know if the problem is in her, in the main function or in the…
-
2
votes1
answer419
viewsImplementation of ANSI C queue
I have a code (end of question) that allows manipulation of a queue in ANSI C, my question is as follows: The code declares a data type of its own to store the data of the queue and has a function…
-
2
votes1
answer62
viewsError removing element from a chained list in c
The function retiraLifo is not working and there is some syntax error, but I did not find it. This function is to remove element from the list. A insereLifo is working. The following error occurs:…
-
2
votes1
answer709
viewsStacking and popping with javascript queue
I have to stack 3 values that are typed by the user through the prompt, and after this pop up, showing the result on the screen. The problem is that after the user enters the 3 values, it appears…
-
2
votes2
answers2182
viewsLaravel Jobs Queue
I’m having a question, I’m trying to run the Jobs using the Supervisor to run Jobs, only the command doesn’t work with php Artisan Queue:work rather with php Artisan Queue:work --Queue=high, I’m…
-
2
votes1
answer66
viewsIdentifier in Apache Activemq
I’m trying to integrate a consumer into a queue that uses the message Broker Apache Activemq. However, to consume these queues you need to configure an identifier, user and password. I can’t set…
-
1
votes0
answers100
viewsVariable loses value before operation C#
I haven’t dealt with C#for a while, I’m making a simple code, to perform simulations on demand and process data, applying FIFO. My problem is regarding the variable attributes of the Fila class, I…
-
1
votes1
answer240
viewsAccess attributes of type Object
I’m having trouble accessing values from an Object attribute. I have a No class that has No attributes, and Object Item. Each item is an object of the Subject class. I queue the items of the class…
-
1
votes1
answer1990
viewsPriority queue implementation using vector
I am implementing a priority queue through an array, my method for insertion works normally: public boolean inserir(int n){ if(estaCheia()) { return false; } if(estaVazia()) { fila[nItens++] = n;…
-
1
votes1
answer149
viewsError in my C program
I need to create a program in C, which removes (or copies) the values of a queue, using the output rules of a stack and add them into a new structure. I rode as below but there are two errors:…
-
1
votes0
answers179
viewsWhat are Oracle queues (Queue)
I was working on an Oracle database import, and during the import noticed the existence of objects of type queue, I’m used to procedures,functions,view, etc. The one in question had never seen. I’d…
-
1
votes1
answer131
viewsHow to row and row with separate rows in Javascript?
I have two rows, and each of these rows will be filled by 3 numbers. The user will place the numbers through the prompt, that will appear on the screen only after entering the data. Even this part…
-
1
votes1
answer447
viewsData Structure, Circular Queue. Questions about the Queue and Queue methods
I’m not getting the two blocks else in the methods Desenfileirar and Enfileirar. More specifically the lines: this.tras = (++this.tras % this.info.length); this.frente = (++this.frente %…
-
1
votes1
answer62
viewsWhy is my C code that uses queue giving Segmentation fault?
Hello I must implement a queue that receives the name information and Cpf but only when I try to unroll something gives seg fault, without the row of the unroll wheel normal, but I do not see the…
-
1
votes1
answer224
viewsDoubt Laravel Queue, Job, Mail
I’m trying to get my system from a cronjob, send email to a certain list, my problem is this: when I do it through a route have no problem any emails are sent! But when sending the email is done…
-
1
votes0
answers164
viewsJob Format does not pass constructor data to Handler
When dispatching a job in Laravel 5.6, send parameters to it. In the constructor, the parameters are received normally, containing the data sent. However, when executing the job with the php artisan…
-
1
votes1
answer158
viewsInsert object from a Linkedlist to a Linkedlist from another class
I have two classes in my project: Cars and Cars. At first, I have a Linkedlist stated as follows: private LinkedList<Carro> carros = new LinkedList<Carro>(); Then I have methods of…
-
1
votes1
answer244
viewsError involving Nonetype
I made a very simple code to simulate lines in python: lista = [] def a(lista): return lista.append(str(input('Nome: ')).lower().strip()) def b(lista: list): if len(lista) == 0: print('A lista está…
-
1
votes0
answers31
viewsDijkstra Algorithm with Priority Queue - Why and Poll are not working, is my logic wrong?
I’m trying to apply the algorithm of Dijkstra using Priority Precise to leave it with logarithmic complexity T(N) = E*log(n) The first node manages to find its neighbors and relax its values but the…
-
0
votes0
answers750
viewsWhat’s the best way to queue
Guys, what’s the best way to queue in java. For example I select 3 files, these files stay in a queue until the process of reading and generating the report is finished, as soon as the report is…
-
0
votes2
answers1509
viewsOrder queue in c#
Since I already have this code: Queue<string> Fila = new Queue<string>(); //Declaração da Fila string opcao = "1"; //Define opção como 1 while (opcao == "1") //Enquanto ele quiser…
-
0
votes1
answer76
viewsWhat logic do I use to write this program in C?
I’m solving a list of exercises on stacks and queues and stuck on a question where ask to write the program according to pseudo code of the question. I have very little experience with C, so I’m not…
-
0
votes0
answers983
viewsProgram C queue and stack
I created a program in C, to remove (or copy) the values of a queue, using the output rules of a stack and add them into a new structure. But it’s not working the way I’d like it to. You are adding…
-
0
votes1
answer195
viewsStruct with char vector
So guys, I created this struct typedef struct{ int inicio; int tamanho; int fim; char *elementos[50]; }Fila; And I intend to create a char vector, just as I have created several times an integer…
-
0
votes1
answer160
viewsQuestion about row in C
Can someone analyze my code and see what might be wrong?. It’s a simulation exercise I got to do in college. Error: Code runs, but loops. Which while has a problem? Code: #include <stdio.h>…
-
0
votes1
answer251
viewsPrint a queue item by removing each item from it
I’m making a program that receives a string with words separated by comma that separates these words and lines them up (Until then I was able to do it quietly), then the program has to go removing…
-
0
votes1
answer550
viewsQueues (queues) are useful in Node.js, which is asynchronous?
I know that in languages like PHP, queues (queues) are often used to perform more "heavy" actions, such as sending a series of emails and the like. Therefore, taking into account the asynchronous…
-
0
votes1
answer497
viewsC++: Data structure / Queue
I made a data structure algorithm. I put all my knowledge into it. I can’t find the error. I leave the statement of the year below: Make a program that creates two rows F1 and F2, size 10, each.…
-
0
votes0
answers48
viewsSave text to visual
I’m trying to create a journal that has a reminder class to add only the reminder outside of the journal. Good people have a problem here at school and wanted to know something, how to make the text…
-
0
votes0
answers78
viewsHow to correctly insert data in a Javascript queue?
I have to enter some data in a queue, and I have the following functions : Insert Rpos - which will insert the data position, Removerpos - which will remove the data position, Lerlist - which will…
-
0
votes0
answers674
viewsHow to create QUEUE by passing STRUCT
I am trying to create a code in which I will insert 10 candidate names in a queue using a C structure. But I don’t have much knowledge in C data structure. I did it this way: #define TAM 5 #include…
-
0
votes1
answer237
viewsHow to add elements in Queue (Queue) continuously?
Below I have a code that he needs to do the following: Create a thread, then start it. When starting the thread, according to the time (random time) the program adds a value in the queue, after…
-
0
votes0
answers225
viewsInsert at the beginning of a circular row
I am working on a circular queue program where I want to implement a "queue break" function, where the user inserts a number and this number should be inserted in the queue spaces prior to f.com.…
-
0
votes1
answer100
viewsIs there a need to do something to ensure queue delivery (SQS) in AWS?
Assuming I have 2 Microservices "A" and "B" that are communicating through an SQS "F" queue". The microservice "A" can fall, "B" can also fall, the question is: should I take into account that "F"…
-
0
votes1
answer88
viewsList information of inserted objects in a Linkedlist
I am implementing an exercise requested in class regarding the insertion of objects in a Linkedlist (queue), but I do not know how to print the information of the objects on the screen. Follow the…
-
0
votes3
answers227
viewsHow to queue for Promises in Javascript?
I would like to know the best way to make a row of Promises in Javascript, so that the incoming Promise only runs after the previous Promise resolution. Example: var queue = [Promise1, Promise2];…
-
0
votes0
answers54
viewsDifficulty with cell array
I have to create, in C, a program that receives a train of N wagons and rearranges these wagons in ascending order from 1 to N; To rearrange, K waiting rails are used (value informed by the user);…
-
0
votes1
answer432
viewsQueue - Python (order)
Let’s simulate a queue situation at the bus terminal. Write a function that receives a NAME LIST (strings) that indicates the order of arrival of people to catch a bus from the terminal. Your role…
-
0
votes2
answers359
viewsHow to intersperse the values of two rows in C, in a third row?
I am trying to intermediate the values of two rows in C, F1 and F2, in a third row, inter, as function below (n would be the amount of F1 and F2 elements): Fila *intercala_fila (Fila *f1, Fila *f2){…
-
0
votes1
answer175
viewsQueue Laravel with Multitenancy
Boas Galera! I have a multi database application where every schema is a client, everything works perfectly, except the queues. I am directing all Jobs to the main database, Jobs records are…
-
0
votes1
answer42
viewsJquery - My What doesn’t work more than once in this animation. What can it be?
I created a function that when the mouse went over the DIV, it would make an animation by inserting and removing classes. But what I don’t understand is that the animation that’s inside the Queue,…