1,306 Topics
![]() | |
[INDENT]Hey All, This is my first post, so I'll do my best... I'm writing a Python app (using wxPython for the GUI) to copy large amounts of files. Each file is about 8-15 MB and there could be as many as 150,000 files. I'm currently using shutil (either [icode].copy(), .copy2() … | |
so I am working on Compositions i have to use the Java interface Queue<E>, create a class named InstructorQueue that implements the Queue interface and all 5 of the operations of a Queue collection interface. You may choose any of the Java collections (choose wisely) as the underlying container. so … | |
As we know priority queue is known for its first element is always the greatest of the elements it contains but how can I make the first element to be the lowest element of them all? [CODE]// priority_queue::push/pop #include <iostream> #include <queue> using namespace std; int main () { priority_queue<int> … | |
![]() | Hello! First time Poster :) I'm trying to create a Java Web Crawler. What I want it to do is pass the crawler a starting site, a max depth/levels of sites to go to (as opposed to number of pages) and save files like images and documents. The problem is, … |
Hi, I'm having issues with a program that concept-wise sounds very simple. The program should read in data from a text file (attached a2.txt), and perform stack and queue operations upon the data. The data consists of long math problems, dealing with order-of-operations. The correct output that should be appearing … | |
I get this error message while I'm trying to use copy constructor, I understand why the error message is showing but I don't know how to resolve it. #include <iostream> #include <iomanip> #include <fstream> #include <sstream> #include <string> #include <ctime> #include <cmath> #include <vector> #include <cassert> using namespace std; class … | |
Hi all, The program I'm making needs to basically interpret long math operations (see the attached text file) and compute them. Simple right? I have to use stacks and queues to reorder the operation into the desired output (the output will compile properly if you run the program as it … | |
Hey, So I got this program all working except some of the output is weird pictures instead of letters. The first time it outputs it works fine, but after that it only partly works. Here's the code: [code] #include "queue.cpp" #include <iostream> #include <fstream> #include <iomanip> /******************************************* * class Priority … | |
Trying to make a circular queue, but its not working right. Enqueue is just adding things to the end, every time. my output is: Numbers in Queue: 1 2 3 Numbers in Queue: 2 3 Numbers in Queue: 2 3 6 it should be: Numbers in Queue: 1 2 3 … | |
Hello, I have to make this program that has two queue's. It takes input from a file, and each line in the file has a number and character. If the number is a one, the character is stored in the highQueue. If it is a 2-5 it is stored in … | |
My Project is to create a MaxHeap priority queue to sort voters. Everything compiles fine but the linker gives me a wierd error: [code=c++]1>Main.obj : error LNK2019: unresolved external symbol "public: __thiscall MaxHeap<class Voter,class SalaryCompare>::MaxHeap<class Voter,class SalaryCompare>(class Voter * * const,int,int)" (??0?$MaxHeap@VVoter@@VSalaryCompare@@@@QAE@QAPAVVoter@@HH@Z) referenced in function _main[/code] Anyone have any ideas? … | |
Hi, guys i need some help! i need to make a txt file with the "-A" command (in shell). that already is implemented in the client, then the client send the file thru sockets and arrive to the server, the server save the file in his directory. But the code … | |
Hey, I am having trouble with the file I/O part of this program. It seems to start at the end of the files contents and not go into the while loop. [code] #include "queue.cpp" #include <iostream> #include <fstream> #include <iomanip> /******************************************* * class Priority * * Takes input from file … | |
Im trying to make a circular queue. Why does empty keep saying my q is empty? [CODE]using System; namespace CQueue { class Program { static void Main(string[] args) { List queue = new List(); Double number = 9.13; queue.Enqueue(number); queue.Enqueue(number); queue.PrintQueue(); } } } class List { object[] thisIsQ = … | |
Hi there, I am trying to write a queue ADT using a linked list in C and have hit a snag initialising my queue... [code=c]typedef struct qNode{ int element; struct qNode *next; } qNode; typedef struct Queue{ struct qNode *front; int len; } Queue; Queue create_queue() { Queue q = … | |
code:: [code] import java.io.*; import java.util.*; public class Global{ public static int flag=0; } interface filebackedfifoqueue { void put(String msg); String get(); } public class trying{ public static void main(String args[])throws IOException{ int ch=1; String msg; msg = new String(); while(ch!=0) { BufferedReader stdin=new BufferedReader(new InputStreamReader(System.in)); System.out.println("\nMenu"); System.out.println("\n0.EXit"); System.out.println("\n1.Publisher"); System.out.println("\n2.Subscriber"); … | |
In a queue, where elements in integers are added, how do i do this: Inside the queue: 1 2 3 5 6 8 when I want to add a number, say 4, the output should be like: 1 2 3 [B]4[/B] 5 6 8 in which it inserts in between … | |
When you put an item on a queue, how do you show the items inside the queue? do you use peek method? the situation is a linked queue... | |
Hello, have a good day everyone. I am confused if what elements are to be inserted in a queue. Are only numbers can be inserted in a queue? Are letters or word(e.g."Subject") can be inserted in a queue? Thank you ahead everyone. Have a nice day. | |
Hi I am using to design flow to launch 3 Vmware images using queue. Can you please help me. I have just started. If you have links or help related to Vmware launching i.e. 3 images at a time. thanks in advance Regards, Mahesh | |
[QUOTE=ArkM;657823]You are welcome![/QUOTE] Simulation of an Airport Runway An airport is developing a computer simulation of air-traffic control, which handles events such as landings and take-offs. It is a small busy airport with only one runway. In each unit of time one plane can land or one plane can take … | |
Hi guys, i'm doing a peice of coursework for uni where we are required to implement a Min-heap/priority queue for calculating the Minimum Spanning Tree. In a min heap, the parent's value needs to be smaller than that of its two children. I've tried to implement this,giving the following list … | |
My application creates a window in the main thread, but I want the message loop in a separate thread. Is there any way to catch the messages from that window while an another thread? I tried giving GetMessage that window's handle, it didn't work. I could just create the window … | |
I have openvpn 2.1_rc7 running on ubuntu 8.04. I set up a user that has all traffic and dns pushed through the vpn. On windows the vpn client works just fine, all traffic and dns requests are pushed through the vpn. When I boot the windows pc with a live … | |
Ok I have a form with 4 comboboxes and 1 listbox, this form searches the db for the corresponding record to the search, the user then selects an item in the listbox, clicks a command button to open an new form with various textboxes corresponding to the db fields. On … | |
![]() | I just bought two gigs of RAM. However, when installed, upon startup, after the windows XP loading screen, my screen just goes black. I checked online and apparently my motherboard supports a max of 2gb. I tried 1.5, using my old RAM, same result. http://www.measham.force9.co.uk/advent/pc/3316.htm my pc/motherboard. However, my video … |
I'm trying to display some object information and it seems to work when I use a pointer to the object, but not when I pass the pointer to a different function. Hopefully, the code will better explain: [CODE] struct pcb { int pid; string name; } void showData(pcb* PCBobject) { … | |
Hello everyone, I am looking for open source message queue implementation in Java. Does anyone know where can I find a 100% pure Java implementation of message queue with basic features? It is better an implementation which does not rely on other components and can be used as a utility … | |
Hi, I'm facing a problem. I need the user to input a string, and then I have to add the string character by character to a queue so I can perform some parsing on it, I'm doing something wrong that I don't know. I've used sizeof(), length() and strlen() built … | |
Hi all... I'll try my best to keep this query as compact as possible... I'm currently working on a project that involves generating alarms/notifications for the Automated Distributed Control System at the company. Well, for this, the team has created Notification Client and Notification Server Applications. There is also another … | |
Sliding Window Mechanism The sliding window mechanism is used in many protocols at many different layers. The sliding window helps in solving a number of problems. Retransmission of lost or damaged frames (or packets) and flow control problems are just examples of that. The sliding window protocol in its simplest … | |
Hello everyone....again. I have a program that is using a queue. I have a class member function that is to traverse the queue, and output the smallest number in the queue. Pseudo for this function is: Compare the front and front->next. Whichever is smaller, keep it. Traverse the queue until … | |
Hi, I am coding a c++ based simulator, for which i need to implement a message queue. The structure of the problem is such. We have a program that contain a "queue" of messagePacket messagePacket in this case is a [icode] pair <int , message> [/icode] where message is a … | |
Hi everyone, I am a U.student from China, I would like ask a question about my assignment. For the directed graph, I would like to perform topological sort for sorting up nodes, but I encountered some problem in queue which is able to be removed or added with certain elements. … | |
Hi, I am currently working on an elevator simulation in MS Visual C# that will eventually involve at least 2, preferrably 3 elevators running across 5 floors. There is currently one elevator that will service all floors when a call button is pressed, though adding a 2nd one brings up … | |
getting straight to the point, my program compiles fine.. it shows 0 errors and 0 warnings... but when i run my program, it just crashes.. u know the usual dialog box with buttons like send dont send and debug.. .. here's the code.. [CODE] // include the basic windows header … | |
I suppose this would be an advanced case. I have *at least* two viruses and some rootkits– the go.google virus and the adoginhispen Trojan/downloader. My internet connection is being rerouted through an external IP address. Search engines results redirect me to random web pages. I have upload and download activity … | |
Busy writing an infix to postfix converter.(I'm a strange guy. I like to do those things from time to time...) I have a class Expression which is in essence : [CODE=csharp] [StructLayout(LayoutKind.Explicit)] //in c/c++ this is a union public struct Valoper { [FieldOffset(0)] public int Value; [FieldOffset(0)] public Oper Operand; … | |
First of all, I'm a total beginner which is the reason that probably my code contains a few simple and dumb mistakes...but how you see I'm working on it ;) My task is to write a program that contains a queue which will be returned in reversed order. But my … | |
I am having a problem writing the last part of my code for this program. There is a DFS function that I need to write that is included in the header file of the graph.h my program. Here is the sample of code that my instructor gave me. [code=c++]template<class VertexType> … | |
![]() | Objective: Write a C program that will accept an infix expression from the user, build an expression tree using the algorithm described in class and then traverse the tree recursively three times to produce the prefix, infix and postfix expressions. Notice that the infix expression produced from the tree should … |
The function that I am having a problem with is in the middle of this seperated from the rest of the code. [code=c++] #ifndef GRAPH_H #define GRAPH_H #include <string> #include "queue.h" using namespace std; class FileOpenError // Exception class -- cannot open input file { }; struct EdgeNode // Structure … | |
I've seen a lot of different possible ways to do so, but I was wondering what people thought the most efficient way was. | |
ok i have everything done for my program but it says i didnt declare myQ i dont understand some help would be nice here is the main #include <iostream> #include "queue.h" using namespace std; int main() { Queue myQ; int i; for(i=0;i<SIZE;i++) { myQ.enqueue(i*2); } myQ.dequeue(); myQ.dequeue(); cout<<myQ.front()<<myQ.back()<<endl; while(!myQ.empty()) { … | |
This grap is kicking my butt. I am not sure how to do it. Can someone please help explain these to me. [code=c++] // graph.h // -- adjacency list representation of a weighted graph // #ifndef GRAPH_H #define GRAPH_H #include <string> #include "queue.h" using namespace std; class FileOpenError // Exception … | |
I don't knof if that's the right place, since it's not c++ specific but a windows development doubt... (and sorry my english) My problem is kinda stupid, but i don't know whats happening, im tryng to show a popup menu when user press the righ mouse buttom, in the cursor … | |
I am having a problem with a class I am writing. I have defined a whole bunch of methods defined that the compiler is telling me in the implementation are different. The errors are: [QUOTE] 1>------ Build started: Project: prog6a, Configuration: Debug Win32 ------ 1>Compiling... 1>main.cpp 1>c:\users\philip\documents\visual studio 2005\projects\cs211\prog6a\prog6a\avltree.h(186) : … | |
Hi, I am working on medium scale application around 14K lines of code. So can't post the code. I am using queue to throttle the speed from one end to other end. The problem i am facing is "queue is giving some garbage value on queue.front() function call after say … | |
First I'll explain what I'm trying to do. I am programming an airline check-in line. I am using a queue ADT to represent a the line. The data type of the a queue is a pointer to my Customer class. In my Customer class, whenever a customer leaves the line, … | |
I am trying to implement a airline check-in line. I have three types of customers-generic, frequent flyers, and elite. Elite further breaks down down into gold, silver and bronze. The ranking follows that generic and frequent flyers are the lowest priority of customers. The check-in clerks can wait on these … |
The End.