text:
/**
 */
package COSEM.COSEMObjects.impl;

import COSEM.COSEMObjects.COSEMObjectsPackage;
import COSEM.COSEMObjects.OutputPulseValues_constants;

import COSEM.InterfaceClasses.impl.DataImpl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 *
 * An implementation of the model object 'Output Pulse Values constants'.
 *
 *

 * The following features are implemented:
 *

 *

 *
{@link COSEM.COSEMObjects.impl.OutputPulseValues_constantsImpl#getActiveenergymetrologicalLED Activeenergymetrological LED}

 *
{@link COSEM.COSEMObjects.impl.OutputPulseValues_constantsImpl#getReactiveenergymetrologicalLED Reactiveenergymetrological LED}

 *
{@link COSEM.COSEMObjects.impl.OutputPulseValues_constantsImpl#getApparentenergymetrologicalLED Apparentenergymetrological LED}

 *
{@link COSEM.COSEMObjects.impl.OutputPulseValues_constantsImpl#getActiveenergyoutputpulse Activeenergyoutputpulse}

 *
{@link COSEM.COSEMObjects.impl.OutputPulseValues_constantsImpl#getReactiveenergyoutputpulse Reactiveenergyoutputpulse}

 *
{@link COSEM.COSEMObjects.impl.OutputPulseValues_constantsImpl#getApparentenergyoutputpulse Apparentenergyoutputpulse}

 *
{@link COSEM.COSEMObjects.impl.OutputPulseValues_constantsImpl#getVolt_squaredhoursmetrologicalLED Volt squaredhoursmetrological LED}

 *
{@link COSEM.COSEMObjects.impl.OutputPulseValues_constantsImpl#getAmpere_squaredhoursmetrologicalLED Ampere squaredhoursmetrological LED}

 *
{@link COSEM.COSEMObjects.impl.OutputPulseValues_constantsImpl#getVolt_squaredhoursoutputpulse Volt squaredhoursoutputpulse}

 *
{@link COSEM.COSEMObjects.impl.OutputPulseValues_constantsImpl#getAmpere_squaredhoursoutputpulse Ampere squaredhoursoutputpulse}

 *

 *
 * @generated
 */
public class OutputPulseValues_constantsImpl extends DataImpl implements OutputPulseValues_constants {
	/**
	 * The default value of the '{@link #getActiveenergymetrologicalLED() Activeenergymetrological LED}' attribute.
	 *
	 *
	 * @see #getActiveenergymetrologicalLED()
	 * @generated
	 * @ordered
	 */
	protected static final double ACTIVEENERGYMETROLOGICAL_LED_EDEFAULT = 0.0;

	/**
	 * The cached value of the '{@link #getActiveenergymetrologicalLED() Activeenergymetrological LED}' attribute.
	 *
	 *
	 * @see #getActiveenergymetrologicalLED()
	 * @generated
	 * @ordered
	 */
	protected double activeenergymetrologicalLED = ACTIVEENERGYMETROLOGICAL_LED_EDEFAULT;

	/**
	 * The default value of the '{@link #getReactiveenergymetrologicalLED() Reactiveenergymetrological LED}' attribute.
	 *
	 *
	 * @see #getReactiveenergymetrologicalLED()
	 * @generated
	 * @ordered
	 */
	protected static final double REACTIVEENERGYMETROLOGICAL_LED_EDEFAULT = 0.0;

	/**
	 * The cached value of the '{@link #getReactiveenergymetrologicalLED() Reactiveenergymetrological LED}' attribute.
	 *
	 *
	 * @see #getReactiveenergymetrologicalLED()
	 * @generated
	 * @ordered
	 */
	protected double reactiveenergymetrologicalLED = REACTIVEENERGYMETROLOGICAL_LED_EDEFAULT;

	/**
	 * The default value of the '{@link #getApparentenergymetrologicalLED() Apparentenergymetrological LED}' attribute.
	 *
	 *
	 * @see #getApparentenergymetrologicalLED()
	 * @generated
	 * @ordered
	 */
	protected static final double APPARENTENERGYMETROLOGICAL_LED_EDEFAULT = 0.0;

	/**
	 * The cached value of the '{@link #getApparentenergymetrologicalLED() Apparentenergymetrological LED}' attribute.
	 *
	 *
	 * @see #getApparentenergymetrologicalLED()
	 * @generated
	 * @ordered
	 */
	protected double apparentenergymetrologicalLED = APPARENTENERGYMETROLOGICAL_LED_EDEFAULT;

	/**
	 * The default value of the '{@link #getActiveenergyoutputpulse() Activeenergyoutputpulse}' attribute.
	 *
	 *
	 * @see #getActiveenergyoutputpulse()
	 * @generated
	 * @ordered
	 */
	protected static final double ACTIVEENERGYOUTPUTPULSE_EDEFAULT = 0.0;

	/**
	 * The cached value of the '{@link #getActiveenergyoutputpulse() Activeenergyoutputpulse}' attribute.
	 *
	 *
	 * @see #getActiveenergyoutputpulse()
	 * @generated
	 * @ordered
	 */
	protected double activeenergyoutputpulse = ACTIVEENERGYOUTPUTPULSE_EDEFAULT;

	/**
	 * The default value of the '{@link #getReactiveenergyoutputpulse() Reactiveenergyoutputpulse}' attribute.
	 *
	 *
	 * @see #getReactiveenergyoutputpulse()
	 * @generated
	 * @ordered
	 */
	protected static final double REACTIVEENERGYOUTPUTPULSE_EDEFAULT = 0.0;

	/**
	 * The cached value of the '{@link #getReactiveenergyoutputpulse() Reactiveenergyoutputpulse}' attribute.
	 *
	 *
	 * @see #getReactiveenergyoutputpulse()
	 * @generated
	 * @ordered
	 */
	protected double reactiveenergyoutputpulse = REACTIVEENERGYOUTPUTPULSE_EDEFAULT;

	/**
	 * The default value of the '{@link #getApparentenergyoutputpulse() Apparentenergyoutputpulse}' attribute.
	 *
	 *
	 * @see #getApparentenergyoutputpulse()
	 * @generated
	 * @ordered
	 */
	protected static final double APPARENTENERGYOUTPUTPULSE_EDEFAULT = 0.0;

	/**
	 * The cached value of the '{@link #getApparentenergyoutputpulse() Apparentenergyoutputpulse}' attribute.
	 *
	 *
	 * @see #getApparentenergyoutputpulse()
	 * @generated
	 * @ordered
	 */
	protected double apparentenergyoutputpulse = APPARENTENERGYOUTPUTPULSE_EDEFAULT;

	/**
	 * The default value of the '{@link #getVolt_squaredhoursmetrologicalLED() Volt squaredhoursmetrological LED}' attribute.
	 *
	 *
	 * @see #getVolt_squaredhoursmetrologicalLED()
	 * @generated
	 * @ordered
	 */
	protected static final double VOLT_SQUAREDHOURSMETROLOGICAL_LED_EDEFAULT = 0.0;

	/**
	 * The cached value of the '{@link #getVolt_squaredhoursmetrologicalLED() Volt squaredhoursmetrological LED}' attribute.
	 *
	 *
	 * @see #getVolt_squaredhoursmetrologicalLED()
	 * @generated
	 * @ordered
	 */
	protected double volt_squaredhoursmetrologicalLED = VOLT_SQUAREDHOURSMETROLOGICAL_LED_EDEFAULT;

	/**
	 * The default value of the '{@link #getAmpere_squaredhoursmetrologicalLED() Ampere squaredhoursmetrological LED}' attribute.
	 *
	 *
	 * @see #getAmpere_squaredhoursmetrologicalLED()
	 * @generated
	 * @ordered
	 */
	protected static final double AMPERE_SQUAREDHOURSMETROLOGICAL_LED_EDEFAULT = 0.0;

	/**
	 * The cached value of the '{@link #getAmpere_squaredhoursmetrologicalLED() Ampere squaredhoursmetrological LED}' attribute.
	 *
	 *
	 * @see #getAmpere_squaredhoursmetrologicalLED()
	 * @generated
	 * @ordered
	 */
	protected double ampere_squaredhoursmetrologicalLED = AMPERE_SQUAREDHOURSMETROLOGICAL_LED_EDEFAULT;

	/**
	 * The default value of the '{@link #getVolt_squaredhoursoutputpulse() Volt squaredhoursoutputpulse}' attribute.
	 *
	 *
	 * @see #getVolt_squaredhoursoutputpulse()
	 * @generated
	 * @ordered
	 */
	protected static final double VOLT_SQUAREDHOURSOUTPUTPULSE_EDEFAULT = 0.0;

	/**
	 * The cached value of the '{@link #getVolt_squaredhoursoutputpulse() Volt squaredhoursoutputpulse}' attribute.
	 *
	 *
	 * @see #getVolt_squaredhoursoutputpulse()
	 * @generated
	 * @ordered
	 */
	protected double volt_squaredhoursoutputpulse = VOLT_SQUAREDHOURSOUTPUTPULSE_EDEFAULT;

	/**
	 * The default value of the '{@link #getAmpere_squaredhoursoutputpulse() Ampere squaredhoursoutputpulse}' attribute.
	 *
	 *
	 * @see #getAmpere_squaredhoursoutputpulse()
	 * @generated
	 * @ordered
	 */
	protected static final double AMPERE_SQUAREDHOURSOUTPUTPULSE_EDEFAULT = 0.0;

	/**
	 * The cached value of the '{@link #getAmpere_squaredhoursoutputpulse() Ampere squaredhoursoutputpulse}' attribute.
	 *
	 *
	 * @see #getAmpere_squaredhoursoutputpulse()
	 * @generated
	 * @ordered
	 */
	protected double ampere_squaredhoursoutputpulse = AMPERE_SQUAREDHOURSOUTPUTPULSE_EDEFAULT;

	/**
	 *
	 *
	 * @generated
	 */
	protected OutputPulseValues_constantsImpl() {
		super();
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return COSEMObjectsPackage.eINSTANCE.getOutputPulseValues_constants();
	}

	/**
	 *
	 *
	 * @generated
	 */
	public double getActiveenergymetrologicalLED() {
		return activeenergymetrologicalLED;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setActiveenergymetrologicalLED(double newActiveenergymetrologicalLED) {
		double oldActiveenergymetrologicalLED = activeenergymetrologicalLED;
		activeenergymetrologicalLED = newActiveenergymetrologicalLED;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__ACTIVEENERGYMETROLOGICAL_LED, oldActiveenergymetrologicalLED, activeenergymetrologicalLED));
	}

	/**
	 *
	 *
	 * @generated
	 */
	public double getReactiveenergymetrologicalLED() {
		return reactiveenergymetrologicalLED;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setReactiveenergymetrologicalLED(double newReactiveenergymetrologicalLED) {
		double oldReactiveenergymetrologicalLED = reactiveenergymetrologicalLED;
		reactiveenergymetrologicalLED = newReactiveenergymetrologicalLED;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__REACTIVEENERGYMETROLOGICAL_LED, oldReactiveenergymetrologicalLED, reactiveenergymetrologicalLED));
	}

	/**
	 *
	 *
	 * @generated
	 */
	public double getApparentenergymetrologicalLED() {
		return apparentenergymetrologicalLED;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setApparentenergymetrologicalLED(double newApparentenergymetrologicalLED) {
		double oldApparentenergymetrologicalLED = apparentenergymetrologicalLED;
		apparentenergymetrologicalLED = newApparentenergymetrologicalLED;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__APPARENTENERGYMETROLOGICAL_LED, oldApparentenergymetrologicalLED, apparentenergymetrologicalLED));
	}

	/**
	 *
	 *
	 * @generated
	 */
	public double getActiveenergyoutputpulse() {
		return activeenergyoutputpulse;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setActiveenergyoutputpulse(double newActiveenergyoutputpulse) {
		double oldActiveenergyoutputpulse = activeenergyoutputpulse;
		activeenergyoutputpulse = newActiveenergyoutputpulse;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__ACTIVEENERGYOUTPUTPULSE, oldActiveenergyoutputpulse, activeenergyoutputpulse));
	}

	/**
	 *
	 *
	 * @generated
	 */
	public double getReactiveenergyoutputpulse() {
		return reactiveenergyoutputpulse;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setReactiveenergyoutputpulse(double newReactiveenergyoutputpulse) {
		double oldReactiveenergyoutputpulse = reactiveenergyoutputpulse;
		reactiveenergyoutputpulse = newReactiveenergyoutputpulse;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__REACTIVEENERGYOUTPUTPULSE, oldReactiveenergyoutputpulse, reactiveenergyoutputpulse));
	}

	/**
	 *
	 *
	 * @generated
	 */
	public double getApparentenergyoutputpulse() {
		return apparentenergyoutputpulse;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setApparentenergyoutputpulse(double newApparentenergyoutputpulse) {
		double oldApparentenergyoutputpulse = apparentenergyoutputpulse;
		apparentenergyoutputpulse = newApparentenergyoutputpulse;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__APPARENTENERGYOUTPUTPULSE, oldApparentenergyoutputpulse, apparentenergyoutputpulse));
	}

	/**
	 *
	 *
	 * @generated
	 */
	public double getVolt_squaredhoursmetrologicalLED() {
		return volt_squaredhoursmetrologicalLED;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setVolt_squaredhoursmetrologicalLED(double newVolt_squaredhoursmetrologicalLED) {
		double oldVolt_squaredhoursmetrologicalLED = volt_squaredhoursmetrologicalLED;
		volt_squaredhoursmetrologicalLED = newVolt_squaredhoursmetrologicalLED;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__VOLT_SQUAREDHOURSMETROLOGICAL_LED, oldVolt_squaredhoursmetrologicalLED, volt_squaredhoursmetrologicalLED));
	}

	/**
	 *
	 *
	 * @generated
	 */
	public double getAmpere_squaredhoursmetrologicalLED() {
		return ampere_squaredhoursmetrologicalLED;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setAmpere_squaredhoursmetrologicalLED(double newAmpere_squaredhoursmetrologicalLED) {
		double oldAmpere_squaredhoursmetrologicalLED = ampere_squaredhoursmetrologicalLED;
		ampere_squaredhoursmetrologicalLED = newAmpere_squaredhoursmetrologicalLED;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__AMPERE_SQUAREDHOURSMETROLOGICAL_LED, oldAmpere_squaredhoursmetrologicalLED, ampere_squaredhoursmetrologicalLED));
	}

	/**
	 *
	 *
	 * @generated
	 */
	public double getVolt_squaredhoursoutputpulse() {
		return volt_squaredhoursoutputpulse;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setVolt_squaredhoursoutputpulse(double newVolt_squaredhoursoutputpulse) {
		double oldVolt_squaredhoursoutputpulse = volt_squaredhoursoutputpulse;
		volt_squaredhoursoutputpulse = newVolt_squaredhoursoutputpulse;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__VOLT_SQUAREDHOURSOUTPUTPULSE, oldVolt_squaredhoursoutputpulse, volt_squaredhoursoutputpulse));
	}

	/**
	 *
	 *
	 * @generated
	 */
	public double getAmpere_squaredhoursoutputpulse() {
		return ampere_squaredhoursoutputpulse;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setAmpere_squaredhoursoutputpulse(double newAmpere_squaredhoursoutputpulse) {
		double oldAmpere_squaredhoursoutputpulse = ampere_squaredhoursoutputpulse;
		ampere_squaredhoursoutputpulse = newAmpere_squaredhoursoutputpulse;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__AMPERE_SQUAREDHOURSOUTPUTPULSE, oldAmpere_squaredhoursoutputpulse, ampere_squaredhoursoutputpulse));
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__ACTIVEENERGYMETROLOGICAL_LED:
				return getActiveenergymetrologicalLED();
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__REACTIVEENERGYMETROLOGICAL_LED:
				return getReactiveenergymetrologicalLED();
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__APPARENTENERGYMETROLOGICAL_LED:
				return getApparentenergymetrologicalLED();
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__ACTIVEENERGYOUTPUTPULSE:
				return getActiveenergyoutputpulse();
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__REACTIVEENERGYOUTPUTPULSE:
				return getReactiveenergyoutputpulse();
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__APPARENTENERGYOUTPUTPULSE:
				return getApparentenergyoutputpulse();
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__VOLT_SQUAREDHOURSMETROLOGICAL_LED:
				return getVolt_squaredhoursmetrologicalLED();
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__AMPERE_SQUAREDHOURSMETROLOGICAL_LED:
				return getAmpere_squaredhoursmetrologicalLED();
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__VOLT_SQUAREDHOURSOUTPUTPULSE:
				return getVolt_squaredhoursoutputpulse();
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__AMPERE_SQUAREDHOURSOUTPUTPULSE:
				return getAmpere_squaredhoursoutputpulse();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__ACTIVEENERGYMETROLOGICAL_LED:
				setActiveenergymetrologicalLED((Double)newValue);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__REACTIVEENERGYMETROLOGICAL_LED:
				setReactiveenergymetrologicalLED((Double)newValue);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__APPARENTENERGYMETROLOGICAL_LED:
				setApparentenergymetrologicalLED((Double)newValue);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__ACTIVEENERGYOUTPUTPULSE:
				setActiveenergyoutputpulse((Double)newValue);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__REACTIVEENERGYOUTPUTPULSE:
				setReactiveenergyoutputpulse((Double)newValue);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__APPARENTENERGYOUTPUTPULSE:
				setApparentenergyoutputpulse((Double)newValue);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__VOLT_SQUAREDHOURSMETROLOGICAL_LED:
				setVolt_squaredhoursmetrologicalLED((Double)newValue);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__AMPERE_SQUAREDHOURSMETROLOGICAL_LED:
				setAmpere_squaredhoursmetrologicalLED((Double)newValue);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__VOLT_SQUAREDHOURSOUTPUTPULSE:
				setVolt_squaredhoursoutputpulse((Double)newValue);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__AMPERE_SQUAREDHOURSOUTPUTPULSE:
				setAmpere_squaredhoursoutputpulse((Double)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__ACTIVEENERGYMETROLOGICAL_LED:
				setActiveenergymetrologicalLED(ACTIVEENERGYMETROLOGICAL_LED_EDEFAULT);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__REACTIVEENERGYMETROLOGICAL_LED:
				setReactiveenergymetrologicalLED(REACTIVEENERGYMETROLOGICAL_LED_EDEFAULT);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__APPARENTENERGYMETROLOGICAL_LED:
				setApparentenergymetrologicalLED(APPARENTENERGYMETROLOGICAL_LED_EDEFAULT);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__ACTIVEENERGYOUTPUTPULSE:
				setActiveenergyoutputpulse(ACTIVEENERGYOUTPUTPULSE_EDEFAULT);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__REACTIVEENERGYOUTPUTPULSE:
				setReactiveenergyoutputpulse(REACTIVEENERGYOUTPUTPULSE_EDEFAULT);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__APPARENTENERGYOUTPUTPULSE:
				setApparentenergyoutputpulse(APPARENTENERGYOUTPUTPULSE_EDEFAULT);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__VOLT_SQUAREDHOURSMETROLOGICAL_LED:
				setVolt_squaredhoursmetrologicalLED(VOLT_SQUAREDHOURSMETROLOGICAL_LED_EDEFAULT);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__AMPERE_SQUAREDHOURSMETROLOGICAL_LED:
				setAmpere_squaredhoursmetrologicalLED(AMPERE_SQUAREDHOURSMETROLOGICAL_LED_EDEFAULT);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__VOLT_SQUAREDHOURSOUTPUTPULSE:
				setVolt_squaredhoursoutputpulse(VOLT_SQUAREDHOURSOUTPUTPULSE_EDEFAULT);
				return;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__AMPERE_SQUAREDHOURSOUTPUTPULSE:
				setAmpere_squaredhoursoutputpulse(AMPERE_SQUAREDHOURSOUTPUTPULSE_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__ACTIVEENERGYMETROLOGICAL_LED:
				return activeenergymetrologicalLED != ACTIVEENERGYMETROLOGICAL_LED_EDEFAULT;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__REACTIVEENERGYMETROLOGICAL_LED:
				return reactiveenergymetrologicalLED != REACTIVEENERGYMETROLOGICAL_LED_EDEFAULT;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__APPARENTENERGYMETROLOGICAL_LED:
				return apparentenergymetrologicalLED != APPARENTENERGYMETROLOGICAL_LED_EDEFAULT;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__ACTIVEENERGYOUTPUTPULSE:
				return activeenergyoutputpulse != ACTIVEENERGYOUTPUTPULSE_EDEFAULT;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__REACTIVEENERGYOUTPUTPULSE:
				return reactiveenergyoutputpulse != REACTIVEENERGYOUTPUTPULSE_EDEFAULT;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__APPARENTENERGYOUTPUTPULSE:
				return apparentenergyoutputpulse != APPARENTENERGYOUTPUTPULSE_EDEFAULT;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__VOLT_SQUAREDHOURSMETROLOGICAL_LED:
				return volt_squaredhoursmetrologicalLED != VOLT_SQUAREDHOURSMETROLOGICAL_LED_EDEFAULT;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__AMPERE_SQUAREDHOURSMETROLOGICAL_LED:
				return ampere_squaredhoursmetrologicalLED != AMPERE_SQUAREDHOURSMETROLOGICAL_LED_EDEFAULT;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__VOLT_SQUAREDHOURSOUTPUTPULSE:
				return volt_squaredhoursoutputpulse != VOLT_SQUAREDHOURSOUTPUTPULSE_EDEFAULT;
			case COSEMObjectsPackage.OUTPUT_PULSE_VALUES_CONSTANTS__AMPERE_SQUAREDHOURSOUTPUTPULSE:
				return ampere_squaredhoursoutputpulse != AMPERE_SQUAREDHOURSOUTPUTPULSE_EDEFAULT;
		}
		return super.eIsSet(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (ActiveenergymetrologicalLED: ");
		result.append(activeenergymetrologicalLED);
		result.append(", ReactiveenergymetrologicalLED: ");
		result.append(reactiveenergymetrologicalLED);
		result.append(", ApparentenergymetrologicalLED: ");
		result.append(apparentenergymetrologicalLED);
		result.append(", Activeenergyoutputpulse: ");
		result.append(activeenergyoutputpulse);
		result.append(", Reactiveenergyoutputpulse: ");
		result.append(reactiveenergyoutputpulse);
		result.append(", Apparentenergyoutputpulse: ");
		result.append(apparentenergyoutputpulse);
		result.append(", Volt_squaredhoursmetrologicalLED: ");
		result.append(volt_squaredhoursmetrologicalLED);
		result.append(", Ampere_squaredhoursmetrologicalLED: ");
		result.append(ampere_squaredhoursmetrologicalLED);
		result.append(", Volt_squaredhoursoutputpulse: ");
		result.append(volt_squaredhoursoutputpulse);
		result.append(", Ampere_squaredhoursoutputpulse: ");
		result.append(ampere_squaredhoursoutputpulse);
		result.append(')');
		return result.toString();
	}

} //OutputPulseValues_constantsImpl


text:
#ifndef RENDERSYSTEMS_GLSUPPORT_INCLUDE_OGREGLHARDWAREPIXELBUFFERCOMMON_H_
#define RENDERSYSTEMS_GLSUPPORT_INCLUDE_OGREGLHARDWAREPIXELBUFFERCOMMON_H_

#include "OgreGLSupportPrerequisites.h"
#include "OgreTexture.h"
#include "OgreHardwarePixelBuffer.h"

namespace Ogre
{

class _OgreGLExport GLHardwarePixelBufferCommon : public HardwarePixelBuffer
{
protected:
    /// Lock a box
    PixelBox lockImpl(const Box &lockBox,  LockOptions options) override;

    /// Unlock a box
    void unlockImpl(void) override;

    // Internal buffer; either on-card or in system memory, freed/allocated on demand
    // depending on buffer usage
    PixelBox mBuffer;
    uint32 mGLInternalFormat; // GL internal format

    // Buffer allocation/freeage
    void allocateBuffer();

    void freeBuffer();

    // Upload a box of pixels to this buffer on the card
    virtual void upload(const PixelBox &data, const Box &dest);

    // Download a box of pixels from the card
    virtual void download(const PixelBox &data);
public:
    /// Should be called by HardwareBufferManager
    GLHardwarePixelBufferCommon(uint32 mWidth, uint32 mHeight, uint32 mDepth,
                               PixelFormat mFormat,
                               HardwareBuffer::Usage usage);

    virtual ~GLHardwarePixelBufferCommon();

    /** Bind surface to frame buffer. Needs FBO extension.
     */
    virtual void bindToFramebuffer(uint32 attachment, uint32 zoffset);

    uint32 getGLFormat() { return mGLInternalFormat; }
};

} /* namespace Ogre */

#endif /* RENDERSYSTEMS_GLSUPPORT_INCLUDE_OGREGLHARDWAREPIXELBUFFERCOMMON_H_ */

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using JavaScriptEngineSwitcher.Core;
using JSPool;
using React.Exceptions;
using React.TinyIoC;

namespace React
{
	/// <summary>
	/// Request-specific ReactJS.NET environment. This is unique to the individual request and is
	/// not shared.
	/// </summary>
	public class ReactEnvironment : IReactEnvironment, IDisposable
	{
		/// <summary>
		/// JavaScript variable set when user-provided scripts have been loaded
		/// </summary>
		protected const string USER_SCRIPTS_LOADED_KEY = "_ReactNET_UserScripts_Loaded";
		/// <summary>
		/// Stack size to use for JSXTransformer if the default stack is insufficient
		/// </summary>
		protected const int LARGE_STACK_SIZE = 2 * 1024 * 1024;

		/// <summary>
		/// Factory to create JavaScript engines
		/// </summary>
		protected readonly IJavaScriptEngineFactory _engineFactory;
		/// <summary>
		/// Site-wide configuration
		/// </summary>
		protected readonly IReactSiteConfiguration _config;
		/// <summary>
		/// Cache used for storing compiled JSX
		/// </summary>
		protected readonly ICache _cache;
		/// <summary>
		/// File system wrapper
		/// </summary>
		protected readonly IFileSystem _fileSystem;
		/// <summary>
		/// Hash algorithm for file-based cache
		/// </summary>
		protected readonly IFileCacheHash _fileCacheHash;
		/// <summary>
		/// React Id generator
		/// </summary>
		private readonly IReactIdGenerator _reactIdGenerator;

		/// <summary>
		/// JSX Transformer instance for this environment
		/// </summary>
		protected readonly Lazy<IBabel> _babelTransformer;
		/// <summary>
		/// Version number of ReactJS.NET
		/// </summary>
		protected readonly Lazy<string> _version = new Lazy<string>(GetVersion);

		/// <summary>
		/// Contains an engine acquired from a pool of engines. Only used if
		/// <see cref="IReactSiteConfiguration.ReuseJavaScriptEngines"/> is enabled.
		/// </summary>
		protected Lazy<PooledJsEngine> _engineFromPool;

		/// <summary>
		/// List of all components instantiated in this environment
		/// </summary>
		protected readonly IList<IReactComponent> _components = new List<IReactComponent>();

		/// <summary>
		/// Gets the <see cref="IReactEnvironment"/> for the current request. If no environment
		/// has been created for the current request, creates a new one.
		/// </summary>
		public static IReactEnvironment Current
		{
			get { return AssemblyRegistration.Container.Resolve<IReactEnvironment>(); }
		}

		/// <summary>
		/// Gets the <see cref="IReactEnvironment"/> for the current request. If no environment
		/// has been created for the current request, creates a new one.
		/// Also provides more specific error information in the event that ReactJS.NET is misconfigured.
		/// </summary>
		public static IReactEnvironment GetCurrentOrThrow
		{
			get
			{
				try
				{
					return Current;
				}
				catch (TinyIoCResolutionException ex)
				{
					throw new ReactNotInitialisedException(
#if NET451
						"ReactJS.NET has not been initialised correctly.",
#else
						"ReactJS.NET has not been initialised correctly. Please ensure you have " +
						"called services.AddReact() and app.UseReact() in your Startup.cs file.",
#endif
						ex
					);
				}
			}
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="ReactEnvironment"/> class.
		/// </summary>
		/// <param name="engineFactory">The JavaScript engine factory</param>
		/// <param name="config">The site-wide configuration</param>
		/// <param name="cache">The cache to use for JSX compilation</param>
		/// <param name="fileSystem">File system wrapper</param>
		/// <param name="fileCacheHash">Hash algorithm for file-based cache</param>
		/// <param name="reactIdGenerator">React ID generator</param>
		public ReactEnvironment(
			IJavaScriptEngineFactory engineFactory,
			IReactSiteConfiguration config,
			ICache cache,
			IFileSystem fileSystem,
			IFileCacheHash fileCacheHash,
			IReactIdGenerator reactIdGenerator
		)
		{
			_engineFactory = engineFactory;
			_config = config;
			_cache = cache;
			_fileSystem = fileSystem;
			_fileCacheHash = fileCacheHash;
			_reactIdGenerator = reactIdGenerator;
			_babelTransformer = new Lazy<IBabel>(() =>
				new Babel(this, _cache, _fileSystem, _fileCacheHash, _config)
			);
			_engineFromPool = new Lazy<PooledJsEngine>(() => _engineFactory.GetEngine());
		}

		/// <summary>
		/// Gets the JavaScript engine to use for this environment.
		/// </summary>
		protected virtual IJsEngine Engine
		{
			get
			{
				return _config.ReuseJavaScriptEngines
					? _engineFromPool.Value
					: _engineFactory.GetEngineForCurrentThread();
			}
		}

		/// <summary>
		/// Gets the Babel transformer for this environment.
		/// </summary>
		public virtual IBabel Babel
		{
			get { return _babelTransformer.Value; }
		}

		/// <summary>
		/// Gets the version of the JavaScript engine in use by ReactJS.NET
		/// </summary>
		public virtual string EngineVersion
		{
			get { return Engine.Name + " " + Engine.Version; }
		}

		/// <summary>
		/// Gets the version number of ReactJS.NET
		/// </summary>
		public virtual string Version
		{
			get { return _version.Value; }
		}

		/// <summary>
		/// Ensures any user-provided scripts have been loaded. This only loads JSX files; files
		/// that need no transformation are loaded in JavaScriptEngineFactory.
		/// </summary>
		protected virtual void EnsureUserScriptsLoaded()
		{
			// Scripts already loaded into this environment, don't load them again
			if (Engine.HasVariable(USER_SCRIPTS_LOADED_KEY) || _config == null)
			{
				return;
			}

			foreach (var file in _config.Scripts)
			{
				try
				{
					if (_config.AllowJavaScriptPrecompilation
						&& Engine.TryExecuteFileWithPrecompilation(_cache, _fileSystem, file, Babel.TransformFile))
					{
						// Do nothing.
					}
					else
					{
						var contents = Babel.TransformFile(file);
						Engine.Execute(contents, file);
					}
				}
				catch (JsException ex)
				{
					throw new ReactScriptLoadException(string.Format(
						"Error while loading \"{0}\": {1}",
						file,
						ex.Message
					), ex);
				}
			}
			Engine.SetVariableValue(USER_SCRIPTS_LOADED_KEY, true);
		}

		/// <summary>
		/// Executes the provided JavaScript code.
		/// </summary>
		/// <param name="code">JavaScript to execute</param>
		public virtual void Execute(string code)
		{
			Engine.Execute(code);
		}

		/// <summary>
		/// Executes the provided JavaScript code, returning a result of the specified type.
		/// </summary>
		/// <typeparam name="T">Type to return</typeparam>
		/// <param name="code">Code to execute</param>
		/// <returns>Result of the JavaScript code</returns>
		public virtual T Execute<T>(string code)
		{
			return Engine.Evaluate<T>(code);
		}

		/// <summary>
		/// Executes the provided JavaScript function, returning a result of the specified type.
		/// </summary>
		/// <typeparam name="T">Type to return</typeparam>
		/// <param name="function">JavaScript function to execute</param>
		/// <param name="args">Arguments to pass to function</param>
		/// <returns>Result of the JavaScript code</returns>
		public virtual T Execute<T>(string function, params object[] args)
		{
			return Engine.CallFunctionReturningJson<T>(function, args);
		}

		/// <summary>
		/// Determines if the specified variable exists in the JavaScript engine
		/// </summary>
		/// <param name="name">Name of the variable</param>
		/// <returns><c>true</c> if the variable exists; <c>false</c> otherwise</returns>
		public virtual bool HasVariable(string name)
		{
			return Engine.HasVariable(name);
		}

		/// <summary>
		/// Creates an instance of the specified React JavaScript component.
		/// </summary>
		/// <typeparam name="T">Type of the props</typeparam>
		/// <param name="componentName">Name of the component</param>
		/// <param name="props">Props to use</param>
		/// <param name="containerId">ID to use for the container HTML tag. Defaults to an auto-generated ID</param>
		/// <param name="clientOnly">True if server-side rendering will be bypassed. Defaults to false.</param>
		/// <param name="serverOnly">True if this component only should be rendered server-side. Defaults to false.</param>
		/// <param name="skipLazyInit">Skip adding to components list, which is used during GetInitJavascript</param>
		/// <returns>The component</returns>
		public virtual IReactComponent CreateComponent<T>(string componentName, T props, string containerId = null, bool clientOnly = false, bool serverOnly = false, bool skipLazyInit = false)
		{
			if (!clientOnly)
			{
				EnsureUserScriptsLoaded();
			}

			var component = new ReactComponent(this, _config, _reactIdGenerator, componentName, containerId)
			{
				ClientOnly = clientOnly,
				Props = props,
				ServerOnly = serverOnly
			};

			if (!skipLazyInit)
			{
				_components.Add(component);
			}
			return component;
		}

		/// <summary>
		/// Adds the provided <see cref="IReactComponent"/> to the list of components to render client side.
		/// </summary>
		/// <param name="component">Component to add to client side render list</param>
		/// <param name="clientOnly">True if server-side rendering will be bypassed. Defaults to false.</param>
		/// <returns>The component</returns>
		public virtual IReactComponent CreateComponent(IReactComponent component, bool clientOnly = false)
		{
			if (!clientOnly)
			{
				EnsureUserScriptsLoaded();
			}

			_components.Add(component);
			return component;
		}

		/// <summary>
		/// Renders the JavaScript required to initialise all components client-side. This will
		/// attach event handlers to the server-rendered HTML.
		/// </summary>
		/// <param name="clientOnly">True if server-side rendering will be bypassed. Defaults to false.</param>
		/// <returns>JavaScript for all components</returns>
		public virtual string GetInitJavaScript(bool clientOnly = false)
		{
			using (var writer = new StringWriter())
			{
				GetInitJavaScript(writer, clientOnly);
				return writer.ToString();
			}
		}

		/// <summary>
		/// Renders the JavaScript required to initialise all components client-side. This will
		/// attach event handlers to the server-rendered HTML.
		/// </summary>
		/// <param name="writer">The <see cref="T:System.IO.TextWriter" /> to which the content is written</param>
		/// <param name="clientOnly">True if server-side rendering will be bypassed. Defaults to false.</param>
		/// <returns>JavaScript for all components</returns>
		public virtual void GetInitJavaScript(TextWriter writer, bool clientOnly = false)
		{
			// Propagate any server-side console.log calls to corresponding client-side calls.
			if (!clientOnly && _components.Count != 0)
			{
				var consoleCalls = Execute<string>("console.getCalls()");
				writer.Write(consoleCalls);
			}

			foreach (var component in _components)
			{
				if (!component.ServerOnly)
				{
					component.RenderJavaScript(writer, waitForDOMContentLoad: false);
					writer.WriteLine(';');
				}
			}
		}

		private ReactAppAssetManifest GetAppManifest() => ReactAppAssetManifest.LoadManifest(_config, _fileSystem, _cache, useCacheRead: true);

		/// <summary>
		/// Returns a list of paths to scripts generated by the React app
		/// </summary>
		public virtual IEnumerable<string> GetScriptPaths()
		{
			return GetAppManifest().Entrypoints
				.Where(path => path.EndsWith(".js"));
		}

		/// <summary>
		/// Returns a list of paths to stylesheets generated by the React app
		/// </summary>
		public virtual IEnumerable<string> GetStylePaths()
		{
			return GetAppManifest().Entrypoints
				.Where(path => path.EndsWith(".css"));
		}

		/// <summary>
		/// Attempts to execute the provided JavaScript code using a non-pooled JavaScript engine (ie.
		/// creates a new JS engine per-thread). This is because Babel uses a LOT of memory, so we
		/// should completely dispose any engines that have loaded Babel in order to conserve memory.
		///
		/// If an exception is thrown, retries the execution using a new thread (and hence a new engine)
		/// with a larger maximum stack size.
		/// This is required because JSXTransformer uses a huge stack which ends up being larger
		/// than what ASP.NET allows by default (256 KB).
		/// </summary>
		/// <typeparam name="T">Type to return from JavaScript call</typeparam>
		/// <param name="function">JavaScript function to execute</param>
		/// <param name="args">Arguments to pass to function</param>
		/// <returns>Result returned from JavaScript code</returns>
		public virtual T ExecuteWithBabel<T>(string function, params object[] args)
		{
			var engine = _engineFactory.GetEngineForCurrentThread();
			EnsureBabelLoaded(engine);

#if NET40 || NET45 || NETSTANDARD2_0
			try
			{
				return engine.CallFunctionReturningJson<T>(function, args);
			}

			catch (Exception)
			{
				// Assume the exception MAY be an "out of stack space" error. Try running the code
				// in a different thread with larger stack. If the same exception occurs, we know
				// it wasn't a stack space issue.
				T result = default(T);
				Exception innerEx = null;
				var thread = new Thread(() =>
				{
					// New engine will be created here (as this is a new thread)
					var threadEngine = _engineFactory.GetEngineForCurrentThread();
					EnsureBabelLoaded(threadEngine);
					try
					{
						result = threadEngine.CallFunctionReturningJson<T>(function, args);
					}
					catch (Exception threadEx)
					{
						// Unhandled exceptions in threads kill the whole process.
						// Pass the exception back to the parent thread to rethrow.
						innerEx = threadEx;
					}
					finally
					{
						_engineFactory.DisposeEngineForCurrentThread();
					}
				}, LARGE_STACK_SIZE);
				thread.Start();
				thread.Join();
				// Rethrow any exceptions that occured in the thread
				if (innerEx != null)
				{
					throw innerEx;
				}
				return result;
			}
#else
			return engine.CallFunctionReturningJson<T>(function, args);
#endif
		}

		/// <summary>
		/// Gets the ReactJS.NET version number. Use <see cref="Version" /> instead.
		/// </summary>
		private static string GetVersion()
		{
#if NET40
			var assembly = Assembly.GetExecutingAssembly();
			var rawVersion = FileVersionInfo.GetVersionInfo(assembly.Location).FileVersion;
#else
			var assembly = typeof(ReactEnvironment).GetTypeInfo().Assembly;
			var rawVersion = assembly.GetCustomAttribute<AssemblyFileVersionAttribute>().Version;
#endif
			var lastDot = rawVersion.LastIndexOf('.');
			var version = rawVersion.Substring(0, lastDot);
			var build = rawVersion.Substring(lastDot + 1);
			return string.Format("{0} (build {1})", version, build);
		}

		/// <summary>
		/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
		/// </summary>
		public virtual void Dispose()
		{
			_engineFactory.DisposeEngineForCurrentThread();
			ReturnEngineToPool();
		}

		/// <summary>
		/// Returns the currently held JS engine to the pool. (no-op if engine pooling is disabled)
		/// </summary>
		public void ReturnEngineToPool()
		{
			if (_engineFromPool.IsValueCreated)
			{
				_engineFromPool.Value.Dispose();
				_engineFromPool = new Lazy<PooledJsEngine>(() => _engineFactory.GetEngine());
			}
		}

		/// <summary>
		/// Gets the site-wide configuration.
		/// </summary>
		public virtual IReactSiteConfiguration Configuration
		{
			get { return _config; }
		}

		/// <summary>
		/// Ensures that Babel has been loaded into the JavaScript engine.
		/// </summary>
		private void EnsureBabelLoaded(IJsEngine engine)
		{
			// If Babel is disabled in the config, don't even try loading it
			if (!_config.LoadBabel)
			{
				throw new BabelNotLoadedException();
			}

			var babelLoaded = engine.Evaluate<bool>("typeof ReactNET_transform !== 'undefined'");
			if (!babelLoaded)
			{
#if NET40
				var assembly = typeof(ReactEnvironment).Assembly;
#else
				var assembly = typeof(ReactEnvironment).GetTypeInfo().Assembly;
#endif
				string resourceName = _config.BabelVersion == BabelVersions.Babel7 || _config.BabelVersion == null
					? "React.Core.Resources.babel.generated.min.js"
					: _config.BabelVersion == BabelVersions.Babel6
						? "React.Core.Resources.babel-legacy.generated.min.js"
						: throw new ReactConfigurationException("BabelVersion was not null, but did not contain a valid value.");

				if (_config.AllowJavaScriptPrecompilation
					&& engine.TryExecuteResourceWithPrecompilation(_cache, resourceName, assembly))
				{
					// Do nothing.
				}
				else
				{
					engine.ExecuteResource(resourceName, assembly);
				}
			}
		}
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
              "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
<refentry id="gluNewNurbsRenderer">
    <refmeta>
        <refmetainfo>
            <copyright>
                <year>1991-2006</year>
                <holder>Silicon Graphics, Inc.</holder>
            </copyright>
        </refmetainfo>
        <refentrytitle>gluNewNurbsRenderer</refentrytitle>
        <manvolnum>3G</manvolnum>
    </refmeta>
    <refnamediv>
        <refname>gluNewNurbsRenderer</refname>
        <refpurpose>create a NURBS object</refpurpose>
    </refnamediv>
    <refsynopsisdiv><title>C Specification</title>
        <funcsynopsis>
            <funcprototype>
                <funcdef>GLUnurbs* <function>gluNewNurbsRenderer</function></funcdef>
            </funcprototype>
        </funcsynopsis>
    </refsynopsisdiv>
    <!-- eqn: ignoring delim $$ -->
    <refsect1 id="description"><title>Description</title>
        <para>
            <function>gluNewNurbsRenderer</function> creates and returns a pointer to
            a new NURBS object.
            This object must be referred to when calling
            NURBS rendering and control functions. A return value of
            0 means that there is not enough memory to allocate the object.
        </para>
    </refsect1>
    <refsect1 id="seealso"><title>See Also</title>
        <para>
            <citerefentry><refentrytitle>gluBeginCurve</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>gluBeginSurface</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>gluBeginTrim</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>gluDeleteNurbsRenderer</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>gluNurbsCallback</refentrytitle></citerefentry>,
            <citerefentry><refentrytitle>gluNurbsProperty</refentrytitle></citerefentry>
        </para>
    </refsect1>
    <refsect1 id="Copyright"><title>Copyright</title>
        <para>
            Copyright <trademark class="copyright"></trademark> 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
        </para>
    </refsect1>
</refentry>


text:
+-------------+-------------------+
| Arthritis   | R Documentation   |
+-------------+-------------------+

Arthritis Treatment Data
------------------------

Description
~~~~~~~~~~~

Data from Koch \\& Edwards (1988) from a double-blind clinical trial
investigating a new treatment for rheumatoid arthritis.

Usage
~~~~~

::

    data("Arthritis")

Format
~~~~~~

A data frame with 84 observations and 5 variables.

ID
    patient ID.

Treatment
    factor indicating treatment (Placebo, Treated).

Sex
    factor indicating sex (Female, Male).

Age
    age of patient.

Improved
    ordered factor indicating treatment outcome (None, Some, Marked).

Source
~~~~~~

Michael Friendly (2000), Visualizing Categorical Data:
`http://euclid.psych.yorku.ca/ftp/sas/vcd/catdata/arthrit.sas <http://euclid.psych.yorku.ca/ftp/sas/vcd/catdata/arthrit.sas>`__

References
~~~~~~~~~~

G. Koch \\& S. Edwards (1988), Clinical efficiency trials with
categorical data. In K. E. Peace (ed.), *Biopharmaceutical Statistics
for Drug Development*, 403–451. Marcel Dekker, New York.

M. Friendly (2000), *Visualizing Categorical Data*. SAS Institute, Cary,
NC.

Examples
~~~~~~~~

::

    data("Arthritis")
    art <- xtabs(~ Treatment + Improved, data = Arthritis, subset = Sex == "Female")
    art

    mosaic(art, gp = shading_Friendly)
    mosaic(art, gp = shading_max)


text:
package com.google.gerrit.server.query.change;

import com.google.gerrit.reviewdb.Change;
import com.google.gerrit.reviewdb.ReviewDb;
import com.google.gerrit.server.CurrentUser;
import com.google.gerrit.server.IdentifiedUser;
import com.google.gerrit.server.project.ChangeControl;
import com.google.gerrit.server.project.NoSuchChangeException;
import com.google.gerrit.server.query.OperatorPredicate;
import com.google.gwtorm.client.OrmException;
import com.google.inject.Provider;

class IsVisibleToPredicate extends OperatorPredicate<ChangeData> {
  private static String describe(CurrentUser user) {
    if (user instanceof IdentifiedUser) {
      return ((IdentifiedUser) user).getAccountId().toString();
    }
    if (user instanceof SingleGroupUser) {
      return "group:" + ((SingleGroupUser) user).getEffectiveGroups() //
          .iterator().next().toString();
    }
    return user.toString();
  }

  private final Provider<ReviewDb> db;
  private final ChangeControl.GenericFactory changeControl;
  private final CurrentUser user;

  IsVisibleToPredicate(Provider<ReviewDb> db,
      ChangeControl.GenericFactory changeControlFactory, CurrentUser user) {
    super(ChangeQueryBuilder.FIELD_VISIBLETO, describe(user));
    this.db = db;
    this.changeControl = changeControlFactory;
    this.user = user;
  }

  @Override
  public boolean match(final ChangeData cd) throws OrmException {
    if (cd.fastIsVisibleTo(user)) {
      return true;
    }
    try {
      Change c = cd.change(db);
      if (c != null && changeControl.controlFor(c, user).isVisible()) {
        cd.cacheVisibleTo(user);
        return true;
      } else {
        return false;
      }
    } catch (NoSuchChangeException e) {
      return false;
    }
  }

  @Override
  public int getCost() {
    return 1;
  }
}


text:
import detailComponent from './detail.component';
export default angular.module('clerkdetail', [])
  .config(($stateProvider) => {
  "ngInject";
$stateProvider.state('clerkdetail', {
  url: '/clerk/detail',
  template: '<clerkdetail></clerkdetail>'
});
})
.component('clerkdetail', detailComponent);


text:
namespace BigDataGrids {
  let module = angular.module('app.uiVirtualList', []);

  module.directive('uiVirtualScroll', [() => new UiVirtualListDirective()]);
}


text:
package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;

public class Get_givenScalarArgDateTime_whenArgMalformed_bad_TODO {

}


text:
(function() {
  module('glift.api.createTest');
  var testUtil = glift.testUtil;

  test('Successfully create a basic widget (Game Viewer)', function() {
    var manager = glift.api.create({
      sgf: testdata.sgfs.complexproblem,
    });
    ok(manager !== undefined);
    ok(manager.sgfCollection !== undefined);
    deepEqual(manager.sgfCollection.length, 1);
    deepEqual(manager.sgfCollection[0], testdata.sgfs.complexproblem);
    deepEqual(manager.sgfColIndex, 0);
    deepEqual(manager.sgfCollectionUrl, null);
    ok(manager.currentWidget !== undefined);
    ok(manager.displayOptions !== undefined);
    ok(manager.loadColInBack === true);

    var currentWidget = manager.currentWidget;
    var sgfObj = currentWidget.sgfOptions;
    ok(sgfObj !== undefined);
    deepEqual(sgfObj.sgfString, testdata.sgfs.complexproblem);
    deepEqual(sgfObj.initialPosition, '');
    deepEqual(sgfObj.widgetType, glift.WidgetType.GAME_VIEWER);
    manager.destroy();
  });

  test('Succesfully create a complex problem series', function() {
    var wtypes = glift.WidgetType;
    var sgfs = testdata.sgfs;
    // TODO(kashomon): Do more extensive integration testing here.
    var manager = glift.api.create({
      sgfCollection: [{
          sgfString: sgfs.complexproblem,
          widgetType: wtypes.STANDARD_PROBLEM
        }, {
          sgfString: sgfs.marktest,
          widgetType: wtypes.EXAMPLE
        }, {
          sgfString: sgfs.twoOptions,
          widgetType: wtypes.CORRECT_VARIATIONS_PROBLEM
        }]
    });
    ok(manager !== undefined);
    ok(glift.dom.elem(manager.divId).html(), 'must not be empty.');

    // It's rather nice to keep one copy of the widget manager around, to play
    // with after the tests run for manual verification.
    // manager.destroy();
  });
})();


text:
<?php

namespace yolk\debug;

abstract class AbstractDumper implements DumperInterface {

	private function __construct() {}

	public static function dump( $var, $output = true ) {

		$dumpers = [
			'is_null'     => 'dumpNull',
			'is_bool'     => 'dumpBoolean',
			'is_integer'  => 'dumpInteger',
			'is_float'    => 'dumpFloat',
			'is_string'   => 'dumpString',
			'is_array'    => 'dumpArray',
			'is_object'   => 'dumpObject',
			'is_resource' => 'dumpResource',
		];

		$item = false;

		foreach( $dumpers as $test => $dumper ) {
			if( $test($var) ) {
				$item = static::$dumper($var);
				break;
			}
		}

		if( !$item ) {
			ob_start();
			var_dump($var);
			$item = ob_get_clean();
		}

		if( $output )
			static::output($item);

		return $item;

	}

	protected static function output( $item ) {
		echo $item, "\n";
	}

}

// EOF


text:
%!TEX TS-program = lualatex
%!TEX encoding = UTF-8 Unicode

\documentclass[12pt, addpoints, hidelinks]{exam}
\usepackage{graphicx}
	\graphicspath{{/Users/goby/Pictures/teach/163/lab/}
	{img/}} % set of paths to search for images

\usepackage{geometry}
\geometry{letterpaper, left=1.5in, bottom=1in}
%\geometry{landscape}                % Activate for for rotated page geometry
%\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{amssymb, amsmath}
\usepackage{mathtools}
	\everymath{\displaystyle}

\usepackage{fontspec}
\setmainfont[Ligatures={TeX}, BoldFont={* Bold}, ItalicFont={* Italic}, BoldItalicFont={* BoldItalic}, Numbers={OldStyle}]{Linux Libertine O}
\setsansfont[Scale=MatchLowercase,Ligatures=TeX]{Linux Biolinum O}
%\setmonofont[Scale=MatchLowercase]{Inconsolatazi4}
\usepackage{microtype}

\usepackage{unicode-math}
\setmathfont[Scale=MatchLowercase]{Asana Math}
%\setmathfont[Scale=MatchLowercase]{XITS Math}

% To define fonts for particular uses within a document. For example,
% This sets the Libertine font to use tabular number format for tables.
\newfontfamily{\tablenumbers}[Numbers={Monospaced}]{Linux Libertine O}
\newfontfamily{\libertinedisplay}{Linux Libertine Display O}

\usepackage{booktabs}
\usepackage{multicol}
\usepackage[normalem]{ulem}

%\usepackage{tabularx}
\usepackage{longtable}
%\usepackage{siunitx}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}

\usepackage{enumitem}
\usepackage{hyperref}
%\usepackage{placeins} %PRovides \FloatBarrier to flush all floats before a certain point.
\usepackage{hanging}

\usepackage[sc]{titlesec}

\renewcommand{\solutiontitle}{\noindent}
\unframedsolutions
\SolutionEmphasis{\bfseries}

%Change \half command from 1/2 to .5
\renewcommand*\half{.5}

\makeatletter
\def\SetTotalwidth{\advance\linewidth by \@totalleftmargin
\@totalleftmargin=0pt}
\makeatother

\pagestyle{headandfoot}
\firstpageheader{\textsc{bi} 063: Evolution and Ecology}{}{\ifprintanswers\textbf{KEY}\else Name: \enspace \makebox[2.5in]{\hrulefill}\fi}
\runningheader{}{}{\footnotesize{pg. \thepage}}
\footer{}{}{}
\runningheadrule

\newcommand*\AnswerBox[2]{%
    \parbox[t][#1]{0.92\textwidth}{%
    \begin{solution}#2\end{solution}}
%    \vspace*{\stretch{1}}
}

\newenvironment{AnswerPage}[1]
    {\begin{minipage}[t][#1]{0.92\textwidth}%
    \begin{solution}}
    {\end{solution}\end{minipage}
    \vspace*{\stretch{1}}}

\newlength{\basespace}
\setlength{\basespace}{5\baselineskip}

%\printanswers

\begin{document}

\subsection*{Phylogenetic trees as hypotheses (\numpoints\ points)}

You are about to receive an assignment to make your first hypothesis
about the relationships of different organisms. An efficient way to
represent your hypothesis is by a "tree" diagram,
called a phylogenetic tree. \emph{Phylogenetic trees are hypotheses
about evolutionary relationships} that are compact and easy to
interpret. You will use phylogenetic trees to represent your own
hypothesis about the relationships (if any) among 21 different
species. This exercise will prepare you to interpret and construct a
tree diagram of your own.

Consider the three phylogenetic trees below. According to the hypothesis, life originated
in 1930; the first organisms were a plant-like ancestor, and an unspecified
ancestor of ducks, geese, whales, and fish. Note that, according to the hypothesis,
the ancestor of cows, humans, and dogs didn't appear until after 1940, and that humans
and dogs had a common ancestor as late as 1990 or so.

\vspace*{1\baselineskip}

\noindent\includegraphics[width=\textwidth]{03c_intro_trees}

\begin{questions}

\question[2]
Define these two terms in your own words:
\begin{parts}
	\part phylogeny:

	\AnswerBox{4\baselineskip}{A hypothesis about the relationships and ancestry of organisms.}

	\part common ancestor (what meaning of the word "common" is being used?):

	\AnswerBox{3\baselineskip}{An ancestor that is shared between two or more organisms. The organisms descend from that shared ancestor. Common refers to shared.}

\end{parts}

\newpage

\question[2]
When did ducks and geese have their last common ancestor according to
this hypothesis? Ducks and whales? Ferns and grass? Explain how you
know.

\AnswerBox{5\baselineskip}{Ducks and geese: about 1990. Ducks and whales: about 1980. Ferns and grass: 1960. Those times are when the ancestor splits into the two descendants.}
%\vspace*{\stretch{1}}

\question[2]
What kinds of animals existed in 1985 according to this hypothesis?
In 1945?

\AnswerBox{5\baselineskip}{1985: Ancestor of trees/grass, ferns; ancestor of ducks/geese; whales, fish, cows, ancestor of humans/dogs. 1945: plant-like ancestor, ancestor of ducks/geese/whales/fish. Maybe nothing for cows/humans/dogs. Allow some leeway for them lining a date across the page.}

\question[2]
Which should be more basically similar according to this hypothesis:
geese and whales, or dogs and whales? Which actually are more similar?
Explain.

\AnswerBox{5\baselineskip}{The hypothesis predicts that whales and geese should be more similar because of common ancestor. Whales and dogs are actually more similar because of shared mammalian characters.}

\question[2]
What does the vertical axis represent? Be careful.

\AnswerBox{5\baselineskip}{Time in years (or other time based scale. It does \emph{not} represent generations.}

\question[2]
Can you think of any evidence that you personally have witnessed that
would falsify the hypothesis represented by this phylogenetic tree? (Any
portion of it, including dates?) Explain.

\AnswerBox{5\baselineskip}{Open ended. Photos of grandparents or plants or animals older than 1940, etc. Students older than 20. Teachers older than 20. }

\end{questions}

\end{document}


text:
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TemplateHaskell #-}

-- | System calls error codes
module Haskus.System.Linux.Internals.Error
   ( ErrorCode (..)
   )
where

import Data.Data
import System.IO.Unsafe

import Haskus.Format.Binary.Storable
import Haskus.Format.Binary.Word
import Haskus.Format.Binary.Ptr
import Haskus.Format.Binary.Enum
import Haskus.Utils.Embed
import Haskus.System.Linux.Internals.Tables

-- =============================================================
--    From linux/include/uapi/asm-generic/errno-base.h
--    and  linux/include/uapi/asm-generic/errno.h
-- =============================================================

-- DO NOT CHANGE THE CONSTRUCTOR ORDER WITHOUT CHANGING THE ERROR TABLE

-- | Linux error codes
data ErrorCode
   = EPERM              -- ^ Operation not permitted
   | ENOENT             -- ^ No such file or directory
   | ESRCH              -- ^ No such process
   | EINTR              -- ^ Interrupted system call
   | EIO                -- ^ I/O error
   | ENXIO              -- ^ No such device or address
   | E2BIG              -- ^ Argument list too long
   | ENOEXEC            -- ^ Exec format error
   | EBADF              -- ^ Bad file number
   | ECHILD             -- ^ No child processes
   | EAGAIN             -- ^ Try again
   | ENOMEM             -- ^ Out of memory
   | EACCES             -- ^ Permission denied
   | EFAULT             -- ^ Bad address
   | ENOTBLK            -- ^ Block device required
   | EBUSY              -- ^ Device or resource busy
   | EEXIST             -- ^ File exists
   | EXDEV              -- ^ Cross-device link
   | ENODEV             -- ^ No such device
   | ENOTDIR            -- ^ Not a directory
   | EISDIR             -- ^ Is a directory
   | EINVAL             -- ^ Invalid argument
   | ENFILE             -- ^ File table overflow
   | EMFILE             -- ^ Too many open files
   | ENOTTY             -- ^ Not a typewriter
   | ETXTBSY            -- ^ Text file busy
   | EFBIG              -- ^ File too large
   | ENOSPC             -- ^ No space left on device
   | ESPIPE             -- ^ Illegal seek
   | EROFS              -- ^ Read-only file system
   | EMLINK             -- ^ Too many links
   | EPIPE              -- ^ Broken pipe
   | EDOM               -- ^ Math argument out of domain of func
   | ERANGE             -- ^ Math result not representable

   | EDEADLK            -- ^ Resource deadlock would occur
   | ENAMETOOLONG       -- ^ File name too long
   | ENOLCK             -- ^ No record locks available
   | ENOSYS             -- ^ Function not implemented
   | ENOTEMPTY          -- ^ Directory not empty
   | ELOOP              -- ^ Too many symbolic links encountered
   | ENOMSG             -- ^ No message of desired type
   | EIDRM              -- ^ Identifier removed
   | ECHRNG             -- ^ Channel number out of range
   | EL2NSYNC           -- ^ Level 2 not synchronized
   | EL3HLT             -- ^ Level 3 halted
   | EL3RST             -- ^ Level 3 reset
   | ELNRNG             -- ^ Link number out of range
   | EUNATCH            -- ^ Protocol driver not attached
   | ENOCSI             -- ^ No CSI structure available
   | EL2HLT             -- ^ Level 2 halted
   | EBADE              -- ^ Invalid exchange
   | EBADR              -- ^ Invalid request descriptor
   | EXFULL             -- ^ Exchange full
   | ENOANO             -- ^ No anode
   | EBADRQC            -- ^ Invalid request code
   | EBADSLT            -- ^ Invalid slot
   | EBFONT             -- ^ Bad font file format
   | ENOSTR             -- ^ Device not a stream
   | ENODATA            -- ^ No data available
   | ETIME              -- ^ Timer expired
   | ENOSR              -- ^ Out of streams resources
   | ENONET             -- ^ Machine is not on the network
   | ENOPKG             -- ^ Package not installed
   | EREMOTE            -- ^ Object is remote
   | ENOLINK            -- ^ Link has been severed
   | EADV               -- ^ Advertise error
   | ESRMNT             -- ^ Srmount error
   | ECOMM              -- ^ Communication error on send
   | EPROTO             -- ^ Protocol error
   | EMULTIHOP          -- ^ Multihop attempted
   | EDOTDOT            -- ^ RFS specific error
   | EBADMSG            -- ^ Not a data message
   | EOVERFLOW          -- ^ Value too large for defined data type
   | ENOTUNIQ           -- ^ Name not unique on network
   | EBADFD             -- ^ File descriptor in bad state
   | EREMCHG            -- ^ Remote address changed
   | ELIBACC            -- ^ Can not access a needed shared library
   | ELIBBAD            -- ^ Accessing a corrupted shared library
   | ELIBSCN            -- ^ .lib section in a.out corrupted
   | ELIBMAX            -- ^ Attempting to link in too many shared libraries
   | ELIBEXEC           -- ^ Cannot exec a shared library directly
   | EILSEQ             -- ^ Illegal byte sequence
   | ERESTART           -- ^ Interrupted system call should be restarted
   | ESTRPIPE           -- ^ Streams pipe error
   | EUSERS             -- ^ Too many users
   | ENOTSOCK           -- ^ Socket operation on non-socket
   | EDESTADDRREQ       -- ^ Destination address required
   | EMSGSIZE           -- ^ Message too long
   | EPROTOTYPE         -- ^ Protocol wrong type for socket
   | ENOPROTOOPT        -- ^ Protocol not available
   | EPROTONOSUPPORT    -- ^ Protocol not supported
   | ESOCKTNOSUPPORT    -- ^ Socket type not supported
   | EOPNOTSUPP         -- ^ Operation not supported on transport endpoint
   | EPFNOSUPPORT       -- ^ Protocol family not supported
   | EAFNOSUPPORT       -- ^ Address family not supported by protocol
   | EADDRINUSE         -- ^ Address already in use
   | EADDRNOTAVAIL      -- ^ Cannot assign requested address
   | ENETDOWN           -- ^ Network is down
   | ENETUNREACH        -- ^ Network is unreachable
   | ENETRESET          -- ^ Network dropped connection because of reset
   | ECONNABORTED       -- ^ Software caused connection abort
   | ECONNRESET         -- ^ Connection reset by peer
   | ENOBUFS            -- ^ No buffer space available
   | EISCONN            -- ^ Transport endpoint is already connected
   | ENOTCONN           -- ^ Transport endpoint is not connected
   | ESHUTDOWN          -- ^ Cannot send after transport endpoint shutdown
   | ETOOMANYREFS       -- ^ Too many references: cannot splice
   | ETIMEDOUT          -- ^ Connection timed out
   | ECONNREFUSED       -- ^ Connection refused
   | EHOSTDOWN          -- ^ Host is down
   | EHOSTUNREACH       -- ^ No route to host
   | EALREADY           -- ^ Operation already in progress
   | EINPROGRESS        -- ^ Operation now in progress
   | ESTALE             -- ^ Stale file handle
   | EUCLEAN            -- ^ Structure needs cleaning
   | ENOTNAM            -- ^ Not a XENIX named type file
   | ENAVAIL            -- ^ No XENIX semaphores available
   | EISNAM             -- ^ Is a named type file
   | EREMOTEIO          -- ^ Remote I/O error
   | EDQUOT             -- ^ Quota exceeded
   | ENOMEDIUM          -- ^ No medium found
   | EMEDIUMTYPE        -- ^ Wrong medium type
   | ECANCELED          -- ^ Operation Canceled
   | ENOKEY             -- ^ Required key not available
   | EKEYEXPIRED        -- ^ Key has expired
   | EKEYREVOKED        -- ^ Key has been revoked
   | EKEYREJECTED       -- ^ Key was rejected by service
   | EOWNERDEAD         -- ^ Owner died
   | ENOTRECOVERABLE    -- ^ State not recoverable
   | ERFKILL            -- ^ Operation not possible due to RF-kill
   | EHWPOISON          -- ^ Memory page has hardware error
   | EOTHER Word64      -- ^ Other error code
   deriving (Eq,Show,Data)

errorTablePtr :: Ptr Word8
errorTablePtr = Ptr $(embedBytes errorTable)

peekErrorTable :: Integral a => a -> Word8
peekErrorTable = unsafePerformIO . peekElemOff errorTablePtr . fromIntegral

instance CEnum ErrorCode where
   toCEnum x
      | x <= fromIntegral errorTableMax
      , Just r <- makeEnumMaybe @ErrorCode (peekErrorTable x) = r
      | otherwise = EOTHER (fromIntegral x)
      where

   fromCEnum = \case
      EOTHER x -> fromIntegral x
      _        -> error "fromCEnumm not implemented for ErrorCode" --TODO


text:
Simulates players joining ClassMentors events for simulations, loading tests, and performance testing

npm install

npm test

node simulatePlayers.js action=clearChallengeResponses data=data.json numPlayers=2 firebaseID=singpath-play token=<FIREBASE_SECRET>

Running setup.

Clearing submissions for event EVENT1234

Removing all participants from event EVENT1234

creating token

Player_0 of type player1 starting.

Player_0 logging in.

Player_0 registering on ClassMentors

Player_0 loaded instructions for player1

Player_0 watching event EVENT1234 for challenges to open.

Player_0 waiting for challenge 1 (challengeKey1) to open

Player_0 waiting for challenge 2 (challengeKey2) to open

Player_0 finished

creating token

Player_1 of type player1 starting.

Player_1 logging in.

Player_1 registering on ClassMentors

Player_1 loaded instructions for player1

Player_1 watching event EVENT1234 for challenges to open.

Player_1 waiting for challenge 1 (challengeKey1) to open

Player_1 waiting for challenge 2 (challengeKey2) to open

Player_1 finished


text:
/* -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */

'use strict';

// This module listens to mozbrowserusernameandpasswordrequired event.
// It's for http authentication only.
// XXX: ftp authentication will be implemented here but not supported yet.

var AuthenticationDialog = {
  // Used for element id access.
  // e.g., 'authentication-dialog-alert-ok'
  prefix: 'authentication-dialog-',

  // DOM
  elements: {},

  // Get all elements when inited.
  getAllElements: function ad_getAllElements() {
    var elementsID = [
      'http-authentication', 'http-username-input', 'http-password-input',
      'http-authentication-message', 'http-authentication-ok',
      'http-authentication-cancel', 'title'
    ];

    var toCamelCase = function toCamelCase(str) {
      return str.replace(/\-(.)/g, function replacer(str, p1) {
        return p1.toUpperCase();
      });
    };

    elementsID.forEach(function createElementRef(name) {
      this.elements[toCamelCase(name)] =
        document.getElementById(this.prefix + name);
    }, this);

    this.screen = document.getElementById('screen');
    this.overlay = document.getElementById('dialog-overlay');
  },

  // Save the events returned by
  // mozbrowserusernameandpasswordrequired for later use.
  // The events are stored according to webapp origin
  // e.g., 'http://uitest.gaiamobile.org': evt
  currentEvents: {},

  init: function ad_init() {
    // Get all elements initially.
    this.getAllElements();
    var elements = this.elements;

    // Bind events
    window.addEventListener('mozbrowserusernameandpasswordrequired', this);
    window.addEventListener('appopen', this);
    window.addEventListener('appwillclose', this);
    window.addEventListener('appterminated', this);
    window.addEventListener('resize', this);
    window.addEventListener('keyboardchange', this);
    window.addEventListener('keyboardhide', this);

    for (var id in elements) {
      if (elements[id].tagName.toLowerCase() == 'button') {
        elements[id].addEventListener('click', this);
      }
    }
  },

  // Default event handler
  handleEvent: function ad_handleEvent(evt) {
    var elements = this.elements;
    switch (evt.type) {
      case 'mozbrowserusernameandpasswordrequired':
        if (evt.target.dataset.frameType != 'window')
          return;

        evt.preventDefault();
        var origin = evt.target.dataset.frameOrigin;
        this.currentEvents[origin] = evt;

        if (origin == WindowManager.getDisplayedApp())
          this.show(origin);
        break;

      case 'click':
        if (evt.currentTarget === elements.httpAuthenticationCancel) {
          this.cancelHandler();
        } else {
          this.confirmHandler();
        }
        break;

      case 'appopen':
        if (this.currentEvents[evt.detail.origin])
          this.show(evt.detail.origin);
        break;

      case 'appwillclose':
        // Do nothing if the app is closed at background.
        if (evt.detail.origin !== this.currentOrigin)
          return;

        // Reset currentOrigin
        this.hide();
        break;

      case 'appterminated':
        if (this.currentEvents[evt.detail.origin])
          delete this.currentEvents[evt.detail.origin];

        break;

      case 'resize':
      case 'keyboardhide':
        if (!this.currentOrigin)
          return;

        this.setHeight(window.innerHeight - StatusBar.height);
        break;

      case 'keyboardchange':
        var keyboardHeight = KeyboardManager.getHeight();
        this.setHeight(window.innerHeight - keyboardHeight - StatusBar.height);
        break;
    }
  },

  setHeight: function ad_setHeight(height) {
    if (this.isVisible())
      this.overlay.style.height = height + 'px';
  },

  show: function ad_show(origin) {
    this.currentOrigin = origin;
    var evt = this.currentEvents[origin];
    var elements = this.elements;
    this.screen.classList.add('authentication-dialog');
    elements.httpAuthentication.classList.add('visible');
    elements.title.textContent = evt.detail.host;
    elements.httpAuthenticationMessage.textContent = evt.detail.realm;
    elements.httpUsernameInput.value = '';
    elements.httpPasswordInput.value = '';

    this.setHeight(window.innerHeight - StatusBar.height);
  },

  hide: function ad_hide() {
    this.elements.httpUsernameInput.blur();
    this.elements.httpPasswordInput.blur();
    this.currentOrigin = null;
    this.elements.httpAuthentication.classList.remove('visible');
    this.screen.classList.remove('authentication-dialog');
  },

  confirmHandler: function ad_confirmHandler() {
    var elements = this.elements;
    var evt = this.currentEvents[this.currentOrigin];
    evt.detail.authenticate(elements.httpUsernameInput.value,
      elements.httpPasswordInput.value);
    elements.httpAuthentication.classList.remove('visible');
    delete this.currentEvents[this.currentOrigin];
    this.screen.classList.remove('authentication-dialog');
  },

  cancelHandler: function ad_cancelHandler() {
    var evt = this.currentEvents[this.currentOrigin];
    var elements = this.elements;
    evt.detail.cancel();
    elements.httpAuthentication.classList.remove('visible');
    delete this.currentEvents[this.currentOrigin];
    this.screen.classList.remove('authentication-dialog');
  },

  isVisible: function ad_isVisible() {
    return this.screen.classList.contains('authentication-dialog');
  }
};

AuthenticationDialog.init();


text:
PostDetailsPage::PostDetailsPage(QWidget* parent) :
  QWidget(parent)
{
  _ui = new Ui::PostDetailsPage;
  _ui->setupUi(this);
  _ui->splitter->setStretchFactor(0, 1);
  _ui->splitter->setStretchFactor(1, 0);
  _ui->splitter->setSizes({10, 1});

  _layout = new QVBoxLayout(_ui->postsWidget);
  _layout->setContentsMargins(0, 0, 0, 0);
  _spacer = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
  _layout->addSpacerItem(_spacer);

  connect(_ui->backButton, SIGNAL(clicked()), this, SIGNAL(back_to_list()));
  connect(_ui->replyButton, SIGNAL(clicked()), this, SLOT(send_reply()));
}

PostDetailsPage::~PostDetailsPage()
{
  delete _ui;
}

void PostDetailsPage::set_client(Client* client)
{
  _client = client;
}

void PostDetailsPage::load_post(const QString& post_id)
{
  if (!_client) { return; }

  try
  {
    _post = _client->fetch_post(post_id);
  }
  catch (...)
  {
    // TODO show error message
  }

  update_post();
}

void PostDetailsPage::update_post()
{
  const QList<Post> posts = _post.get_children();

  while (_post_widgets.size() < posts.size() + 1)
  {
    PostWidget* w = new PostWidget;
    w->set_details_mode(true);
    _layout->insertWidget(_post_widgets.size(), w);
    _post_widgets << w;
  }
  while (_post_widgets.size() > posts.size() + 1)
  {
    delete _post_widgets.last();
    _post_widgets.pop_back();
  }

  Q_ASSERT(_post_widgets.size() >= 1);
  _post_widgets.first()->set_post(_post);

  for (int i = 0; i < posts.size(); ++i)
  {
    _post_widgets[i + 1]->set_post(posts[i]);
  }
}

void PostDetailsPage::send_reply()
{
  if (!_client || !_client->is_authenticated()) return;

  const QString message = _ui->replyText->toPlainText();
  if (message.isEmpty()) return;

  try
  {
    _client->send_reply(message, _post.get_post_id(), _post.get_color_string());
    _ui->replyText->clear();
    load_post(_post.get_post_id());
  }
  catch(...)
  {
    // TODO: display error message
  }
}


text:
#ifndef _NATIVE_LIST_H_
#define _NATIVE_LIST_H_ 1

// Module Dependencies
#include "array.h"
#include "collection.h"

namespace native
{
	// Forward Declarations
	template <class TValue> class ListIterator;

	/**
		An ordered collection of values, maintained as an array.
	 */
	template <class TValue>
	class List : public Collection< ListIterator<TValue> >
	{
	public:
		/** Creates an empty List. */
		List();

		/**
			Creates a copy of the given List.
			\param other The List to copy.
		 */
		List(const List<TValue>& other);

		/**
			Performs a move operation, destroying the other List and moving
			its contents to this List.
			\param other The List to move.
		 */
		List(List<TValue>&& other) noexcept;

		/**
			Creates a List from a compiler-generated initializer_list.
			\param init The initializer list.
		 */
		List(std::initializer_list<TValue> init);

		/**
			Discards the previous contents and makes a copy of another List.
			\param other The List to copy.
			\return A reference to this List.
		 */
		List<TValue>& operator=(const List<TValue>& other);

		/**
			Appends a single value to the end of the List.
			\param value The value to append.
		 */
		void add(const TValue& value) override;

		/**
			Inserts a value into the List at the given index.
			\param index The index to insert it to.
			\param value The value to insert.
		 */
		void insert(size_t index, const TValue& value);

		/**
			Removes the value at the given index from the List.
			\param index The index of the value to remove.
		 */
		void removeAt(size_t index);

		/**
			Removes all instances of the given value from the List.
			\param value The value to remove.
		 */
		void remove(const TValue& value);

		/** Removes all items from the List. */
		void clear() override;

		/**
			The length is the number of values in the List.
			\return The current length.
		 */
		size_t getLength() const noexcept override { return _length; }

		/**
			Retrieves the value at the given zero-based index in the List.
			\param index The index.
			\return The value at the given index.
		 */
		const TValue& atIndex(size_t index) const;
		const TValue& operator[](size_t index) const { return atIndex(index); }

		/**
			Retrieves a modifiable reference to the value at the given zero-based
			index in the List.
			\param index The index.
			\return The value at the given index.
		 */
		TValue& atIndex(size_t index);
		TValue& operator[](size_t index) { return atIndex(index); }

		/**
			Obtains an Iterator positioned at the first value in this List.
			\return An iterator for this List.
		 */
		ListIterator<TValue> begin() const override;

		/**
			Obtains an Iterator just beyond the last value in the List.
			\return An Iterator for the List.
		 */
		ListIterator<TValue> end() const override;

	private:
		// Type Definitions
		typedef typename internal::ArrayOptimizer<TValue>::TArray TArray;

		// Instance Variables
		TArray _array;
		size_t _length;
	};

	/**
		An Iterator specifically for iterating through a List.
	 */
	template <class TValue>
	class ListIterator : public Iterator< TValue, ListIterator<TValue> >
	{
	public:
		/**
			Creates a ListIterator for the given List.
			\param list The List to iterate.
			\param index The index at which to begin iterating.
		 */
		ListIterator(const List<TValue>& list, size_t index);

		/**
			Increments the Iterator forward to the next value in the List.
			\return The Iterator.
		 */
		ListIterator<TValue>& operator++() override;

		/**
			Decrements the Iterator back to the previous value in the List.
			\return The Iterator.
		 */
		ListIterator<TValue>& operator--();

		/**
			Returns the current value in iteration.
			\return The current value in iteration.
		 */
		const TValue& operator*() const override;

		/**
			Tests iterators for inequality.
			\param other The Iterator to compare with.
			\return true if different, false if the same.
		 */
		bool operator!=(const ListIterator<TValue>& other) const override;

	private:
		// Instance Variables
		const List<TValue>& _list;
		size_t _index;
	};

	template <class TValue>
	List<TValue>::List() : _length(0)
	{
	}

	template <class TValue>
	List<TValue>::List(const List<TValue>& other) : _array(other._array), _length(other._length)
	{
	}

	template <class TValue>
	List<TValue>::List(List<TValue>&& other) noexcept : _array(std::move(other._array)), _length(other._length)
	{
		other._length = 0;
	}

	template <class TValue>
	List<TValue>::List(std::initializer_list<TValue> init) : _array((const std::initializer_list<TValue>&) init), _length(init.size())
	{
	}

	template <class TValue>
	List<TValue>& List<TValue>::operator=(const List<TValue>& other)
	{
		_array = other._array;
		_length = other._length;

		return *this;
	}

	template <class TValue>
	void List<TValue>::add(const TValue& value)
	{
		if (_array.getLength() <= getLength())
			_array.setLength(internal::getCapacityForLength(getLength() + 1));

		_array.set(_length++, internal::ArrayOptimizer<TValue>::getValue(value));
	}

	template <class TValue>
	void List<TValue>::insert(size_t index, const TValue& value)
	{
		if (_array.getLength() <= this->getLength())
			_array.setLength(internal::getCapacityForLength(getLength() + 1));

		if (index >= getLength())
			index = getLength();
		else {
			// Move contents to make space for the new value.
			_array.set(index + 1, _array.toArray() + index, getLength() - index);
		}

		_array.set(index, internal::ArrayOptimizer<TValue>::getValue(value));
		++_length;
	}

	template <class TValue>
	void List<TValue>::removeAt(size_t index)
	{
		if (index >= getLength())
			internal::raiseArrayIndexException();

		if (index < getLength() - 1) {
			// Move other values back a step in the Array.
			_array.set(index, _array.toArray() + index + 1, getLength() - index - 1);
		}

		--_length;
	}

	template <class TValue>
	void List<TValue>::remove(const TValue& value)
	{
		const List<TValue>& constRef = *this;

		for (size_t i = 0; i < getLength(); ++i)
		{
			while (i < getLength() && constRef.atIndex(i) == value)
				removeAt(i);
		}
	}

	template <class TValue>
	void List<TValue>::clear()
	{
		_length = 0;
		_array.clear();
	}

	template <class TValue>
	const TValue& List<TValue>::atIndex(size_t index) const
	{
		return internal::ArrayOptimizer<TValue>::getValue(_array.atIndex(index));
	}

	template <class TValue>
	TValue& List<TValue>::atIndex(size_t index)
	{
		return internal::ArrayOptimizer<TValue>::getValue(_array.atIndex(index));
	}

	template <class TValue>
	ListIterator<TValue> List<TValue>::begin() const
	{
		return ListIterator<TValue>(*this, 0);
	}

	template <class TValue>
	ListIterator<TValue> List<TValue>::end() const
	{
		return ListIterator<TValue>(*this, getLength());
	}

	template <class TValue>
	ListIterator<TValue>::ListIterator(const List<TValue>& list, size_t index) : _list(list), _index(index)
	{
	}

	template <class TValue>
	ListIterator<TValue>& ListIterator<TValue>::operator++()
	{
		_index++;
		return *this;
	}

	template <class TValue>
	ListIterator<TValue>& ListIterator<TValue>::operator--()
	{
		_index--;
		return *this;
	}

	template <class TValue>
	const TValue& ListIterator<TValue>::operator*() const
	{
		return _list[_index];
	}

	template <class TValue>
	bool ListIterator<TValue>::operator!=(const ListIterator<TValue>& other) const
	{
		return _index != other._index || &_list != &other._list;
	}
}

#endif // _NATIVE_LIST_H_


text:
<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
namespace Sistema\Bundle\FrontendBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

/**
 * @Route("/avisos")
 */
class AvisoController extends Controller
{

    /**
     * @Route("/listar/mantenimiento", name="listar_avisos_mantenimiento")
     * @Template()
     */
    public function listarAvisosMantenimientoAction()
    {
        $aviso = $this->get('aviso_mantenimiento.service');
        $avisos = $aviso->getAvisosMantenimiento(5);
        return ['avisos' => $avisos ];
    }

    /**
     * @Route("/listar/tope", name="listar_avisos_tope")
     * @Template()
     */
    public function listarAvisosTopeAction()
    {
        $aviso = $this->get('aviso_tope.service');
        $avisos = $aviso->getAvisosTope(5);
        return ['avisos' => $avisos];

    }

}

?>


text:
<!doctype html>

    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">

    <title>online Customer services</title>
    <link rel="stylesheet" href="../static/css/common.css" />

Power by uuchat.io


text:
namespace System {
	public class ArgumentOutOfRangeException : ArgumentException {

		public ArgumentOutOfRangeException() : base("Argument is out of range.") { }

		public ArgumentOutOfRangeException(string paramName) : base("Argument is out of range.", paramName) { }

		public ArgumentOutOfRangeException(string paramName, string msg) : base(msg, paramName) { }
	}
}

#endif


text:
<?php
/**
 * Created by PhpStorm.
 * User: dtome
 * Date: 24/02/17
 * Time: 21:44
 */

namespace Slx\Infrastructure\Service\Mail;

use PHPMailer;
use Slx\Domain\Entity\Email\EmailTemplateInterface;
use Symfony\Component\Yaml\Parser as YamlParser;

class Mailer
{

    /**
     * @var PHPMailer
     */
    private $phpMailer;

    /**
     * @var string
     */
    private $configPath = __DIR__ . '/../../../../../config/mailconfig.yml';

    /**
     * Mailer constructor.
     * @param \Twig_Environment $twig
     */
    public function __construct($twig)
    {
        $parameters = $this->getMailerParameters();
        $this->phpMailer = new PHPMailer;
        $this->phpMailer->isSMTP();
//        $this->phpMailer->SMTPDebug = 2;
        $this->phpMailer->Debugoutput = 'html';
        $this->phpMailer->Host = $parameters['mail']['host'];
        $this->phpMailer->Port = 587;
        $this->phpMailer->SMTPSecure = 'tls';
        $this->phpMailer->SMTPAuth = true;
        $this->phpMailer->Username = $parameters['mail']['username'];
        $this->phpMailer->Password = $parameters['mail']['password'];
        $this->phpMailer->setFrom($parameters['mail']['username']);

        $this->twig = $twig;
    }

    public function send(EmailTemplateInterface $emailTemplate)
    {
        $this->phpMailer->addAddress($emailTemplate->emailTo());
        $this->phpMailer->msgHTML($this->twig->render($emailTemplate->templatePath(), $emailTemplate->parameters()));

        if (!$this->phpMailer->send()) {
            throw new EmailNoSendedException();
        }
    }

    private function getMailerParameters(): array
    {
        $parser = new YamlParser();
        if (!file_exists($this->configPath)) {
            throw new ConfigFileDoesNotExistException();
        }
        return $parser->parse(file_get_contents($this->configPath));
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>Simple read bits example — pyModbusTCP 0.0.11 documentation</title>

    <link rel="stylesheet" href="../_static/nature.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />

    <link rel="top" title="pyModbusTCP 0.0.11 documentation" href="../index.html" />
    <link rel="up" title="pyModbusTCP examples" href="index.html" />
    <link rel="next" title="Simple write bits example" href="write_bit.html" />
    <link rel="prev" title="Simple read registers example" href="read_register.html" />

Navigation

          index

          modules |

          next |

          previous |

pyModbusTCP 0.0.11 documentation »

pyModbusTCP examples »

Simple read bits example¶

#!/usr/bin/env python
# -*- coding: utf-8 -*-

# read_bit
# read 10 bits and print result on stdout

from pyModbusTCP.client import ModbusClient
import time

SERVER_HOST = "localhost"
SERVER_PORT = 502

c = ModbusClient()

# uncomment this line to see debug message
#c.debug(True)

# define modbus server host, port
c.host(SERVER_HOST)
c.port(SERVER_PORT)

while True:
    # open or reconnect TCP to server
    if not c.is_open():
        if not c.open():
            print("unable to connect to "+SERVER_HOST+":"+str(SERVER_PORT))

    # if open() is ok, read coils (modbus function 0x01)
    if c.is_open():
        # read 10 bits at address 0, store result in regs list
        bits = c.read_coils(0, 10)
        # if success display registers
        if bits:
            print("bit ad #0 to 9: "+str(bits))

    # sleep 2s before next polling
    time.sleep(2)

Previous topic

Simple read registers example

Next topic

Simple write bits example

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

    Enter search terms or a module, class or function name.

Navigation

          index

          modules |

          next |

          previous |

pyModbusTCP 0.0.11 documentation »

pyModbusTCP examples »

        © Copyright 2014, Loic Lefebvre.
      Created using Sphinx 1.2.2.


text:
package org.apache.xbean.naming.context;

import java.util.Collections;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicReference;

import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.OperationNotSupportedException;

/**
 * @version $Rev$ $Date$
 */
public class ImmutableFederatedContext extends AbstractFederatedContext {

    public ImmutableFederatedContext(String nameInNamespace, Set<Context> federatedContexts) {
        super(nameInNamespace, ContextAccess.UNMODIFIABLE, federatedContexts);
    }

    public void federateContext(Context context) throws NamingException {
        addFederatedContext(this, context);
    }

    public void unfederateContext(Context context) throws NamingException {
        removeFederatedContext(this, context);
    }

    @Override
    protected Map<String, Object> getWrapperBindings() throws NamingException {
        return Collections.emptyMap();
    }

    public Context createNestedSubcontext(String path, Map<String, Object> bindings) throws NamingException {
        return new NestedImmutableFederatedContext(path, bindings);
    }

    /**
      * Nested context which shares the absolute index map in MapContext.
      */
     public class NestedImmutableFederatedContext extends AbstractFederatedContext {
         private final AtomicReference<Map<String, Object>> bindingsRef;
         private final String pathWithSlash;

         public NestedImmutableFederatedContext(String path, Map<String, Object> bindings) throws NamingException {
             super(ImmutableFederatedContext.this, path);

             path = getNameInNamespace();
             if (!path.endsWith("/")) path += "/";
             this.pathWithSlash = path;

             this.bindingsRef = new AtomicReference<Map<String, Object>>(Collections.unmodifiableMap(bindings));
         }

         public Context createNestedSubcontext(String path, Map<String, Object> bindings) throws NamingException {
             return new NestedImmutableFederatedContext(getNameInNamespace(path), bindings);
         }

         protected Object getDeepBinding(String name) {
             String absoluteName = pathWithSlash + name;
             return ImmutableFederatedContext.this.getDeepBinding(absoluteName);
         }

         protected Map<String, Object> getWrapperBindings() throws NamingException {
             return bindingsRef.get();
         }

         protected boolean addBinding(String name, Object value, boolean rebind) throws NamingException {
             throw new OperationNotSupportedException("Context is immutable");
         }

         protected boolean removeBinding(String name, boolean removeNotEmptyContext) throws NamingException {
             throw new OperationNotSupportedException("Context is immutable");
         }
     }

}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>au.gov.amsa.animator (parent 0.5.25 API)</title>
<meta name="date" content="2020-09-11">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Package au.gov.amsa.animator

Interface Summary

Interface
Description

Model

View

Class Summary

Class
Description

Animator

AnimatorDemoMain

AnimatorMain

AnimatorPreferences

ImageDemo

Map

ModelEmpty

ModelManyCraft

Sources

ViewRecentTracks

Enum Summary

Enum
Description

ViewRecentTracksOption

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Copyright © 2020. All rights reserved.


text:
 Constructor for the PnPHttpProvider class

**Namespace:** [OfficeDevPnP.Core.Framework.Graph](OfficeDevPnP.Core.Framework.Graph.md)
**Assembly:** OfficeDevPnP.Core.dll
## Syntax
```C#
public PnPHttpProvider(int retryCount, int delay, string userAgent)
```
### Parameters
#### (optional) retryCount
  Type: System.Int32
  Maximum retry Count

#### (optional) delay
  Type: System.Int32
  Delay Time

#### (optional) userAgent
  Type: System.String
  User-Agent string to set

## See also
- [PnPHttpProvider](OfficeDevPnP.Core.Framework.Graph.PnPHttpProvider.md)
- [OfficeDevPnP.Core.Framework.Graph](OfficeDevPnP.Core.Framework.Graph.md)


text:
module.exports = {
  // your server name
  ServerName: 'MVC9-Web-Server',
  // charset : UTF-8/GBK/GB2312/etc...
  Charset: 'UTF-8',
  // charset : UTF-8/GBK/GB2312/etc...
  FileCharset: 'base64',
  // your web application root directory
  WebRootDir: 'webApp',
  // server admin's email
  AdminEmail: 'null',
  // turn zlib gzip compression true/false
  EnableCompression: true,
  // level of zlib compression 0-9 (for example 0 disable, 1 faster, 8 normal, 9 best)
  CompressionLevel: 3,
  // error page path under the WebRootDir, put null to turn off this option to improve the performance of server request
  ErrorPage: 'errorPages',
  // turn console server log true/false
  LogLevel: 6,
  // write access log file true/false
  WriteLog: true,
  // buffer life(ms), put 0 to turn off file read buffer
  BufferTime: 60000,
  // Caution: Enable RequestDebug will turn off your web service!
  RequestDebug: false
}


text:
package material

import "github.com/dlespiau/dax"

// Color is the simplest material possible, just a color.
type Color struct {
	dax.BaseMaterial
	color dax.Color
}

var _ dax.Material = &Color{}

// NewColor creates a new Color material.
func NewColor(color *dax.Color) *Color {
	return &Color{
		color: *color,
	}
}

const colorFragmentShader = `
#version 330
uniform vec4 color;
out vec4 outputColor;
void main() {
    outputColor = color;
}`

// ID is part of the Material interface.
func (m *Color) ID() string {
	return "-dax-material-color"
}

// GetFragmentShader is part of the Material interface.
func (m *Color) GetFragmentShader() *dax.FragmentShader {
	s := dax.NewFragmentShader(colorFragmentShader)
	s.AddUniform(dax.VariableKindVec4, "color")

	return s
}


text:
layout: page
title: Colors
---

The look and feel of our company and product relies on using a handful of specific colors that help convey meaning and purpose.

### Section Colours

Sport Green

		$sport-color

News Red

		$news-color

Culture Purple

		$culture-color

Opinion teal

		$opinion-color

Lifestyle orange

		$lifestyle-color

		RGBA

Business blue

		$business-color

More teal

		$more-color

### General Election Policatal Party

<<<<<<< HEAD

=======
### View Codepen

See the Pen it-sg_colours by Ray (@roneill) on CodePen.

>>>>>>> e315a7daa971f52141180c1f35a24bf35cd17924


text:
package org.gradle.internal.resource;

import org.gradle.api.resources.MissingResourceException;
import org.gradle.api.resources.ResourceException;

import java.io.File;
import java.io.FileNotFoundException;
import java.net.URI;

public class ResourceExceptions {
    public static ResourceIsAFolderException readFolder(File location) {
        return new ResourceIsAFolderException(location.toURI(), String.format("Cannot read '%s' because it is a folder.", location));
    }

    public static ResourceException readFailed(File location, Throwable failure) {
        return failure(location.toURI(), String.format("Could not read '%s'.", location), failure);
    }

    public static ResourceException readFailed(String displayName, Throwable failure) {
        return new ResourceException(String.format("Could not read %s.", displayName), failure);
    }

    public static MissingResourceException readMissing(File location, Throwable failure) {
        return new MissingResourceException(location.toURI(),
                String.format("Could not read '%s' as it does not exist.", location),
                failure instanceof FileNotFoundException ? null : failure);
    }

    public static MissingResourceException getMissing(URI location, Throwable failure) {
        return new MissingResourceException(location,
                String.format("Could not read '%s' as it does not exist.", location),
                failure instanceof FileNotFoundException ? null : failure);
    }

    public static MissingResourceException getMissing(URI location) {
        return new MissingResourceException(location,
                String.format("Could not read '%s' as it does not exist.", location));
    }

    public static ResourceException getFailed(URI location, Throwable failure) {
        return failure(location, String.format("Could not get resource '%s'.", location), failure);
    }

    public static ResourceException putFailed(URI location, Throwable failure) {
        return failure(location, String.format("Could not write to resource '%s'.", location), failure);
    }

    /**
     * Wraps the given failure, unless it is a ResourceException with the specified location.
     */
    public static ResourceException failure(URI location, String message, Throwable failure) {
        if (failure instanceof ResourceException) {
            ResourceException resourceException = (ResourceException) failure;
            if (location.equals(resourceException.getLocation())) {
                return resourceException;
            }
        }
        return new ResourceException(location, message, failure);
    }
}


text:
package info.javaspec.console;

import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import info.javaspec.SpecCollection;
import info.javaspec.console.helpers.SpecCollectionHelper;
import info.javaspec.console.helpers.SpecHelper;
import info.javaspec.example.declaration.DescribeTwoSpecs;
import info.javaspec.example.declaration.OneSpiesSpecs;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.equalTo;

/** Steps about spec declaration syntax forms. */
public class SpecDeclarationSteps {
  private final SpecHelper specHelper;
  private final SpecCollectionHelper specCollectionHelper;

  private String thatDescription;
  private String thatIntendedBehavior;
  private List<String> thoseIntendedBehaviors;
  private Verification specLambdasRan;

  public SpecDeclarationSteps(SpecHelper specHelper, SpecCollectionHelper specCollectionHelper) {
    this.specHelper = specHelper;
    this.specCollectionHelper = specCollectionHelper;
  }

  @Given("^I have a spec declaration that calls `it` with a lambda and a description of intended behavior$")
  public void iHaveASpecDeclarationCallingIt() throws Exception {
    specHelper.setDeclaringClass(OneSpiesSpecs.class);
    thatDescription = "OneSpies";
    thatIntendedBehavior = "does a thing";
    specLambdasRan = () -> assertThat(OneSpiesSpecs.numTimesRan, equalTo(1));
  }

  @Given(
    "^I have a spec declaration that calls `describe` with a class and a lambda containing 1 or more `it` statements$")
  public void iHaveASpecDeclarationCallingDescribe() throws Exception {
    specHelper.setDeclaringClass(DescribeTwoSpecs.class);
    thatDescription = "Illudium Q-36 Explosive Space Modulator";
    thoseIntendedBehaviors = new ArrayList<>(Arrays.asList("discombobulates", "explodes"));
    specLambdasRan = () -> assertThat(DescribeTwoSpecs.descriptionsRan, equalTo(thoseIntendedBehaviors));
  }

  @When("^I load the specs from that declaration$")
  public void iLoadTheSpecsFromThatDeclaration() throws Exception {
    specCollectionHelper.loadSpecsFromClass();
  }

  @When("^I run that spec declaration$")
  public void iRunThatSpec() throws Exception {
    this.specCollectionHelper.runThatCollection();
  }

  @When("^I run that suite$")
  public void iRunThatCollection() throws Exception {
    this.specCollectionHelper.runThatCollection();
  }

  @Then("^a spec should exist with the given description$")
  public void aSpecShouldExistWithThatDescription() throws Exception {
    SpecCollection thatCollection = specCollectionHelper.findCollectionWithDescription(thatDescription);
    assertThat(thatCollection.intendedBehaviors(), containsInAnyOrder(thatIntendedBehavior));
  }

  @Then("^that lambda should be run$")
  public void thatLambdaShouldBeRun() throws Exception {
    specLambdasRan.verify();
  }

  @Then("^those lambdas should be run$")
  public void thoseLambdasShouldBeRun() throws Exception {
    specLambdasRan.verify();
  }

  @Then("^there should be a suite with that description$")
  public void thereShouldBeACollectionWithThatDescription() throws Exception {
    SpecCollection thatCollection = specCollectionHelper.findCollectionWithDescription(thatDescription);
    assertThat(thatCollection.description(), equalTo(thatDescription));
  }

  @Then("^that suite should contain a spec for each `it` statement within it$")
  public void thatCollectionShouldHaveSpecs() throws Exception {
    assertThat(specCollectionHelper.getSelectedCollection().intendedBehaviors(), equalTo(thoseIntendedBehaviors));
  }
}