1,306 Topics
![]() | |
this code is correct expect that part which calculate the waiting time .. it should be 0 in first process but in output it equals the burst time of 1st process. how can i fix it ? #include <iostream> #include<iomanip> #include<queue> using namespace std; int main(){ queue<int> sc; float tat … | |
An assignment is given to prepare a prolog code for the following scenario. Five bikes with colors Red, Blue, Black, White and Grey are in queue. At least one in front of Red and at least one behind the Blue. At least one in front of Black and at least … | |
i know it's too much long but i really need some help to fix the program errors , am stuck within whole code lines and ma mind went confused .. it's airport simulation program the airport has one runway .. one plane can land and one plane can fly but … | |
i am new to queue..can somebody help me on this.im stuck at selction 2,3 and 4 #include <iostream> #include <queue> // Queue STL #include <time.h> using namespace std; int displayMenu() { int menu; cout <<"\t\tQueue Numbering System"<< endl; cout <<"`````````````````````````````````"<< endl; cout <<"1. Generate queue number"<< endl; cout <<"2. Get … | |
Alright, I am taking a summer course on Operating Systems and it has been a while since I took Java. I am trying to re-learn everything that I have forgotten. In my field, Java was only required as an introduction class and therefore my level of programming in a computer … | |
Please help me to build a list of examples of stack and queue in real life situation... Conditions: The object concerned must only one object. And the object must be tangible. Example: Queue (FIFO): The bullet in a machine gun..(you cannot fire 2 bullets at the same time) Stack (LIFO): … | |
How to print path of a binary tree after adding every node (branches of a tree have values 0 and 1)? For example, I have this binary tree: NODE1 has two children, NODE2 and NODE3. Branch from NODE1 to NODE2 is 0, and from NODE1 to NODE3 is 1. From … | |
C++ HELP: hello i made a program where user enter any message then fing its frequency and push it on the queue and sort it i want to sort it again by which element in the same piority entered please anyone can help>? for example for this message: "Eerie eyes … | |
I am trying to create a GUI using Tkinter, that reads in serial data. I eventually want multiple check buttons (for each possible port), and when the checkbutton is clicked, I would like the raw data from the port to continuously print onto a textbox in the GUI. I did … | |
Representing the list may or may not matter for a specific algorithm, but what does a list has to do with a stack/queue? | |
I have some JQuery code where an if-then statement is being run after a .slideToggle event. I just don't understand why the if section is still being run when it would appear the if statement is false. Code incoming: JQuery: $(function() { var pull = $('#pull'); menu = $('div#nav ul'); … | |
As you can see in the picture below, the whenever I hover over an element in the corner, the element is seeming to over-ride the border and is going over it instead of behind it. I'm assuming that's because of the "box-sizing: border-box;" in the CSS, how would I deal … | |
Ive made a java program to do automated tasks for a game. It takes screen shots with java.robot every 250 milliseconds. The program is working great, but it will always crash at around the 30min mark Im running this program on my mac, and this is the crash report that … | |
Ive made a java program to do automated tasks for a game. It takes screen shots with java.robot every 250 milliseconds. The program is working great, but it will always crash at around the 30min mark Im running this program on my mac, and this is the crash report that … | |
a java code that displays multilevel feedback queue scheduling[](http://www.) | |
Bank Waiting Times Customers often have to wait during the acquiring and consuming many products and services. Many banks participated in an experiment testing customers’ satisfaction with waiting in the line. The experiment produced the following data (as an example): Table 1. Waiting times of bank customers at different banks … | |
I am computer technitian. Unfortunately deteriorating economic conditions prevent me from finding an employment that matches my education and I also am unable to afford any formal education, but I digress. I have mentioned my education to clarify that I already have some knowledge with programming languages forehand, however these … | |
What a nonsense..... I was testing Tutorial Draft from Type of Article, and clicked on **Cancel** to see what? My testwriting added to.....moderation queue..... nice ;) Next thing - cannot see who voted on post/article...... I got -1 for my prev input (maybe thats correct name for that) and Ive … | |
Im trying to implement queue with a linked list i think i have the enqueue function correct but im having problems with the dequeue. I can get it to delete the first number but then the rest of the list is empty can someone point me in the right direction? … | |
How does a person go about adding an item to a queue within a gui? I have a textarea and a textfield. | |
Everytime I try to start a new topic at programmingforums.org I see this message: Xandy, you do not have permission to access this page. This could be due to one of several reasons: Your user account may not have sufficient privileges to access this page. Are you trying to edit … | |
i am working on an infix to postfix project and have reached a troubling point. one by one i must extract a string token from the string being inputted to the method infixtopostfix and one by one input them to the front of the deque named postfix. i dont understand … | |
how can I implement stack with one queue? the queue only can enqueue and dequeue | |
This is my last question over my current running project. For some reason, when i call my object in my main program it gives me errors. If I try to call it as: Checkout_Simulation sim_obj; Then I get errors: Checkout_Simulation.cpp:16: error: missing template arguments before ‘sim_obj’ Checkout_Simulation.cpp:16: error: expected `;' … | |
Hi programmers, i need to have a code to produce a round robin algorithm. Can you help me?? The requirements are that it must have: A menu system with the options (1 input data manually-if option 1 is selected a)to read data from file, b)to enter data by hand, 2-automatic … | |
Hi I am wondering how you would create a program for the knight tour instead of using recursion using a stack. I just want the ideal behind using a stack/queue instead of recursion please no code:) | |
Hello guys, I have a problem with Win32 C++ GUI. I'm creating a program and as one of the steps, I want to: 1. Let the user type somthing in the textbox, 2. Show it in another box/area, 3. Clear the typed text from the textbox. It would be something … | |
Python's double ended queue module makes Caesar's cipher easy. | |
I am using uploadify to upload images in php. After uploading the files, showing the progress bar as completed but the uploads folder is showing as empty. I have downloaded the script and just added a new folder to upload files as uploads folder. Here is my code index.php <!DOCTYPE … | |
write a c++ program that will do the . Enter 10 integer . Pushing on stack and poping on user choice . pushing on queue and poping form queue . Bring the integer in order. Display the calculator selecting oprtion by user choice (+,-,*,%) | |
PLease write a better code which is rather advance form using #include<queue> && #include<list> #include<iostream> #include<conio.h> #include <iomanip.h> using namespace std; const int size=20; // Patient Class class Patient { int age; char name[30],phy; public: Patient() { age=0; strcpy(name,""); phy=NULL; } void SetName(char* P_name) { strcpy(name,P_name); } void SetAge(int P_age) … | |
I can't get it to compile. I've tried so many things. The errors |29|error: expected unqualified-id before '{' token| |266|error: expected '}' at end of input| |266|error: expected unqualified-id at end of input| ||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===| Here is the code` #include … | |
Hey everyone, I have an assignment for tomorrow and I don't have any clue about this last question. "Q5- Consider a waiting queue in a bank with customers who are issued direction slips. They are asked to move to following service terminals depending on their customer numbers being divided by … | |
Simulate a patient’s lines using queues with enqueue ( ), dequeue ( ) and printQueue ( ) operations. Define a queue node in the following manner: typedef struct queueNode { int patientID; // Unique identifier; starts at 1; after 24 hours should be reset to 1 int checkupTime; // Random … | |
I need a maze solver that uses queue type breadth first search to find a way out of the maze and print it out. I already made a dfs one but i cant seem to figure out how to make a bfs one. Here it is: #include <stdio.h> #define red … | |
//I need help on where to go from here, mostly in the main. //The instructions and requirements can be found in the attachment. /********************************* Queue header file ********************************/ #ifndef QUEUE_H #define QUEUE_H #include <iostream> using namespace std; class Queue { private: class QueueNode { friend class Queue; int value; QueueNode … | |
//Hi all,can someone help with this problem //I am stack,need to output all functions in main,with user input for queue and stack,but first queue //This is my .h and .cpp of queue #include "stdafx.h" template <class ItemType> struct NodeType; template <class ItemType> class QueType { public: QueType(); // Class constructor. … | |
I am writing code to simulate a queue at a bank, which calculates the average wait time of all customers that enter the queue. I'm getting a STATUS_ACCESS_VIOLATION at line 56 of program3.cpp. I've had this error before and I'm pretty sure it happens because of an attempt to act … | |
The simulator will simulate one or more line-ups for customer service at a business. In the default setup, it will take between 1 and 6 minutes for a customer service request to be handled (random) once a customer reaches the front of the queue, after which the customer will leave. … | |
Hello All, I want to write a c++ code to sort a queue with the help of another queue and a non array element. Please help me getting the code. | |
How can I use seleium test case in groovy? such as clinking on links. test case <html> ... <body> <table> <tr> <td>open</td> <td>https://url.web:8010/</td> </tr> <tr> <td>clickAndWait</td> <td>link=service=homeLink</td> </tr> <tr> <td>clickAndWait</td> <td>link=name=contentLink,service=Queue</td> </tr> <tr> <td>clickAndWait</td> <td>link=BackLink</td> </tr> ... groovy script // Setup credentials def String[] credentials = new String[2] credentials[0] = … | |
Hey guys, Just got a quick question ... I am implementing a client GUI, and part of the requirements are that the client is able to start, stop and restart the server. This got me a bit confused since the client connects after the server is running. What I am … | |
Hey everyone, I am facing an implementaton issue here ... hopefully someone can give me a hand .. So I am implementing a client-server communication, where the server has to act as a print server. In other words, the client simulates to be next to a printer and can send … | |
#include<iostream> #include<conio.h> #include<string> using namespace std; struct node{ char data; node * next; }; void queue1(); void queue2(); void queue3(); void queue4(); void concatenate(); node * firstnodeptr1=NULL; node * lastnodeptr=NULL; node * firstnodeptr2=NULL; node * firstnodeptr3=NULL; node * firstnodeptr4=NULL; node *finalfirstnodeptr=NULL; int counter1=1,counter2=1,counter3=1,counter4=1; void main(){ char ch; do{ cout<<"enter the … | |
prog6.h #include "340.h" #include "binTree.h" #ifndef H_PROG6 #define H_PROG6 const vector < int > A{ 1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15 }; const vector < float > B{ 0.5, 1.75, -3, 4.25, 5.50, -6.75, 8, 9.25, -10.5 }; const vector < … | |
I am using a priority queue with a double as the priority. I am guessing this is cause so issues. I used these numbers first with no issues. 34.365681 34.481879 34.539832 36.715120 I then used these numbers and had a segmentation fault. 45.411042 40.481879 37.702110 38.951187 struct PRIORITYQUEUE { int … | |
I was reading this example of Priority queues and have several questions. http://matrixsust.blogspot.com/2011/11/basic-priority-queue-in-c.html #include<stdio.h> #include<malloc.h> void insert(); void del(); void display(); //How exactly do structs in structs work? Do you need to do anything special with them? Is this a //form of a linked list? Which part of this is … | |
I need a C++ program to implement a heap based priority queue which accepts job ID, priority number and submitter name as inputs. the program should heap sort whenever a new job ID or priority or submitter name is entered. The jobs that have maximum priority should be extracted (along … | |
Below is my queue code. Whenever I enter nos. 1 to 8, it will print 1-7 then replace 8 with 0. If there are any other mistakes in my code please let me know. import java.util.Arrays; import java.util.Scanner; public class Queue { private int[] elements; //integer values from scanner private … |
The End.