queue

How do I chain or queue custom functions using JQuery?

I have multiple functions the do different animations to different parts of the HTML. I would like to chain or queue these functions so they will run the animations sequentially and not at the same time. I am trying to automate multiple events in sequence to look like a user has been clicking on different buttons or links. I could pro...

Graceful Page Loading / Controlling File Loading

Hi folks, I am a scriptmonkey working with a lot of graphic designers who know not a thing about the web. Despite my objections I frequently find myself with problems such as a 100Kb background image, several textual items they have made into glossy images, and 3 separate lengthy FLVs loading into a page etc etc. I would really like t...

Add Items to a ASP Repeater from a Custom Queue Container

I want to use an asp repeater to generate the html for the items I pull back in a custom class Queue. In other words Queue x = otherClass.getCustomClassObjects(); And then bind this to a repeater. And on the OnRepeaterItemDataBound assingn the html values appropriately to what is in the queue. Is this possible ? ...

What's the best way to organize worker processes in Rails?

I frequently have some code that should be run either on a schedule or as a background process with some parameters. The common element is that they are run outside the dispatch process, but need access to the Rails environment (and possibly the parameters passed in). What's a good way to organize this and why? If you like to use a part...

Is there a Queue/FIFO data structure for the iPhone?

Before I roll my own Queue using NSMutableArray, I'd like to know if there is something more standard available. I don't see anything in the Apple docs, but I'll be surprised if there is not a Queue implementation from somewhere that folks are using. Java spoils me! ...

How does Tokyo Cabinet handle large integers?

I have implemented a queue on top of TC (Tokyo Tyrant to be specific). I am using memcache compatible function increment to keep track of queue head and tail. I just want to know what is the limit for the integers stored (64 bit?) by TC and what happens when increment function is called after the number stored is at maximum value allowed...

What are the differences between the two common implementations of a queue?

In Java, one of the implementations of queue is "circular array" and the other one is "linked list". What are their differences? ...

Service Broker with Sql Server 2005 - Messages stuck in queue

Hi! I'm configuring a simple service broker implementation. Locally, we use SQL Server 2008 Express and everything works fine. Once the code runs on our production server (SQL SERVER 2005), messages are stuck in the receiver queue. The followind code is incomplete but states how queues and services are basically configured: -- Create m...

How to wait for a Blocking Queue to be emptied by worker

I'm using a single producer-single consumer model with a blocking queue. I would like for the producer, when it has finished producing, to wait for the queue to empty before returning. I implemented the BlockingQueue suggested here by Marc Gravell. In my model, the producer (renderer) is using events to notify the worker (printer) whe...

Patterns/Principles for thread-safe queues and "master/worker" program in Java

I have a problem which I believe is the classic master/worker pattern, and I'm seeking advice on implementation. Here's what I currently am thinking about the problem: There's a global "queue" of some sort, and it is a central place where "the work to be done" is kept. Presumably this queue will be managed by a kind of "master" object. ...

Queue in An Array

Problem: to understand the solution, when the length of the queue is 5. Exercise: Its solution: Question: Why is the solution not C A B B B, otherwise everything the same in the "Solution"-picture above? Source, (the solution and exercise at "10:02.03-08.03") ...

Library for the Basic Data Structures, such as Queue, in C

Post related to the question here. Problem: to find the right data structure for the queue: #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <time.h> int m...

Concurrent and Blocking Queue in Java

Hello Everybody, I have the classic problem of a thread pushing events to the incoming queue of a second thread. Only this time, I am very interested about performance. What I want to achieve is: I want concurrent access to the queue, the producer pushing, the receiver poping. When the queue is empty, I wand the consumer to block to t...

Multiple-writer thread-safe queue in C

I am working on a multi-threaded C application using pthreads. I have one thread which writes to a a database (the database library is only safe to be used in a single thread), and several threads which are gathering data, processing it, and then need to send the results to the database thread for storage. I've seen in mentioned that it ...

How can I animate multiple elements sequentially using jQuery?

I thought it would be simple but I still can't get it to work. By clicking one button, I want several animations to happen - one after the other - but now all the animations are happening at once. Here's my code - can someone please tell me where I'm going wrong?: $(".button").click(function(){ $("#header").animate({top: "-50"}, "slow...

Can we modify properties of object which is in Queue - C# ?

I have used System.Collections.Queue and its object form_elements_queue if (form_elements_queue.Count > 0) queue_element = (RecordQueue)form_elements_queue.Peek(); I'm modifying the queue_element like below, queue_element.Children--; RecordQueue is my custom Type which I Enqueue in form_elements_queue. but its not referenci...

Personalised bulk email programmatically without timing out

I have a list of around 5,000 to 10,000 (individual user supplied) email addresses from people all over the world, each associated with their username and language codes. I also have a single message translated into the different languages of the users that I want to email. Now, I would like to send a single plain text email to each of t...

Which Java blocking queue is best for multiple producer and single or multiple consumers scenarios?

Which Java blocking queue is best for multiple producer and single or multiple consumers scenarios ? I am testing with LinkedBlockingQueue but i am getting OutOfMemoryError exception. I am trying to achieve following things. producer creates a object & put in a queue. consumer grabs the data from queue & insert into DB. There woul...

.NET - Windows Azure Queue question - background work on the queue

First let me say, I'm just starting to get up to speed on the Azure platform. I understand how in the Azure Queue model a web interaction could put something in a queue and a later interaction could process it. But... What is the equivalent of a "Windows Service" in the Azure world? What if I just wanted something in the background to ...

STL queue iteration

I need to iterate over a queue. www.cplusplus.com says: By default, if no container class is specified for a particular queue class, the standard container class template deque is used. So can I somehow get to the queue's underlying deque and iterate over it? Thanks. ...