1,306 Topics

Member Avatar for
Member Avatar for CSloan7597

Hey everyone. I have recently decided to try and learn how to use java Sockets for client/server communication, as well as swing and threads, etc. and have (pretty much) completed a small client server application. The application is basically a syntax-highlighting notepad, a client swing GUI which connects to a …

Member Avatar for CSloan7597
0
295
Member Avatar for coolbeanbob

Hello all, Lots of code here, but much of it can be ignored. I am getting an error on line 34 of HashTable.h, stemming from line 50 of main.cpp. I am trying to create an array of lists in the HashTable.h file. Error code is: \HashTable.h(34) : error C2440: '=' …

0
88
Member Avatar for gopikrish

I am trying to publish my ear and war modules into Oracle weblogic portal 10.3.0.0 server using workshop. I am using pointbase DB. But publishing failed since I was getting the following error, weblogic.application.ModuleException: Exception preparing module: EJBModule(netuix.jar)Unable to deploy EJB: ProxyPagePersistenceManager from netuix.jar: Exception while attempting to deploy Security …

0
77
Member Avatar for coolbeanbob

Hello, I need to take a four digit integer and re-arrange it as follows... pre: 1234 post: 3412 I have been searching for a method to convert a char array to an int, so I can use the code below. Am I using atoi() incorrectly? The result I get when …

Member Avatar for coolbeanbob
0
447
Member Avatar for sharkfan69

I'm having trouble figuring out why my extractMax function isn't working correctly. I'm reading from an input file that looks something like this: [CODE](arule, 12), (brule, 21), (zrule, 70), (drule, 25), (erule, 10) (frule, 3) (grule, 20), (srule, 100)[/CODE] It should read the priorities into an array, build the heap, …

0
51
Member Avatar for BuhRock

So I have to program this MVC GUI of a checkout line. I have a gui that has 10 registers. Each register has a queue of customers. There is a button that when clicked, will generate a customer and the customer will be entered in the line with the shorted …

Member Avatar for JamesCherrill
0
213
Member Avatar for learner guy

hi can anyone help me in making this code work ..i will be very grateful to him/her [CODE]#include <iostream> #include <stdio.h> #include <conio.h> #include <windows.h> using namespace std; #define BLACK 0 #define BLUE 1 #define GREEN 2 #define CYAN 3 #define RED 4 #define MAGENTA 5 #define BROWN 6 #define …

Member Avatar for WaltP
0
392
Member Avatar for str91
Member Avatar for Adak
0
92
Member Avatar for datuna

unfortunately following code returns zero as output [CODE]#include<iostream> #define MAX 100 using namespace std; int graph[MAX][MAX]; int queue[MAX]; int head,tail; int parent[MAX]; int V,E; int s,t,fTotal; int F[MAX][MAX]; //breadth First search bool reachable(int s,int t){ bool found=false; head=tail=0; int vq; memset(parent,255,sizeof(parent)); queue[tail++]=s; parent[s]=s; while(head< tail && ! found){ vq=queue[head++]; for(int …

0
69
Member Avatar for BuhRock

So I have to implement a checkout line using a priority queue. I'm really stuck. I have 3 classes, a Register class, Store class, and customer class. Each customer has a service time which is the time it takes to check out. There are ten registers. Reach register has a …

Member Avatar for BuhRock
0
154
Member Avatar for abysspell

Hi All, I'm working on building a program that will allow a user to encode and decode a string of characters. I have a priority queue of all the characters and their corresponding frequencies, information needed to make the Huffman Tree, however this is where I'm stuck. How would I …

0
39
Member Avatar for jigglymig

I am having trouble with the program not pushing the strings and only part of the characters from the file. I really hope one of you can help me because this is due in the morning here is the actual assignment Learning Objectives: The purpose of this lab is to …

0
65
Member Avatar for glamourhits

Your task is to implement Stack and Queue classes for Objects. Both Stack and Queue should extend Collection, which is an abstract class that will be given to you. You will need to download and modify the NetBeans project that goes along with this assignment. Stack should have the following …

Member Avatar for Taywin
0
589
Member Avatar for triumphost

I have a game client that has a button to allow input and when toggled on it will block input.. Thing is sometimes even when u toggle it off, it still blocks user input.. Other times there is an extremely HUGE delay before it accepts input.. I was thinking if …

Member Avatar for ret801
0
224
Member Avatar for sunn shine

i hv 2 write a code for queue fifo rule for patients visiting doctor's clinic.. can any1 atleast tel me the algo? i'll implement it by myself...

Member Avatar for WaltP
0
118
Member Avatar for Asimina

i want this animation to start from the beginning but i dont know how to do it. im using scriptaculous framework. here is my animation: [url]http://silviadwomoh.com/loop/[/url] and here is my code: [CODE] <script type="text/javascript" language="javascript"> //fade div 1 new Effect.Fade('anim1', {duration: 1, from: 0, to: 1, afterFinish: function (one){ //after …

Member Avatar for Asimina
0
198
Member Avatar for biggnlarge

I am currently creating a queue ADT for one of my classes in college. We are using a linux ssh server for compiling our programs, but i am writing the code in windows. When i compile i get no errors, but when i run it goes fine until it hits …

0
124
Member Avatar for ayeshashahid

i need help in making the size of the array to n size in queues.i have made a program help me in it. [CODE]////##############///// #include <iostream> using namespace std; #define MAX 5 class queue { private: int t[MAX]; int al; int dl; public: queue() { dl=-1; al=-1; } void remove() …

Member Avatar for Mr. K
0
114
Member Avatar for ronster342000

I am writing a program that reads customer info from a file, then reads transactions from another. I am building my ADTs for this as I cannot use templates for this class yet and have a cpl of issues. The linked list contains the clientID as an int and a …

Member Avatar for MonsieurPointer
0
246
Member Avatar for edbtzy

I am trying to create a client to connect to a mysql database using sockets. I have the following code but of course, its not working to my advantage. Right now, this code connects to a server file located on a linux machine...i havent coded it yet to connect to …

Member Avatar for gerard4143
0
192
Member Avatar for HASHMI007

[QUOTE]Que.h Header file [/QUOTE] [CODE]template < class T> class Que{ public : Que(); Que(int max); ~Que(); int isFull()const ; int isEmpty()const ; void Insert( T newItem); void Remove(T & item); private : int front , rear; int maxQue; int count ; T * Items; // Dynamic Arry Implementation }; template …

Member Avatar for HASHMI007
0
179
Member Avatar for bhaskerlee202

Hi All, Is there any Mechanism similar to "Oracle AdvancedQueue" in Altibase database...? Any one have idea about Altibase database please help. Any help will be appreciated. Thank You.

0
62
Member Avatar for iamnot

This code is give in a data structures book I issued from my library. I am not able to understand how the functions are working. I am aware of the algorithms. Can anyone please explain how qinsert(),qremove(),build(),encode() are working.Please explain in detail [CODE]#include <stdio.h> #include <string.h> typedef struct node_t { …

Member Avatar for Mouche
0
236
Member Avatar for mikecolistro

HI there! So ive been looking around on how to reset the function clock() and the examples ive found have not worked, basically in my code i have to loops, the first i want to run for 15 mins then the inner loop run for one, so i assigned a …

Member Avatar for nezachem
0
306
Member Avatar for swissknife007

[CODE]#define max 50 struct code{int bits[max];int start;};typedef struct code code; struct node{int freq;int father;int isleft;};typedef struct node node; void insert(int,int); int del(int); main() { code cd,code1[max]; node node1[max*2-1]; int i,k,n,p,p1,p2,root,rootnodes; char symb,alph[max]; for(i=0;i<max;i++) alph[i]=' '; rootnodes=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%s""%d",&symb,&node1[i].freq); insert(rootnodes,i); alph[i]=symb; } for(p=n;p<2*n-1;n++) { p1=del(rootnodes); p2=del(rootnodes); node1[p1].father=p; node1[p1].isleft=1; node1[p2].father=p; …

Member Avatar for vedro-compota
0
135
Member Avatar for altXerror

ok. so i'm having trouble with the Windows API. i'm just learing how to use it, so i don't know much about it. anyways, i just wanted to create a window and have it displayed then catch the exit message and close, but VC Compiler is throwing errors. 1>c:\users\furrix\documents\visual studio …

Member Avatar for altXerror
0
342
Member Avatar for Jfunch

I have a program that uses two threads, one that adds some numbers and the other takes the sum and finds the average. I used a blocking queue to pass the sum to the other string. I have no problem queue.put() to put the total in the queue and then …

Member Avatar for JamesCherrill
0
221
Member Avatar for coolbeanbob

Hello, I am working on a binary search tree program. In main, line 21, I am invoking the Binary_tree insert function. I get a compiler error on line 178 of the Binary_tree file. The error says "error: cannot convert 'const int*' to 'Binary_node<int>*' in assignment. They both seem like ints …

0
69
Member Avatar for coolbeanbob

Hello, I am getting the following error on line 96, and also for every function implementation below line 96. What do I need to add? error: expected unqualified-id before 'void' [CODE] //Binary_tree class interface template <class Entry> class Binary_tree { public: Binary_tree(){} //constructor //Post: An empty binary tree has been …

Member Avatar for coolbeanbob
0
1K
Member Avatar for programing

hi my program should implement queue using stack h make a code but i still have error if an one can tell me what is he error [CODE]#include<stdio.h> #include<conio.h> #include<process.h> int in_top=-1; int out_top=-1; void in_stack_push(int item); int in_stack_pop(); void out_stack_push(); int out_stack_pop(); int insert_queue[20],delete_queue[20]; void main() { int i,ch,item; …

Member Avatar for trin12345
0
178
Member Avatar for Cross213

What's wrong with this code, I'm getting LNK errors [CODE]#include "Queue.h" int main() { Queue <int> q; // q is an object q.showQ(); q.insert(72); q.insert(36); q.insert(43); q.showQ(); q.remove(); q.showQ(); return 0; } [/CODE]

Member Avatar for Cross213
0
153
Member Avatar for Sunshine2011

Within this code I would like to save the data which was input through a function "SavePlayer", but it doesn't work. The compiler "says" that object "a" ist not known. Probably the bold line [CODE][B][I]a.SavePlayer(manyPlayer,Player a); [/I][/B][/CODE]is wrong, but I have no idea how to solve the problem. Maybe someone …

Member Avatar for dluz
0
101
Member Avatar for triumphost

Hi All, I'm making a website for my school project but I have a problem with the pre tag. I used a table to define the layout of my site. But now I want to add content using the <pre> tag and it stays in the center -__- even when …

0
73
Member Avatar for FRGT/10

Project: Binary Tree ADT Transformers: 1. Add Node (You may follow BST rules for adding and deleting) 2. Delete Node Observers: 1. Node Count 2. isRoot 3. isParent 4. isChild 5. isSibling 6. isAncestor 7. isDescendant 8. isLeaf 9. Indegree 10. Outdegree 11. Traversals (pre, in, post, level-order) .CPP CODE …

Member Avatar for homeryansta
0
238
Member Avatar for MattJones

Hey Guys, I'm working on a C++ program for school. Basically the Program inputs a file of points and outputs an svg file that contains the Graph with the least number of edges. We need to implement this with the Kruskal and Prim algorithm, and the algorithm needs to be …

Member Avatar for Fbody
0
205
Member Avatar for manie
Member Avatar for coolbeanbob

Is this possible? I need to read the data from a stack (and a queue), but I need to maintain the stack (and queue) so they can be used later. I have not found any useful information online. My only thought is loading the data into a parallel stack before …

Member Avatar for mrnutty
0
215
Member Avatar for coolbeanbob

Hello Everyone, I am working on a package delivery simulation. I believe I have a bug. Lines 47-53 give the user the option to choose a particular moment of time where they can see a snapshot of the system's status. The program seems to break down if I choose to …

Member Avatar for coolbeanbob
0
184
Member Avatar for coolbeanbob

Hello Everyone, I am getting the following error on line 12. "variable or field 'start' declared void" I have deleted quite a bit of code, in case your wondering what the program is supposed to do. I don't understand why the compiler would have a problem with this function being …

Member Avatar for coolbeanbob
0
469
Member Avatar for scirdan

I am trying to port some software from an embedded product into the windows environment using VS2010. Its C code and it has 2 threads that send messages to each other. Whats the best method for communication? I am having a hard time finding the right way to do a …

0
44
Member Avatar for Nikki2

My direct 3d option is unavailable and I have no clue how to fix, any help will be very appreciated, here the information from my DxDiag ------------------ System Information ------------------ Time of this report: 8/23/2011, 12:28:40 Machine name: ME Operating System: Windows XP Home Edition (5.1, Build 2600) Service Pack …

Member Avatar for pjhutch
0
288
Member Avatar for maninaction
Member Avatar for Mouche
0
62
Member Avatar for Reverend Jim

I thought I'd play around with vPython so I wrote a 3D breakout game (I used to have one on my Amiga and I haven't seen one for Windows). Everything is done except for one wee problem. I want to idle while waiting for the user to click the left …

Member Avatar for Reverend Jim
0
275
Member Avatar for sirlink99

I get this error when I run my applet on a website [CODE] Java Plug-in 1.6.0_26 Using JRE version 1.6.0_26-b03 Java HotSpot(TM) Client VM User home directory = C:\Users\Adam ---------------------------------------------------- c: clear console window f: finalize objects on finalization queue g: garbage collect h: display this help message l: dump …

Member Avatar for mKorbel
0
517
Member Avatar for purijatin

Hello, The problem is that some how due to garbage collection timings I am having tradeoff's in my performance. The issue can be generalized as: [CODE] public void loop(BlockingQueue<Runnable> queue) { for(Runnable runnable : queue)//line2 { runnable.run();//line4 if(Math.random() > 0.9) System.gc();//line5 } //line7 } [/CODE] Now normally the queue passed …

Member Avatar for purijatin
0
131
Member Avatar for Chub97

I am having a bit of trouble with general PHP video uploads and then converting them into a FLV flash file for playback. I have heard something about installing something called FFMPEG but I cannot not find any tutorials any where for doing this. So basically what I am looking …

Member Avatar for Chub97
0
179
Member Avatar for michelleradu

Error C2662: 'Event::GetTime' : cannot convert 'this' pointer from 'const Event' to 'Event &'. This is my code: [CODE] #include <iostream> #include <queue> #ifndef Person_h #define Person_h #include "Person.h" #endif using namespace std; enum EventName { _SendMessageToUserInterface, _SetPNOld, _IntroduceInfection }; class Event{ int time; EventName name; Person person; public: Event(int …

Member Avatar for michelleradu
0
362
Member Avatar for Cross213

I would like to know how the isFull() function works for a Stack and a Queue, but by implementing the Stack as a dynamic array(without a predefined size) and implementing the Queue as a linked list.

Member Avatar for Cross213
0
1K
Member Avatar for goco17

is it possible to have a back() in stack....i know queue and vector has it... [CODE] #include "Card.hpp" #include "Card2.hpp" #include <stack> using namespace std; typedef char StackItemType; bool Card::isEmpty() const { return cards.size() == 0; } Card Card::see() const { return cards.back(); } Card Card::pop() { Card c = …

Member Avatar for jonsca
0
4K
Member Avatar for kaellee

#!/usr/bin/env python from socket import * import time import sys import select import threading import Queue _name_='_main_' loop=2 def client1_chat(connection1,connection2,i): while 1: data1=connection1.recv(1024) if data1=='end': end1=data1 connection1.close() connection2.send('%s' % data1) break else: connection2.send('%s' % data1) def client2_chat(connection2,connection1,i): while 1: data2=connection2.recv(1024) if data2=='end': end2=data2 connection2.close() connection1.send('%s' % data2) break else: connection1.send('%s' …

0
71

The End.