text:
package org.apache.camel.component.jbpm;

import org.apache.camel.AsyncCallback;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.component.jbpm.emitters.CamelEventEmitter;
import org.apache.camel.component.jbpm.listeners.CamelCaseEventListener;
import org.apache.camel.component.jbpm.listeners.CamelProcessEventListener;
import org.apache.camel.component.jbpm.listeners.CamelTaskEventListener;
import org.apache.camel.support.DefaultConsumer;
import org.jbpm.services.api.DeploymentEvent;
import org.jbpm.services.api.DeploymentEventListener;
import org.jbpm.services.api.DeploymentService;
import org.jbpm.services.api.ListenerSupport;
import org.jbpm.services.api.model.DeployedUnit;
import org.jbpm.services.api.service.ServiceRegistry;
import org.kie.internal.runtime.manager.CacheManager;
import org.kie.internal.runtime.manager.InternalRuntimeManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class JBPMConsumer extends DefaultConsumer implements DeploymentEventListener {

    private static final transient Logger LOGGER = LoggerFactory.getLogger(JBPMConsumer.class);

    private JBPMEndpoint endpoint;
    private JBPMConfiguration configuration;

    public JBPMConsumer(Endpoint endpoint, Processor processor) {
        super(endpoint, processor);

        this.endpoint = (JBPMEndpoint) endpoint;
        this.configuration = ((JBPMEndpoint) getEndpoint()).getConfiguration();
    }

    @Override
    protected void doStart() throws Exception {
        super.doStart();

        DeploymentService deploymentService
                = (DeploymentService) ServiceRegistry.get().service(ServiceRegistry.DEPLOYMENT_SERVICE);

        if (configuration.getDeploymentId() != null) {
            InternalRuntimeManager manager
                    = (InternalRuntimeManager) deploymentService.getRuntimeManager(configuration.getDeploymentId());
            configure(manager, this);

            LOGGER.debug("JBPM Camel Consumer configured and started for deployment id {}", configuration.getDeploymentId());
        } else {

            ((ListenerSupport) deploymentService).addListener(this);

            for (DeployedUnit deployed : deploymentService.getDeployedUnits()) {
                InternalRuntimeManager manager = (InternalRuntimeManager) deployed.getRuntimeManager();
                configure(manager, this);
            }

            LOGGER.debug("JBPM Camel Consumer configured and started on all available deployments");
        }

    }

    @Override
    protected void doStop() throws Exception {
        super.doStop();
        DeploymentService deploymentService
                = (DeploymentService) ServiceRegistry.get().service(ServiceRegistry.DEPLOYMENT_SERVICE);
        if (configuration.getDeploymentId() != null) {
            LOGGER.debug("JBPM Camel Consumer unconfigured and stopped for deployment id {}", configuration.getDeploymentId());
        } else {
            ((ListenerSupport) deploymentService).removeListener(this);

            LOGGER.debug("JBPM Camel Consumer unconfigured and stopped on all available deployments");
        }

        if (JBPMConstants.JBPM_EVENT_EMITTER.equals(configuration.getEventListenerType())) {
            ServiceRegistry.get().remove("CamelEventEmitter");
        }

    }

    public void sendMessage(String eventType, Object body) {
        Exchange exchange = createExchange(false);
        exchange.getIn().setHeader("EventType", eventType);

        exchange.getIn().setBody(body);

        if (!endpoint.isSynchronous()) {
            // use default consumer callback
            AsyncCallback cb = defaultConsumerCallback(exchange, false);
            getAsyncProcessor().process(exchange, cb);
        } else {
            try {
                getProcessor().process(exchange);
            } catch (Exception e) {
                exchange.setException(e);
            }

            // handle any thrown exception
            if (exchange.getException() != null) {
                getExceptionHandler().handleException("Error processing exchange", exchange, exchange.getException());
            }
            releaseExchange(exchange, false);
        }
    }

    @Override
    public void onDeploy(DeploymentEvent event) {
        InternalRuntimeManager manager = (InternalRuntimeManager) event.getDeployedUnit().getRuntimeManager();
        configure(manager, this);
    }

    @Override
    public void onUnDeploy(DeploymentEvent event) {
        // no-op
    }

    @Override
    public void onActivate(DeploymentEvent event) {
        // no-op
    }

    @Override
    public void onDeactivate(DeploymentEvent event) {
        // no-op
    }

    protected void configure(InternalRuntimeManager manager, JBPMConsumer consumer) {
        String eventListenerType = configuration.getEventListenerType();
        if (eventListenerType == null) {
            return;
        }

        configureConsumer(eventListenerType, manager, consumer);
    }

    protected void configureConsumer(String eventListenerType, InternalRuntimeManager manager, JBPMConsumer consumer) {
        LOGGER.debug("Configuring Camel JBPM Consumer for {} on runtime manager {}", eventListenerType, manager);

        CacheManager cacheManager = manager.getCacheManager();
        JBPMCamelConsumerAware consumerAware = null;
        if (JBPMConstants.JBPM_PROCESS_EVENT_LISTENER.equals(eventListenerType)) {
            consumerAware = (JBPMCamelConsumerAware) cacheManager
                    .get("new org.apache.camel.component.jbpm.listeners.CamelProcessEventListener()");
            if (consumerAware == null) {
                consumerAware = new CamelProcessEventListener();
                cacheManager.add("new org.apache.camel.component.jbpm.listeners.CamelProcessEventListener()", consumerAware);
            }
            LOGGER.debug("Configuring JBPMConsumer on process event listener {}", consumerAware);
        } else if (JBPMConstants.JBPM_TASK_EVENT_LISTENER.equals(eventListenerType)) {
            consumerAware = (JBPMCamelConsumerAware) cacheManager
                    .get("new org.apache.camel.component.jbpm.listeners.CamelTaskEventListener()");
            if (consumerAware == null) {
                consumerAware = new CamelTaskEventListener();
                cacheManager.add("new org.apache.camel.component.jbpm.listeners.CamelTaskEventListener()", consumerAware);
            }
            LOGGER.debug("Configuring JBPMConsumer on task event listener {}", consumerAware);
        } else if (JBPMConstants.JBPM_CASE_EVENT_LISTENER.equals(eventListenerType)) {
            consumerAware = (JBPMCamelConsumerAware) cacheManager
                    .get("new org.apache.camel.component.jbpm.listeners.CamelCaseEventListener()");
            if (consumerAware == null) {
                consumerAware = new CamelCaseEventListener();
                cacheManager.add("new org.apache.camel.component.jbpm.listeners.CamelCaseEventListener()", consumerAware);
            }
            LOGGER.debug("Configuring JBPMConsumer on case event listener {}", consumerAware);
        } else if (JBPMConstants.JBPM_EVENT_EMITTER.equals(eventListenerType)) {
            LOGGER.debug("Configuring JBPMConsumer for event emitter");
            ServiceRegistry.get().register("CamelEventEmitter",
                    new CamelEventEmitter(this, configuration.getEmitterSendItems()));

            return;
        }

        LOGGER.debug("Adding consumer {} on {}", consumer, consumerAware);
        consumerAware.addConsumer(consumer);
    }

    @Override
    public String toString() {
        return "JBPMConsumer [endpoint=" + endpoint + ", configuration=" + configuration + "]";
    }
}


text:
module.exports = function ucPlatformjJudge(ua, browser) {
  if(ua && browser && ua.match(/UC/) && browser.name === 'Android Browser') {
    var ucstr = ua.substring(ua.indexOf('UC'), ua.length);
    var uclen = ucstr.indexOf(' ');
    uclen = uclen > -1 ? uclen : ucstr.length;
    browser.name = 'UC Android Browser';
    browser.version = ucstr.substring(ucstr.indexOf('/') + 1, uclen);
  }

  return browser;
};

redpajama_set_name: RedPajamaGithub


text:
"use strict";

import {IDirective, ILogService, IScope, IAugmentedJQuery, IAttributes} from "angular";

/**
 * Directive that executes an expression when the element it is applied to gets an `escape` keydown event.
 */
export class TodoEscapeDirective implements IDirective {

	public restrict: string = "A";
	public scope: boolean = false; // uses parent's scope

	public $log: ILogService;

	public constructor($log: ILogService) {
		this.$log = $log;
	}

	public link(scope: IScope, elem: IAugmentedJQuery, attrs: IAttributes): void {
		this.$log.log("todoEscape directive loaded");
		const ESCAPE_KEY: number = 27;

		elem.bind("keydown", (event: JQueryEventObject) => {
			if (event.keyCode === ESCAPE_KEY) {
				scope.$apply(attrs["todoEscape"]);
			}
		});

		scope.$on("$destroy", () => {
			elem.unbind("keydown");
		});
	}
}


text:
package com.ainrif.apiator.test.model.micronaut.smoke;

import com.ainrif.apiator.test.model.core.Dto01_Plain;
import com.ainrif.apiator.test.model.core.Dto02_Complex;
import io.micronaut.http.annotation.Controller;

import javax.annotation.Nullable;

@Controller("/controller")
public class MicronautControllerImpl implements MicronautController {
    @Override
    public Dto02_Complex postWithCookieParam(String cookie, Dto02_Complex body) {
        return null;
    }

    @Override
    public Dto02_Complex getWithParams(String id,
                                       @Nullable String option,
                                       @Nullable Dto01_Plain exploded) {
        return null;
    }

    @Override
    public Dto02_Complex postWithCookieNamedParam(String id, Dto02_Complex body) {
        return null;
    }

    @Override
    public void deleteWithPathParamAndVoidReturn(String id) {
    }

    @Override
    public Dto02_Complex patch(Dto02_Complex body) {
        return null;
    }
}


text:
package de.free_creations.editors.contest;

import de.free_creations.editors.person.*;
import de.free_creations.dbEntities.ContestType;
import de.free_creations.nbPhon4Netbeans.IconManager;
import de.free_creations.nbPhonAPI.ContestTypeCollection;
import de.free_creations.nbPhonAPI.DataBaseNotReadyException;
import de.free_creations.nbPhonAPI.Manager;
import java.awt.Component;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.util.List;
import java.util.Objects;
import javax.swing.DefaultComboBoxModel;
import javax.swing.Icon;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.plaf.basic.BasicComboBoxRenderer;
import org.openide.util.Exceptions;

/**
 *
 * @author Harald Postner <Harald at free-creations.de>
 */
public class ContestTypeComboBox extends JComboBox<ContestTypeItem> {

  private final KeyListener keyListener
          = new KeyAdapter() {
            private final static char deleteChar = '\u007F';
            private final static char backspaceChar = '\u0008';

            @Override
            public void keyTyped(KeyEvent evt) {
              char c = evt.getKeyChar();
              switch (c) {
                case backspaceChar:
                case deleteChar:
                  setSelectedItem(null);
              }
            }
          };

  public ContestTypeComboBox() {
    super();
    ContestTypeComboBoxModel model = new ContestTypeComboBoxModel();
    setModel(model);
    setRenderer(new ContestTypeComboBoxRenderer());
  }

  public String getSelectedContestTypeId() {
    Object selectedItem = getSelectedItem();
    if (selectedItem instanceof ContestTypeItem) {
      return ((ContestTypeItem) selectedItem).contestTypeId;
    } else {
      return null;
    }
  }

  public void setSelectedContestTypeId(String id) {
    if (id == null) {
      setSelectedItem(null);
      return;
    }
    for (int i = 0; i < getItemCount(); i++) {
      ContestTypeItem item = getItemAt(i);
      if (item != null) {
        if (id.equals(item.contestTypeId)) {
          setSelectedIndex(i);
          return;
        }
      }
    }
  }

  public void setSelectedContestType(ContestType ct) {
    if (ct == null) {
      setSelectedItem(null);
    } else {
      setSelectedContestTypeId(ct.getContestTypeId());
    }
  }

  public ContestType getSelectedContestType() {
    String s = getSelectedContestTypeId();
    if (s == null) {
      return null;
    } else {
      ContestTypeCollection contestTypeCollection = Manager.getContestTypeCollection();
      try {
        return contestTypeCollection.findEntity(s);
      } catch (DataBaseNotReadyException ex) {
        return null;
      }
    }
  }

  public class ContestTypeComboBoxRenderer extends BasicComboBoxRenderer {

    @Override
    public Component getListCellRendererComponent(JList list,
            Object value,
            int index,
            boolean isSelected,
            boolean cellHasFocus) {
      Component c = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
      if (c instanceof JLabel) {
        JLabel l = (JLabel) c;
        if (value instanceof ContestTypeItem) {
          ContestTypeItem i = (ContestTypeItem) value;
          l.setText(i.name);
          l.setIcon(i.icon);
        }
        if (value == null) {
          l.setText(null);
          l.setIcon(null);
        }
      }
      return c;
    }

  }

  public class ContestTypeComboBoxModel extends DefaultComboBoxModel<ContestTypeItem> {

    public ContestTypeComboBoxModel() {
      super();
      addElement(null);
      if (java.beans.Beans.isDesignTime()) {
        ContestTypeItem l = new ContestTypeItem("ENSEMBLE", "Ensemble Playing", null);
        addElement(l);
        ContestTypeComboBoxModel.this.setSelectedItem(l);
      } else {
        ContestTypeCollection contestTypeCollection = Manager.getContestTypeCollection();
        List<ContestType> all = contestTypeCollection.getAll();
        for (ContestType ct : all) {
          ContestTypeItem i = new ContestTypeItem(
                  ct.getContestTypeId(),
                  ct.getName(),
                  IconManager.iconManager().image2icon(
                          IconManager.iconManager().getContestTypeImage(ct.getIcon())));
          addElement(i);
        }
        addKeyListener(keyListener);
      }
    }
  }
}

class ContestTypeItem {

  public final String contestTypeId;
  public final String name;
  public final Icon icon;

  public ContestTypeItem(String contestTypeId, String name, Icon icon) {
    this.contestTypeId = contestTypeId;
    this.name = name;
    this.icon = icon;
  }

  @Override
  public String toString() {
    return name;
  }

  @Override
  public int hashCode() {
    int hash = 3;
    hash = 53 * hash + Objects.hashCode(this.contestTypeId);
    return hash;
  }

  @Override
  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    }
    if (getClass() != obj.getClass()) {
      return false;
    }
    final ContestTypeItem other = (ContestTypeItem) obj;
    if (!Objects.equals(this.contestTypeId, other.contestTypeId)) {
      return false;
    }
    return true;
  }

}


text:
namespace Alachisoft.NCache.Management.ServiceControl
{
    public static class ServiceOptions
    {
        public static int START = 0;
        public static int STOP = 1;
        public static int RESTART = 2;
        public static int RESTARTNICCHANGE = 3;
        public static int ISRUNNING = 4;
    }
}


text:
namespace boost { namespace mpl {

template<>
struct size_impl< aux::half_open_range_tag >
{
    template< typename Range > struct apply
        : minus<
              typename Range::finish
            , typename Range::start
            >
    {
    };
};

}}

#endif // BOOST_MPL_AUX_RANGE_C_SIZE_HPP_INCLUDED


text:
/* ----------------------------------------------------------------------
 * Project:      CMSIS DSP Library
 * Title:        arm_lms_q31.c
 * Description:  Processing function for the Q31 LMS filter
 *
 * $Date:        23 April 2021
 * $Revision:    V1.9.0
 *
 * Target Processor: Cortex-M and Cortex-A cores
 * -------------------------------------------------------------------- */
/*
 * Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved.
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the License); you may
 * not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "dsp/filtering_functions.h"

/**
  @ingroup groupFilters
 */

/**
  @addtogroup LMS
  @{
 */

/**
  @brief         Processing function for Q31 LMS filter.
  @param[in]     S         points to an instance of the Q31 LMS filter structure.
  @param[in]     pSrc      points to the block of input data.
  @param[in]     pRef      points to the block of reference data.
  @param[out]    pOut      points to the block of output data.
  @param[out]    pErr      points to the block of error data.
  @param[in]     blockSize number of samples to process.
  @return        none

  @par           Scaling and Overflow Behavior
                   The function is implemented using an internal 64-bit accumulator.
                   The accumulator has a 2.62 format and maintains full precision of the intermediate
                   multiplication results but provides only a single guard bit.
                   Thus, if the accumulator result overflows it wraps around rather than clips.
                   In order to avoid overflows completely the input signal must be scaled down by
                   log2(numTaps) bits.
                   The reference signal should not be scaled down.
                   After all multiply-accumulates are performed, the 2.62 accumulator is shifted
                   and saturated to 1.31 format to yield the final result.
                   The output signal and error signal are in 1.31 format.
 @par
                   In this filter, filter coefficients are updated for each sample and
                   the updation of filter cofficients are saturted.
 */

void arm_lms_q31(
  const arm_lms_instance_q31 * S,
  const q31_t * pSrc,
        q31_t * pRef,
        q31_t * pOut,
        q31_t * pErr,
        uint32_t blockSize)
{
        q31_t *pState = S->pState;                     /* State pointer */
        q31_t *pCoeffs = S->pCoeffs;                   /* Coefficient pointer */
        q31_t *pStateCurnt;                            /* Points to the current sample of the state */
        q31_t *px, *pb;                                /* Temporary pointers for state and coefficient buffers */
        q31_t mu = S->mu;                              /* Adaptive factor */
        uint32_t numTaps = S->numTaps;                 /* Number of filter coefficients in the filter */
        uint32_t tapCnt, blkCnt;                       /* Loop counters */
        q63_t acc;                                     /* Accumulator */
        q31_t e = 0;                                   /* Error of data sample */
        q31_t alpha;                                   /* Intermediate constant for taps update */
        q31_t coef;                                    /* Temporary variable for coef */
        q31_t acc_l, acc_h;                            /* Temporary input */
        uint32_t uShift = ((uint32_t) S->postShift + 1U);
        uint32_t lShift = 32U - uShift;                /*  Shift to be applied to the output */

  /* S->pState points to buffer which contains previous frame (numTaps - 1) samples */
  /* pStateCurnt points to the location where the new input data should be written */
  pStateCurnt = &(S->pState[(numTaps - 1U)]);

  /* initialise loop count */
  blkCnt = blockSize;

  while (blkCnt > 0U)
  {
    /* Copy the new input sample into the state buffer */
    *pStateCurnt++ = *pSrc++;

    /* Initialize pState pointer */
    px = pState;

    /* Initialize coefficient pointer */
    pb = pCoeffs;

    /* Set the accumulator to zero */
    acc = 0;

#if defined (ARM_MATH_LOOPUNROLL)

    /* Loop unrolling: Compute 4 taps at a time. */
    tapCnt = numTaps >> 2U;

    while (tapCnt > 0U)
    {
      /* Perform the multiply-accumulate */
      /* acc +=  b[N] * x[n-N] */
      acc += ((q63_t) (*px++)) * (*pb++);

      /* acc +=  b[N-1] * x[n-N-1] */
      acc += ((q63_t) (*px++)) * (*pb++);

      /* acc +=  b[N-2] * x[n-N-2] */
      acc += ((q63_t) (*px++)) * (*pb++);

      /* acc +=  b[N-3] * x[n-N-3] */
      acc += ((q63_t) (*px++)) * (*pb++);

      /* Decrement loop counter */
      tapCnt--;
    }

    /* Loop unrolling: Compute remaining taps */
    tapCnt = numTaps % 0x4U;

#else

    /* Initialize tapCnt with number of samples */
    tapCnt = numTaps;

#endif /* #if defined (ARM_MATH_LOOPUNROLL) */

    while (tapCnt > 0U)
    {
      /* Perform the multiply-accumulate */
      acc += ((q63_t) (*px++)) * (*pb++);

      /* Decrement the loop counter */
      tapCnt--;
    }

    /* Converting the result to 1.31 format */
    /* Calc lower part of acc */
    acc_l = acc & 0xffffffff;

    /* Calc upper part of acc */
    acc_h = (acc >> 32) & 0xffffffff;

    acc = (uint32_t) acc_l >> lShift | acc_h << uShift;

    /* Store the result from accumulator into the destination buffer. */
    *pOut++ = (q31_t) acc;

    /* Compute and store error */
    e = *pRef++ - (q31_t) acc;
    *pErr++ = e;

    /* Compute alpha i.e. intermediate constant for taps update */
    alpha = (q31_t) (((q63_t) e * mu) >> 31);

    /* Initialize pState pointer */
    /* Advance state pointer by 1 for the next sample */
    px = pState++;

    /* Initialize coefficient pointer */
    pb = pCoeffs;

#if defined (ARM_MATH_LOOPUNROLL)

    /* Loop unrolling: Compute 4 taps at a time. */
    tapCnt = numTaps >> 2U;

    /* Update filter coefficients */
    while (tapCnt > 0U)
    {
      /* Perform the multiply-accumulate */

      /* coef is in 2.30 format */
      coef = (q31_t) (((q63_t) alpha * (*px++)) >> (32));
      /* get coef in 1.31 format by left shifting */
      *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U));
      /* update coefficient buffer to next coefficient */
      pb++;

      coef = (q31_t) (((q63_t) alpha * (*px++)) >> (32));
      *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U));
      pb++;

      coef = (q31_t) (((q63_t) alpha * (*px++)) >> (32));
      *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U));
      pb++;

      coef = (q31_t) (((q63_t) alpha * (*px++)) >> (32));
      *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U));
      pb++;

      /* Decrement loop counter */
      tapCnt--;
    }

    /* Loop unrolling: Compute remaining taps */
    tapCnt = numTaps % 0x4U;

#else

    /* Initialize tapCnt with number of samples */
    tapCnt = numTaps;

#endif /* #if defined (ARM_MATH_LOOPUNROLL) */

    while (tapCnt > 0U)
    {
      /* Perform the multiply-accumulate */
      coef = (q31_t) (((q63_t) alpha * (*px++)) >> (32));
      *pb = clip_q63_to_q31((q63_t) * pb + (coef << 1U));
      pb++;

      /* Decrement loop counter */
      tapCnt--;
    }

    /* Decrement loop counter */
    blkCnt--;
  }

  /* Processing is complete.
     Now copy the last numTaps - 1 samples to the start of the state buffer.
     This prepares the state buffer for the next function call. */

  /* Points to the start of the pState buffer */
  pStateCurnt = S->pState;

  /* copy data */
#if defined (ARM_MATH_LOOPUNROLL)

  /* Loop unrolling: Compute 4 taps at a time. */
  tapCnt = (numTaps - 1U) >> 2U;

  while (tapCnt > 0U)
  {
    *pStateCurnt++ = *pState++;
    *pStateCurnt++ = *pState++;
    *pStateCurnt++ = *pState++;
    *pStateCurnt++ = *pState++;

    /* Decrement loop counter */
    tapCnt--;
  }

  /* Loop unrolling: Compute remaining taps */
  tapCnt = (numTaps - 1U) % 0x4U;

#else

  /* Initialize tapCnt with number of samples */
  tapCnt = (numTaps - 1U);

#endif /* #if defined (ARM_MATH_LOOPUNROLL) */

  while (tapCnt > 0U)
  {
    *pStateCurnt++ = *pState++;

    /* Decrement loop counter */
    tapCnt--;
  }

}

/**
  @} end of LMS group
 */


text:
call cordova platform remove ios
call cordova platform remove android
call cordova plugin remove io.jxcore.node
call cordova plugin add jxcore-cordova/
call cordova platform add ios
call cordova platform add android


text: export { default } from 'ember-flexberry-designer/models/fd-aggregation';


text:
module ActiveMigration
  # Dependencies are supported by ActiveMigration in this module.  If you set some dependencies
  # they'll be ran before Base#run is called.  Specifying dependencies is easy:
  #
  #   set_dependencies  [:supplier_migration, :manufacturer_migration]
  #
  module Dependencies

    def self.included(base)#:nodoc:
      base.class_eval do
        alias_method_chain :run, :dependencies
        class << self
          attr_accessor :dependencies, :completed
          # Sets the dependencies for the migration
          #
          #   set_dependencies  [:supplier_migration, :manufacturer_migration]
          def set_dependencies(dependencies)
            @dependencies = dependencies
          end
          alias dependencies= set_dependencies
          def completed? #:nodoc:
            @completed
          end
          def is_completed #:nodoc:
            @completed = true
          end
          alias completed completed?
          def dependencies #:nodoc:
            @dependencies || []
          end
        end
      end
    end

    def run_with_dependencies(skip_dependencies=false) #:nodoc:
      if skip_dependencies
        logger.info("#{self.class.to_s} is skipping dependencies.")
        run_without_dependencies
      else
        self.class.dependencies.each do |dependency|
          migration = dependency.to_s.camelize.constantize
          unless migration.completed?
            logger.info("#{self.class.to_s} is running #{migration.to_s} as a dependency.")
            migration.new.run
            migration.is_completed
          end
        end
        run_without_dependencies unless self.class.completed?
      end
    end

  end
end


text:
/*
 * File: stl.h
 * -----------
 * Contains utility functions related to the STL collections.
 *
 * @author Marty Stepp
 * @version 2016/09/22
 * @since 2016/09/22
 */

#ifndef _stl_h
#define _stl_h

#include <initializer_list>
#include <iostream>
#include <iterator>
#include <vector>
#include "collections.h"

// STL containers:
// array, vector, deque, forward_list, ist, stack, queue, priority_queue,
// set, multiset, map, multimap, unordered_*, bitset, valarray

template <typename T>
std::ostream& operator <<(std::ostream& out, const std::initializer_list<T>& list) {
    return stanfordcpplib::collections::writeCollection(out, list);
}

template <typename T>
std::ostream& operator <<(std::ostream& out, const std::vector<T>& vec) {
    return stanfordcpplib::collections::writeCollection(out, vec);
}

#endif // _stl_h


text:
namespace sh
{

	void ActionDeleteMaterial::execute()
	{
		sh::Factory::getInstance().destroyMaterialInstance(mName);
	}

	void ActionCloneMaterial::execute()
	{
		sh::MaterialInstance* sourceMaterial = sh::Factory::getInstance().getMaterialInstance(mSourceName);
		std::string sourceMaterialParent = static_cast<sh::MaterialInstance*>(sourceMaterial->getParent())->getName();
		sh::MaterialInstance* material = sh::Factory::getInstance().createMaterialInstance(
					mDestName, sourceMaterialParent);
		sourceMaterial->copyAll(material, sourceMaterial, false);

		material->setSourceFile(sourceMaterial->getSourceFile());
	}

	void ActionSaveAll::execute()
	{
		sh::Factory::getInstance().saveAll();
	}

	void ActionChangeGlobalSetting::execute()
	{
		sh::Factory::getInstance().setGlobalSetting(mName, mNewValue);
	}

	void ActionCreateConfiguration::execute()
	{
		sh::Configuration newConfiguration;
		sh::Factory::getInstance().createConfiguration(mName);
	}

	void ActionDeleteConfiguration::execute()
	{
		sh::Factory::getInstance().destroyConfiguration(mName);
	}

	void ActionChangeConfiguration::execute()
	{
		sh::Configuration* c = sh::Factory::getInstance().getConfiguration(mName);
		c->setProperty(mKey, sh::makeProperty(new sh::StringValue(mValue)));
		sh::Factory::getInstance().notifyConfigurationChanged();
	}

	void ActionDeleteConfigurationProperty::execute()
	{
		sh::Configuration* c = sh::Factory::getInstance().getConfiguration(mName);
		c->deleteProperty(mKey);
		sh::Factory::getInstance().notifyConfigurationChanged();
	}

	void ActionSetMaterialProperty::execute()
	{
		sh::MaterialInstance* m = sh::Factory::getInstance().getMaterialInstance(mName);
		m->setProperty(mKey, sh::makeProperty(mValue));

		sh::Factory::getInstance().notifyConfigurationChanged();
	}

	void ActionDeleteMaterialProperty::execute()
	{
		sh::MaterialInstance* m = sh::Factory::getInstance().getMaterialInstance(mName);
		m->deleteProperty(mKey);

		sh::Factory::getInstance().notifyConfigurationChanged();
	}

	void ActionCreatePass::execute()
	{
		sh::MaterialInstance* m = sh::Factory::getInstance().getMaterialInstance(mName);
		m->createPass();

		sh::Factory::getInstance().notifyConfigurationChanged();
	}

	void ActionDeletePass::execute()
	{
		sh::MaterialInstance* m = sh::Factory::getInstance().getMaterialInstance(mName);
		m->deletePass(mPassIndex);

		sh::Factory::getInstance().notifyConfigurationChanged();
	}

	void ActionSetPassProperty::execute()
	{
		sh::MaterialInstance* m = sh::Factory::getInstance().getMaterialInstance(mName);
		assert (m->getPasses()->size() > mPassIndex);
		m->getPasses()->at(mPassIndex).setProperty (mKey, sh::makeProperty(mValue));

		sh::Factory::getInstance().notifyConfigurationChanged();
	}

	void ActionDeletePassProperty::execute()
	{
		sh::MaterialInstance* m = sh::Factory::getInstance().getMaterialInstance(mName);
		assert (m->getPasses()->size() > mPassIndex);
		m->getPasses()->at(mPassIndex).deleteProperty(mKey);

		sh::Factory::getInstance().notifyConfigurationChanged();
	}

	void ActionSetShaderProperty::execute()
	{
		sh::MaterialInstance* m = sh::Factory::getInstance().getMaterialInstance(mName);
		assert (m->getPasses()->size() > mPassIndex);
		m->getPasses()->at(mPassIndex).mShaderProperties.setProperty (mKey, sh::makeProperty(mValue));

		sh::Factory::getInstance().notifyConfigurationChanged();
	}

	void ActionDeleteShaderProperty::execute()
	{
		sh::MaterialInstance* m = sh::Factory::getInstance().getMaterialInstance(mName);
		assert (m->getPasses()->size() > mPassIndex);
		m->getPasses()->at(mPassIndex).mShaderProperties.deleteProperty (mKey);

		sh::Factory::getInstance().notifyConfigurationChanged();
	}

	void ActionSetTextureProperty::execute()
	{
		sh::MaterialInstance* m = sh::Factory::getInstance().getMaterialInstance(mName);
		assert (m->getPasses()->size() > mPassIndex);
		assert (m->getPasses()->at(mPassIndex).mTexUnits.size() > mTextureIndex);
		m->getPasses()->at(mPassIndex).mTexUnits.at(mTextureIndex).setProperty(mKey, sh::makeProperty(mValue));

		sh::Factory::getInstance().notifyConfigurationChanged();
	}

	void ActionDeleteTextureProperty::execute()
	{
		sh::MaterialInstance* m = sh::Factory::getInstance().getMaterialInstance(mName);
		assert (m->getPasses()->size() > mPassIndex);
		assert (m->getPasses()->at(mPassIndex).mTexUnits.size() > mTextureIndex);
		m->getPasses()->at(mPassIndex).mTexUnits.at(mTextureIndex).deleteProperty(mKey);

		sh::Factory::getInstance().notifyConfigurationChanged();
	}

	void ActionCreateTextureUnit::execute()
	{
		sh::MaterialInstance* m = sh::Factory::getInstance().getMaterialInstance(mName);
		assert (m->getPasses()->size() > mPassIndex);
		m->getPasses()->at(mPassIndex).createTextureUnit(mTexUnitName);

		sh::Factory::getInstance().notifyConfigurationChanged();
	}

	void ActionDeleteTextureUnit::execute()
	{
		sh::MaterialInstance* m = sh::Factory::getInstance().getMaterialInstance(mName);
		assert (m->getPasses()->size() > mPassIndex);
		assert (m->getPasses()->at(mPassIndex).mTexUnits.size() > mTextureIndex);

		m->getPasses()->at(mPassIndex).mTexUnits.erase(m->getPasses()->at(mPassIndex).mTexUnits.begin() + mTextureIndex);

		sh::Factory::getInstance().notifyConfigurationChanged();
	}

	void ActionMoveTextureUnit::execute()
	{
		sh::MaterialInstance* m = sh::Factory::getInstance().getMaterialInstance(mName);
		assert (m->getPasses()->size() > mPassIndex);
		assert (m->getPasses()->at(mPassIndex).mTexUnits.size() > mTextureIndex);
		if (!mMoveUp)
			assert (m->getPasses()->at(mPassIndex).mTexUnits.size() > mTextureIndex+1);

		std::vector<MaterialInstanceTextureUnit> textures = m->getPasses()->at(mPassIndex).mTexUnits;
		if (mMoveUp)
			std::swap(textures[mTextureIndex-1], textures[mTextureIndex]);
		else
			std::swap(textures[mTextureIndex+1], textures[mTextureIndex]);
		m->getPasses()->at(mPassIndex).mTexUnits = textures;

		sh::Factory::getInstance().notifyConfigurationChanged();
	}

	void ActionChangeTextureUnitName::execute()
	{
		sh::MaterialInstance* m = sh::Factory::getInstance().getMaterialInstance(mName);
		assert (m->getPasses()->size() > mPassIndex);
		assert (m->getPasses()->at(mPassIndex).mTexUnits.size() > mTextureIndex);

		m->getPasses()->at(mPassIndex).mTexUnits[mTextureIndex].setName(mTexUnitName);

		sh::Factory::getInstance().notifyConfigurationChanged();
	}
}


text:
package master

import (
	"fmt"
	"net"
	"path"
	"runtime"

	kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/api"
	"k8s.io/kubernetes/cmd/kubeadm/app/images"
	"k8s.io/kubernetes/pkg/api"
	"k8s.io/kubernetes/pkg/api/resource"
	clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
	ipallocator "k8s.io/kubernetes/pkg/registry/core/service/ipallocator"
	"k8s.io/kubernetes/pkg/util/intstr"
)

// TODO(phase1+): kube-proxy should be a daemonset, three different daemonsets should not be here
func createKubeProxyPodSpec(s *kubeadmapi.MasterConfiguration, architecture string) api.PodSpec {
	envParams := kubeadmapi.GetEnvParams()
	privilegedTrue := true
	return api.PodSpec{
		SecurityContext: &api.PodSecurityContext{HostNetwork: true},
		NodeSelector: map[string]string{
			"beta.kubernetes.io/arch": architecture,
		},
		Containers: []api.Container{{
			Name:            kubeProxy,
			Image:           images.GetCoreImage(images.KubeProxyImage, s, envParams["hyperkube_image"]),
			Command:         append(getComponentCommand("proxy", s), "--kubeconfig=/run/kubeconfig"),
			SecurityContext: &api.SecurityContext{Privileged: &privilegedTrue},
			VolumeMounts: []api.VolumeMount{
				{
					Name:      "dbus",
					MountPath: "/var/run/dbus",
					ReadOnly:  false,
				},
				{
					// TODO there are handful of clever options to get around this, but it's
					// easier to just mount kubelet's config here; we should probably just
					// make sure that proxy reads the token and CA cert from /run/secrets
					// and accepts `--master` at the same time
					//
					// clever options include:
					//  - do CSR dance and create kubeconfig and mount it as a secret
					//  - create a service account with a second secret encoding kubeconfig
					//  - use init container to convert known information to kubeconfig
					//  - ...whatever
					Name:      "kubeconfig",
					MountPath: "/run/kubeconfig",
					ReadOnly:  false,
				},
			},
		}},
		Volumes: []api.Volume{
			{
				Name: "kubeconfig",
				VolumeSource: api.VolumeSource{
					HostPath: &api.HostPathVolumeSource{Path: path.Join(envParams["kubernetes_dir"], "kubelet.conf")},
				},
			},
			{
				Name: "dbus",
				VolumeSource: api.VolumeSource{
					HostPath: &api.HostPathVolumeSource{Path: "/var/run/dbus"},
				},
			},
		},
	}
}

func createKubeDNSPodSpec(s *kubeadmapi.MasterConfiguration) api.PodSpec {

	dnsPodResources := api.ResourceList{
		api.ResourceName(api.ResourceCPU):    resource.MustParse("100m"),
		api.ResourceName(api.ResourceMemory): resource.MustParse("170Mi"),
	}

	healthzPodResources := api.ResourceList{
		api.ResourceName(api.ResourceCPU):    resource.MustParse("10m"),
		api.ResourceName(api.ResourceMemory): resource.MustParse("50Mi"),
	}

	kubeDNSPort := int32(10053)
	dnsmasqPort := int32(53)

	nslookup := fmt.Sprintf("nslookup kubernetes.default.svc.%s 127.0.0.1", s.Networking.DNSDomain)

	nslookup = fmt.Sprintf("-cmd=%s:%d >/dev/null && %s:%d >/dev/null",
		nslookup, dnsmasqPort,
		nslookup, kubeDNSPort,
	)

	return api.PodSpec{
		NodeSelector: map[string]string{
			"beta.kubernetes.io/arch": runtime.GOARCH,
		},
		Containers: []api.Container{
			// DNS server
			{
				Name:  "kube-dns",
				Image: images.GetAddonImage(images.KubeDNSImage),
				Resources: api.ResourceRequirements{
					Limits:   dnsPodResources,
					Requests: dnsPodResources,
				},
				Args: []string{
					fmt.Sprintf("--domain=%s", s.Networking.DNSDomain),
					fmt.Sprintf("--dns-port=%d", kubeDNSPort),
					// TODO __PILLAR__FEDERATIONS__DOMAIN__MAP__
				},
				LivenessProbe: &api.Probe{
					Handler: api.Handler{
						HTTPGet: &api.HTTPGetAction{
							Path:   "/healthz",
							Port:   intstr.FromInt(8080),
							Scheme: api.URISchemeHTTP,
						},
					},
					InitialDelaySeconds: 60,
					TimeoutSeconds:      5,
					SuccessThreshold:    1,
					FailureThreshold:    1,
				},
				// # we poll on pod startup for the Kubernetes master service and
				// # only setup the /readiness HTTP server once that's available.
				ReadinessProbe: &api.Probe{
					Handler: api.Handler{
						HTTPGet: &api.HTTPGetAction{
							Path:   "/readiness",
							Port:   intstr.FromInt(8081),
							Scheme: api.URISchemeHTTP,
						},
					},
					InitialDelaySeconds: 30,
					TimeoutSeconds:      5,
				},
				Ports: []api.ContainerPort{
					{
						ContainerPort: kubeDNSPort,
						Name:          "dns-local",
						Protocol:      api.ProtocolUDP,
					},
					{
						ContainerPort: kubeDNSPort,
						Name:          "dns-tcp-local",
						Protocol:      api.ProtocolTCP,
					},
				},
			},
			// dnsmasq
			{
				Name:  "dnsmasq",
				Image: images.GetAddonImage(images.KubeDNSmasqImage),
				Resources: api.ResourceRequirements{
					Limits:   dnsPodResources,
					Requests: dnsPodResources,
				},
				Args: []string{
					"--cache-size=1000",
					"--no-resolv",
					fmt.Sprintf("--server=127.0.0.1#%d", kubeDNSPort),
				},
				Ports: []api.ContainerPort{
					{
						ContainerPort: dnsmasqPort,
						Name:          "dns",
						Protocol:      api.ProtocolUDP,
					},
					{
						ContainerPort: dnsmasqPort,
						Name:          "dns-tcp",
						Protocol:      api.ProtocolTCP,
					},
				},
			},
			// healthz
			{
				Name:  "healthz",
				Image: images.GetAddonImage(images.KubeExechealthzImage),
				Resources: api.ResourceRequirements{
					Limits:   healthzPodResources,
					Requests: healthzPodResources,
				},
				Args: []string{
					nslookup,
					"-port=8080",
					"-quiet",
				},
				Ports: []api.ContainerPort{{
					ContainerPort: 8080,
					Protocol:      api.ProtocolTCP,
				}},
			},
		},
		DNSPolicy: api.DNSDefault,
	}

}

func createKubeDNSServiceSpec(s *kubeadmapi.MasterConfiguration) (*api.ServiceSpec, error) {
	_, n, err := net.ParseCIDR(s.Networking.ServiceSubnet)
	if err != nil {
		return nil, fmt.Errorf("could not parse %q: %v", s.Networking.ServiceSubnet, err)
	}
	ip, err := ipallocator.GetIndexedIP(n, 10)
	if err != nil {
		return nil, fmt.Errorf("unable to allocate IP address for kube-dns addon from the given CIDR (%q) [%v]", s.Networking.ServiceSubnet, err)
	}

	svc := &api.ServiceSpec{
		Selector: map[string]string{"name": "kube-dns"},
		Ports: []api.ServicePort{
			{Name: "dns", Port: 53, Protocol: api.ProtocolUDP},
			{Name: "dns-tcp", Port: 53, Protocol: api.ProtocolTCP},
		},
		ClusterIP: ip.String(),
	}

	return svc, nil
}

func CreateEssentialAddons(s *kubeadmapi.MasterConfiguration, client *clientset.Clientset) error {
	arches := [3]string{"amd64", "arm", "arm64"}

	for _, arch := range arches {
		kubeProxyDaemonSet := NewDaemonSet(kubeProxy+"-"+arch, createKubeProxyPodSpec(s, arch))
		SetMasterTaintTolerations(&kubeProxyDaemonSet.Spec.Template.ObjectMeta)

		if _, err := client.Extensions().DaemonSets(api.NamespaceSystem).Create(kubeProxyDaemonSet); err != nil {
			return fmt.Errorf("<master/addons> failed creating essential kube-proxy addon [%v]", err)
		}
	}

	fmt.Println("<master/addons> created essential addon: kube-proxy")

	kubeDNSDeployment := NewDeployment("kube-dns", 1, createKubeDNSPodSpec(s))
	SetMasterTaintTolerations(&kubeDNSDeployment.Spec.Template.ObjectMeta)

	if _, err := client.Extensions().Deployments(api.NamespaceSystem).Create(kubeDNSDeployment); err != nil {
		return fmt.Errorf("<master/addons> failed creating essential kube-dns addon [%v]", err)
	}

	kubeDNSServiceSpec, err := createKubeDNSServiceSpec(s)
	if err != nil {
		return fmt.Errorf("<master/addons> failed creating essential kube-dns addon - %v", err)
	}

	kubeDNSService := NewService("kube-dns", *kubeDNSServiceSpec)
	if _, err := client.Services(api.NamespaceSystem).Create(kubeDNSService); err != nil {
		return fmt.Errorf("<master/addons> failed creating essential kube-dns addon [%v]", err)
	}

	fmt.Println("<master/addons> created essential addon: kube-dns")

	return nil
}


text:
require("../core/core.module");

import { ProviderPickerEditorComponent } from "./provider-picker-editor.component";
import { ProviderPickerListComponent } from "./provider-picker-list.component";
import { ProviderPickerComponent } from "./provider-picker.component";
import { ProviderPickerActionCreator } from "./provider-picker.actions";
import { ProviderPickerService } from "./provider-picker.service";
import *  as reducers from "./provider-picker.reducers";

var app = (<any>angular.module("app.providerPicker", [
    "app.core"
]));

app.service("providerPickerActionCreator",["$location","dispatcher","providerPickerService","guid",ProviderPickerActionCreator]);
app.service("providerPickerService",["$q","apiEndpoint","fetch",ProviderPickerService]);
app.component((ProviderPickerEditorComponent as any).config);
app.component((ProviderPickerListComponent as any).config);
app.component((ProviderPickerComponent as any).config);

app.config(["reducersProvider", reducersProvider => {
	reducersProvider.configure(reducers.addProviderPickerReducer);
    reducersProvider.configure(reducers.allProviderPickersReducer);
    reducersProvider.configure(reducers.removeProviderPickerReducer);
}]);


text:
<!DOCTYPE html>

  <link rel="stylesheet" href="style.css">

  <link rel="stylesheet" href="./jquery.fullPage.css"/>
  <link rel="stylesheet" href="fadestyle.css">

</script>
<title>T H R I V E</title>

Consious?

 FAST FASHION dominerar idag modebranscehn.
        De traditionella uppdelningarna vår/sommar och höst/vinter
        har idag delats upp på minst 52 micro-kollektiner per år vilket
        genererar en ohållbar konsumtion av kläder. De mesta av dessa
        kläder slängs sedan efter bara fåtalet användningar,
        detta vill vi på THRIVE ändra på in vårt arbete med hållbart mode.

          T H R I V E är Sveriges största PETA-certifierade butik. PETA-certifikatet baseras på att det inte har gjorts några djurförsök på material eller färdiga produkter och lovar att inte göra det i framtiden.

          Om hållbart mode ska förbli hållbart är
          detta en viktig pelare.

          T H R I V Es vision är att erbjuda exklusiva och noggrant utvalda kollektioner från världens ledande hållbara varumärken. Kollektionerna är ofta små och och limiterade. Tillsammans med PETA-certifikatet bidrar de till en positiv förändring för miljön, djuren och människorna.
          Respektfullt mode utan kompromisser – Hos THRIVE  är alla vinnare.

          Genom att vara aktivt medveten med vilka kläder du väljer att köpa kan du faktiskt göra skillnad. Våra jeans från Mud Jeans t.ex har livstids reparation.
          Hur bra är inte det?
          Den ekologiska bomullen kombinerat med reparationen gör jeansen till en hållbar vinnare i alla lägen som slipper att bli slängda.


text:
package io.kubernetes.client.openapi.models;

import io.kubernetes.client.fluent.Fluent;
import io.kubernetes.client.fluent.Nested;

/** Generated */
public interface V1PodTemplateFluent<A extends V1PodTemplateFluent<A>> extends Fluent<A> {
  public String getApiVersion();

  public A withApiVersion(String apiVersion);

  public Boolean hasApiVersion();

  public String getKind();

  public A withKind(String kind);

  public Boolean hasKind();

  /**
   * This method has been deprecated, please use method buildMetadata instead.
   *
   * @return The buildable object.
   */
  @Deprecated
  public V1ObjectMeta getMetadata();

  public V1ObjectMeta buildMetadata();

  public A withMetadata(V1ObjectMeta metadata);

  public Boolean hasMetadata();

  public V1PodTemplateFluent.MetadataNested<A> withNewMetadata();

  public V1PodTemplateFluent.MetadataNested<A> withNewMetadataLike(V1ObjectMeta item);

  public V1PodTemplateFluent.MetadataNested<A> editMetadata();

  public V1PodTemplateFluent.MetadataNested<A> editOrNewMetadata();

  public V1PodTemplateFluent.MetadataNested<A> editOrNewMetadataLike(V1ObjectMeta item);

  /**
   * This method has been deprecated, please use method buildTemplate instead.
   *
   * @return The buildable object.
   */
  @Deprecated
  public V1PodTemplateSpec getTemplate();

  public V1PodTemplateSpec buildTemplate();

  public A withTemplate(V1PodTemplateSpec template);

  public Boolean hasTemplate();

  public V1PodTemplateFluent.TemplateNested<A> withNewTemplate();

  public V1PodTemplateFluent.TemplateNested<A> withNewTemplateLike(V1PodTemplateSpec item);

  public V1PodTemplateFluent.TemplateNested<A> editTemplate();

  public V1PodTemplateFluent.TemplateNested<A> editOrNewTemplate();

  public V1PodTemplateFluent.TemplateNested<A> editOrNewTemplateLike(V1PodTemplateSpec item);

  public interface MetadataNested<N>
      extends Nested<N>, V1ObjectMetaFluent<V1PodTemplateFluent.MetadataNested<N>> {
    public N and();

    public N endMetadata();
  }

  public interface TemplateNested<N>
      extends Nested<N>, V1PodTemplateSpecFluent<V1PodTemplateFluent.TemplateNested<N>> {
    public N and();

    public N endTemplate();
  }
}


text:
var spawn = require("child_process").spawn;
var boundary = require("./boundary.js");

function iis() {
}

iis.getWorkerProcesses = function(callback) {
  var _this = this;

  var appcmd = spawn("appcmd", ["list", "wps"], { cwd: process.env.windir + "\\system32\\inetsrv" });
  var processes = [];

  appcmd.stdout = boundary.delimited(appcmd.stdout);

  appcmd.stdout.on("message", function(message) {
    message = message.toString();

    if (!message)
      return;

    if (message.indexOf("ERROR") != -1) {
      callback(message);
      return;
    }

    var match = /WP "(\d+)" \(applicationPool:(.+?)\)/.exec(message);

    processes.push({
      processId: parseInt(match[1], 10),
      appPool: match[2]
    });
  });

  appcmd.on("error", function() {
    // Ignore if appcmd doesn't exist
    // Don't need to call the callback, 'close' event will be emitted
  });

  appcmd.on("close", function() {
    callback(null, processes);
  });
};

module.exports = iis;


text:
<?php

namespace FSi\Bundle\TerytDatabaseBundle\Entity;

use FSi\Bundle\TerytDatabaseBundle\Model\Territory\Province as BaseProvince;

class Province extends BaseProvince
{
}


text:
package ua.com.fielden.platform.expression.lexer.case_when.then_;

import ua.com.fielden.platform.expression.automata.AbstractState;
import ua.com.fielden.platform.expression.automata.NoTransitionAvailable;

public class State2 extends AbstractState {

    public State2() {
        super("S2", false);
    }

    @Override
    protected AbstractState transition(final char symbol) throws NoTransitionAvailable {
        if (symbol == 'e' || symbol == 'E') {
            return getAutomata().getState("S3");
        }
        throw new NoTransitionAvailable("Invalid symbol '" + symbol + "'", this, symbol);
    }

}


text:
package test

import (
	"context"

	dataSource "github.com/tidepool-org/platform/data/source"
	"github.com/tidepool-org/platform/page"
	"github.com/tidepool-org/platform/request"
)

type ListInput struct {
	UserID     string
	Filter     *dataSource.Filter
	Pagination *page.Pagination
}

type ListOutput struct {
	SourceArray dataSource.SourceArray
	Error       error
}

type CreateInput struct {
	UserID string
	Create *dataSource.Create
}

type CreateOutput struct {
	Source *dataSource.Source
	Error  error
}

type GetOutput struct {
	Source *dataSource.Source
	Error  error
}

type UpdateInput struct {
	ID        string
	Condition *request.Condition
	Update    *dataSource.Update
}

type UpdateOutput struct {
	Source *dataSource.Source
	Error  error
}

type DeleteInput struct {
	ID        string
	Condition *request.Condition
}

type DeleteOutput struct {
	Deleted bool
	Error   error
}

type Client struct {
	ListInvocations      int
	ListInputs           []ListInput
	ListStub             func(ctx context.Context, userID string, filter *dataSource.Filter, pagination *page.Pagination) (dataSource.SourceArray, error)
	ListOutputs          []ListOutput
	ListOutput           *ListOutput
	CreateInvocations    int
	CreateInputs         []CreateInput
	CreateStub           func(ctx context.Context, userID string, create *dataSource.Create) (*dataSource.Source, error)
	CreateOutputs        []CreateOutput
	CreateOutput         *CreateOutput
	DeleteAllInvocations int
	DeleteAllInputs      []string
	DeleteAllStub        func(ctx context.Context, id string) error
	DeleteAllOutputs     []error
	DeleteAllOutput      *error
	GetInvocations       int
	GetInputs            []string
	GetStub              func(ctx context.Context, id string) (*dataSource.Source, error)
	GetOutputs           []GetOutput
	GetOutput            *GetOutput
	UpdateInvocations    int
	UpdateInputs         []UpdateInput
	UpdateStub           func(ctx context.Context, id string, condition *request.Condition, create *dataSource.Update) (*dataSource.Source, error)
	UpdateOutputs        []UpdateOutput
	UpdateOutput         *UpdateOutput
	DeleteInvocations    int
	DeleteInputs         []DeleteInput
	DeleteStub           func(ctx context.Context, id string, condition *request.Condition) (bool, error)
	DeleteOutputs        []DeleteOutput
	DeleteOutput         *DeleteOutput
}

func NewClient() *Client {
	return &Client{}
}

func (c *Client) List(ctx context.Context, userID string, filter *dataSource.Filter, pagination *page.Pagination) (dataSource.SourceArray, error) {
	c.ListInvocations++
	c.ListInputs = append(c.ListInputs, ListInput{UserID: userID, Filter: filter, Pagination: pagination})
	if c.ListStub != nil {
		return c.ListStub(ctx, userID, filter, pagination)
	}
	if len(c.ListOutputs) > 0 {
		output := c.ListOutputs[0]
		c.ListOutputs = c.ListOutputs[1:]
		return output.SourceArray, output.Error
	}
	if c.ListOutput != nil {
		return c.ListOutput.SourceArray, c.ListOutput.Error
	}
	panic("List has no output")
}

func (c *Client) Create(ctx context.Context, userID string, create *dataSource.Create) (*dataSource.Source, error) {
	c.CreateInvocations++
	c.CreateInputs = append(c.CreateInputs, CreateInput{UserID: userID, Create: create})
	if c.CreateStub != nil {
		return c.CreateStub(ctx, userID, create)
	}
	if len(c.CreateOutputs) > 0 {
		output := c.CreateOutputs[0]
		c.CreateOutputs = c.CreateOutputs[1:]
		return output.Source, output.Error
	}
	if c.CreateOutput != nil {
		return c.CreateOutput.Source, c.CreateOutput.Error
	}
	panic("Create has no output")
}

func (c *Client) DeleteAll(ctx context.Context, userID string) error {
	c.DeleteAllInvocations++
	c.DeleteAllInputs = append(c.DeleteAllInputs, userID)
	if c.DeleteAllStub != nil {
		return c.DeleteAllStub(ctx, userID)
	}
	if len(c.DeleteAllOutputs) > 0 {
		output := c.DeleteAllOutputs[0]
		c.DeleteAllOutputs = c.DeleteAllOutputs[1:]
		return output
	}
	if c.DeleteAllOutput != nil {
		return *c.DeleteAllOutput
	}
	panic("DeleteAll has no output")
}

func (c *Client) Get(ctx context.Context, id string) (*dataSource.Source, error) {
	c.GetInvocations++
	c.GetInputs = append(c.GetInputs, id)
	if c.GetStub != nil {
		return c.GetStub(ctx, id)
	}
	if len(c.GetOutputs) > 0 {
		output := c.GetOutputs[0]
		c.GetOutputs = c.GetOutputs[1:]
		return output.Source, output.Error
	}
	if c.GetOutput != nil {
		return c.GetOutput.Source, c.GetOutput.Error
	}
	panic("Get has no output")
}

func (c *Client) Update(ctx context.Context, id string, condition *request.Condition, update *dataSource.Update) (*dataSource.Source, error) {
	c.UpdateInvocations++
	c.UpdateInputs = append(c.UpdateInputs, UpdateInput{ID: id, Condition: condition, Update: update})
	if c.UpdateStub != nil {
		return c.UpdateStub(ctx, id, condition, update)
	}
	if len(c.UpdateOutputs) > 0 {
		output := c.UpdateOutputs[0]
		c.UpdateOutputs = c.UpdateOutputs[1:]
		return output.Source, output.Error
	}
	if c.UpdateOutput != nil {
		return c.UpdateOutput.Source, c.UpdateOutput.Error
	}
	panic("Update has no output")
}

func (c *Client) Delete(ctx context.Context, id string, condition *request.Condition) (bool, error) {
	c.DeleteInvocations++
	c.DeleteInputs = append(c.DeleteInputs, DeleteInput{ID: id, Condition: condition})
	if c.DeleteStub != nil {
		return c.DeleteStub(ctx, id, condition)
	}
	if len(c.DeleteOutputs) > 0 {
		output := c.DeleteOutputs[0]
		c.DeleteOutputs = c.DeleteOutputs[1:]
		return output.Deleted, output.Error
	}
	if c.DeleteOutput != nil {
		return c.DeleteOutput.Deleted, c.DeleteOutput.Error
	}
	panic("Delete has no output")
}

func (c *Client) AssertOutputsEmpty() {
	if len(c.ListOutputs) > 0 {
		panic("ListOutputs is not empty")
	}
	if len(c.CreateOutputs) > 0 {
		panic("CreateOutputs is not empty")
	}
	if len(c.DeleteAllOutputs) > 0 {
		panic("DeleteAllOutputs is not empty")
	}
	if len(c.GetOutputs) > 0 {
		panic("GetOutputs is not empty")
	}
	if len(c.UpdateOutputs) > 0 {
		panic("UpdateOutputs is not empty")
	}
	if len(c.DeleteOutputs) > 0 {
		panic("DeleteOutputs is not empty")
	}
}


text:
"""
===================
The Population View
===================

The :class:`PopulationView` is a user-facing abstraction that manages read and write access
to the underlying simulation :term:`State Table`. It has two primary responsibilities:

    1. To provide user access to subsets of the simulation state table
       when it is safe to do so.
    2. To allow the user to update the simulation state in a controlled way.

"""
from typing import TYPE_CHECKING, List, Tuple, Union

import pandas as pd

from vivarium.framework.population.exceptions import PopulationError

if TYPE_CHECKING:
    # Cyclic import
    from vivarium.framework.population.manager import PopulationManager

class PopulationView:
    """A read/write manager for the simulation state table.
    It can be used to both read and update the state of the population. A
    PopulationView can only read and write columns for which it is configured.
    Attempts to update non-existent columns are ignored except during
    simulant creation when new columns are allowed to be created.

    Parameters
    ----------
    manager
        The population manager for the simulation.
    columns
        The set of columns this view should have access too.  If empty, this
        view will have access to the entire state table.
    query
        A :mod:`pandas`-style filter that will be applied any time this
        view is read from.

    Notes
    -----
    By default, this view will filter out ``untracked`` simulants unless
    the ``tracked`` column is specified in the initialization arguments.

    """

    def __init__(
        self,
        manager: "PopulationManager",
        view_id: int,
        columns: Union[List[str], Tuple[str]] = (),
        query: str = None,
    ):
        self._manager = manager
        self._id = view_id
        self._columns = list(columns)
        self._query = query

    @property
    def name(self):
        return f"population_view_{self._id}"

    @property
    def columns(self) -> List[str]:
        """The columns that the view can read and update.

        If the view was created with ``None`` as the columns argument, then
        the view will have access to the full table by default. That case
        should be only be used in situations where the full state table is
        actually needed, like for some metrics collection applications.

        """
        if not self._columns:
            return list(self._manager.get_population(True).columns)
        return list(self._columns)

    @property
    def query(self) -> Union[str, None]:
        """A :mod:`pandas` style query to filter the rows of this view.

        This query will be applied any time the view is read. This query may
        reference columns not in the view's columns.

        """
        return self._query

    def subview(self, columns: Union[List[str], Tuple[str]]) -> "PopulationView":
        """Retrieves a new view with a subset of this view's columns.

        Parameters
        ----------
        columns
            The set of columns to provide access to in the subview. Must be
            a proper subset of this view's columns.

        Returns
        -------
        PopulationView
            A new view with access to the requested columns.

        Raises
        ------
        PopulationError
            If the requested columns are not a proper subset of this view's
            columns or no columns are requested.

        Notes
        -----
        Subviews are useful during population initialization. The original
        view may contain both columns that a component needs to create and
        update as well as columns that the component needs to read.  By
        requesting a subview, a component can read the sections it needs
        without running the risk of trying to access uncreated columns
        because the component itself has not created them.

        """

        if not columns or set(columns) - set(self.columns):
            raise PopulationError(
                f"Invalid subview requested.  Requested columns must be a non-empty "
                f"subset of this view's columns.  Requested columns: {columns}, "
                f"Available columns: {self.columns}"
            )
        # Skip constraints for requesting subviews.
        return self._manager._get_view(columns, self.query)

    def get(self, index: pd.Index, query: str = "") -> pd.DataFrame:
        """Select the rows represented by the given index from this view.

        For the rows in ``index`` get the columns from the simulation's
        state table to which this view has access. The resulting rows may be
        further filtered by the view's query and only return a subset
        of the population represented by the index.

        Parameters
        ----------
        index
            Index of the population to get.
        query
            Additional conditions used to filter the index. These conditions
            will be unioned with the default query of this view.  The query
            provided may use columns that this view does not have access to.

        Returns
        -------
        pandas.DataFrame
            A table with the subset of the population requested.

        Raises
        ------
        PopulationError
            If this view has access to columns that have not yet been created
            and this method is called.  If you see this error, you should
            request a subview with the columns you need read access to.

        See Also
        --------
        :meth:`subview <PopulationView.subview>`

        """
        pop = self._manager.get_population(True).loc[index]

        if not index.empty:
            if self._query:
                pop = pop.query(self._query)
            if query:
                pop = pop.query(query)

        non_existent_columns = set(self.columns) - set(pop.columns)
        if non_existent_columns:
            raise PopulationError(
                f"Requested column(s) {non_existent_columns} not in population table. "
                "This is likely due to a failure to require some columns, randomness "
                "streams, or pipelines when registering a simulant initializer, a value "
                "producer, or a value modifier. NOTE: It is possible for a run to "
                "succeed even if resource requirements were not properly specified in "
                "the simulant initializers or pipeline creation/modification calls. This "
                "success depends on component initialization order which may change in "
                "different run settings."
            )
        return pop.loc[:, self.columns]

    def update(self, population_update: Union[pd.DataFrame, pd.Series]) -> None:
        """Updates the state table with the provided data.

        Parameters
        ----------
        population_update
            The data which should be copied into the simulation's state. If
            the update is a :class:`pandas.DataFrame`, it can contain a subset
            of the view's columns but no extra columns. If ``pop`` is a
            :class:`pandas.Series` it must have a name that matches one of
            this view's columns unless the view only has one column in which
            case the Series will be assumed to refer to that regardless of its
            name.

        Raises
        ------
        PopulationError
            If the provided data name or columns do not match columns that
            this view manages or if the view is being updated with a data
            type inconsistent with the original population data.

        """
        state_table = self._manager.get_population(True)
        population_update = self._format_update_and_check_preconditions(
            population_update,
            state_table,
            self.columns,
            self._manager.creating_initial_population,
            self._manager.adding_simulants,
        )
        if self._manager.creating_initial_population:
            new_columns = list(set(population_update).difference(state_table))
            self._manager._population[new_columns] = population_update[new_columns]
        elif not population_update.empty:
            update_columns = list(set(population_update).intersection(state_table))
            for column in update_columns:
                column_update = self._update_column_and_ensure_dtype(
                    population_update[column],
                    state_table[column],
                    self._manager.adding_simulants,
                )
                self._manager._population.loc[:, column] = column_update

    def __repr__(self):
        return (
            f"PopulationView(_id={self._id}, _columns={self.columns}, _query={self._query})"
        )

    ##################
    # Helper methods #
    ##################

    @staticmethod
    def _format_update_and_check_preconditions(
        population_update: Union[pd.Series, pd.DataFrame],
        state_table: pd.DataFrame,
        view_columns: List[str],
        creating_initial_population: bool,
        adding_simulants: bool,
    ) -> pd.DataFrame:
        """Standardizes the population update format and checks preconditions.

        Managing how values get written to the underlying population state table is critical
        to rule out several categories of error in client simulation code. The state table
        is modified at three different times. In the first, the initial population table
        is being created and new columns are being added to the state table with their
        initial values. In the second, the population manager has added new rows with
        appropriate null values to the state table in response to population creation
        dictated by client code, and population updates are being provided to fill in
        initial values for those new rows. In the final case, state table values for
        existing simulants are being overridden as part of a time step.

        All of these modification scenarios require that certain preconditions are met.
        For all scenarios, we require

            1. The update is a DataFrame or a Series.
            2. If it is a series, it is nameless and this view manages a single column
               or it is named and it's name matches a column in this PopulationView.
            3. The update matches at least one column in this PopulationView.
            4. The update columns are a subset of the columns managed by this
               PopulationView.
            5. The update index is a subset of the existing state table index.
               PopulationViews don't make rows, they just fill them in.

        For initial population creation additional preconditions are documented in
        :meth:`PopulationView._ensure_coherent_initialization`. Outside population
        initialization, we require that all columns in the update to be present in
        the existing state table. When new simulants are added in the middle of the
        simulation, we require that only one component provide updates to a column.

        Parameters
        ----------
        population_update
            The update to the simulation state table.
        state_table
            The existing simulation state table.
        view_columns
            The columns managed by this PopulationView.
        creating_initial_population
            Whether the initial population is being created.
        adding_simulants
            Whether new simulants are currently being initialized.

        Returns
        -------
        pandas.DataFrame
            The input data formatted as a DataFrame.

        Raises
        ------
        TypeError
            If the population update is not a :class:`pandas.Series` or a
            :class:`pandas.DataFrame`.
        PopulationError
            If the update violates any preconditions relevant to the context in which
            the update is provided (initial population creation, population creation on
            time steps, or population state changes on time steps).

        """
        assert not creating_initial_population or adding_simulants

        population_update = PopulationView._coerce_to_dataframe(
            population_update,
            view_columns,
        )

        unknown_simulants = len(population_update.index.difference(state_table.index))
        if unknown_simulants:
            raise PopulationError(
                "Population updates must have an index that is a subset of the current "
                f"population state table. {unknown_simulants} simulants were provided "
                f"in an update with no matching index in the existing table."
            )

        if creating_initial_population:
            PopulationView._ensure_coherent_initialization(population_update, state_table)
        else:
            new_columns = list(set(population_update).difference(state_table))
            if new_columns:
                raise PopulationError(
                    f"Attempting to add new columns {new_columns} to the state table "
                    f"outside the initial population creation phase."
                )

            if adding_simulants:
                state_table_new_simulants = state_table.loc[population_update.index, :]
                conflicting_columns = [
                    column
                    for column in population_update
                    if state_table_new_simulants[column].notnull().any()
                    and not population_update[column].equals(
                        state_table_new_simulants[column]
                    )
                ]
                if conflicting_columns:
                    raise PopulationError(
                        "Two components are providing conflicting initialization data "
                        f"for the state table columns: {conflicting_columns}."
                    )

        return population_update

    @staticmethod
    def _coerce_to_dataframe(
        population_update: Union[pd.Series, pd.DataFrame],
        view_columns: List[str],
    ) -> pd.DataFrame:
        """Coerce all population updates to a :class:`pandas.DataFrame` format.

        Parameters
        ----------
        population_update
            The update to the simulation state table.

        Returns
        -------
        pandas.DataFrame
            The input data formatted as a DataFrame.

        Raises
        ------
        TypeError
            If the population update is not a :class:`pandas.Series` or a
            :class:`pandas.DataFrame`.
        PopulationError
            If the input data is a :class:`pandas.Series` and this :class:`PopulationView`
            manages multiple columns or if the population update contains columns not
            managed by this view.

        """
        if not isinstance(population_update, (pd.Series, pd.DataFrame)):
            raise TypeError(
                "The population update must be a pandas Series or DataFrame. "
                f"A {type(population_update)} was provided."
            )

        if isinstance(population_update, pd.Series):
            if population_update.name is None:
                if len(view_columns) == 1:
                    population_update.name = view_columns[0]
                else:
                    raise PopulationError(
                        "Cannot update with an unnamed pandas series unless there "
                        "is only a single column in the view."
                    )

            population_update = pd.DataFrame(population_update)

        if not set(population_update.columns).issubset(view_columns):
            raise PopulationError(
                f"Cannot update with a DataFrame or Series that contains columns "
                f"the view does not. Dataframe contains the following extra columns: "
                f"{set(population_update.columns).difference(view_columns)}."
            )

        update_columns = list(population_update)
        if not update_columns:
            raise PopulationError(
                "The update method of population view is being called "
                "on a DataFrame with no columns."
            )

        return population_update

    @staticmethod
    def _ensure_coherent_initialization(
        population_update: pd.DataFrame, state_table: pd.DataFrame
    ) -> None:
        """Ensure that overlapping population updates have the same information.

        During population initialization, each state table column should be updated by
        exactly one component and each component with an initializer should create at
        least one column. Sometimes components are a little sloppy and provide
        duplicate column information, which we should continue to allow. We want to ensure
        that a column is only getting one set of unique values though.

        Parameters
        ----------
        population_update
            The update to the simulation state table.
        state_table
            The existing simulation state table. When this method is called, the table
            should be in a partially complete state. That is the provided population
            update should carry some new attributes we need to assign.

        Raises
        -----
        PopulationError
            If the population update contains no new information or if it contains
            information in conflict with the existing state table.

        """
        missing_pops = len(state_table.index.difference(population_update.index))
        if missing_pops:
            raise PopulationError(
                f"Components should initialize the same population at the simulation start. "
                f"A component is missing updates for {missing_pops} simulants."
            )
        new_columns = set(population_update).difference(state_table)
        overlapping_columns = set(population_update).intersection(state_table)
        if not new_columns:
            raise PopulationError(
                f"A component is providing a population update for {list(population_update)} "
                "but all provided columns are initialized by other components."
            )
        for column in overlapping_columns:
            if not population_update[column].equals(state_table[column]):
                raise PopulationError(
                    "Two components are providing conflicting initialization data for the "
                    f"{column} state table column."
                )

    @staticmethod
    def _update_column_and_ensure_dtype(
        update: pd.Series,
        existing: pd.Series,
        adding_simulants: bool,
    ) -> pd.Series:
        """Build the updated state table column with an appropriate dtype.

        Parameters
        ----------
        update
            The new column values for a subset of the existing index.
        existing
            The existing column values for all simulants in the state table.
        adding_simulants
            Whether new simulants are currently being initialized.

        Returns
        -------
        pd.Series
            The column with the provided update applied

        """
        # FIXME: This code does not work as described. I'm leaving it here because writing
        #  real dtype checking code is a pain and we never seem to hit the actual edge cases.
        #  I've also seen this error, though I don't have a reproducible and useful example.
        #  I'm reasonably sure what's really being accounted for here is non-nullable columns
        #  that temporarily have null values introduced in the space between rows being
        #  added to the state table and initializers filling them with their first values.
        #  That means the space of dtype casting issues is actually quite small. What should
        #  actually happen in the long term is to separate the population creation entirely
        #  from the mutation of existing state. I.e. there's not an actual reason we need
        #  to do all these sequential operations on a single underlying dataframe during
        #  the creation of new simulants besides the fact that it's the existing
        #  implementation.
        update_values = update.values.copy()
        new_state_table_values = existing.values.copy()
        update_index_positional = existing.index.get_indexer(update.index)

        # Assumes the update index labels can be interpreted as an array position.
        new_state_table_values[update_index_positional] = update_values

        unmatched_dtypes = new_state_table_values.dtype != update_values.dtype
        if unmatched_dtypes and not adding_simulants:
            # This happens when the population is being grown because extending
            # the index forces columns that don't have a natural null type
            # to become 'object'
            raise PopulationError(
                "A component is corrupting the population table by modifying the dtype of "
                f"the {update.name} column from {existing.dtype} to {update.dtype}."
            )
        new_state_table_values = new_state_table_values.astype(update_values.dtype)
        return pd.Series(new_state_table_values, index=existing.index, name=existing.name)


text:
<?php  namespace Kris\LaravelFormBuilder\Fields;

use Kris\LaravelFormBuilder\Form;

abstract class ParentType extends FormField
{

    /**
     * @var FormField[]
     */
    protected $children;

    /**
     * Populate children array
     *
     * @return mixed
     */
    abstract protected function createChildren();

    /**
     * @param       $name
     * @param       $type
     * @param Form  $parent
     * @param array $options
     */
    public function __construct($name, $type, Form $parent, array $options = [])
    {
        parent::__construct($name, $type, $parent, $options);
        // If there is default value provided and  setValue was not triggered
        // in the parent call, make sure we generate child elements
        if ($this->hasDefault) {
            $this->createChildren();
        }
        $this->checkIfFileType();
    }

    /**
     * @param  mixed $val
     *
     * @return ChildFormType
     */
    public function setValue($val)
    {
        parent::setValue($val);
        $this->createChildren();

        return $this;
    }

    /**
     * @param array $options
     * @param bool  $showLabel
     * @param bool  $showField
     * @param bool  $showError
     * @return string
     */
    public function render(array $options = [], $showLabel = true, $showField = true, $showError = true)
    {
        $options['children'] = $this->children;
        return parent::render($options, $showLabel, $showField, $showError);
    }

    /**
     * Get all children of the choice field
     *
     * @return mixed
     */
    public function getChildren()
    {
        return $this->children;
    }

    /**
     * Get a child of the choice field
     *
     * @return mixed
     */
    public function getChild($key)
    {
        return array_get($this->children, $key);
    }

    /**
     * @inheritdoc
     */
    public function isRendered()
    {
        foreach ((array) $this->children as $key => $child) {
            if ($child->isRendered()) {
                return true;
            }
        }

        return parent::isRendered();
    }

    /**
     * Get child dynamically
     *
     * @param $name
     * @return FormField
     */
    public function __get($name)
    {
        return $this->getChild($name);
    }

    /**
     * Check if field has type property and if it's file add enctype/multipart to form
     */
    protected function checkIfFileType()
    {
        if ($this->getOption('type') === 'file') {
            $this->parent->setFormOption('files', true);
        }
    }

    public function __clone()
    {
        foreach ((array) $this->children as $key => $child) {
            $this->children[$key] = clone $child;
        }
    }

    /**
     * @inheritdoc
     */
    public function disable()
    {
        foreach ($this->children as $field) {
            $field->disable();
        }
    }

    /**
     * @inheritdoc
     */
    public function enable()
    {
        foreach ($this->children as $field) {
            $field->enable();
        }
    }

    /**
     * @inheritdoc
     */
    public function getValidationRules()
    {
        return $this->formHelper->mergeFieldsRules($this->children);
    }
}


text:
//---------------------------------------------------------------------------
#ifndef valueflowH
#define valueflowH
//---------------------------------------------------------------------------

#include <string>
#include "config.h"

class Token;
class TokenList;
class SymbolDatabase;
class ErrorLogger;
class Settings;

namespace ValueFlow {
    class CPPCHECKLIB Value {
    public:
        explicit Value(long long val = 0) : intvalue(val), tokvalue(nullptr), varvalue(val), condition(0), varId(0U), conditional(false), inconclusive(false), defaultArg(false), valueKind(ValueKind::Possible) {}
        Value(const Token *c, long long val) : intvalue(val), tokvalue(nullptr), varvalue(val), condition(c), varId(0U), conditional(false), inconclusive(false), defaultArg(false), valueKind(ValueKind::Possible) {}

        /** int value */
        long long intvalue;

        /** token value - the token that has the value. this is used for pointer aliases, strings, etc. */
        const Token *tokvalue;

        /** For calculated values - variable value that calculated value depends on */
        long long varvalue;

        /** Condition that this value depends on (TODO: replace with a 'callstack') */
        const Token *condition;

        /** For calculated values - varId that calculated value depends on */
        unsigned int varId;

        /** Conditional value */
        bool conditional;

        /** Is this value inconclusive? */
        bool inconclusive;

        /** Is this value passed as default parameter to the function? */
        bool defaultArg;

        /** How known is this value */
        enum ValueKind {
            /** This value is possible, other unlisted values may also be possible */
            Possible,
            /** Only listed values are possible */
            Known,
            /** Max value. Greater values are impossible. */
            Max,
            /** Min value. Smaller values are impossible. */
            Min
        } valueKind;

        void setKnown() {
            valueKind = ValueKind::Known;
        }

        bool isKnown() const {
            return valueKind == ValueKind::Known;
        }

        void setPossible() {
            valueKind = ValueKind::Possible;
        }

        bool isPossible() const {
            return valueKind == ValueKind::Possible;
        }

        void changeKnownToPossible() {
            if (isKnown())
                valueKind = ValueKind::Possible;
        }
    };

    void setValues(TokenList *tokenlist, SymbolDatabase* symboldatabase, ErrorLogger *errorLogger, const Settings *settings);

    std::string eitherTheConditionIsRedundant(const Token *condition);
}

#endif // valueflowH


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Acacia caerulescens Maslin & Court

### Remarks
null


text:
module Ant {

    export class Global {

        showNotification(message: string, notificationType: string) {
            var notification = $("#notification").data("kendoNotification");

            if (notification) {
                notification.show(message, notificationType);
            }
            else {
                alert(message);
            }
            if (notificationType === "error") {
                //this.addJSErrorSeleniumAttributeToBody(message);
            }
        }

        CreateRandomString(lengthOfString: number) {
            var text = "";
            var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

            for (var i = 0; i < lengthOfString; i++)
                text += possible.charAt(Math.floor(Math.random() * possible.length));

            return text;
        }

    }
}

interface Window { antGlobal: Ant.Global; }

window.antGlobal = new Ant.Global();


text:
package br.com.goncalves.pugnotification.notification;

import android.app.NotificationManager;
import android.content.Context;

import br.com.goncalves.pugnotification.utils.Utils;

public class PugNotification {
    private static final String TAG = PugNotification.class.getSimpleName();
    public static PugNotification mSingleton = null;
    public final Context mContext;
    public boolean shutdown;

    public PugNotification(Context context) {
        this.mContext = context;
    }

    public static PugNotification with(Context context) {
        if (mSingleton == null) {
            synchronized (PugNotification.class) {
                if (mSingleton == null) {
                    mSingleton = new Contractor(context).build();
                }
            }
        }
        return mSingleton;
    }

    public Load load() {
        return new Load(this);
    }

    public void cancel(int identifier) {
        Utils.checkMain();
        NotificationManager notifyManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
        notifyManager.cancel(identifier);
    }

    public void shutdown() {
        if (this == mSingleton) {
            throw new UnsupportedOperationException("Default singleton instance cannot be shutdown.");
        }
        if (shutdown) {
            return;
        }
        shutdown = true;
    }

    private static class Contractor {
        private final Context mContext;

        public Contractor(Context context) {
            if (context == null) {
                throw new IllegalArgumentException("Context must not be null.");
            }
            this.mContext = context.getApplicationContext();
        }

        public PugNotification build() {
            return new PugNotification(mContext);
        }
    }
}


text:
class TestSuiteNoAtExit : public base::TestSuite {
 public:
  TestSuiteNoAtExit(int argc, char** argv) : TestSuite(argc, argv) {}
  ~TestSuiteNoAtExit() override = default;

 protected:
  void Initialize() override;

 private:
  base::TestDiscardableMemoryAllocator discardable_memory_allocator_;
};

void TestSuiteNoAtExit::Initialize() {
  // Run TestSuite::Initialize first so that logging is initialized.
  base::TestSuite::Initialize();

#if defined(OS_ANDROID)
  media::MediaCodecBridgeImpl::SetupCallbackHandlerForTesting();
#endif

  // Run this here instead of main() to ensure an AtExitManager is already
  // present.
  media::InitializeMediaLibrary();
  media::SetUpFakeLocalizedStrings();

  base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_);
}

int main(int argc, char** argv) {
  mojo::core::Init();
  TestSuiteNoAtExit test_suite(argc, argv);

  return base::LaunchUnitTests(
      argc, argv,
      base::BindOnce(&TestSuiteNoAtExit::Run, base::Unretained(&test_suite)));
}


text:
package org.apache.james.transport.matchers;

import org.apache.mailet.Mail;
import org.apache.mailet.MailAddress;

import java.util.Collection;

/**
 * Does a DNS lookup (MX and A/CNAME records) on the sender's domain. If there
 * are no entries, the domain is considered fake and the match is successful.
 */
public class SenderInFakeDomain extends AbstractNetworkMatcher {

    public Collection<MailAddress> match(Mail mail) {
        if (mail.getSender() == null) {
            return null;
        }
        String domain = mail.getSender().getDomain();
        // DNS Lookup for this domain
        Collection<String> servers = getMailetContext().getMailServers(domain);
        if (servers.size() == 0) {
            // No records...could not deliver to this domain, so matches
            // criteria.
            log("No MX, A, or CNAME record found for domain: " + domain);
            return mail.getRecipients();
        } else if (matchNetwork(servers.iterator().next())) {
            /*
             * It could be a wildcard address like these:
             *
             * 64.55.105.9/32          # Allegiance Telecom Companies Worldwide (.nu)
             * 64.94.110.11/32         # VeriSign (.com .net)
             * 194.205.62.122/32       # Network Information Center - Ascension Island (.ac)
             * 194.205.62.62/32        # Internet Computer Bureau (.sh)
             * 195.7.77.20/32          # Fredrik Reutersward Data (.museum)
             * 206.253.214.102/32      # Internap Network Services (.cc)
             * 212.181.91.6/32         # .NU Domain Ltd. (.nu)
             * 219.88.106.80/32        # Telecom Online Solutions (.cx)
             * 194.205.62.42/32        # Internet Computer Bureau (.tm)
             * 216.35.187.246/32       # Cable & Wireless (.ws)
             * 203.119.4.6/32          # .PH TLD (.ph)
             *
             */
            log("Banned IP found for domain: " + domain);
            log(" --> :" + servers.iterator().next());
            return mail.getRecipients();
        } else {
            // Some servers were found... the domain is not fake.

            return null;
        }
    }
}


text:
/**
 *
 * @author greg (at) myrobotlab.org
 *
 * This file is part of MyRobotLab (http://myrobotlab.org).
 *
 * MyRobotLab is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version (subject to the "Classpath" exception
 * as provided in the LICENSE.txt file that accompanied this code).
 *
 * MyRobotLab is distributed in the hope that it will be useful or fun,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * All libraries in thirdParty bundle are subject to their own license
 * requirements - please refer to http://myrobotlab.org/libraries for
 * details.
 *
 * Enjoy !
 *
 * */

package org.myrobotlab.service.interfaces;

import java.util.ArrayList;

import org.myrobotlab.service.data.Pin;

public interface SensorDataPublisher {

	public ArrayList<Pin> getPinList();

	public Pin publishPin(Pin p);

}


text:
<?php

namespace Oro\Bundle\ImapBundle\OriginSyncCredentials;

use Oro\Bundle\ImapBundle\Entity\UserEmailOrigin;

/**
 * Wrong credential sync email box notification sender channel.
 */
interface NotificationSenderInterface
{
    /**
     * Sends notification message about given wrong email origin.
     */
    public function sendNotification(UserEmailOrigin $emailOrigin);
}


text:
/**
 * Require all error modules
 */

var modules = require('./lib');

/**
 * Expose `errors`
 */

var errors = module.exports = exports;

/**
 * Turn all errors into a factory
 */

for(var m in modules) {
  errors[m] = {};

  for(var error in modules[m]) {
    expose(errors[m], error, modules[m][error]);
  }
}

/**
 * Helper function for exposing errors
 *
 * @param {Object} anchor
 * @param {String} name
 * @param {String} message
 */

function expose(anchor, name, message) {
  Object.defineProperty(anchor, name, {
    enumerable: true,
    get: function() {
      return new Error(message);
    }
  });
}