text:
/**
 */
package CIM15.IEC61968.Metering;

import CIM15.IEC61968.Customers.CustomerAgreement;
import CIM15.IEC61968.Customers.CustomersPackage;

import CIM15.IEC61970.Core.IdentifiedObject;

import CIM15.IEC61970.Domain.DateTimeInterval;

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

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

/**
 *
 * A representation of the model object 'End Device Control'.
 *
 *
 *

 * The following features are supported:
 *

 *
{@link CIM15.IEC61968.Metering.EndDeviceControl#getDemandResponseProgram Demand Response Program}

 *
{@link CIM15.IEC61968.Metering.EndDeviceControl#getDrProgramLevel Dr Program Level}

 *
{@link CIM15.IEC61968.Metering.EndDeviceControl#isDrProgramMandatory Dr Program Mandatory}

 *
{@link CIM15.IEC61968.Metering.EndDeviceControl#getCustomerAgreement Customer Agreement}

 *
{@link CIM15.IEC61968.Metering.EndDeviceControl#getType Type}

 *
{@link CIM15.IEC61968.Metering.EndDeviceControl#getScheduledInterval Scheduled Interval}

 *
{@link CIM15.IEC61968.Metering.EndDeviceControl#getEndDeviceGroup End Device Group}

 *
{@link CIM15.IEC61968.Metering.EndDeviceControl#getEndDevice End Device}

 *
{@link CIM15.IEC61968.Metering.EndDeviceControl#getPriceSignal Price Signal}

 *

 *

 *
 * @generated
 */
public class EndDeviceControl extends IdentifiedObject {
	/**
	 * The cached value of the '{@link #getDemandResponseProgram() Demand Response Program}' reference.
	 *
	 *
	 * @see #getDemandResponseProgram()
	 * @generated
	 * @ordered
	 */
	protected DemandResponseProgram demandResponseProgram;

	/**
	 * The default value of the '{@link #getDrProgramLevel() Dr Program Level}' attribute.
	 *
	 *
	 * @see #getDrProgramLevel()
	 * @generated
	 * @ordered
	 */
	protected static final int DR_PROGRAM_LEVEL_EDEFAULT = 0;

	/**
	 * The cached value of the '{@link #getDrProgramLevel() Dr Program Level}' attribute.
	 *
	 *
	 * @see #getDrProgramLevel()
	 * @generated
	 * @ordered
	 */
	protected int drProgramLevel = DR_PROGRAM_LEVEL_EDEFAULT;

	/**
	 * This is true if the Dr Program Level attribute has been set.
	 *
	 *
	 * @generated
	 * @ordered
	 */
	protected boolean drProgramLevelESet;

	/**
	 * The default value of the '{@link #isDrProgramMandatory() Dr Program Mandatory}' attribute.
	 *
	 *
	 * @see #isDrProgramMandatory()
	 * @generated
	 * @ordered
	 */
	protected static final boolean DR_PROGRAM_MANDATORY_EDEFAULT = false;

	/**
	 * The cached value of the '{@link #isDrProgramMandatory() Dr Program Mandatory}' attribute.
	 *
	 *
	 * @see #isDrProgramMandatory()
	 * @generated
	 * @ordered
	 */
	protected boolean drProgramMandatory = DR_PROGRAM_MANDATORY_EDEFAULT;

	/**
	 * This is true if the Dr Program Mandatory attribute has been set.
	 *
	 *
	 * @generated
	 * @ordered
	 */
	protected boolean drProgramMandatoryESet;

	/**
	 * The cached value of the '{@link #getCustomerAgreement() Customer Agreement}' reference.
	 *
	 *
	 * @see #getCustomerAgreement()
	 * @generated
	 * @ordered
	 */
	protected CustomerAgreement customerAgreement;

	/**
	 * The default value of the '{@link #getType() Type}' attribute.
	 *
	 *
	 * @see #getType()
	 * @generated
	 * @ordered
	 */
	protected static final String TYPE_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getType() Type}' attribute.
	 *
	 *
	 * @see #getType()
	 * @generated
	 * @ordered
	 */
	protected String type = TYPE_EDEFAULT;

	/**
	 * This is true if the Type attribute has been set.
	 *
	 *
	 * @generated
	 * @ordered
	 */
	protected boolean typeESet;

	/**
	 * The cached value of the '{@link #getScheduledInterval() Scheduled Interval}' containment reference.
	 *
	 *
	 * @see #getScheduledInterval()
	 * @generated
	 * @ordered
	 */
	protected DateTimeInterval scheduledInterval;

	/**
	 * The cached value of the '{@link #getEndDeviceGroup() End Device Group}' reference.
	 *
	 *
	 * @see #getEndDeviceGroup()
	 * @generated
	 * @ordered
	 */
	protected EndDeviceGroup endDeviceGroup;

	/**
	 * The cached value of the '{@link #getEndDevice() End Device}' reference.
	 *
	 *
	 * @see #getEndDevice()
	 * @generated
	 * @ordered
	 */
	protected EndDevice endDevice;

	/**
	 * The default value of the '{@link #getPriceSignal() Price Signal}' attribute.
	 *
	 *
	 * @see #getPriceSignal()
	 * @generated
	 * @ordered
	 */
	protected static final float PRICE_SIGNAL_EDEFAULT = 0.0F;

	/**
	 * The cached value of the '{@link #getPriceSignal() Price Signal}' attribute.
	 *
	 *
	 * @see #getPriceSignal()
	 * @generated
	 * @ordered
	 */
	protected float priceSignal = PRICE_SIGNAL_EDEFAULT;

	/**
	 * This is true if the Price Signal attribute has been set.
	 *
	 *
	 * @generated
	 * @ordered
	 */
	protected boolean priceSignalESet;

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

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return MeteringPackage.Literals.END_DEVICE_CONTROL;
	}

	/**
	 * Returns the value of the 'Demand Response Program' reference.
	 * It is bidirectional and its opposite is '{@link CIM15.IEC61968.Metering.DemandResponseProgram#getEndDeviceControls End Device Controls}'.
	 *
	 *

	 * If the meaning of the 'Demand Response Program' reference isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Demand Response Program' reference.
	 * @see #setDemandResponseProgram(DemandResponseProgram)
	 * @see CIM15.IEC61968.Metering.DemandResponseProgram#getEndDeviceControls
	 * @generated
	 */
	public DemandResponseProgram getDemandResponseProgram() {
		if (demandResponseProgram != null && demandResponseProgram.eIsProxy()) {
			InternalEObject oldDemandResponseProgram = (InternalEObject)demandResponseProgram;
			demandResponseProgram = (DemandResponseProgram)eResolveProxy(oldDemandResponseProgram);
			if (demandResponseProgram != oldDemandResponseProgram) {
			}
		}
		return demandResponseProgram;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public DemandResponseProgram basicGetDemandResponseProgram() {
		return demandResponseProgram;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public NotificationChain basicSetDemandResponseProgram(DemandResponseProgram newDemandResponseProgram, NotificationChain msgs) {
		DemandResponseProgram oldDemandResponseProgram = demandResponseProgram;
		demandResponseProgram = newDemandResponseProgram;
		return msgs;
	}

	/**
	 * Sets the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#getDemandResponseProgram Demand Response Program}' reference.
	 *
	 *
	 * @param value the new value of the 'Demand Response Program' reference.
	 * @see #getDemandResponseProgram()
	 * @generated
	 */
	public void setDemandResponseProgram(DemandResponseProgram newDemandResponseProgram) {
		if (newDemandResponseProgram != demandResponseProgram) {
			NotificationChain msgs = null;
			if (demandResponseProgram != null)
				msgs = ((InternalEObject)demandResponseProgram).eInverseRemove(this, MeteringPackage.DEMAND_RESPONSE_PROGRAM__END_DEVICE_CONTROLS, DemandResponseProgram.class, msgs);
			if (newDemandResponseProgram != null)
				msgs = ((InternalEObject)newDemandResponseProgram).eInverseAdd(this, MeteringPackage.DEMAND_RESPONSE_PROGRAM__END_DEVICE_CONTROLS, DemandResponseProgram.class, msgs);
			msgs = basicSetDemandResponseProgram(newDemandResponseProgram, msgs);
			if (msgs != null) msgs.dispatch();
		}
	}

	/**
	 * Returns the value of the 'Dr Program Level' attribute.
	 *
	 *

	 * If the meaning of the 'Dr Program Level' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Dr Program Level' attribute.
	 * @see #isSetDrProgramLevel()
	 * @see #unsetDrProgramLevel()
	 * @see #setDrProgramLevel(int)
	 * @generated
	 */
	public int getDrProgramLevel() {
		return drProgramLevel;
	}

	/**
	 * Sets the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#getDrProgramLevel Dr Program Level}' attribute.
	 *
	 *
	 * @param value the new value of the 'Dr Program Level' attribute.
	 * @see #isSetDrProgramLevel()
	 * @see #unsetDrProgramLevel()
	 * @see #getDrProgramLevel()
	 * @generated
	 */
	public void setDrProgramLevel(int newDrProgramLevel) {
		drProgramLevel = newDrProgramLevel;
		drProgramLevelESet = true;
	}

	/**
	 * Unsets the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#getDrProgramLevel Dr Program Level}' attribute.
	 *
	 *
	 * @see #isSetDrProgramLevel()
	 * @see #getDrProgramLevel()
	 * @see #setDrProgramLevel(int)
	 * @generated
	 */
	public void unsetDrProgramLevel() {
		drProgramLevel = DR_PROGRAM_LEVEL_EDEFAULT;
		drProgramLevelESet = false;
	}

	/**
	 * Returns whether the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#getDrProgramLevel Dr Program Level}' attribute is set.
	 *
	 *
	 * @return whether the value of the 'Dr Program Level' attribute is set.
	 * @see #unsetDrProgramLevel()
	 * @see #getDrProgramLevel()
	 * @see #setDrProgramLevel(int)
	 * @generated
	 */
	public boolean isSetDrProgramLevel() {
		return drProgramLevelESet;
	}

	/**
	 * Returns the value of the 'Dr Program Mandatory' attribute.
	 *
	 *

	 * If the meaning of the 'Dr Program Mandatory' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Dr Program Mandatory' attribute.
	 * @see #isSetDrProgramMandatory()
	 * @see #unsetDrProgramMandatory()
	 * @see #setDrProgramMandatory(boolean)
	 * @generated
	 */
	public boolean isDrProgramMandatory() {
		return drProgramMandatory;
	}

	/**
	 * Sets the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#isDrProgramMandatory Dr Program Mandatory}' attribute.
	 *
	 *
	 * @param value the new value of the 'Dr Program Mandatory' attribute.
	 * @see #isSetDrProgramMandatory()
	 * @see #unsetDrProgramMandatory()
	 * @see #isDrProgramMandatory()
	 * @generated
	 */
	public void setDrProgramMandatory(boolean newDrProgramMandatory) {
		drProgramMandatory = newDrProgramMandatory;
		drProgramMandatoryESet = true;
	}

	/**
	 * Unsets the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#isDrProgramMandatory Dr Program Mandatory}' attribute.
	 *
	 *
	 * @see #isSetDrProgramMandatory()
	 * @see #isDrProgramMandatory()
	 * @see #setDrProgramMandatory(boolean)
	 * @generated
	 */
	public void unsetDrProgramMandatory() {
		drProgramMandatory = DR_PROGRAM_MANDATORY_EDEFAULT;
		drProgramMandatoryESet = false;
	}

	/**
	 * Returns whether the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#isDrProgramMandatory Dr Program Mandatory}' attribute is set.
	 *
	 *
	 * @return whether the value of the 'Dr Program Mandatory' attribute is set.
	 * @see #unsetDrProgramMandatory()
	 * @see #isDrProgramMandatory()
	 * @see #setDrProgramMandatory(boolean)
	 * @generated
	 */
	public boolean isSetDrProgramMandatory() {
		return drProgramMandatoryESet;
	}

	/**
	 * Returns the value of the 'Customer Agreement' reference.
	 * It is bidirectional and its opposite is '{@link CIM15.IEC61968.Customers.CustomerAgreement#getEndDeviceControls End Device Controls}'.
	 *
	 *

	 * If the meaning of the 'Customer Agreement' reference isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Customer Agreement' reference.
	 * @see #setCustomerAgreement(CustomerAgreement)
	 * @see CIM15.IEC61968.Customers.CustomerAgreement#getEndDeviceControls
	 * @generated
	 */
	public CustomerAgreement getCustomerAgreement() {
		if (customerAgreement != null && customerAgreement.eIsProxy()) {
			InternalEObject oldCustomerAgreement = (InternalEObject)customerAgreement;
			customerAgreement = (CustomerAgreement)eResolveProxy(oldCustomerAgreement);
			if (customerAgreement != oldCustomerAgreement) {
			}
		}
		return customerAgreement;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public CustomerAgreement basicGetCustomerAgreement() {
		return customerAgreement;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public NotificationChain basicSetCustomerAgreement(CustomerAgreement newCustomerAgreement, NotificationChain msgs) {
		CustomerAgreement oldCustomerAgreement = customerAgreement;
		customerAgreement = newCustomerAgreement;
		return msgs;
	}

	/**
	 * Sets the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#getCustomerAgreement Customer Agreement}' reference.
	 *
	 *
	 * @param value the new value of the 'Customer Agreement' reference.
	 * @see #getCustomerAgreement()
	 * @generated
	 */
	public void setCustomerAgreement(CustomerAgreement newCustomerAgreement) {
		if (newCustomerAgreement != customerAgreement) {
			NotificationChain msgs = null;
			if (customerAgreement != null)
				msgs = ((InternalEObject)customerAgreement).eInverseRemove(this, CustomersPackage.CUSTOMER_AGREEMENT__END_DEVICE_CONTROLS, CustomerAgreement.class, msgs);
			if (newCustomerAgreement != null)
				msgs = ((InternalEObject)newCustomerAgreement).eInverseAdd(this, CustomersPackage.CUSTOMER_AGREEMENT__END_DEVICE_CONTROLS, CustomerAgreement.class, msgs);
			msgs = basicSetCustomerAgreement(newCustomerAgreement, msgs);
			if (msgs != null) msgs.dispatch();
		}
	}

	/**
	 * Returns the value of the 'Type' attribute.
	 *
	 *

	 * If the meaning of the 'Type' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Type' attribute.
	 * @see #isSetType()
	 * @see #unsetType()
	 * @see #setType(String)
	 * @generated
	 */
	public String getType() {
		return type;
	}

	/**
	 * Sets the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#getType Type}' attribute.
	 *
	 *
	 * @param value the new value of the 'Type' attribute.
	 * @see #isSetType()
	 * @see #unsetType()
	 * @see #getType()
	 * @generated
	 */
	public void setType(String newType) {
		type = newType;
		typeESet = true;
	}

	/**
	 * Unsets the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#getType Type}' attribute.
	 *
	 *
	 * @see #isSetType()
	 * @see #getType()
	 * @see #setType(String)
	 * @generated
	 */
	public void unsetType() {
		type = TYPE_EDEFAULT;
		typeESet = false;
	}

	/**
	 * Returns whether the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#getType Type}' attribute is set.
	 *
	 *
	 * @return whether the value of the 'Type' attribute is set.
	 * @see #unsetType()
	 * @see #getType()
	 * @see #setType(String)
	 * @generated
	 */
	public boolean isSetType() {
		return typeESet;
	}

	/**
	 * Returns the value of the 'Scheduled Interval' containment reference.
	 *
	 *

	 * If the meaning of the 'Scheduled Interval' containment reference isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Scheduled Interval' containment reference.
	 * @see #setScheduledInterval(DateTimeInterval)
	 * @generated
	 */
	public DateTimeInterval getScheduledInterval() {
		return scheduledInterval;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public NotificationChain basicSetScheduledInterval(DateTimeInterval newScheduledInterval, NotificationChain msgs) {
		DateTimeInterval oldScheduledInterval = scheduledInterval;
		scheduledInterval = newScheduledInterval;
		return msgs;
	}

	/**
	 * Sets the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#getScheduledInterval Scheduled Interval}' containment reference.
	 *
	 *
	 * @param value the new value of the 'Scheduled Interval' containment reference.
	 * @see #getScheduledInterval()
	 * @generated
	 */
	public void setScheduledInterval(DateTimeInterval newScheduledInterval) {
		if (newScheduledInterval != scheduledInterval) {
			NotificationChain msgs = null;
			if (scheduledInterval != null)
				msgs = ((InternalEObject)scheduledInterval).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - MeteringPackage.END_DEVICE_CONTROL__SCHEDULED_INTERVAL, null, msgs);
			if (newScheduledInterval != null)
				msgs = ((InternalEObject)newScheduledInterval).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - MeteringPackage.END_DEVICE_CONTROL__SCHEDULED_INTERVAL, null, msgs);
			msgs = basicSetScheduledInterval(newScheduledInterval, msgs);
			if (msgs != null) msgs.dispatch();
		}
	}

	/**
	 * Returns the value of the 'End Device Group' reference.
	 * It is bidirectional and its opposite is '{@link CIM15.IEC61968.Metering.EndDeviceGroup#getEndDeviceControls End Device Controls}'.
	 *
	 *

	 * If the meaning of the 'End Device Group' reference isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'End Device Group' reference.
	 * @see #setEndDeviceGroup(EndDeviceGroup)
	 * @see CIM15.IEC61968.Metering.EndDeviceGroup#getEndDeviceControls
	 * @generated
	 */
	public EndDeviceGroup getEndDeviceGroup() {
		if (endDeviceGroup != null && endDeviceGroup.eIsProxy()) {
			InternalEObject oldEndDeviceGroup = (InternalEObject)endDeviceGroup;
			endDeviceGroup = (EndDeviceGroup)eResolveProxy(oldEndDeviceGroup);
			if (endDeviceGroup != oldEndDeviceGroup) {
			}
		}
		return endDeviceGroup;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public EndDeviceGroup basicGetEndDeviceGroup() {
		return endDeviceGroup;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public NotificationChain basicSetEndDeviceGroup(EndDeviceGroup newEndDeviceGroup, NotificationChain msgs) {
		EndDeviceGroup oldEndDeviceGroup = endDeviceGroup;
		endDeviceGroup = newEndDeviceGroup;
		return msgs;
	}

	/**
	 * Sets the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#getEndDeviceGroup End Device Group}' reference.
	 *
	 *
	 * @param value the new value of the 'End Device Group' reference.
	 * @see #getEndDeviceGroup()
	 * @generated
	 */
	public void setEndDeviceGroup(EndDeviceGroup newEndDeviceGroup) {
		if (newEndDeviceGroup != endDeviceGroup) {
			NotificationChain msgs = null;
			if (endDeviceGroup != null)
				msgs = ((InternalEObject)endDeviceGroup).eInverseRemove(this, MeteringPackage.END_DEVICE_GROUP__END_DEVICE_CONTROLS, EndDeviceGroup.class, msgs);
			if (newEndDeviceGroup != null)
				msgs = ((InternalEObject)newEndDeviceGroup).eInverseAdd(this, MeteringPackage.END_DEVICE_GROUP__END_DEVICE_CONTROLS, EndDeviceGroup.class, msgs);
			msgs = basicSetEndDeviceGroup(newEndDeviceGroup, msgs);
			if (msgs != null) msgs.dispatch();
		}
	}

	/**
	 * Returns the value of the 'End Device' reference.
	 * It is bidirectional and its opposite is '{@link CIM15.IEC61968.Metering.EndDevice#getEndDeviceControls End Device Controls}'.
	 *
	 *

	 * If the meaning of the 'End Device' reference isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'End Device' reference.
	 * @see #setEndDevice(EndDevice)
	 * @see CIM15.IEC61968.Metering.EndDevice#getEndDeviceControls
	 * @generated
	 */
	public EndDevice getEndDevice() {
		if (endDevice != null && endDevice.eIsProxy()) {
			InternalEObject oldEndDevice = (InternalEObject)endDevice;
			endDevice = (EndDevice)eResolveProxy(oldEndDevice);
			if (endDevice != oldEndDevice) {
			}
		}
		return endDevice;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public EndDevice basicGetEndDevice() {
		return endDevice;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public NotificationChain basicSetEndDevice(EndDevice newEndDevice, NotificationChain msgs) {
		EndDevice oldEndDevice = endDevice;
		endDevice = newEndDevice;
		return msgs;
	}

	/**
	 * Sets the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#getEndDevice End Device}' reference.
	 *
	 *
	 * @param value the new value of the 'End Device' reference.
	 * @see #getEndDevice()
	 * @generated
	 */
	public void setEndDevice(EndDevice newEndDevice) {
		if (newEndDevice != endDevice) {
			NotificationChain msgs = null;
			if (endDevice != null)
				msgs = ((InternalEObject)endDevice).eInverseRemove(this, MeteringPackage.END_DEVICE__END_DEVICE_CONTROLS, EndDevice.class, msgs);
			if (newEndDevice != null)
				msgs = ((InternalEObject)newEndDevice).eInverseAdd(this, MeteringPackage.END_DEVICE__END_DEVICE_CONTROLS, EndDevice.class, msgs);
			msgs = basicSetEndDevice(newEndDevice, msgs);
			if (msgs != null) msgs.dispatch();
		}
	}

	/**
	 * Returns the value of the 'Price Signal' attribute.
	 *
	 *

	 * If the meaning of the 'Price Signal' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Price Signal' attribute.
	 * @see #isSetPriceSignal()
	 * @see #unsetPriceSignal()
	 * @see #setPriceSignal(float)
	 * @generated
	 */
	public float getPriceSignal() {
		return priceSignal;
	}

	/**
	 * Sets the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#getPriceSignal Price Signal}' attribute.
	 *
	 *
	 * @param value the new value of the 'Price Signal' attribute.
	 * @see #isSetPriceSignal()
	 * @see #unsetPriceSignal()
	 * @see #getPriceSignal()
	 * @generated
	 */
	public void setPriceSignal(float newPriceSignal) {
		priceSignal = newPriceSignal;
		priceSignalESet = true;
	}

	/**
	 * Unsets the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#getPriceSignal Price Signal}' attribute.
	 *
	 *
	 * @see #isSetPriceSignal()
	 * @see #getPriceSignal()
	 * @see #setPriceSignal(float)
	 * @generated
	 */
	public void unsetPriceSignal() {
		priceSignal = PRICE_SIGNAL_EDEFAULT;
		priceSignalESet = false;
	}

	/**
	 * Returns whether the value of the '{@link CIM15.IEC61968.Metering.EndDeviceControl#getPriceSignal Price Signal}' attribute is set.
	 *
	 *
	 * @return whether the value of the 'Price Signal' attribute is set.
	 * @see #unsetPriceSignal()
	 * @see #getPriceSignal()
	 * @see #setPriceSignal(float)
	 * @generated
	 */
	public boolean isSetPriceSignal() {
		return priceSignalESet;
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case MeteringPackage.END_DEVICE_CONTROL__DEMAND_RESPONSE_PROGRAM:
				if (demandResponseProgram != null)
					msgs = ((InternalEObject)demandResponseProgram).eInverseRemove(this, MeteringPackage.DEMAND_RESPONSE_PROGRAM__END_DEVICE_CONTROLS, DemandResponseProgram.class, msgs);
				return basicSetDemandResponseProgram((DemandResponseProgram)otherEnd, msgs);
			case MeteringPackage.END_DEVICE_CONTROL__CUSTOMER_AGREEMENT:
				if (customerAgreement != null)
					msgs = ((InternalEObject)customerAgreement).eInverseRemove(this, CustomersPackage.CUSTOMER_AGREEMENT__END_DEVICE_CONTROLS, CustomerAgreement.class, msgs);
				return basicSetCustomerAgreement((CustomerAgreement)otherEnd, msgs);
			case MeteringPackage.END_DEVICE_CONTROL__END_DEVICE_GROUP:
				if (endDeviceGroup != null)
					msgs = ((InternalEObject)endDeviceGroup).eInverseRemove(this, MeteringPackage.END_DEVICE_GROUP__END_DEVICE_CONTROLS, EndDeviceGroup.class, msgs);
				return basicSetEndDeviceGroup((EndDeviceGroup)otherEnd, msgs);
			case MeteringPackage.END_DEVICE_CONTROL__END_DEVICE:
				if (endDevice != null)
					msgs = ((InternalEObject)endDevice).eInverseRemove(this, MeteringPackage.END_DEVICE__END_DEVICE_CONTROLS, EndDevice.class, msgs);
				return basicSetEndDevice((EndDevice)otherEnd, msgs);
		}
		return super.eInverseAdd(otherEnd, featureID, msgs);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case MeteringPackage.END_DEVICE_CONTROL__DEMAND_RESPONSE_PROGRAM:
				return basicSetDemandResponseProgram(null, msgs);
			case MeteringPackage.END_DEVICE_CONTROL__CUSTOMER_AGREEMENT:
				return basicSetCustomerAgreement(null, msgs);
			case MeteringPackage.END_DEVICE_CONTROL__SCHEDULED_INTERVAL:
				return basicSetScheduledInterval(null, msgs);
			case MeteringPackage.END_DEVICE_CONTROL__END_DEVICE_GROUP:
				return basicSetEndDeviceGroup(null, msgs);
			case MeteringPackage.END_DEVICE_CONTROL__END_DEVICE:
				return basicSetEndDevice(null, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case MeteringPackage.END_DEVICE_CONTROL__DEMAND_RESPONSE_PROGRAM:
				if (resolve) return getDemandResponseProgram();
				return basicGetDemandResponseProgram();
			case MeteringPackage.END_DEVICE_CONTROL__DR_PROGRAM_LEVEL:
				return getDrProgramLevel();
			case MeteringPackage.END_DEVICE_CONTROL__DR_PROGRAM_MANDATORY:
				return isDrProgramMandatory();
			case MeteringPackage.END_DEVICE_CONTROL__CUSTOMER_AGREEMENT:
				if (resolve) return getCustomerAgreement();
				return basicGetCustomerAgreement();
			case MeteringPackage.END_DEVICE_CONTROL__TYPE:
				return getType();
			case MeteringPackage.END_DEVICE_CONTROL__SCHEDULED_INTERVAL:
				return getScheduledInterval();
			case MeteringPackage.END_DEVICE_CONTROL__END_DEVICE_GROUP:
				if (resolve) return getEndDeviceGroup();
				return basicGetEndDeviceGroup();
			case MeteringPackage.END_DEVICE_CONTROL__END_DEVICE:
				if (resolve) return getEndDevice();
				return basicGetEndDevice();
			case MeteringPackage.END_DEVICE_CONTROL__PRICE_SIGNAL:
				return getPriceSignal();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case MeteringPackage.END_DEVICE_CONTROL__DEMAND_RESPONSE_PROGRAM:
				setDemandResponseProgram((DemandResponseProgram)newValue);
				return;
			case MeteringPackage.END_DEVICE_CONTROL__DR_PROGRAM_LEVEL:
				setDrProgramLevel((Integer)newValue);
				return;
			case MeteringPackage.END_DEVICE_CONTROL__DR_PROGRAM_MANDATORY:
				setDrProgramMandatory((Boolean)newValue);
				return;
			case MeteringPackage.END_DEVICE_CONTROL__CUSTOMER_AGREEMENT:
				setCustomerAgreement((CustomerAgreement)newValue);
				return;
			case MeteringPackage.END_DEVICE_CONTROL__TYPE:
				setType((String)newValue);
				return;
			case MeteringPackage.END_DEVICE_CONTROL__SCHEDULED_INTERVAL:
				setScheduledInterval((DateTimeInterval)newValue);
				return;
			case MeteringPackage.END_DEVICE_CONTROL__END_DEVICE_GROUP:
				setEndDeviceGroup((EndDeviceGroup)newValue);
				return;
			case MeteringPackage.END_DEVICE_CONTROL__END_DEVICE:
				setEndDevice((EndDevice)newValue);
				return;
			case MeteringPackage.END_DEVICE_CONTROL__PRICE_SIGNAL:
				setPriceSignal((Float)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case MeteringPackage.END_DEVICE_CONTROL__DEMAND_RESPONSE_PROGRAM:
				setDemandResponseProgram((DemandResponseProgram)null);
				return;
			case MeteringPackage.END_DEVICE_CONTROL__DR_PROGRAM_LEVEL:
				unsetDrProgramLevel();
				return;
			case MeteringPackage.END_DEVICE_CONTROL__DR_PROGRAM_MANDATORY:
				unsetDrProgramMandatory();
				return;
			case MeteringPackage.END_DEVICE_CONTROL__CUSTOMER_AGREEMENT:
				setCustomerAgreement((CustomerAgreement)null);
				return;
			case MeteringPackage.END_DEVICE_CONTROL__TYPE:
				unsetType();
				return;
			case MeteringPackage.END_DEVICE_CONTROL__SCHEDULED_INTERVAL:
				setScheduledInterval((DateTimeInterval)null);
				return;
			case MeteringPackage.END_DEVICE_CONTROL__END_DEVICE_GROUP:
				setEndDeviceGroup((EndDeviceGroup)null);
				return;
			case MeteringPackage.END_DEVICE_CONTROL__END_DEVICE:
				setEndDevice((EndDevice)null);
				return;
			case MeteringPackage.END_DEVICE_CONTROL__PRICE_SIGNAL:
				unsetPriceSignal();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case MeteringPackage.END_DEVICE_CONTROL__DEMAND_RESPONSE_PROGRAM:
				return demandResponseProgram != null;
			case MeteringPackage.END_DEVICE_CONTROL__DR_PROGRAM_LEVEL:
				return isSetDrProgramLevel();
			case MeteringPackage.END_DEVICE_CONTROL__DR_PROGRAM_MANDATORY:
				return isSetDrProgramMandatory();
			case MeteringPackage.END_DEVICE_CONTROL__CUSTOMER_AGREEMENT:
				return customerAgreement != null;
			case MeteringPackage.END_DEVICE_CONTROL__TYPE:
				return isSetType();
			case MeteringPackage.END_DEVICE_CONTROL__SCHEDULED_INTERVAL:
				return scheduledInterval != null;
			case MeteringPackage.END_DEVICE_CONTROL__END_DEVICE_GROUP:
				return endDeviceGroup != null;
			case MeteringPackage.END_DEVICE_CONTROL__END_DEVICE:
				return endDevice != null;
			case MeteringPackage.END_DEVICE_CONTROL__PRICE_SIGNAL:
				return isSetPriceSignal();
		}
		return super.eIsSet(featureID);
	}

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

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (drProgramLevel: ");
		if (drProgramLevelESet) result.append(drProgramLevel); else result.append("<unset>");
		result.append(", drProgramMandatory: ");
		if (drProgramMandatoryESet) result.append(drProgramMandatory); else result.append("<unset>");
		result.append(", type: ");
		if (typeESet) result.append(type); else result.append("<unset>");
		result.append(", priceSignal: ");
		if (priceSignalESet) result.append(priceSignal); else result.append("<unset>");
		result.append(')');
		return result.toString();
	}

} // EndDeviceControl


text:
package com.orientechnologies.orient.core.sql.operator.math;

import java.math.BigDecimal;
import java.util.Date;

import com.orientechnologies.orient.core.command.OCommandContext;
import com.orientechnologies.orient.core.db.record.OIdentifiable;
import com.orientechnologies.orient.core.id.ORID;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.sql.filter.OSQLFilterCondition;
import com.orientechnologies.orient.core.sql.operator.OIndexReuseType;
import com.orientechnologies.orient.core.sql.operator.OQueryOperator;

/**
 * MOD "%" operator.
 *
 * @author Luca Garulli
 *
 */
public class OQueryOperatorMod extends OQueryOperator {

  public OQueryOperatorMod() {
    super("%", 10, false);
  }

  @Override
  public Object evaluateRecord(final OIdentifiable iRecord, ODocument iCurrentResult, final OSQLFilterCondition iCondition,
      Object iLeft, Object iRight, OCommandContext iContext) {
    if (iRight == null || iLeft == null)
      return null;

    if (iLeft instanceof Date)
      iLeft = ((Date) iLeft).getTime();
    if (iRight instanceof Date)
      iRight = ((Date) iRight).getTime();

    if (iLeft instanceof Number && iRight instanceof Number) {
      final Number l = (Number) iLeft;
      final Number r = (Number) iRight;
      if (l instanceof Integer)
        return l.intValue() % r.intValue();
      else if (l instanceof Long)
        return l.longValue() % r.longValue();
      else if (l instanceof Short)
        return l.shortValue() % r.shortValue();
      else if (l instanceof Float)
        return l.floatValue() % r.floatValue();
      else if (l instanceof Double)
        return l.doubleValue() % r.doubleValue();
      else if (l instanceof BigDecimal) {
        if (r instanceof BigDecimal)
          return ((BigDecimal) l).remainder((BigDecimal) r);
        else if (r instanceof Float)
          return ((BigDecimal) l).remainder(new BigDecimal(r.floatValue()));
        else if (r instanceof Double)
          return ((BigDecimal) l).remainder(new BigDecimal(r.doubleValue()));
        else if (r instanceof Long)
          return ((BigDecimal) l).remainder(new BigDecimal(r.longValue()));
        else if (r instanceof Integer)
          return ((BigDecimal) l).remainder(new BigDecimal(r.intValue()));
        else if (r instanceof Short)
          return ((BigDecimal) l).remainder(new BigDecimal(r.shortValue()));
      }
    }

    return null;
  }

  @Override
  public OIndexReuseType getIndexReuseType(Object iLeft, Object iRight) {
    return OIndexReuseType.NO_INDEX;
  }

  @Override
  public ORID getBeginRidRange(Object iLeft, Object iRight) {
    return null;
  }

  @Override
  public ORID getEndRidRange(Object iLeft, Object iRight) {
    return null;
  }
}

redpajama_set_name: RedPajamaGithub


text:
import React, {Component} from 'react';
import PropTypes, {connect, withViewport, withContext} from '../PropTypes.js';
import {Strike} from '../controls.js';
import Row from 'react-bootstrap/lib/Row';
import Col from 'react-bootstrap/lib/Col';
import * as Sponsor from './Sponsors.js';

@withContext
@withViewport
export default class IntroSponsors extends Component {
  static contextTypes = PropTypes.contextTypes;
  static propTypes = {
    viewport: PropTypes.viewport,
  };

  render() {
    const big = this.props.viewport.width > 830;
    if (big) {
      return (
        <Row style={{marginTop: 25, marginBottom: 15}}>

            <Sponsor.SlagerijGuy big={big} />
            <Sponsor.itenium big={big} />
            <Sponsor.Nostech big={big} style={{marginLeft: 20}} />

            <Sponsor.TransformerService big={big} />
            <Sponsor.RdInterieur big={big} style={{marginLeft: 20}} />
            <Sponsor.BeSure2 big={big} style={{marginLeft: 20}} />

        </Row>
      );
    }

    return (
      <Row style={{margin: 10}}>

        <Col style={{marginTop: 20}}>
          <Sponsor.SlagerijGuy big={big} />
        </Col>
        <Col style={{marginTop: 20}}>
          <Sponsor.itenium big={big} />
        </Col>
        <Col style={{marginTop: 20}}>
          <Sponsor.Nostech big={big} />
        </Col>
        <Col style={{marginTop: 20}}>
          <Sponsor.TransformerService big={big} />
        </Col>
        <Col style={{marginTop: 20}}>
          <Sponsor.RdInterieur big={big} />
        </Col>
        <Col style={{marginTop: 20}}>
          <Sponsor.BeSure2 big={big} />
        </Col>
      </Row>
    );
  }
}


text:
var express = require('express');
var bodyParser = require('body-parser');
var url = require('url');
var http = require('http');
var dataProvider = require('./modules/handler.js');

var port = 8103;

var app = express();

app.use(bodyParser.json());

var router = express.Router();
router.get('/', function(request, response, next){

	var get_params = request.query;
	if (get_params.image)
	{
		dataProvider.provideData('images/'+get_params.image+'.jpg', {"Content-Type":"image/pgn"}, response);
	}
	else if (Object.keys(get_params).length)
	{
		dataProvider.queryData('data/data.json', get_params, response);
	}
	else
	{
		dataProvider.provideList('data/data.json', "json", response);
	}

});

app.use('/', router);

http.createServer(app).listen(8103, 'localhost');


text:
package com.tle.core.institution.convert;

import com.dytech.devlib.PropBagEx;
import com.tle.common.filesystem.handle.SubTemporaryFile;
import com.tle.common.filesystem.handle.TemporaryFileHandle;
import com.tle.core.services.FileSystemService;
import javax.inject.Inject;

public abstract class XmlMigrator extends Migrator {
  @Inject protected FileSystemService fileSystemService;
  @Inject protected XmlHelper xmlHelper;

  protected boolean fileExists(TemporaryFileHandle staging, String filename) {
    return fileSystemService.fileExists(staging, filename);
  }

  /**
   * @param folder
   * @return true if the format file exists and the format is set to bucketed
   */
  protected boolean isBucketed(final SubTemporaryFile folder) {
    if (fileSystemService.fileExists(
        new SubTemporaryFile(folder, InstitutionImportExportConstants.EXPORT_FORMAT_FILE))) {
      PropBagEx ff =
          xmlHelper.readToPropBagEx(folder, InstitutionImportExportConstants.EXPORT_FORMAT_FILE);
      return Boolean.valueOf(ff.getNode("bucketed")); // $NON-NLS-1$
    }
    return false;
  }
}


text:
import * as path from 'path';
import express from 'express';
import serveEsnext from 'serve-esnext';

express()
  .use(serveEsnext)
  .use(express.static(path.resolve()))
  .listen(8080, () => {
    process.stdout.write('Listening on :8080\n');
  });


text:
package com.vaadin.addon.charts.model;

/**
 * Options to render charts in 3 dimensions. This feature requires
 * highcharts-3d.js, found in the download package or online at code.highcharts.com/
 * highcharts-3d.js.
 */
public class Options3d extends AbstractConfigurationObject {

	private static final long serialVersionUID = 1L;
	private Number alpha;
	private Number beta;
	private Number depth;
	private Boolean enabled;
	private Frame frame;
	private Number viewDistance;

	public Options3d() {
	}

	/**
	 * @see #setAlpha(Number)
	 */
	public Number getAlpha() {
		return alpha;
	}

	/**
	 * One of the two rotation angles for the chart.
	 *

	 * Defaults to: 0
	 */
	public void setAlpha(Number alpha) {
		this.alpha = alpha;
	}

	/**
	 * @see #setBeta(Number)
	 */
	public Number getBeta() {
		return beta;
	}

	/**
	 * One of the two rotation angles for the chart.
	 *

	 * Defaults to: 0
	 */
	public void setBeta(Number beta) {
		this.beta = beta;
	}

	/**
	 * @see #setDepth(Number)
	 */
	public Number getDepth() {
		return depth;
	}

	/**
	 * The total depth of the chart.
	 *

	 * Defaults to: 100
	 */
	public void setDepth(Number depth) {
		this.depth = depth;
	}

	public Options3d(Boolean enabled) {
		this.enabled = enabled;
	}

	/**
	 * @see #setEnabled(Boolean)
	 */
	public Boolean getEnabled() {
		return enabled;
	}

	/**
	 * Wether to render the chart using the 3D functionality.
	 *

	 * Defaults to: false
	 */
	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}

	/**
	 * @see #setFrame(Frame)
	 */
	public Frame getFrame() {
		return frame;
	}

	/**
	 * Provides the option to draw a frame around the charts by defining a
	 * bottom, front and back panel.
	 */
	public void setFrame(Frame frame) {
		this.frame = frame;
	}

	/**
	 * @see #setViewDistance(Number)
	 */
	public Number getViewDistance() {
		return viewDistance;
	}

	/**
	 * Defines the distance the viewer is standing in front of the chart, this
	 * setting is important to calculate the perspective effect in column and
	 * scatter charts. It is not used for 3D pie charts.
	 *

	 * Defaults to: 100
	 */
	public void setViewDistance(Number viewDistance) {
		this.viewDistance = viewDistance;
	}
}


text:
<?php
/**
 * @package WPSEO\Admin|Google_Search_Console
 */

if ( ! class_exists( 'WP_List_Table' ) ) {
	require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
}

/**
 * Class WPSEO_GSC_Table
 */
class WPSEO_GSC_Table extends WP_List_Table {

	/**
	 * @var string
	 */
	private $search_string;

	/**
	 * @var array
	 */
	protected $_column_headers;

	/**
	 * The category that is displayed
	 *
	 * @var mixed|string
	 */
	private $current_view;

	/**
	 * @var integer
	 */
	private $per_page = 50;

	/**
	 * @var integer
	 */
	private $current_page = 1;

	/**
	 * @var array
	 */
	private $modal_heights = array(
		'create'         => 300,
		'no_premium'     => 140,
		'already_exists' => 160,
	);

	/**
	 * Search Console table class constructor (subclasses list table).
	 *
	 * @param string $platform Platform (desktop, mobile, feature phone).
	 * @param string $category Type of the issues.
	 * @param array  $items    Set of the issues to display.
	 */
	public function __construct( $platform, $category, array $items ) {
		parent::__construct();

		// Adding the thickbox.
		add_thickbox();

		// Set search string.
		if ( ( $search_string = filter_input( INPUT_GET, 's' ) ) != '' ) {
			$this->search_string = $search_string;
		}

		$this->current_view = $category;

		// Set the crawl issue source.
		$this->show_fields( $platform );

		$this->items = $items;
	}

	/**
	 * Getting the screen id from this table
	 *
	 * @return string
	 */
	public function get_screen_id() {
		return $this->screen->id;
	}

	/**
	 * Setup the table variables, fetch the items from the database, search, sort and format the items.
	 */
	public function prepare_items() {
		// Get variables needed for pagination.
		$this->per_page     = $this->get_items_per_page( 'errors_per_page', $this->per_page );
		$this->current_page = intval( ( $paged = filter_input( INPUT_GET, 'paged' ) ) ? $paged : 1 );

		$this->setup_columns();
		$this->views();
		$this->parse_items();
	}

	/**
	 * Set the table columns
	 *
	 * @return array
	 */
	public function get_columns() {
		$columns = array(
			'cb'             => '<input type="checkbox" />',
			'url'            => __( 'URL', 'wordpress-seo' ),
			'last_crawled'   => __( 'Last crawled', 'wordpress-seo' ),
			'first_detected' => __( 'First detected', 'wordpress-seo' ),
			'response_code'  => __( 'Response code', 'wordpress-seo' ),
		);

		return $columns;
	}

	/**
	 * Return the columns that are sortable
	 *
	 * @return array
	 */
	protected function get_sortable_columns() {
		$sortable_columns = array(
			'url'            => array( 'url', false ),
			'last_crawled'   => array( 'last_crawled', false ),
			'first_detected' => array( 'first_detected', false ),
			'response_code'  => array( 'response_code', false ),
		);

		return $sortable_columns;
	}

	/**
	 * Return available bulk actions
	 *
	 * @return array
	 */
	protected function get_bulk_actions() {
		return array(
			'mark_as_fixed' => __( 'Mark as fixed', 'wordpress-seo' ),
		);
	}

	/**
	 * Default method to display a column
	 *
	 * @param array  $item        Data array.
	 * @param string $column_name Column name key.
	 *
	 * @return mixed
	 */
	protected function column_default( $item, $column_name ) {
		return $item[ $column_name ];
	}

	/**
	 * Checkbox column
	 *
	 * @param array $item Item data array.
	 *
	 * @return string
	 */
	protected function column_cb( $item ) {
		return sprintf(
			'<input type="checkbox" name="wpseo_crawl_issues[]" value="%s" />', $item['url']
		);
	}

	/**
	 * Formatting the output of the column last crawled into a dateformat
	 *
	 * @param array $item Item data array.
	 *
	 * @return string
	 */
	protected function column_last_crawled( $item ) {
		return date_i18n( get_option( 'date_format' ), strtotime( $item['last_crawled'] ) );
	}

	/**
	 * Formatting the output of the column first detected into a dateformat
	 *
	 * @param array $item Item data array.
	 *
	 * @return string
	 */
	protected function column_first_detected( $item ) {
		return date_i18n( get_option( 'date_format' ), strtotime( $item['first_detected'] ) );
	}

	/**
	 * URL column
	 *
	 * @param array $item Item data array.
	 *
	 * @return string
	 */
	protected function column_url( $item ) {
		$actions = array();

		if ( $this->can_create_redirect() ) {
			/**
			 * Modal box
			 */
			$modal_height = $this->modal_box( $item['url'] );

			$actions['create_redirect'] = 'modal_heights[ $modal_height ] . '&inlineId=redirect-' . md5( $item['url'] ) . '" class="thickbox wpseo-open-gsc-redirect-modal aria-button-if-js">' . __( 'Create redirect', 'wordpress-seo' ) . '';
		}

		$actions['view']        = '' . __( 'View', 'wordpress-seo' ) . '';
		$actions['markasfixed'] = '' . __( 'Mark as fixed', 'wordpress-seo' ) . '';

		return sprintf(
			'%1$s %2$s',
			$item['url'],
			$this->row_actions( $actions )
		);
	}

	/**
	 * Running the setup of the columns
	 */
	private function setup_columns() {
		$this->_column_headers = array( $this->get_columns(), array(), $this->get_sortable_columns() );
	}

	/**
	 * Check if the current category allow creating redirects
	 *
	 * @return bool
	 */
	private function can_create_redirect() {
		return in_array( $this->current_view, array( 'soft_404', 'not_found', 'access_denied' ) );
	}

	/**
	 * Setting the table navigation
	 *
	 * @param int $total_items    Total number of items.
	 * @param int $posts_per_page Number of items per page.
	 */
	private function set_pagination( $total_items, $posts_per_page ) {
		$this->set_pagination_args( array(
			'total_items' => $total_items,
			'total_pages' => ceil( ( $total_items / $posts_per_page ) ),
			'per_page'    => $posts_per_page,
		) );
	}

	/**
	 * Setting the items
	 */
	private function parse_items() {
		if ( is_array( $this->items ) && count( $this->items ) > 0 ) {
			if ( ! empty( $this->search_string ) ) {
				$this->do_search();
			}

			$this->set_pagination( count( $this->items ), $this->per_page );

			$this->sort_items();
			$this->paginate_items();
		}
	}

	/**
	 * Search through the items
	 */
	private function do_search() {
		$results = array();

		foreach ( $this->items as $item ) {
			foreach ( $item as $value ) {
				if ( stristr( $value, $this->search_string ) !== false ) {
					$results[] = $item;
					continue;
				}
			}
		}

		$this->items = $results;
	}

	/**
	 * Running the pagination
	 */
	private function paginate_items() {
		// Setting the starting point. If starting point is below 1, overwrite it with value 0, otherwise it will be sliced of at the back.
		$slice_start = ( $this->current_page - 1 );
		if ( $slice_start < 0 ) {
			$slice_start = 0;
		}

		// Apply 'pagination'.
		$this->items = array_slice( $this->items, ( $slice_start * $this->per_page ), $this->per_page );
	}

	/**
	 * Sort the items by callback
	 */
	private function sort_items() {
		// Sort the results.
		usort( $this->items, array( $this, 'do_reorder' ) );
	}

	/**
	 * Doing the sorting of the issues
	 *
	 * @param array $a First data set for comparison.
	 * @param array $b Second data set for comparison.
	 *
	 * @return int
	 */
	private function do_reorder( $a, $b ) {
		// If no sort, default to title.
		$orderby = ( $orderby = filter_input( INPUT_GET, 'orderby' ) ) ? $orderby : 'url';

		// If no order, default to asc.
		$order = ( $order = filter_input( INPUT_GET, 'order' ) ) ? $order : 'asc';

		// When there is a raw field of it, sort by this field.
		if ( array_key_exists( $orderby . '_raw', $a ) && array_key_exists( $orderby . '_raw', $b ) ) {
			$orderby = $orderby . '_raw';
		}

		// Determine sort order.
		$result = strcmp( $a[ $orderby ], $b[ $orderby ] );

		// Send final sort direction to usort.
		return ( $order === 'asc' ) ? $result : ( - $result );
	}

	/**
	 * Modal box
	 *
	 * @param string $url URL string.
	 *
	 * @return string
	 */
	private function modal_box( $url ) {
		$current_redirect = false;
		$view_type        = $this->modal_box_type( $url, $current_redirect );

		require WPSEO_PATH . '/admin/google_search_console/views/gsc-create-redirect.php';

		return $view_type;
	}

	/**
	 * Determine which model box type should be rendered
	 *
	 * @param string $url              URL string.
	 * @param string $current_redirect Current redirect by reference.
	 *
	 * @return string
	 */
	private function modal_box_type( $url, &$current_redirect ) {
		if ( defined( 'WPSEO_PREMIUM_FILE' ) && class_exists( 'WPSEO_Redirect_Manager' ) ) {
			static $redirect_manager;

			if ( ! $redirect_manager ) {
				$redirect_manager = new WPSEO_Redirect_Manager();
			}

			if ( $current_redirect = $redirect_manager->get_redirect( $url ) ) {
				return 'already_exists';
			}

			return 'create';
		}

		return 'no_premium';
	}

	/**
	 * Showing the hidden fields used by the AJAX requests
	 *
	 * @param string $platform Platform (desktop, mobile, feature phone).
	 */
	private function show_fields( $platform ) {
		echo "<input type='hidden' name='wpseo_gsc_nonce' value='" . wp_create_nonce( 'wpseo_gsc_nonce' ) . "' />";
		echo "<input id='field_platform' type='hidden' name='platform' value='{$platform}' />";
		echo "<input id='field_category' type='hidden' name='category' value='{$this->current_view}' />";
	}
}


text:
                    Update
                    Menu
                    Port
                    Drop

                    {{restaurant.name}}

                        Phone

                            <input ng-model="restaurant.phone" type="text" ui-mask="(999) 999-9999" class="form-control">

                        Menu

                            <input ng-model="restaurant.menu" type="text" class="form-control">

                        Website

                            <input ng-model="restaurant.url" type="text" class="form-control">

        <button class="btn btn-primary btn-block" ng-click="add()" ng-hide="newrestaurant" >
            Create
        </button>

        <form ng-show="newrestaurant" class="form-horizontal">

                Name

                    <input ng-model="newrestaurant.name" type="text" class="form-control" placeholder="Name" id="name" required>

                Phone

                    <input ng-model="newrestaurant.phone" type="text" ui-mask="(999) 999-9999" class="form-control" placeholder="(xxx) xxx-xxxx" id="phone">

                Menu

                    <input ng-model="newrestaurant.menu" type="text" class="form-control" placeholder="http://" id="menu" required>

                Website

                    <input ng-model="newrestaurant.url" type="text" class="form-control" placeholder="http://" id="url">

                    <button class="btn btn-default" ng-click="create()">
                        Save
                    </button>

        </form>

No restaurants yet


text:
<?xml version='1.0' encoding='UTF-8'?>
<project>
  <actions/>
  <description>Supervises the service instances. If there were too much requests since last supervisation, then scale up, otherwise, of there were to few requests, then scaledown.

Tests each instance before scaling.</description>
  <keepDependencies>false</keepDependencies>
  <properties/>
  <scm class="hudson.scm.NullSCM"/>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers/>
  <concurrentBuild>false</concurrentBuild>
  <builders>
    <hudson.tasks.Shell>
      <command>curl http://localhost:3000/servkeeper/supervise</command>
    </hudson.tasks.Shell>
  </builders>
  <publishers/>
  <buildWrappers/>
</project>


text:
{% extends "base.html" %}

{% block content %}

Valid column definition formats

        There are numerous ways to specify a column for a datatable, depending on what you need to
        accomplish.  The following formats are all valid ways to write a column definition in a
        view's datatable_options:

datatable_options = {
    'columns': [
        # "concrete" field backed by the database
        'name',  # field's verbose_name will be used
        ("Name", 'name'),  # custom verbose name provided
        ("Name", 'name', 'callback_attr_name'),  # callback looked up on view
        ("Name", 'name', callback_handle),  # calback used directly

        # non-field, but backed by methods, properties, etc
        "Virtual Field",

        # "fake" virtual field whose data is generated by the view
        ("Virtual Field", None, 'callback_attr_name'),
        ("Virtual Field", None, callback_handle),
    ],
}

        For concrete fields that also provide callbacks, the actual database value will be consulted
        during searches and sorts, but the table will use the return value of the callback as the
        display data.

        Virtual fields are useful ways to mount methods onto a table.  Consider a read-only property
        that generates its return value based on some underlying database field:

datatable_options = {
    'columns': [
        ("Average profit", 'get_average_profit'),
    ],
}

        Be careful with virtual columns that might cause database queries per-row.  That doesn't
        scale very well!

{% endblock content %}


text:
class Array
  def >> obj
    delete_if do |element|
      element.eql? obj
    end
  end
end


text:
using FFImageLoading.Work;

namespace FFImageLoading.Transformations
{
    [Preserve(AllMembers = true)]
    public class SepiaTransformation : ITransformation
    {
        public IBitmap Transform(IBitmap sourceBitmap, string path, ImageSource source, bool isPlaceholder, string key)
        {
            return sourceBitmap;
        }
        public string Key => "SepiaTransformation";
    }
}


text:
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
                        unicode_literals, with_statement)

from textwrap import dedent

from pants.backend.codegen.protobuf.java.java_protobuf_library import JavaProtobufLibrary
from pants.backend.jvm.targets.jar_library import JarLibrary
from pants.backend.jvm.targets.scala_jar_dependency import ScalaJarDependency
from pants.build_graph.build_file_aliases import BuildFileAliases
from pants.java.jar.jar_dependency import JarDependency
from pants_test.test_base import TestBase

class JavaProtobufLibraryTest(TestBase):

  @classmethod
  def alias_groups(cls):
    return BuildFileAliases(
        targets={
          'java_protobuf_library': JavaProtobufLibrary,
          'jar_library': JarLibrary},
        objects={
          'jar': JarDependency,
          'scala_jar': ScalaJarDependency,
        }
      )

  def test_empty(self):
    self.add_to_build_file('BUILD', dedent('''
    java_protobuf_library(name='foo',
      sources=[],
    )'''))
    target = self.target('//:foo')
    self.assertIsInstance(target, JavaProtobufLibrary)
    self.assertSequenceEqual([], target.imported_jars)

  def test_jar_library_imports(self):
    self.add_to_build_file('BUILD', dedent('''
    java_protobuf_library(name='foo',
      sources=[],
      imports=[':import_jars',]
    )
    jar_library(name='import_jars',
      jars=[
        jar(org='foo', name='bar', rev='123'),
      ],
    )
    '''))
    target = self.target('//:foo')
    self.assertIsInstance(target, JavaProtobufLibrary)
    self.assertEquals(1, len(target.imported_jars))
    import_jar_dep = target.imported_jars[0]
    self.assertIsInstance(import_jar_dep, JarDependency)

  def test_wrong_import_type1(self):
    self.add_to_build_file('BUILD', dedent('''
      java_protobuf_library(name='foo',
        sources=[],
        imports=[':not_jar']
      )

      java_protobuf_library(name='not_jar',
        sources=[],
      )
      '''))
    target = self.target('//:foo')
    self.assertIsInstance(target, JavaProtobufLibrary)
    with self.assertRaises(JarLibrary.WrongTargetTypeError):
      target.imported_jars

  def test_wrong_import_type2(self):
    self.add_to_build_file('BUILD', dedent('''
      java_protobuf_library(name='foo',
        sources=[],
        imports=[
          jar(org='foo', name='bar', rev='123'),
        ],
      )
      '''))
    with self.assertRaises(JarLibrary.ExpectedAddressError):
      self.target('//:foo')

  def test_compute_dependency_specs(self):
    self.add_to_build_file('BUILD', dedent('''
    java_protobuf_library(name='foo',
      sources=[],
      imports=[':import_jars',],
      # Note: Should not be a part of dependency specs.
      dependencies=[
        ':proto_dep',
      ]
    )
    jar_library(name='import_jars',
      jars=[
        jar(org='foo', name='bar', rev='123'),
      ],
    )
    java_protobuf_library(name='proto_dep',
        sources=[],
    )
    '''))
    target = self.target('//:foo')
    self.assertIsInstance(target, JavaProtobufLibrary)
    self.assertEqual([':import_jars'], list(target.compute_dependency_specs(payload=target.payload)))


text:
'use strict';

/**
 * The result of the GetSupportedOptimizationTypes API
 *
 */
class SupportedOptimizationTypesListResult {
  /**
   * Create a SupportedOptimizationTypesListResult.
   * @property {array} [supportedOptimizationTypes] Supported optimization
   * types for a profile.
   */
  constructor() {
  }

  /**
   * Defines the metadata of SupportedOptimizationTypesListResult
   *
   * @returns {object} metadata of SupportedOptimizationTypesListResult
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SupportedOptimizationTypesListResult',
      type: {
        name: 'Composite',
        className: 'SupportedOptimizationTypesListResult',
        modelProperties: {
          supportedOptimizationTypes: {
            required: false,
            readOnly: true,
            serializedName: 'supportedOptimizationTypes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'OptimizationTypeElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = SupportedOptimizationTypesListResult;


text:
package com.apkola.muzei.lastfm;

public interface Config {
    public static final String API_KEY = BuildConfig.LASTFM_API_KEY;
    public static final String DEFAULT_USERNAME = BuildConfig.LASTFM_DEFAULT_USERNAME;
    public static final int LIMIT = 50;
}


text:
var stream;

function onLoadMetadataCallback(e) {
  console.log("Getting metadata...");
}

function getMediaErrorCallback(e) {
  console.log("Rejected...", e);
};

function getMediaSuccessCallback(localMediaStream) {
  stream = localMediaStream;
  console.log("Getting audio/video media successfull...");
  var video = document.querySelector('video#usermedia');
  video.src = window.URL.createObjectURL(localMediaStream);

  video.onloadedmetadata = onLoadMetadataCallback;
}

var options = {
  video: true,
  audio: true
}

//check which getUserMedai method is available in your browser
navigator.getUserMedia  = navigator.getUserMedia ||
                          navigator.webkitGetUserMedia ||
                          navigator.mozGetUserMedia ||
                          navigator.msGetUserMedia;

//getting users audio and vidoe (mic and camera) if possible
if (navigator.getUserMedia) {
  navigator.getUserMedia(options, getMediaSuccessCallback, getMediaErrorCallback);
} else {
  alert("Your browser does not support getUserMedia() element");
}

btnGetAudioTracks.addEventListener("click", function(){
   console.log("getAudioTracks");
   console.log(stream.getAudioTracks());
});

btnGetTrackById.addEventListener("click", function(){
   console.log("getTrackById");
   console.log(stream.getTrackById(stream.getAudioTracks()[0].id));
});

btnGetTracks.addEventListener("click", function(){
   console.log("getTracks()");
   console.log(stream.getTracks());
});

btnGetVideoTracks.addEventListener("click", function(){
   console.log("getVideoTracks()");
   console.log(stream.getVideoTracks());
});

btnRemoveAudioTrack.addEventListener("click", function(){
   console.log("removeAudioTrack()");
   stream.removeTrack(stream.getAudioTracks()[0]);
});

btnRemoveVideoTrack.addEventListener("click", function(){
   console.log("removeVideoTrack()");
   stream.removeTrack(stream.getVideoTracks()[0]);
});


text:
import time
from flask import Flask, g, request, make_response
import hashlib, urllib2, urllib, re, cookielib
import xml.etree.ElementTree as ET
import sae.storage
from datetime import date
import requests
import json
import config
import dateCounts,lrcSearch,renrenStatus,bus,movies, schoolCalendar,courses,music
import libraryBorrowed,librarySearch

tips = config.tips
error_msg = config.error_msg

app = Flask(__name__)
app.debug = True

@app.route('/', methods=['GET', 'POST'])
def wechat_auth():
	if request.method == 'GET':
		token = 'Add your token here'
		query = request.args
		signature = query.get('signature', '')
		timestamp = query.get('timestamp', '')
		nonce = query.get('nonce', '')
		echostr = query.get('echostr', '')
		s = [timestamp, nonce, token]
		s.sort()
		s = ''.join(s)
		if ( hashlib.sha1(s).hexdigest() == signature ):
			return make_response(echostr)
	# Get the infomations from the recv_xml.
	reply = config.reply
	xiaoli_reply = config.xiaoli_reply
	bus_reply = ''' '''
	xml_recv = ET.fromstring(request.data)
	ToUserName = xml_recv.find("ToUserName").text
	FromUserName = xml_recv.find("FromUserName").text
	Content = ''
	try:
		Content = xml_recv.find("Content").text
	except:
		pass
	msgtype_test = ''
	event_test = ''
	try:
		msgtype_test = xml_recv.find('MsgType').text
		event_test = xml_recv.find('Event').text
	except:
		pass

	if msgtype_test == 'event' and event_test == 'subscribe':
		# 返回帮助信息
		Content = tips

	elif Content.lower().find('xiaoli') >= 0:
		# 返回图文模式
		# 校历
		response = make_response(xiaoli_reply % (
			FromUserName, ToUserName, str(int(time.time())), 'http://tzclife-pic.stor.sinaapp.com/xiaoli2015.jpg' ))
		response.content_type = 'application/xml'
		return response

	elif Content.lower().find('help') >= 0:
		# 返回帮助信息
		Content = tips

	elif Content.lower().find('bir') >= 0:
		# 返回天数
		Content = dateCounts.DateCounts(Content)

	elif Content.lower().find('time') >= 0 :
		# 查询校园时间表
		Content = config.TimeTableSummer

	elif Content.lower().find('movie') >= 0 :
		# 查询学校电影信息
		Content = config.movies

	elif Content.lower().find('bus') >= 0 :
		# 查询公交信息
		Content = config.bus

	elif Content.lower().find('status') >= 0 :
		# 向人人网LiveTzc发布状态
		Content = renrenStatus.RenrenStatus(Content)

	elif Content.find('@') >= 0:
		# 查询歌词 用的是百度音乐
		Content = lrcSearch.LrcSearchRequests(Content)

	elif Content.find('dt') >= 0:
		# 查询上海公交卡还剩多少钱
		sptccUrl = 'http://220.248.75.36/handapp/PGcardAmtServlet?arg1='
		success = Content.split()
		if len(success) == 2:
			page = urllib2.urlopen(sptccUrl + success[1]).read()
			page_f = page.find("'")
			page_e = page.find("'", page_f + 1)
			Content = '交通卡还剩下  ' + page[page_f + 1:page_e] + '  元TAT'
		else:
			Content = 'SPTCC error...'

	elif Content.find('car') >= 0:
		# 查询违章信息
		args = Content.split()
		chepai = args[1]
		cjh = args[2]
		post_url = 'http://bsdt.jhga.gov.cn/egov/jdcwfcxAction.action'
		post_data = dict(CPHM='浙G' + chepai, CJH=cjh, CPLB='02', fn='jdcwfcx', OPENID='oDQPZt6mijPGQMBv7cnAOOUBK8g8')
		html = requests.post(post_url, post_data)
		try:
			datas = json.loads(html.content)
			carid = len(datas)
			infos = ''
			for x in range(carid):
				infos = infos + '\n\nwww.jhga.gov.cn/ajax/jxj_showimg.aspx?id='+str(datas[x]['ID'])
			Content = html.content[:1500]+'\n'+'一共'+str(carid)+'个违章\n\n'+ infos[:460]
		except:
			Content = html.content[:2000]

	elif Content.lower().find('cjhlist') >= 0:
		# 违章列表
		Content =  config.cars

	elif Content.lower().find('sptcc') >= 0:
		# 查询上海公交卡还剩多少钱
		sptccUrl = 'http://220.248.75.36/handapp/PGcardAmtServlet?arg1=49925366539'
		page = urllib2.urlopen(sptccUrl).read()
		page_f = page.find("'")
		page_e = page.find("'", page_f + 1)
		Content = '交通卡还剩下  ' + page[page_f + 1:page_e] + '  元TAT'

	elif Content.lower().find('lib') >= 0 :
		# 图书馆相关信息查询
		success = Content.split()
		book_url = 'http://www2.lib.tzc.edu.cn/cgi-bin/IlaswebBib'
		for i in range(len(success)):
			success[i] = success[i].encode('utf8')
		if len(success) == 2:
			book_name = success[1]
			Content = librarySearch.LibrarySearch(book_name)

		elif len(success) == 3:
			try:
				Content = libraryBorrowed(success[1],success[2])
			except:
				Content = '图书馆服务器故障'
		else:
			Content = 'lib和书名之间要有个空格哦!!!'

	elif len(Content.split()) == 2:
		# 返回课表信息
		Content = courses.Courses(Content)
	else:
		Content = error_msg
	# 格式化
	response = make_response(reply % (FromUserName, ToUserName, str(int(time.time())), Content ))
	response.content_type = 'application/xml'
	return response


text:
title: 'release notes 2020-11-18'
date: 2020-11-18
releaseType:
  - api
---

## API Key and 2FA Requirements Enforced for Free Users

In order to enhance security for all of our users, Twilio SendGrid now requires customers on free plans to use API Key authentication on all API requests and SMTP configurations. Customers must also enable Two-Factor Authentication (2FA) for all users, subusers and teammates. Visit our docs for more information on [Upgrading to API Keys]({{root_url}}/for-developers/sending-email/upgrade-your-authentication-method-to-api-keys/) and [Enabling Two-Factor Authentication]({{root_url}}/ui/account-and-settings/two-factor-authentication/).


text:
using Magelia.WebStore.Contracts;
using Magelia.WebStore.Models.Parts;
using Orchard;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Drivers;
using Orchard.Localization;
using Orchard.UI.Notify;
using System;

namespace Magelia.WebStore.Drivers
{
    public class SettingsPartDriver : ContentPartDriver<SettingsPart>
    {
        private INotifier _notifier;
        private Localizer _localizer;
        private IOrchardServices _orcharServices;
        private IWebStoreServices _webStoreServices;

        protected override String Prefix
        {
            get
            {
                return "Magelia_WebStore_Settings";
            }
        }

        private void EnsureCurrentUser()
        {
            this._webStoreServices.EnsureUser(this._orcharServices.WorkContext.CurrentUser);
        }

        protected override DriverResult Editor(SettingsPart part, dynamic shapeHelper)
        {
            return this.ContentShape(
                "Parts_Settings_Edit",
                () => shapeHelper.EditorTemplate(
                    Model: part,
                    Prefix: this.Prefix,
                    TemplateName: "Parts/Settings"
                )
            ).OnGroup("WebStoreSettings");
        }

        protected override DriverResult Editor(SettingsPart part, IUpdateModel updater, dynamic shapeHelper)
        {
            if (updater.TryUpdateModel(part, this.Prefix, null, null))
            {
                this.EnsureCurrentUser();
            }

            return this.Editor(part, shapeHelper);
        }

        public SettingsPartDriver(INotifier notifier, IWebStoreServices webStoreServices, IOrchardServices orcharServices)
        {
            this._notifier = notifier;
            this._orcharServices = orcharServices;
            this._localizer = NullLocalizer.Instance;
            this._webStoreServices = webStoreServices;
        }
    }
}


text:
<?php if(isset($client)){ ?>

<?php echo _l('proposals'); ?>

<?php if(has_permission('proposals','','create')){ ?>
<a href="<?php echo admin_url('proposals/proposal?rel_type=customer&rel_id='.$client->userid); ?>" class="btn btn-info mbot25<?php if($client->active == 0){echo ' disabled';} ?>"><?php echo _l('new_proposal'); ?>
<?php } ?>
<?php if(total_rows('tblproposals',array('rel_type'=>'customer','rel_id'=>$client->userid))> 0 && (has_permission('proposals','','create') || has_permission('proposals','','edit'))){ ?>
<?php echo _l('sync_data'); ?>
<?php $this->load->view('admin/proposals/sync_data',array('related'=>$client,'rel_id'=>$client->userid,'rel_type'=>'customer')); ?>
<?php } ?>
<?php
$table_data = array(
 _l('proposal') . ' #',
 _l('proposal_subject'),
 _l('proposal_total'),
 _l('proposal_date'),
 _l('proposal_open_till'),
 _l('tags'),
 _l('proposal_date_created'),
 _l('proposal_status'));
$custom_fields = get_custom_fields('proposal',array('show_on_table'=>1));
foreach($custom_fields as $field){
 array_push($table_data,$field['name']);
}
render_datatable($table_data,'proposals-client-profile');
?>
<?php } ?>


text:
<m:foo xmlns:m="http://www.mycompany.com/MyNamespace"
	   xmlns:y="http://www.yourcompany.com/YourNamespace" name="The Parent">
	<m:bar id="123" title="The First Child" />
	<y:bar id="456" title="The Second Child" />
	<m:bar id="789" title="The Second Child" />
</m:foo>


text:
from a10sdk.common.A10BaseClass import A10BaseClass

class PreferredSessionSyncPort(A10BaseClass):

    """Class Description::
    VRRP-A preferred-session-sync-port.

    Class preferred-session-sync-port supports CRUD Operations and inherits from `common/A10BaseClass`.
    This class is the `"PARENT"` class for this module.`

    :param trunk_list: {"minItems": 1, "items": {"type": "trunk"}, "uniqueItems": true, "array": [{"required": ["pre-trunk"], "properties": {"pre-vlan": {"description": "Interface VLAN (VLAN ID)", "format": "number", "type": "number", "maximum": 4094, "minimum": 1, "optional": true}, "uuid": {"description": "uuid of the object", "format": "string", "minLength": 1, "modify-not-allowed": 1, "optional": true, "maxLength": 64, "type": "string"}, "pre-trunk": {"optional": false, "type": "number", "description": "Trunk Interface number", "format": "interface"}}}], "type": "array", "$ref": "/axapi/v3/vrrp-a/preferred-session-sync-port/trunk/{pre-trunk}"}
    :param ethernet_list: {"minItems": 1, "items": {"type": "ethernet"}, "uniqueItems": true, "array": [{"required": ["pre-eth"], "properties": {"pre-eth": {"optional": false, "type": "number", "description": "Ethernet interface number", "format": "interface"}, "pre-vlan": {"description": "Interface VLAN (VLAN ID)", "format": "number", "type": "number", "maximum": 4094, "minimum": 1, "optional": true}, "uuid": {"description": "uuid of the object", "format": "string", "minLength": 1, "modify-not-allowed": 1, "optional": true, "maxLength": 64, "type": "string"}}}], "type": "array", "$ref": "/axapi/v3/vrrp-a/preferred-session-sync-port/ethernet/{pre-eth}"}
    :param DeviceProxy: The device proxy for REST operations and session handling. Refer to `common/device_proxy.py`

    URL for this object::
    `https://<Hostname|Ip address>//axapi/v3/vrrp-a/preferred-session-sync-port`.

    """
    def __init__(self, **kwargs):
        self.ERROR_MSG = ""
        self.required=[]
        self.b_key = "preferred-session-sync-port"
        self.a10_url="/axapi/v3/vrrp-a/preferred-session-sync-port"
        self.DeviceProxy = ""
        self.trunk_list = []
        self.ethernet_list = []

        for keys, value in kwargs.items():
            setattr(self,keys, value)


text:
require 'chef/resource/lwrp_base'

class Chef
  class Resource
    class CouchConfig < Chef::Resource::LWRPBase
      self.resource_name = :couch_config
      default_action :create
      actions [
        :create,
        :delete
      ]

      attribute :source, kind_of: String, required: true
      attribute :options, kind_of: Hash, default: {}
    end
  end
end


text:
#pragma once
#ifndef LINK_UNIFORM_BLOCK_ACTIVE_VISITOR_H
#define LINK_UNIFORM_BLOCK_ACTIVE_VISITOR_H

#include "ir.h"
#include "ir_visitor.h"
#include "glsl_types.h"
#include "main/hash_table.h"

struct link_uniform_block_active {
   const glsl_type *type;

   unsigned *array_elements;
   unsigned num_array_elements;

   bool has_instance_name;
};

class link_uniform_block_active_visitor : public ir_hierarchical_visitor {
public:
   link_uniform_block_active_visitor(void *mem_ctx, struct hash_table *ht,
				     struct gl_shader_program *prog)
      : success(true), prog(prog), ht(ht), mem_ctx(mem_ctx)
   {
      /* empty */
   }

   virtual ir_visitor_status visit_enter(ir_dereference_array *);
   virtual ir_visitor_status visit(ir_dereference_variable *);

   bool success;

private:
   struct gl_shader_program *prog;
   struct hash_table *ht;
   void *mem_ctx;
};

#endif /* LINK_UNIFORM_BLOCK_ACTIVE_VISITOR_H */


text:
My Personal website
====================

Based on the theme:[Agency bootstrap theme ](http://startbootstrap.com/templates/agency/)

new line


text:
"use strict";
import { appRepository, AppRepository } from "../../repository/AppRepository";
import { AppUseCase } from "../AppUseCase";
export const createDecrementalCounterUseCase = () => {
    return new DecrementalCounterUseCase(appRepository);
};
export default class DecrementalCounterUseCase extends AppUseCase {
    constructor(public appRepository: AppRepository) {
        super();
    }

    execute() {
        const app = this.appRepository.get();
        app.counter.decrement();
        this.appRepository.save(app);
    }
}


text:
Matryoshka
----------

[![Latest Stable Version](http://img.shields.io/packagist/v/matryoshka-model/matryoshka.svg?style=flat-square)](https://packagist.org/packages/matryoshka-model/matryoshka) [![Build Status](https://img.shields.io/travis/matryoshka-model/matryoshka/master.svg?style=flat-square)](https://travis-ci.org/matryoshka-model/matryoshka) [![Coveralls branch](https://img.shields.io/coveralls/matryoshka-model/matryoshka/master.svg?style=flat-square)](https://coveralls.io/r/matryoshka-model/matryoshka?branch=master) [![Total Downloads](https://img.shields.io/packagist/dt/matryoshka-model/matryoshka.svg?style=flat-square)](https://packagist.org/packages/matryoshka-model/matryoshka) [![Matryoshka Model's Slack](http://matryoshka-slackin.herokuapp.com/badge.svg?style=flat-square)](http://matryoshka-slackin.herokuapp.com)

> Matryoshka is not an ORM.

Matryoshka is a micro framework (< 1000 SLOC) that helps you to build your model [service layer](http://martinfowler.com/eaaCatalog/serviceLayer.html) in a structured way without the need of using the complex ORM systems, avoiding overheads.
Matryoshka does not provide a persistence layer implementation itself and does not require adapters: you have the full control over the persistence layer by implementing [criterias](http://en.wikipedia.org/wiki/Criteria_Pattern).
Its layered design aims to provide a strong seperation between the persistence and the rest of your application, whether the datagateway you need to use (i.e. Zend\Db, MongoCollection, a REST client or anything else).
In order to simplify your job with common persistence systems, a set of [wrappers](http://en.wikipedia.org/wiki/Wrapper_library) are already provided as separated repositories. They are just a set of ready-to-use classes.
Matryoshka uses a few of [Zend Framework 2](http://framework.zend.com/) components but does not require you to use Zend Framework: you are free to use Matryoshka with any framework.
Last but not least, the Matryoshka design allows you to use just single components or all of them in cooperations. Anyway you can decide how to design your own application model: only you know what your application needs.

[Read more about Matryoshka components](docs/Overview.md)

#### Wrappers:
- [rest-wrapper](https://github.com/matryoshka-model/rest-wrapper)
- [mongo-wrapper](https://github.com/matryoshka-model/mongo-wrapper)

#### Integration modules:
- [zf2-matryoshka-module](https://github.com/matryoshka-model/zf2-matryoshka-module)
- [zf-apigility-matryoshka](https://github.com/matryoshka-model/zf-apigility-matryoshka)

#### Others:

Other addons, plugins, and modules made with Matryoshka.

- [mongo-transactional](https://github.com/matryoshka-model/mongo-transactional)

#### Community

For questions and support please visit the [slack channel](http://matryoshka.slack.com) (get an invite [here](http://matryoshka-slackin.herokuapp.com)).

## Theory of operation

Matryoshka doesn't provide a persistence layer implementation itself, but it can work with any third party implementation that acts as datagateway. Regardless of the datagateway you choose, Matryoshka provides to clients (i.e. your controller) the same set of handful API. To accomplish this goal Matryoshka uses criteria interfaces that developer have to implement.

Think a criteria as a small piece of code that tell to the datagateway how to perform an operation on your dataset: for example filter some rows. So, each criteria represent a simple task: different kind of criteria interfaces are defined for write, read and delete operations. Also, in concrete criteria classes, the developer can add methods to augment the "query interface" with domain specific logic.

A concrete criteria class acts both as a criterion defining a query interface and also as [mediator](http://en.wikipedia.org/wiki/Mediator_pattern) between model layer and datagateway. Only criteria classes performs operations against the datagateway interface, instead Matryoshka's components do not.

So Matryoska is unawareness about the datagateway interface, that makes it working with any kind of third-party datagateway implementation.

Matryoshka dolls (layers):

* **ModelManager**
    A dedicated service locator for your model service classes (i.e., model)

* **Model**
    An end user service that manages a collection of related data by using criterias (similar to a table gateway or a document collection)

* **Criteria**
    An "user query interface" from an API point of view, also acting as mediator between model and datagateway

Finally, in the empty space of the innermost doll you can put:

* **Datagateway**
    Any kind of datagateway, like `Zend\Db\TableGateway` or `\MongoCollection` or a REST client

Basic usage example:

```php
//Assiming MyModel an instance of a Matryoshka Model class registered in Matryoshka model manager
$myModel = $modelManager->get('MyModel');

//Assuming MyCriteria a class extending ReadableCriteriaInterface
$criteria = new MyCriteria();
$criteria->setMyCustomFilter('foo');

//Execute a query
$resultSet = $myModel->find($criteria);
```

## Installation

Install it using [composer](http://getcomposer.org).

Add the following to your `composer.json` file:

```
"require": {
    "matryoshka-model/matryoshka": "~0.8.0"
}
```

## Requirements

- PHP >= 5.5

## Configuration

[Read about Matryoshka configuration here](docs/Configuration.md)

---

[![Analytics](https://ga-beacon.appspot.com/UA-49657176-2/matryoshka?flat)](https://github.com/igrigorik/ga-beacon)


text:
namespace BitArray64
{
    using System;
    using System.Collections;
    using System.Collections.Generic;

    public class BitArray64 : IEnumerable<int>
    {
        public const uint BitsCount = 64;

        private ulong numValue;

        public BitArray64(ulong number)
        {
            this.numValue = number;
        }

        public ulong NumValue
        {
            get { return this.numValue; }
            private set { this.numValue = value; }
        }

        public int this[int index]
        {
            get
            {
                if ((index >= 0) && (index < BitsCount))
                {
                    if ((this.NumValue & ((ulong)1 << index)) == 0)
                    {
                        return 0;
                    }
                    else
                    {
                        return 1;
                    }
                }
                else
                {
                    throw new IndexOutOfRangeException("Invalid index.");
                }
            }

            set
            {
                if ((index < 0) || (index > BitsCount - 1))
                {
                    throw new IndexOutOfRangeException("Invalid index.");
                }
                if ((value < 0) || (value > 1))
                {
                    throw new ArgumentException("Invalid value - bit value should be 0 or 1.");
                }

                this.NumValue &= ~((ulong)1 << index);
                this.NumValue |= ((ulong)value << index);
            }
        }

        public static bool operator ==(BitArray64 first, BitArray64 second)
        {
            return object.Equals(first, second);
        }

        public static bool operator !=(BitArray64 first, BitArray64 second)
        {
            return !object.Equals(first, second);
        }

        public override bool Equals(object obj)
        {
            var otherBitArray = obj as BitArray64;
            if (otherBitArray == null)
            {
                throw new ArgumentException("Object is not BitArray64");
            }
            return this.NumValue.Equals(otherBitArray.NumValue);
        }

        public override int GetHashCode()
        {
            return this.NumValue.GetHashCode();
        }

        public IEnumerator<int> GetEnumerator()
        {
            for (int index = 0; index < BitsCount; index++)
            {
                yield return this[index];
            }
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return this.GetEnumerator();
        }
    }
}


text:
package unnamed.utils.vec;

import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.MathHelper;
import net.minecraft.util.Vec3;
import net.minecraft.world.ChunkPosition;
import net.minecraftforge.common.util.ForgeDirection;
import unnamed.api.ICopyable;

public class Coord implements ICopyable<Coord> {

    public final int x;
    public final int y;
    public final int z;

    public Coord(int x, int y, int z) {
        this.x = x;
        this.y = y;
        this.z = z;
    }

    public Coord(double x, double y, double z) {
        this.x = MathHelper.floor_double(x);
        this.y = MathHelper.floor_double(y);
        this.z = MathHelper.floor_double(z);
    }

    public Coord(ForgeDirection direction) {
        this (direction.offsetX, direction.offsetY, direction.offsetZ);
    }

    public Coord(int[] coords) {
        this (coords[0], coords[1], coords[2]);
    }

    public Coord(ChunkPosition pos) {
        this (pos.chunkPosX, pos.chunkPosY, pos.chunkPosZ);
    }

    public Coord(ChunkCoordinates pos) {
        this (pos.posX, pos.posY, pos.posZ);
    }

    public Coord(Vec3 vec) {
        this (vec.xCoord, vec.yCoord, vec.zCoord);
    }

    public Coord offset(ForgeDirection direction) {
        return new Coord(x + direction.offsetX, y + direction.offsetY, z + direction.offsetZ);
    }

    public Coord offset(int ox, int oy, int oz) {
        return new Coord(x + ox, y + oy, z + oz);
    }

    @Override
    public Coord copy() {
        return new Coord(x, y, z);
    }

    @Override
    public int hashCode() {
        return (x + 128) << 16 | (y + 128) << 8 | (z + 128);
    }

    @Override
    public boolean equals(Object obj) {
        return obj instanceof Coord &&
                ((Coord) obj).x == x &&
                ((Coord) obj).y == y &&
                ((Coord) obj).z == z;
    }

    @Override
    public String toString() {
        return String.format("%s,%s,%s", x, y, z);
    }

    public ChunkPosition asChunkPosition() {
        return new ChunkPosition(x, y, z);
    }

    public ChunkCoordinates asChunkCoordinate() {
        return new ChunkCoordinates(x, y, z);
    }

    public Vec3 asVector() {
        return Vec3.createVectorHelper(x, y, z);
    }

    public Coord add(Coord other) {
        return new Coord(x + other.x, y + other.y, z + other.z);
    }

    public Coord substract(Coord other) {
        return new Coord(x - other.x, y - other.y, z - other.z);
    }

    public int lengthSq() {
        return x * x + y * y + z * z;
    }

    public double length() {
        return Math.sqrt(lengthSq());
    }

    public Coord getAdjacentCoord(ForgeDirection fd) {
        return getOffsetCoord(fd, 1);
    }

    public Coord getOffsetCoord(ForgeDirection fd, int distance) {
        return new Coord(x + (fd.offsetX * distance), y + (fd.offsetY * distance), z + (fd.offsetZ * distance));
    }

    public Coord[] getDirectlyAdjacentCoords() {
        return getDirectlyAdjacentCoords(true);
    }

    public Coord[] getDirectlyAdjacentCoords(boolean includeBelow) {
        Coord[] adjacents;
        if (includeBelow) adjacents = new Coord[6];
        else adjacents = new Coord[5];

        adjacents[0] = getAdjacentCoord(ForgeDirection.UP);
        adjacents[1] = getAdjacentCoord(ForgeDirection.NORTH);
        adjacents[2] = getAdjacentCoord(ForgeDirection.EAST);
        adjacents[3] = getAdjacentCoord(ForgeDirection.SOUTH);
        adjacents[4] = getAdjacentCoord(ForgeDirection.WEST);

        if (includeBelow) adjacents[5] = getAdjacentCoord(ForgeDirection.DOWN);

        return adjacents;
    }

    public Coord[] getAdjacentCoords() {
        return getAdjacentCoords(true, true);
    }

    public Coord[] getAdjacentCoords(boolean includeBelow, boolean includeDiagonal) {
        if (!includeDiagonal) return getDirectlyAdjacentCoords(includeBelow);

        Coord[] adjacents = new Coord[(includeBelow ? 26 : 17)];

        int index = 0;

        for (int xl = -1; xl < 1; ++xl)
            for (int zl = -1; zl < 1; ++zl)
                for (int yl = (includeBelow? -1 : 0); yl < 1; ++yl)
                    if (xl != 0 || zl != 0 || yl != 0) adjacents[index++] = new Coord(x + xl, y + yl, z + zl);

        return adjacents;
    }

    public boolean isAbove(Coord pos) {
        return pos != null && y > pos.y;
    }

    public boolean isBelow(Coord pos) {
        return pos != null && y < pos.y;
    }

    public boolean isNorthOf(Coord pos) {
        return pos != null && z < pos.z;
    }

    public boolean isSouthOf(Coord pos) {
        return pos != null && z > pos.z;
    }

    public boolean isEastOf(Coord pos) {
        return pos != null && x > pos.x;
    }

    public boolean isWestOf(Coord pos) {
        return pos != null && x < pos.x;
    }

    public boolean isXAligned(Coord pos) {
        return pos != null && x == pos.x;
    }

    public boolean isYAligned(Coord pos) {
        return pos != null && y == pos.y;
    }

    public boolean isZAligned(Coord pos) {
        return pos != null && z == pos.z;
    }
}


text:
<?php
namespace Users\UtilisateurBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
class UtilisateursController extends Controller
{
    public function factureAction()
    {
        $em = $this->getDoctrine()->getManager();
        $factures = $em->getRepository('EPEpapetrieBundle:Commandes')->byFacture($this->getUser());

        return $this->render('UsersUtilisateurBundle:Facture:facture.html.twig', array('factures' => $factures));
    }

    public function facturePDFAction($id)
      {

      $em = $this->getDoctrine()->getManager();
       $facture = $em->getRepository('EPEpapetrieBundle:Commandes')->findOneBy(array('utilisateurs' => $this->getUser(),  'id' => $id)) ;

       if (!$facture ) {
        $this->get('session')->getFlashBag()->add('error', 'Une erreur est servenue');
          return $this->redirect($this->generateUrl('users_utilisateur_facture'));
       }

       //on stocke la vue à convertir en PDF, en n'oubliant pas les paramètres twig si la vue comporte des données dynamiques
$html = $this->renderView('UsersUtilisateurBundle:Facture:facturePDF.html.twig', array('facture'=>$facture));
//on appelle le service html2pdf
$html2pdf = $this->get('html2pdf_factory')->create();
//real : utilise la taille réelle
$html2pdf->pdf->SetDisplayMode('real');
//writeHTML va tout simplement prendre la vue stocker dans la variable $html pour la convertir en format PDF
$html2pdf->writeHTML($html);
//Output envoit le document PDF au navigateur internet
return new Response($html2pdf->Output('Facture.pdf'), 200, array('Content-Type' => 'application/pdf'));

      }

}


text:
@interface WYCollectionPicker () <WYCollectionPickerViewDelegate>

@property (nonatomic, strong) UIWindow *privateWindow;//私有window窗口
@property (nonatomic, strong) UIView *backgroundShadowView;//被禁遮罩层

@property (nonatomic, strong) WYCollectionPickerView *pickView;

@end

@implementation WYCollectionPicker

- (instancetype)init {
    self = [super init];
    if (self) {
        [self setupSubviews];
    }
    return self;
}

- (void)setTitle:(NSString *)title {
    _title = title;

    _pickView.titleLabel.text = title;
}

- (void)show {

    [self.privateWindow addSubview:_pickView];
    [self.privateWindow setHidden:NO];
//    [self.privateWindow makeKeyAndVisible];

    _pickView.transform = CGAffineTransformMakeTranslation(0, CGRectGetHeight(_pickView.bounds));

//    [self reloadData];

    [UIView animateWithDuration:0.5
                          delay:0.0
                        options:0
                     animations:^{
                         //调整背景遮罩的透明度
                         self.backgroundShadowView.alpha = 0.6;
                         _pickView.transform = CGAffineTransformIdentity;
                     }
                     completion:^(BOOL finished) {}];
}

- (void)hide {

    if ([_delegate respondsToSelector:@selector(pickerWillDismiss:)]) {
        [_delegate pickerWillDismiss:self];
    }

    [UIView animateWithDuration:0.5
                          delay:0.0
                        options:0
                     animations:^{
                         //恢复背景遮罩的透明度为0
                         self.backgroundShadowView.alpha = 0.0;
                         _pickView.transform = CGAffineTransformMakeTranslation(0, CGRectGetHeight(_pickView.bounds));
                     } completion:^(BOOL finished) {
                         self.privateWindow.hidden = YES;
                         [_pickView removeFromSuperview];
                         [[[[UIApplication sharedApplication] delegate] window] makeKeyAndVisible];
                     }];
}

#pragma mark - setup subviews
- (void)setupSubviews {
    CGRect screenbBounds = [UIScreen mainScreen].bounds;

    _pickView = [WYCollectionPickerView wy_loadFromNibByBundlePath:WYPodBundlePath];
    _pickView.delegate = self;
    _pickView.titleLabel.text = _title;
    [_pickView.cancelButton addTarget:self action:@selector(hide) forControlEvents:UIControlEventTouchUpInside];

    _pickView.frame = CGRectMake(0, CGRectGetHeight(screenbBounds) - 270, CGRectGetWidth(screenbBounds), 270);

    _privateWindow  = [[UIWindow alloc] initWithFrame:screenbBounds];
    _privateWindow.windowLevel = UIWindowLevelStatusBar;
    _privateWindow.backgroundColor = [UIColor clearColor];

    UIView *backgroundView = [[UIView alloc] initWithFrame:_privateWindow.frame];
    backgroundView.backgroundColor = [UIColor darkGrayColor];
    backgroundView.alpha = 0.0;
    [_privateWindow addSubview:backgroundView];
    _backgroundShadowView = backgroundView;

    UITapGestureRecognizer *recognize = [[UITapGestureRecognizer alloc] initWithTarget:self
                                                                                action:@selector(hide)];
    [_backgroundShadowView addGestureRecognizer:recognize];
}

#pragma mark - WYCollectionPickerView Delegate
- (NSInteger)numberOfItemInPickerView:(WYCollectionPickerView *)pickerView {
    return [_delegate numberOfItemInPicker:self];
}

- (UIImage *)pickerView:(WYCollectionPickerView *)pickerView imageForItemAtIndex:(NSInteger)index {
    return [_delegate picker:self imageForItemAtIndex:index];
}

- (NSString *)pickerView:(WYCollectionPickerView *)pickerView titleForItemAtIndex:(NSInteger)index {
    return [_delegate picker:self titleForItemAtIndex:index];
}

- (void)pickerView:(WYCollectionPickerView *)pickerView didSelectedItemAtIndex:(NSInteger)index {
    if ([_delegate respondsToSelector:@selector(picker:didSelectedItemAtIndex:)]) {
        [_delegate picker:self didSelectedItemAtIndex:index];
    }
}

@end


text:
using System.Collections.Generic;
using Newtonsoft.Json;
using TwitchCSharp.Helpers;

namespace TwitchCSharp.Models
{
    //@author gibletto

    [JsonObject(ItemConverterType = typeof (TwitchListConverter))]
    public class TwitchList<T> : TwitchResponse
    {
        public List<T> List { get; set; }
    }
}


text:
const express = require('express'),
      router = express.Router(),
      path = require('path')

router.get('/isauth', (req, res, next) => {
  console.log(req.session)
  res.send(req.user)
})

router.get('/logout', (req, res, next) => {
  req.logout()
  res.redirect('/');
})

router.get('*', (req, res, next) => {
  res.sendFile(path.join(__dirname, '../../dist/index.html'))
});

module.exports = router


text:
"""The MSIE WebCache ESE database event formatters."""

from plaso.formatters import interface
from plaso.formatters import manager

class MsieWebCacheContainerEventFormatter(interface.ConditionalEventFormatter):
  """Formatter for a MSIE WebCache ESE database Container_# table record."""

  DATA_TYPE = u'msie:webcache:container'

  FORMAT_STRING_PIECES = [
      u'Entry identifier: {entry_identifier}',
      u'Container identifier: {container_identifier}',
      u'Cache identifier: {cache_identifier}',
      u'URL: {url}',
      u'Redirect URL: {redirect_url}',
      u'Access count: {access_count}',
      u'Sync count: {sync_count}',
      u'Filename: {cached_filename}',
      u'File extension: {file_extension}',
      u'Cached file size: {cached_file_size}',
      u'Request headers: {request_headers}',
      u'Response headers: {response_headers}']

  FORMAT_STRING_SHORT_PIECES = [
      u'URL: {url}']

  SOURCE_LONG = u'MSIE WebCache container record'
  SOURCE_SHORT = u'WEBHIST'

class MsieWebCacheContainersEventFormatter(interface.ConditionalEventFormatter):
  """Formatter for a MSIE WebCache ESE database Containers table record."""

  DATA_TYPE = u'msie:webcache:containers'

  FORMAT_STRING_PIECES = [
      u'Container identifier: {container_identifier}',
      u'Set identifier: {set_identifier}',
      u'Name: {name}',
      u'Directory: {directory}',
      u'Table: Container_{container_identifier}']

  FORMAT_STRING_SHORT_PIECES = [
      u'Directory: {directory}']

  SOURCE_LONG = u'MSIE WebCache containers record'
  SOURCE_SHORT = u'WEBHIST'

class MsieWebCacheLeakFilesEventFormatter(interface.ConditionalEventFormatter):
  """Formatter for a MSIE WebCache ESE database LeakFiles table record."""

  DATA_TYPE = u'msie:webcache:leak_file'

  FORMAT_STRING_PIECES = [
      u'Leak identifier: {leak_identifier}',
      u'Filename: {cached_filename}']

  FORMAT_STRING_SHORT_PIECES = [
      u'Filename: {cached_filename}']

  SOURCE_LONG = u'MSIE WebCache partitions record'
  SOURCE_SHORT = u'WEBHIST'

class MsieWebCachePartitionsEventFormatter(interface.ConditionalEventFormatter):
  """Formatter for a MSIE WebCache ESE database Partitions table record."""

  DATA_TYPE = u'msie:webcache:partitions'

  FORMAT_STRING_PIECES = [
      u'Partition identifier: {partition_identifier}',
      u'Partition type: {partition_type}',
      u'Directory: {directory}',
      u'Table identifier: {table_identifier}']

  FORMAT_STRING_SHORT_PIECES = [
      u'Directory: {directory}']

  SOURCE_LONG = u'MSIE WebCache partitions record'
  SOURCE_SHORT = u'WEBHIST'

manager.FormattersManager.RegisterFormatters([
    MsieWebCacheContainerEventFormatter, MsieWebCacheContainersEventFormatter,
    MsieWebCacheLeakFilesEventFormatter, MsieWebCachePartitionsEventFormatter])


text:
require 'rails_helper'

describe Ak::Client do
  describe 'client' do
    it 'instantiates with credentials' do
      expect(Ak::Client.client.credentials).to eq({password: ENV['AK_PASSWORD'], username: ENV['AK_USERNAME']})
    end
  end
end


text:
package com.hamishrickerby.http_server.responses;

import com.hamishrickerby.http_server.Headers;
import com.hamishrickerby.http_server.Method;
import com.hamishrickerby.http_server.Request;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Created by rickerbh on 17/08/2016.
 */
public abstract class Response {
    Request request;
    private static String CR_LF = "\r\n";
    protected List<Method> supportedMethods;

    public Response(Request request) {
        this.request = request;
        supportedMethods = new ArrayList<>();
        supportedMethods.add(Method.GET);
        supportedMethods.add(Method.HEAD);
        supportedMethods.add(Method.OPTIONS);
    }

    public byte[] getBytes() {
        byte[] status = statusLine().getBytes();
        byte[] body;

        switch (request.getMethod()) {
            case HEAD:
            case OPTIONS:
                body = new byte[0];
                break;
            default:
                body = body();
        }

        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        try {
            outputStream.write(status);
            outputStream.write(body);
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            return outputStream.toByteArray();
        }
    }

    private String statusLine() {
        StringBuilder b = new StringBuilder();
        b.append(request.getVersion())
                .append(" ")
                .append(validatedCode())
                .append(" ")
                .append(reason())
                .append(CR_LF)
                .append(String.join(CR_LF, headers()))
                .append(CR_LF);
        return b.toString();
    }

    protected int validatedCode() {
        if (getSupportedMethods().contains(request.getMethod())) {
            return code();
        }
        return 405;
    }

    protected int code() {
        return 200;
    }

    protected String reason() {
        return "OK";
    }

    protected String[] headers() {
        switch (request.getMethod()) {
            case OPTIONS:
                Headers headers = new Headers();
                List<String> methods = getSupportedMethods()
                        .stream()
                        .map(Method::name)
                        .collect(Collectors.toList());
                headers.put("Allow", String.join(",", methods));
                return headers.list().stream().toArray(String[]::new);
            default:
                return new String[0];
        }
    }

    abstract protected byte[] body();

    protected List<Method> getSupportedMethods() {
        return supportedMethods;
    }
}


text:
set :fonts_dir, 'fonts'

configure :build do
  activate :relative_assets
end


text:
package org.apache.wink.example.asset;

import java.util.Collection;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "users")
public class Users {
    @XmlElementRef
    Collection<User> users;

    public Users() {
    }

    public Users(Collection<User> users) {
        this.users = users;
    }
}


text:
import React from 'react';
import HelperText from '../../../../packages/text-field/helper-text/index';

import '../../../../packages/text-field/helper-text/index.scss';

const TextFieldHelperTextScreenshotTest = () => {
  return (
    <div>
      <HelperText>Help Me!</HelperText>
      <HelperText persistent>Help Me Persistent Text!</HelperText>
    </div>
  );
};
export default TextFieldHelperTextScreenshotTest;