1,306 Topics

Member Avatar for
Member Avatar for Xufyan

here i've created the first applet but it is not working, [CODE] import java.applet.Applet; import java.awt.*; public class FirstApplet extends Applet { public void paint(Graphics g) { g.drawString("Look at me, I'm a Java Applet!",10,50); } } [/CODE] i am getting no errors but when i am opening the html file …

Member Avatar for _aven
0
241
Member Avatar for vuyiswamb

Good Day Guys This is an MVC , JQuery, KNockout.js Question. i have a Controller Action that is being Defined like this [HttpGet] public JsonResult SearchCars(string searchString) { string[] searchTerms = (searchString).ToUpper().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); string[] searchTermSounds = new string[searchTerms.Length]; var list = (from r in Cache.CarSearchItems …

Member Avatar for stbuchok
0
260
Member Avatar for Rouf mir

Can someone tell me how to implement priority queues using arrays.Please help!!!!!!

Member Avatar for princysharma90
0
120
Member Avatar for basketmen

Hi guys, i have about 11.000 Delivery Queue (Outgoing Emails) in WHM > ConfigServer Mail Queues its about announcement email my server rebooted, and now there is no one Outgoing Emails left, in WHM > ConfigServer Mail Queues > Delivery Queue can i get it back? or some log where …

0
101
Member Avatar for ChristianOncken

from socket import * from time import time, ctime import thread import Queue import os class ThreadSafeConsole(Text): def __init__(self, master, **options): Text.__init__(self, master, **options) self.queue = Queue.Queue() self.update_me() def write(self, line): self.queue.put(line) def clear(self): self.queue.put(None) def update_me(self): try: while 1: line = self.queue.get_nowait() if line is None: self.delete(1.0, END) else: …

Member Avatar for ChristianOncken
0
2K
Member Avatar for david56connor

Hi there, I have a piece of code that I made to handle the joining of 'characters' in to a 'raid' on a game. The program refreshes a page to check if the 'raid' is available, if it is, it 'forms' the raid and 'joins' the characters. The joining process …

0
141
Member Avatar for Bladtman242

Hi, for a school project (exam actually), we've written a ternary trie for text-completion. We fill it with about 400.000 lines of text (13 MB in total, as UTF-8). Now, java represents characters in UTF-16 i believe. So thats 26 MB, + another 26 for saving the complete strings in …

Member Avatar for Bladtman242
0
217
Member Avatar for Massa3332

public class QueueAsArray implements Queue { protected int[] myArray; int count, size, rear = 0; public QueueAsArray(int newSize) { myArray = new int[newSize]; size = newSize; count = 0; } public void purge() { int index = 0; while(count > 0) { myArray[index] = 0; index++; count--; } rear = …

Member Avatar for JamesCherrill
0
216
Member Avatar for XodoX

I have a linked list where the input is read into. The 2 types of input have to go into a queue. 1 queue for each type. I suppose that the output line of the linked list can be used to read it into the queue ? I know it …

Member Avatar for XodoX
0
161
Member Avatar for Violet_82

Hello there, I wonder if you can help me with a jquery issue. I am at the moment reading a book about it and there is an example in there, which you can see here http://antobbo.webspace.virginmedia.com/various_tests/worktest/chapter_03/09_animated_navigation/index.html If you hover on the navigation you will see the jquery effect kicking in …

Member Avatar for pritaeas
0
318
Member Avatar for XodoX

I think this has something to do with process scheduling. (1st process) Start 0// starts at 0ms Run 10 // runs for 10 ms Disk 0 // no idea what this does, but it takes 10 ms Run 30 // run 30 ms End // terminates (2nd process) Start 5 …

Member Avatar for asrockw7
0
194
Member Avatar for SAM2012

Hi, I need help in designing a function that would model the arrival of the messages in the queue following poisson distribution. I shall be grateful for this kind help.

Member Avatar for SAM2012
0
183
Member Avatar for warpstar

Can someone explain the code below? Is .next an operator in java that pushes the pointer to the next node in the linked list? Node E < -- type node? public E dequeue ( ) throws EmptyQueueException { if (isEmpty ( )) { throw new EmptyQueueException (”Queue under flow”) ; …

Member Avatar for warpstar
0
146
Member Avatar for Lomholdt

Hello. I recently finished my 1. semester in Computer Science, and got a good fundamental idea on programming in Python. Our exam assignment whas to create a game where we had to smash robots by clicking around with the mouse. The GUI was provided by our instructor. Now we newer …

Member Avatar for Lucaci Andrew
0
268
Member Avatar for Fazura

Here's my code in which i am getting SIGABRT for 7 test cases :- #include<cstdio> #include <queue> #include <vector> using namespace std; int main() { //variable declarations int i,j,steps=1,n,m,s,t,tmp,tmp1,visited[1000001]; vector<vector<int> > buildings ( 3501, vector<int> ( 3501 ) ); queue<int> tovisit; //take inputs scanf("%d %d",&n,&m); for (i=1;i<=m;i++) { scanf("%d %d",&tmp,&tmp1); …

0
113
Member Avatar for ericstern

Hi, I am learning python coming from a C background and I am trying to understand how python lists work. I took a look at the built in methods, and I am wondering if they are implemented like a linked list. The reason I am wondering this, is because I …

Member Avatar for ericstern
0
248
Member Avatar for chophouse

I'm writing a script to populate a list with the last 5 albums frm a list of what's about to play. My query works in terms of retrieving the values, but the list populates with a set of parens and an extra comma added to each returned value. Any ideas …

Member Avatar for chophouse
0
145
Member Avatar for MrEARTHSHAcKER

Hi, There is short explanation of queue at cplusplus.com site which tells that queue should contain front() and back() functions. As I have tested in VC++, if I use queue from <queue> and call any of these functions for an empty queue, program crashes. Could this problem be solved by …

Member Avatar for MrEARTHSHAcKER
0
2K
Member Avatar for rajesh1158

In the below code, I want to know the significance of 10 while creating a PrioriyQueue. I know its the initial capacity but what does it mean?? I replace 10 with any positive number and the output remains same. import java.util.*; class Test { static class PQsort implements Comparator<Integer> { …

Member Avatar for JamesCherrill
0
201
Member Avatar for anonymous0502

How to share variable between multiprocessing and Pyside application. I am a newbie.Can anyone help me?Any suggestion will be appreciated.Thanks very much. This is my demo: #!/usr/bin/env python #coding:utf-8 #demo:pyside gui application communicate with multiprocessing.Process() import sys,time import multiprocessing as mp import logging,logging.handlers from PySide.QtCore import * from PySide.QtGui import …

Member Avatar for vegaseat
0
544
Member Avatar for emilio

I'm having doubts about a need to use a singleton pattern in a web service. I'm building a web service that is acting as a server side for multiple clients. I was thinking about making my business logic classes a singleton classes but i'm having doubts because of the following …

Member Avatar for hericles
0
161
Member Avatar for PuQimX

i have read a txt file into queue just like below example which is i can do it.. the problem is i how to read Tab Delimited Files which i want file size to multiple by 0.6... because i want to create handle a printer simulation using queue...sorry for my …

Member Avatar for PuQimX
0
161
Member Avatar for SAM2012

I need your help regarding the message acknowledgement in the queue when the message reaches at the queue. Any help would be highly appreciated. the code for my queue class is; struct ListNode { ListNode(gcroot<message^> msg); gcroot<message^> msg; ListNode* next; }; ListNode::ListNode(gcroot<message^> msg): msg(msg), next(nullptr) {} public class queue { …

Member Avatar for DeanMSands3
0
190
Member Avatar for MrEARTHSHAcKER

Hi, I am learning queues and I have found 2 examples. Both examples represent queues with limited size, for example 30. But <queue> allows us to create queue that is not limited by ***pre-set** queue size. Can anyone explain me how have they created something like that? Thanks! ***By *pre-set* …

Member Avatar for MrEARTHSHAcKER
0
247
Member Avatar for zuzzles

So i came across this issue that I can run my applet fine and it creates my file (exe) until i attempt to do so in a browser (firefox, IE, etc). Its signed and asks for permission and gives no erros but it doesnt write to the file I want …

Member Avatar for JamesCherrill
0
313
Member Avatar for chinee

i am doing a project with a group i have to deal with orders by kind then linked to the driver who will be taking the first customer. the driver can be free or back in 10 min. i have started with the order list with the customer, i have …

Member Avatar for NormR1
0
791
Member Avatar for SAM2012

I have queue class as below public class queue { public: queue(); ~queue(); bool Empty() const; void Enqueue(message^); void Dequeue(); void DisplayAll() const; private: gcroot<String^> bindingkey; queue(queue const& obj); ListNode* head; ListNode* tail; }; queue::queue():head(nullptr), tail(nullptr) {} queue::~queue() { while (head != nullptr) { Dequeue(); } } //bool queue::Empty() const …

Member Avatar for emilo35
0
174
Member Avatar for Yoink

Hi, I have a program that deals with stacks and queues in python. Part of the program compares items in 3 stacks that contain objects. The loop will run and compare all items in the top of the stacks and pop the item that has the highest value and appends …

Member Avatar for scudzilla
0
266
Member Avatar for ITOzann

Hello guys, I've been trying to finish a project. But I seem to be stuck. I'm suppose to get the following output: [1:18:10, 2:33:10, 3:21:10] Remove customer:1:18:10 Remove customer:2:33:10 Remove customer:3:21:10 [Cashier:1001:0-0:Customer:null, Cashier:1002:0-0:Customer:null, Cashier:1003:0- 0:Customer:null, Cashier:1004:0-0:Customer:null] Remove free cashier:Cashier:1001:0-0:Customer:null Remove free cashier:Cashier:1002:0-0:Customer:null Remove free cashier:Cashier:1003:0-0:Customer:null Remove free cashier:Cashier:1004:0-0:Customer:null [Cashier:1001:13-31:Customer:1:18:10, Cashier:1002:13-46:Customer:2:33:10, …

Member Avatar for ITOzann
0
382
Member Avatar for minghags

Hello! I just want to ask you guys if anyone can help me reedit my program from BFS to DFS. I know how BFS works but i can't figure it out how to write the sintax. So i would please ask you guys if you could help me out. Heres …

Member Avatar for Labdabeta
0
451
Member Avatar for themenucha

Hi! I'm trying to emplement the job queue. Somehow i can't initialize it: the queue is empty `Inline Code Example Here` //INCLUDES #include <stdio.h> #include <stdlib.h> #include <semaphore.h> #include <pthread.h> //GLOBALS pthread_mutex_t job_queue_mutex = PTHREAD_MUTEX_INITIALIZER; int i; #define N_threads 10 int val=0; //STRUCTURES typedef struct job { int data; struct …

Member Avatar for histrungalot
0
422
Member Avatar for hawkeyeviewonu

Sorry for my english.. Im trying to make a program that show the shortest route of this nodes using BFS algorithm.. ![115](/attachments/large/3/115.JPG "115") i tried to print the prev array which shows the shortest route but somehow it doesnt appear on console when running.. how to fix it? btw, is …

Member Avatar for histrungalot
0
985
Member Avatar for rlord3534

My program won't run.. I keep getting a nullPointerException but I have no idea why.. Thanks! The program is supposed to create a simulation for a line ---------------------------------------------------------------------------- public class Prog5 { /** * @param args */ public static void main(String[] args) { Simulation simulation = new Simulation(10); simulation.run(); } …

Member Avatar for NormR1
0
207
Member Avatar for _Nemesis_

Hi guys, I have been trying to implement the A* algorithm in C++ and would like to make use of the priority_queue structure to hold the open and closed lists of nodes. The problem is, all of the algorithms that I have found use the equivalent of a "search/contains" function …

Member Avatar for _Nemesis_
0
1K
Member Avatar for msmriyas

this is my sourse code,i have indicated the error in the bottom of the sourse code . import java.io.*; public class Queue { private int maxSize; private int queArray[]; private int front; private int rear; private int nItems; public Queue (int s) { maxSize = s; queArray = new int[maxSize]; …

Member Avatar for NormR1
0
158
Member Avatar for AnnA.A

Hi, I'm new here, so I'm sory if this theme already exsist. I'm trying to do a database of students in c, and I want to use queue for realizing that. For example: Name: char surname: char id number: char or int subjects: queue User will enter id number and …

Member Avatar for AnnA.A
0
211
Member Avatar for kspecks

So I am trying to write data to a SQL directory the code is suppose to take a finger print and store it in a directory and for some reason the data in the DataRow myRow is always null I have tried everything. sqlCommandText = "select * from xluser where …

Member Avatar for kspecks
0
104
Member Avatar for raviaaaa

HI All iam using applet tag in html file ex: <APPLET name="TreeMenuFrom" code="com.scand.jtree.TreeApplet.class" width="300" height="250" codebase="./com/scand/jtree" MAYSCRIPT> <PARAM NAME="root_closeable" VALUE=""> <PARAM NAME="menu" VALUE="treeMenuFrom"> <PARAM NAME="image0" VALUE="images/item_open.gif"> <PARAM NAME="image1" VALUE="images/item_node.gif"> <PARAM NAME="image2" VALUE="images/item_open.gif"> <PARAM NAME="image3" VALUE="images/item_closed.gif"> </applet> TreeApplet.class is exist under com/scand/jtree but iam getting following error while loading the applet …

Member Avatar for NormR1
0
216
Member Avatar for Nathaniel10

I am teaching myself C++ and wrote a program that does the queue data structure. It runs corectly. I would like some feedback on how I can improve the program to make it run faster, use fewer lines of code, or be clearer to someone else. I haven't added my …

Member Avatar for Nathaniel10
0
87
Member Avatar for raviaaaa

while configuring workspace in Eclipse, applet is not loading i am using jdk1.5 and Tomcat 5.5 but when iam try to open same application in IT link applet is loading sucessuflly (i have used the same code to configure locally) can any one please let me know how to resolve …

Member Avatar for NormR1
0
191
Member Avatar for raviaaaa

Hi All can you pleased help me how to resolve applet load fail in IT link applet loading fine, but when i used same code and made a local setup while runnning applet is not loading please see the stack trace and com.scand.jtree classes are exists under applet folder under …

Member Avatar for NormR1
0
315
Member Avatar for vinnitro

Hi friends, i was recently started writing a program on java needed for my practicals but as i started i found an error which deletes last element of queue actually i want to delete first element of queue anybody can solve it import java.util.*; class VQueue { int size; int …

Member Avatar for vinnitro
0
178
Member Avatar for Hypnos_16

[I]This exercise will explore the queue and stack data structure implemented with linked lists. The Koch snowflake can be implemented without recursion by using a queue or a stack. Assume that L is either a queue or a stack, L.add( seg ) adds a segment, and L.remove() removes the segment. …

0
122
Member Avatar for faithful4ever

My struct is as such: [CODE] typedef struct pqueue { char str[20]; int priority; }pqueue; pqueue q[MAXQ]; [/CODE] When I'm displaying the items in the priority queue, I am trying to sort it by priority, so I have the following comparison function: [CODE] int compareByPriority(const void *a, const void *b) …

Member Avatar for faithful4ever
0
126
Member Avatar for arty.net

Hi guys, i have a tricky problem with this wxgtk gui and thread nesting. As you can see i'm trying to collect data through a buffer ( self.data= dict() ) through the main gui. I need to get the data from the ComboBox and the three textfields then i need …

Member Avatar for arty.net
0
161
Member Avatar for riahc3

Hey Since I couldnt get my web service to really support multiple users, Ive thought of simply implementing a FIFO kinda of queue like this: (The code is made up on the spot right now. Therefore, ; may be missing, some variable declared wrong, etc. Ignore that. Just concentrate on …

Member Avatar for riahc3
0
123
Member Avatar for bloominninja

Hi, I'm getting pretty frustrated with my code at this point, Im trying to implement a queue class to hold a number of integers... however dev (the compiler im using) keeps spitting out the errors [CODE] [Linker error] undefined reference to `QueueType<int>::QueueType()' [Linker error] undefined reference to `QueueType<int>::~QueueType()' [/CODE] here …

Member Avatar for bloominninja
0
238
Member Avatar for garden4ork

Hello again, pretty simple question this time I would think. What I'm wanting is to be able to add 5 minutes onto a ttime variable. As what I'm trying to acheive is a queue system. (Time + QueueTime) and (QueueTime := QueueTime + ProductTime) However I get the basics, just …

Member Avatar for DelphiGuy
0
118
Member Avatar for gabriellogan

I want to modify this Radix sort C++ to work with strings only. I want to sort words not numbers. I don't know what to change or where to change it. Any suggestions? [CODE] // CS 9F // March 3, 2012 // Include files #include <iostream> // used for cin, …

0
106
Member Avatar for aakanaa

Hi, i am new to C++. recently i have a project that require to create an array of queue. However, i don't have an idea how to create this. Can i create an array of queue by doing queue<int> q[2]? Any explanation will help, thank you very much

0
44

The End.