Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
2k views

Node.js batch processing

Batch processing steps: When a job is posted, push it to the queue. Get the required number of items from the queue and put it in the ...
sg7610's user avatar
  • 388
5 votes
2 answers
3k views

Queue with O(1) enqueue and dequeue with JS arrays

If you simply implement it with .push() to .enqueue() and .shift() to ...
Redu's user avatar
  • 946
1 vote
1 answer
924 views

Implement jquery like functions addClass, removeClass and delay in Javascript

Assume $ is not the browser. Now have to implement $, it will take a string, which is a query, it will use the querySelector to select the element. (Reference: https://developer.mozilla.org/en-US/docs/...
Umang Gupta's user avatar
1 vote
1 answer
143 views

Queue implementation in ES6 [closed]

Here's my Queue implementation in ES6, ...
Melissa Stewart's user avatar
4 votes
1 answer
260 views

Node.JS Server Queue Processor

I implemented a simple queuing system for my Node.JS app and wanted a critique on it's structure. ...
Enijar's user avatar
  • 175
3 votes
0 answers
654 views

Blocking Promise-driven queues with ECMAScript's async/await and generators

I implemented an AsyncQueue, whose dequeue() operation returns a Promise. The ...
ComFreek's user avatar
  • 761
2 votes
1 answer
75 views

JavaScript Queue Attempt #2

This is a follow-up review to JavaScript queue implementation using linked list I've run the code through a linter, fixed every style error, added const where it ...
Douglas's user avatar
  • 879
2 votes
2 answers
899 views

JavaScript queue implementation using linked list

Are there better ways of modularizing the code? Does it contain things JavaScript experts would avoid? Is it idiomatic? Is there a better way of signaling an empty queue than returning ...
Douglas's user avatar
  • 879
1 vote
1 answer
927 views

Hackerrank "Queues: A Tale of Two Stacks" Javascript Solution

Here is the original problem, and below is my solution (passing). It's asking to implement a queue with 2 stacks, which means I cannot simply use Array.shift. I wonder if the solution can be improved. ...
kdenz's user avatar
  • 335
6 votes
1 answer
153 views

JavaScript Queue

I'm new to JS and have I made this snippet for practicing. Because I have no idea for JS conventions, I want some advice about that. ...
kidkkr's user avatar
  • 347
1 vote
3 answers
7k views

Time-delayed function queue

I recently had an interesting requirement in a test environment where I needed to simulate actions at varied (random) intervals in a node back-end. They needed to ...
pulse0ne's user avatar
  • 155
2 votes
0 answers
283 views

Request Queue for League of Legends API

I am working on some website for League of Legends statistics, which uses the RiotGames API. The API allows you to do a maximum amount of requests per 10 seconds, and another maximum amount of ...
Danmoreng's user avatar
  • 121
3 votes
0 answers
565 views

Multithreaded queue manager

I've written a simple multithreaded queue manager in JavaScript which will be seeing some pretty heavy usage at a later point in the project I'm working on. I think it's pretty solid, but I wouldn't ...
Elliot Bonneville's user avatar
3 votes
1 answer
3k views

Javascript Queue for async functions

Based on the answer to my previous question on Stack Overflow, I put together the following Queue class. I realize there are already libraries out there to do this. However, I wanted to actually ...
Marcus Hughes's user avatar
4 votes
1 answer
561 views

Javascript Queue Object

I created a Queue object when answering this question and I was wondering if it could do with some improvement. Here is the current code: ...
Naftali's user avatar
  • 1,099

15 30 50 per page