to make loop on current
331834
function(callback) {
            var current = this.jsonQ_current;
            for (var i = 0, ln = current.length; i < ln; i++) {
                callback(i, current[i].path, this.pathValue(current[i].path));
            }
            return this;
        }
1343465
def set_current(self, value):
        '''
        
        '''
        self.current = value
        self.cursor = 0
        self.limit = len(self.current)
        self.limit_backward = 0
        self.bra = self.cursor
        self.ket = self.limit
65995
function each (array, iterator, cb) {
  var len = array.length
  array.forEach(function (item, i) {
    iterator.call(null, item, i, done)
  })
  function done () {
    if (!--len) {
      return cb && cb()
    }
  }
}
629706
function oneOrEach(itemOrArr, cb) {
        if (Array.isArray(itemOrArr)) {
            _.each(itemOrArr, cb);
        } else {
            cb(itemOrArr, 0);
        }
    }
136679
function each(items, numParralel, fn, done) {
    if (done === undefined) {
      done = fn; fn = numParralel;
      numParralel = 3;
    }

    if (numParralel <= 0) numParralel = 1;

    let doing = 0;
    let numProcessing = 0;
    let numDone = 0;
    const numTotal = items.length;
    const results = [];
    return nextItem();

    function nextItem() {
      // We done-check first in case of emtpty array
      if (numDone >= numTotal) return done(null, results);

      // Batch (or call next item)
      while (doing < numTotal && numProcessing < numParralel) {
        callFn(fn, items[doing++], onDone);
        numProcessing++;
      }
      return;

      // All done
      function onDone(err, result) {
        if (err) return done(err);

        results.push(result);
        numProcessing--;
        numDone++;
        return nextItem();
      }
    }
  }
186416
def iterate(self):
        
        self.counter += 1
        self.counter0 += 1
        self.revcounter -= 1
        self.revcounter0 -= 1
        self.first = False
        self.last = (self.revcounter0 == self.len_values - 1)
278149
def iterate(self, delay=None):
        
        self.runUntilCurrent()
        self.doEvents()
        self.doIteration(delay)
935824
def gotoNext(self):
        
        index = self._currentPanel.currentIndex() + 1
        if ( self._currentPanel.count() == index ):
            index = 0
            
        self._currentPanel.setCurrentIndex(index)
358344
function each(ary, func) {
        if (ary) {
            var i;
            for (i = 0; i < ary.length; i += 1) {
                if (ary[i] && func(ary[i], i, ary)) {
                    break;
                }
            }
        }
    }
458178
function once(child) {
    if (handle(current) === true) {
      return
    }

    readdir(current, onread)

    function onread(error, entries) {
      var length = entries ? entries.length : 0
      var index = -1
      var entry

      if (error) {
        entries = []
      }

      while (++index < length) {
        entry = entries[index]

        if (entry !== child && handle(resolve(current, entry)) === true) {
          return
        }
      }

      child = current
      current = dirname(current)

      if (current === child) {
        callback(null, one ? null : results)
        return
      }

      once(basename(child))
    }
  }
297590
def loop_once(self):
        """"""
        while 1:
            if not self._active_nodes:
                # If everything has died stop looping
                self.triggershutdown()
                raise RuntimeError("Unexpectedly no active workers available")
            try:
                eventcall = self.queue.get(timeout=2.0)
                break
            except Empty:
                continue
        callname, kwargs = eventcall
        assert callname, kwargs
        method = "worker_" + callname
        call = getattr(self, method)
        self.log("calling method", method, kwargs)
        call(**kwargs)
        if self.sched.tests_finished:
            self.triggershutdown()
746235
def hascurrent(self, allowempty=False):
        """"""
        for e in self.select(Current,None,False, False):
            if not allowempty and len(e) == 0: continue
            return True
        return False
999461
def loop():
    """"""
    print("Straight")
    board.digital_write(L_CTRL_1, 1)
    board.digital_write(L_CTRL_2, 0)
    board.analog_write(PWM_L, 245)
    board.digital_write(R_CTRL_1, 1)
    board.digital_write(R_CTRL_2, 0)
    board.analog_write(PWM_R, 245)
    board.sleep(2.0)

    print("CW spin")
    board.digital_write(L_CTRL_1, 1)
    board.digital_write(L_CTRL_2, 0)
    board.analog_write(PWM_L, 245)
    board.digital_write(R_CTRL_1, 0)
    board.digital_write(R_CTRL_2, 1)
    board.analog_write(PWM_R, 245)
    board.sleep(2.0)

    print("CCW spin")
    board.digital_write(L_CTRL_1, 0)
    board.digital_write(L_CTRL_2, 1)
    board.analog_write(PWM_L, 245)
    board.digital_write(R_CTRL_1, 1)
    board.digital_write(R_CTRL_2, 0)
    board.analog_write(PWM_R, 245)
    board.sleep(2.0)

    print("Stop")
    board.digital_write(L_CTRL_1, 1)
    board.digital_write(L_CTRL_2, 0)
    board.analog_write(PWM_L, 0)
    board.digital_write(R_CTRL_1, 1)
    board.digital_write(R_CTRL_2, 0)
    board.analog_write(PWM_R, 0)
    board.sleep(5.0)
984187
function onList() {
    getCurrentRegistry(function(cur) {
        var info = [''];
        var allRegistries = getAllRegistry();

        Object.keys(allRegistries).forEach(function(key) {
            var item = allRegistries[key];
            var prefix = item.registry === cur ? '* ' : '  ';
            info.push(prefix + key + line(key, 12) + item.registry);
        });

        info.push('');
        printMsg(info);
    });
}
165709
def event_loop(self):
        
        if hasattr(self.loop, '._run_once'):
            self.loop._thread_id = threading.get_ident()
            try:
                self.loop._run_once()
            finally:
                self.loop._thread_id = None
        else:
            self.loop.call_soon(self.loop.stop)
            self.loop.run_forever()
128970
def startElement(self, name, attrs):
        
        self.stack.append((self.current, self.chardata))
        self.current = {}
        self.chardata = []
599509
function(loop){
    var test = loop.test;
    this.buf.push('while (' + test + ') {');
    this.visit(loop.block, loop);
    this.buf.push('}');
  }