queue

How can you open a popup window after you close another one?

I need to open a popup window, which when closed, opens a new pop up window. Then when you close that one another opens. I'm aware that this functionality can have uses for spam and nag-ware, but I need it for a user experience survey. Don't ask me, it wasn't my idea. How do you do this? ...

How to create a temporary jms queue with jboss?

I need to create temporary queues on fly. How is that possible? ...

How check if a task is already in python Queue?

Hello. I'm writing a simple crawler in Python using the threading and Queue modules. I fetch a page, check links and put them into a queue, when a certain thread has finished processing page, it grabs the next one from the queue. I'm using an array for the pages I've already visited to filter the links I add to the queue, but if there ar...

How to create a temporary jms queue and connect to it by name?

I need to create a temporary queue for responses, but I need to know if it is possible to connect to temporary queue without sending response queue object via setJMSReplyTo method of message, because replying thread doesn't get that object at all. ...

MSMQ slow queue reading

I am using an open source .Net library which uses MSMQ underneath. After about a week or 2, the service slows down (not timed exactly but general guess). It appears that what is happening is messages from MSMQ are only being read exactly once every 10 seconds. Normally, they are read instantly. So they will be read at T+10sec, T+20se...

How do you implement a Stack and a Queue in JavaScript?

What is the best way to implement a Stack and a Queue in JavaScript? I'm looking to do the shunting-yard algorithm and I'm going to need these data-structures. ...

Simple queue algorithm question

This is not a request for a queueing algorithm, I know there are plenty. I'm reading a C# book and it explains the Circular Queue algorithm with a code example. On lines 13, 14 and 15, he explains how to check if the queue is full. However I can't understand why the first optional condition is necessary. Could someone show me a situatio...

python queue get(),task_done() question

my consumer side of the queue: m = queue.get() queue.task_done() <rest of the program> questions: does task_done() effectively pop m off the queue and release whatever locks the consumer has on the queue? i need to use m during the rest of the program. is it safe, or do i need to copy it before i call task_done()? or, is m usable a...

Is there a better way to implement a Remove method for a Queue?

First of all, just grant that I do in fact want the functionality of a Queue<T> -- FIFO, generally only need Enqueue/Dequeue, etc. -- and so I'd prefer an answer other than "What you really want is a List<T>" (I know about RemoveAt). For example, say I have a Queue<DataPoint> dataToProcess of data points that need to be processed in the...

Tricky C# syntax for out function parameter

I'm familiar with using out to pass in a simple data type for manipulation, but I can't seem to figure out how to pass in this Queue<> without causing a compile error. Any ideas? Code: Queue<SqlCommand> insertScriptQueue = new Queue<SqlCommand>(); private void UpdateDefaultIndicator(int newDefaultViewID, ...

[Geronimo 2.1] add a Queue JNDI ref in ejb-jar.xml? sending JMS Msg in a EJB/MDB

hi, I have an EAR application which contains an MDB and a WAR. In this EAR application I would send a message into an another Queue from other EAR application. Say jms/anotherQueue If the message sending happens in web context, it works. I have such setup in web.xml <message-destination-ref> <message-destination-ref-name>jms/another...

SQL Query Help for Queue Quantities

I have a database which has an orders table and inventory table. The order-items table has a 1 record per 1 qty layout, so if a person places an order for 7 'ABC's, and 4 'XYZ's, I get 11 records in the table. id, item, qtyNum 01 ABC 1 02 ABC 2 03 ABC 3 04 ABC 4 05 ABC 5 06 ABC 6 07 ABC 7 08 XYZ 1 09 XYZ 2 10 XYZ 3 11 XYZ 4 The...

FIFO queue (or stack) implemented on disk, not ram (preferably in C++)

Basically what I'm after is the equivalent of the Standard Template Library queue implemented in such a way as to use the disk for storage. The volume of data that will need to be in the queue is far greater than can be stored in the ram of most computers today. Ideally, I'm after a library to use. However, any recommendation on how to ...

.NET containers - when are members By Reference, By Value?

I migrate between C++ and VB.NET in my coding ventures... which leads to the occasional confusion about when something is by value or by reference in VB.NET. Let's say for example that I have an array of MyObject which is populated with a bunch of objects. dim MyArr(5000) of MyObject Now let's say that the information from this array...

Is a Python Queue needed for simple byte stream between threads?

I have a simple thread that grabs bytes from a Bluetooth RFCOMM (serial-port-like) socket and dumps them into a Queue.Queue (FIFO), which seems like the typical method to exchange data between threads. Works fine. Is this overkill though? Could I just use a bytearray then have my reader thread .append(somebyte) and the processing func...

Rails backgroundRB plugin need to schedule it and queue to database for persistancy.

Hi, I'm trying to do the following: Run a Worker and a method within it every 15 minutes Have a log of the job last runtime, in the database table bdrd_job_queue. What I've done: I have a schedule every 15 minutes in my backgroundRB.yml file The method call has a persistent_job.finish! call, but it's not working, because the persi...

How can I insert elements into a Queue in C#

In C# I use a Queue collection. I can easily Enqueue or Dequeue. Okay, now I would like to insert something in the middle of the queue or at the beginning of the queue. I don't find any method to do such thing. What do you recommend as the alternate collection? ...

How to create queues of objects in Django?

I am new to Django and I am trying to build a blog myself. I'm trying to create a feature I've seen implemented in Drupal using the nodequeue module. What I want to do is to be able to create queues of objects, for example, queues of blog posts. Below, I describe how I imagine the queues to work: the size of each queue should be user-...

A multithreaded queue in Python

I need to perform time consuming tasks in an webapplication. Because the tasks can be so heavy that they run for minutes they have to run on multiple threads so the user won't have to look at a loading page for minutes. So I thought a multithreaded queue would be a good solution. Each instance of a object that you add to the queue shoul...

Circular Buffer in Flash

I need to store items of varying length in a circular queue in a flash chip. Each item will have its encapsulation so I can figure out how big it is and where the next item begins. When there are enough items in the buffer, it will wrap to the beginning. What is a good way to store a circular queue in a flash chip? There is a possibi...