1,306 Topics
![]() | |
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 … | |
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 … ![]() | |
Can someone tell me how to implement priority queues using arrays.Please help!!!!!! | |
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 … | |
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: … | |
![]() | 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 … |
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 … | |
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 = … | |
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 … | |
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 … | |
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 … | |
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. | |
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”) ; … | |
![]() | 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 … |
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); … | |
![]() | 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 … ![]() |
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 … | |
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 … | |
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> { … | |
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 … | |
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 … | |
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 … | |
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 { … | |
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* … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
Sorry for my english.. Im trying to make a program that show the shortest route of this nodes using BFS algorithm..  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 … | |
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(); } … | |
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 … | |
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]; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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. … | |
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) … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 |
The End.