---------------------------------------------------------------------------- 3. Cycle (Side-effects) ----------------------------------------------------------------------------
359063
function fetchDatapointsCycle(sources) {
  const payload$ = sources.ACTION.filter(
    action => action.type === FETCH_DATAPOINTS,
  ).pluck('payload');

  const dataChannelId$ = payload$.pluck('dataChannelId');
  const deviceId$ = payload$.pluck('deviceId');

  const deviceKey$ = sources.STATE.pluck('devices')
    .combineLatest(deviceId$, (devices, deviceId) =>
      R.path([deviceId, 'deviceKey'])(devices),
    )
    .filter(exist);

  const datapoints$ = sources.STATE.pluck('datapoints').filter(exist);

  const query$ = datapoints$
    .combineLatest(dataChannelId$, (datapoint, dataChannelId) =>
      R.path([dataChannelId, 'query'])(datapoint),
    )
    .filter(exist)
    .startWith({});

  const request$ = Observable.combineLatest(
    deviceKey$.distinctUntilChanged(),
    deviceId$.distinctUntilChanged(),
    dataChannelId$.distinctUntilChanged(),
    query$.distinctUntilKeyChanged('start').distinctUntilKeyChanged('end'),
    (deviceKey, deviceId, dataChannelId, query) => ({
      url: `/api/devices/${deviceId}/datachannels/${dataChannelId}/datapoints`,
      method: 'GET',
      headers: { deviceKey },
      category: FETCH_DATAPOINTS,
      query,
    }),
  );

  const response$ = sources.HTTP.select(FETCH_DATAPOINTS).switchMap(success);

  // Remind: api response with dataChannelId will be better.
  const responseDataChannedId$ = response$
    .pluck('request', 'url')
    .map(R.pipe(R.match(/[\w]+(?=\/datapoints$)/), R.head));

  const action$ = response$
    .pluck('body', 'data')
    .zip(responseDataChannedId$, (data, dataChannelId) => ({
      data,
      dataChannelId,
    }))
    .map(setDatapoints);

  return {
    ACTION: action$,
    HTTP: request$,
  };
}
1092081
private static Point2d[] coordinatesOfCycle(int[] cycle, IAtomContainer container) {
        Point2d[] points = new Point2d[cycle.length];
        for (int i = 0; i < cycle.length; i++) {
            points[i] = container.getAtom(cycle[i]).getPoint2d();
        }
        return points;
    }
502118
@Override
    public void removeChemSequence(int pos) {
        for (int i = pos; i < chemSequenceCount - 1; i++) {
            chemSequences[i] = chemSequences[i + 1];
        }
        chemSequences[chemSequenceCount - 1] = null;
        chemSequenceCount--;
    }
592665
private void writeReactionSet(IReactionSet reactions) throws CDKException {

        for (IReaction iReaction : reactions.reactions()) {
            writeReaction(iReaction);
        }
    }
886572
protected function cycle()
    {
        if (!$this->moved) {
            $this->curr->clear();
            $this->curr->merge($this->next);
            $this->next->clear();
            $this->moved = true;
        }
    }
225334
function() {
        var tmp = [], //12
			src = [], //16
			dst = [], //16
			mat = this.toArray(),
			i = 0;

        for (i = 0; i < 4; i++) {
            var i4 = i << 2;
            src[i] = mat[i4];
            src[i + 4] = mat[i4 + 1];
            src[i + 8] = mat[i4 + 2];
            src[i + 12] = mat[i4 + 3];
        }

        // calculate pairs for first 8 elements (cofactors)
        tmp[0] = src[10] * src[15];
        tmp[1] = src[11] * src[14];
        tmp[2] = src[9] * src[15];
        tmp[3] = src[11] * src[13];
        tmp[4] = src[9] * src[14];
        tmp[5] = src[10] * src[13];
        tmp[6] = src[8] * src[15];
        tmp[7] = src[11] * src[12];
        tmp[8] = src[8] * src[14];
        tmp[9] = src[10] * src[12];
        tmp[10] = src[8] * src[13];
        tmp[11] = src[9] * src[12];

        // calculate first 8 elements (cofactors)
        var src0 = src[0],
			src1 = src[1],
			src2 = src[2],
			src3 = src[3],
			src4 = src[4],
			src5 = src[5],
			src6 = src[6],
			src7 = src[7];
		dst[0] = tmp[0] * src5 + tmp[3] * src6 + tmp[4] * src7;
		dst[0] -= tmp[1] * src5 + tmp[2] * src6 + tmp[5] * src7;
		dst[1] = tmp[1] * src4 + tmp[6] * src6 + tmp[9] * src7;
		dst[1] -= tmp[0] * src4 + tmp[7] * src6 + tmp[8] * src7;
		dst[2] = tmp[2] * src4 + tmp[7] * src5 + tmp[10] * src7;
		dst[2] -= tmp[3] * src4 + tmp[6] * src5 + tmp[11] * src7;
		dst[3] = tmp[5] * src4 + tmp[8] * src5 + tmp[11] * src6;
		dst[3] -= tmp[4] * src4 + tmp[9] * src5 + tmp[10] * src6;
		dst[4] = tmp[1] * src1 + tmp[2] * src2 + tmp[5] * src3;
		dst[4] -= tmp[0] * src1 + tmp[3] * src2 + tmp[4] * src3;
		dst[5] = tmp[0] * src0 + tmp[7] * src2 + tmp[8] * src3;
		dst[5] -= tmp[1] * src0 + tmp[6] * src2 + tmp[9] * src3;
		dst[6] = tmp[3] * src0 + tmp[6] * src1 + tmp[11] * src3;
		dst[6] -= tmp[2] * src0 + tmp[7] * src1 + tmp[10] * src3;
		dst[7] = tmp[4] * src0 + tmp[9] * src1 + tmp[10] * src2;
		dst[7] -= tmp[5] * src0 + tmp[8] * src1 + tmp[11] * src2;

        // calculate pairs for second 8 elements (cofactors)
		tmp[0] = src2 * src7;
		tmp[1] = src3 * src6;
		tmp[2] = src1 * src7;
		tmp[3] = src3 * src5;
		tmp[4] = src1 * src6;
		tmp[5] = src2 * src5;
		tmp[6] = src0 * src7;
		tmp[7] = src3 * src4;
		tmp[8] = src0 * src6;
		tmp[9] = src2 * src4;
		tmp[10] = src0 * src5;
		tmp[11] = src1 * src4;

        // calculate second 8 elements (cofactors)
		src0 = src[8];
		src1 = src[9];
		src2 = src[10];
		src3 = src[11];
		src4 = src[12];
		src5 = src[13];
		src6 = src[14];
		src7 = src[15];
		dst[8] = tmp[0] * src5 + tmp[3] * src6 + tmp[4] * src7;
		dst[8] -= tmp[1] * src5 + tmp[2] * src6 + tmp[5] * src7;
		dst[9] = tmp[1] * src4 + tmp[6] * src6 + tmp[9] * src7;
		dst[9] -= tmp[0] * src4 + tmp[7] * src6 + tmp[8] * src7;
		dst[10] = tmp[2] * src4 + tmp[7] * src5 + tmp[10] * src7;
		dst[10] -= tmp[3] * src4 + tmp[6] * src5 + tmp[11] * src7;
		dst[11] = tmp[5] * src4 + tmp[8] * src5 + tmp[11] * src6;
		dst[11] -= tmp[4] * src4 + tmp[9] * src5 + tmp[10] * src6;
		dst[12] = tmp[2] * src2 + tmp[5] * src3 + tmp[1] * src1;
		dst[12] -= tmp[4] * src3 + tmp[0] * src1 + tmp[3] * src2;
		dst[13] = tmp[8] * src3 + tmp[0] * src0 + tmp[7] * src2;
		dst[13] -= tmp[6] * src2 + tmp[9] * src3 + tmp[1] * src0;
		dst[14] = tmp[6] * src1 + tmp[11] * src3 + tmp[3] * src0;
		dst[14] -= tmp[10] * src3 + tmp[2] * src0 + tmp[7] * src1;
		dst[15] = tmp[10] * src2 + tmp[4] * src0 + tmp[9] * src1;
		dst[15] -= tmp[8] * src1 + tmp[11] * src2 + tmp[5] * src0;

		var det = 1.0 / (src[0] * dst[0] + src[1] * dst[1] + src[2] * dst[2] + src[3] * dst[3]);
		for (i = 0, k = 0; i < 4; i++) {
			var m = this.matrix[i];
			for (var j = 0; j < 4; j++) {
				m[j] = dst[k++] * det;
			}
		}
		return this;
    }
628811
function _1CMethodDescription(parentModule) {

    // Идентификатор (имя) метода.
    this.Name = "";

    // Тип метода. Если истина - то это Процедура, иначе - это функция.
    this.IsProc = false;

    // Массив параметров метода.
    this.Params = new Array();

    // Массив явным образом объявленных переменных.
    this.DeclaredVars = new Array();

    // Массив автоматических локальных переменных (не объявленных явным образом).
    this.AutomaticVars = new Array();

    // Список вызовов: массив методов, вызываемых из данного метода.
    this.Calls = new Array();
    this._CallsUpper = new Array();
    this.CallsPosition = new Array();

    // Номер строки объявления метода.
    this.StartLine = 0;

    // Номер строки завершения объявления метода.
    this.EndLine = 0;

    // Ассоциативный массив Имя переменной -> Тип переменной (пока тип всегда null).
    this._varsTypes = {};

    // Контекст модуля, в котором объявлен данный метод (_1CModuleContextDescription).
    this.parentModule = parentModule;
    
    // Экспортная процедура или нет. 
    this.IsExport = false;
    
    this.description = "";
    
}
823814
@Override
    public void addReaction(IReaction reaction) {
        if (reactionCount + 1 >= reactions.length) growReactionArray();
        reactions[reactionCount] = reaction;
        reactionCount++;
    }
1082521
function yy_r173()
    {
        static $lops = array('eq'          => array('op' => ' == ', 'pre' => null),
                             'ne'          => array('op' => ' != ', 'pre' => null),
                             'neq'         => array('op' => ' != ', 'pre' => null),
                             'gt'          => array('op' => ' > ', 'pre' => null),
                             'ge'          => array('op' => ' >= ', 'pre' => null),
                             'gte'         => array('op' => ' >= ', 'pre' => null),
                             'lt'          => array('op' => ' < ', 'pre' => null),
                             'le'          => array('op' => ' <= ', 'pre' => null),
                             'lte'         => array('op' => ' <= ', 'pre' => null),
                             'mod'         => array('op' => ' % ', 'pre' => null),
                             'and'         => array('op' => ' && ', 'pre' => null),
                             'or'          => array('op' => ' || ', 'pre' => null),
                             'xor'         => array('op' => ' xor ', 'pre' => null),
                             'isdivby'     => array('op' => ' % ', 'pre' => '!('),
                             'isnotdivby'  => array('op' => ' % ', 'pre' => '('),
                             'isevenby'    => array('op' => ' / ', 'pre' => '!(1 & '),
                             'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '),
                             'isoddby'     => array('op' => ' / ', 'pre' => '(1 & '),
                             'isnotoddby'  => array('op' => ' / ', 'pre' => '!(1 & '),);
        $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor));
        $this->_retvalue = $lops[ $op ];
    }
162670
@Override
    public void removeReaction(int pos) {
        for (int i = pos; i < reactionCount - 1; i++) {
            reactions[i] = reactions[i + 1];
        }
        reactions[reactionCount - 1] = null;
        reactionCount--;
    }
1239161
function iterator ()
            {
                for (var i=0; i<obj.data.length; ++i) {
                    
                    // This produces a very slight easing effect
                    obj.data[i] = data[i] * RG.Effects.getEasingMultiplier(frames, numFrame);
                }
                
                RGraph.clear(obj.canvas);
                RGraph.redrawCanvas(obj.canvas);
    
                if (++numFrame < frames) {
                    RGraph.Effects.updateCanvas(iterator);
                } else {
                    callback(obj);
                }
            }
534078
function(events, args) {
    let ev,
        i = -1,
        l = events.length,
        a1 = args[0],
        a2 = args[1],
        a3 = args[2];
    switch (args.length) {
        case 0:
            while (++i < l) (ev = events[i]).callback.call(ev.ctx);
            return;
        case 1:
            while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1);
            return;
        case 2:
            while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2);
            return;
        case 3:
            while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3);
            return;
        default:
            while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args);
            return;
    }
}
464031
function checkBadness() {
    var b, b1, bad, big, bw, count, h, x, y;
    bad = bw = count = 0;

    // Blocks of same colour.
    for (y = 0; y < width - 1; y++) {
      for (x = 0; x < width - 1; x++) {
            // All foreground colour.
        if ((frameBuffer[x + width * y] &&
             frameBuffer[(x + 1) + width * y] &&
             frameBuffer[x + width * (y + 1)] &&
             frameBuffer[(x + 1) + width * (y + 1)]) ||
            // All background colour.
            !(frameBuffer[x + width * y] ||
              frameBuffer[(x + 1) + width * y] ||
              frameBuffer[x + width * (y + 1)] ||
              frameBuffer[(x + 1) + width * (y + 1)])) {
          bad += N2;
        }
      }
    }

    // X runs.
    for (y = 0; y < width; y++) {
      badBuffer[0] = 0;

      for (h = b = x = 0; x < width; x++) {
        if ((b1 = frameBuffer[x + width * y]) === b) {
          badBuffer[h]++;
        } else {
          badBuffer[++h] = 1;
        }

        b   = b1;
        bw += b ? 1 : -1;
      }

      bad += getBadRuns(h);
    }

    if (bw < 0) bw = -bw;

    big   = bw;
    big  += big << 2;
    big <<= 1;

    while (big > width * width) {
      big -= width * width;
      count++;
    }

    bad += count * N4;

    // Y runs.
    for (x = 0; x < width; x++) {
      badBuffer[0] = 0;

      for (h = b = y = 0; y < width; y++) {
        if ((b1 = frameBuffer[x + width * y]) === b) {
          badBuffer[h]++;
        } else {
          badBuffer[++h] = 1;
        }

        b = b1;
      }

      bad += getBadRuns(h);
    }

    return bad;
  }
1297205
function setDutyCycle()
{
	myMOSFETsensor.setDutyCycle(g_cycleNum);
	if (g_addnumBool)
		g_cycleNum += 0.1;
	else
		g_cycleNum -= 0.1;
	g_cycleCount++;
	if (g_cycleCount > 10)
	{
		g_addnumBool = !g_addnumBool;
		g_cycleCount = 0;
	}
	else
		setTimeout(setDutyCycle, 100);
}
832501
def find_cycle(self):
      """"""
      for node in self.nodes:
         cyc = self._follow_children(node)
         if len(cyc) > 0:
            return [self._nodes[x] for x in cyc]
      return None
995760
def add_effect(effect_id, *args, **kwargs):
    ''''''
    effect = fiber.get_stack_var(SIDE_EFFECT_TAG)
    if effect is None:
        return False
    effect.add_effect(effect_id, *args, **kwargs)
    return True
977732
function printErrors(summary, errors) {
  logError(`${summary}\n`);

  errors.forEach(err => {
    logError(`\t- ${err.message || err}`);
  });

  console.log();
}