text:
package org.openestate.io.immoxml.xml;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.CopyStrategy2;
import org.jvnet.jaxb2_commons.lang.CopyTo2;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;

/**
 * Java class for <infrastruktur> element.
 *
 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "zulieferung",
    "ausblick",
    "distanzen",
    "distanzenSport",
    "userDefinedSimplefield",
    "userDefinedAnyfield"
})
@XmlRootElement(name = "infrastruktur")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
public class Infrastruktur implements Serializable, Cloneable, CopyTo2, Equals2, ToString2
{

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    protected Boolean zulieferung;
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    protected Ausblick ausblick;
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    protected List<Distanzen> distanzen;
    @XmlElement(name = "distanzen_sport")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    protected List<DistanzenSport> distanzenSport;
    @XmlElement(name = "user_defined_simplefield")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    protected List<UserDefinedSimplefield> userDefinedSimplefield;
    @XmlElement(name = "user_defined_anyfield")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    protected List<UserDefinedAnyfield> userDefinedAnyfield;

    /**
     * Gets the value of the zulieferung property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public Boolean getZulieferung() {
        return zulieferung;
    }

    /**
     * Sets the value of the zulieferung property.
     *
     * @param value
     *     allowed object is
     *     {@link Boolean }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public void setZulieferung(Boolean value) {
        this.zulieferung = value;
    }

    /**
     * Gets the value of the ausblick property.
     *
     * @return
     *     possible object is
     *     {@link Ausblick }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public Ausblick getAusblick() {
        return ausblick;
    }

    /**
     * Sets the value of the ausblick property.
     *
     * @param value
     *     allowed object is
     *     {@link Ausblick }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public void setAusblick(Ausblick value) {
        this.ausblick = value;
    }

    /**
     * Gets the value of the distanzen property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the distanzen property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getDistanzen().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link Distanzen }
     *
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public List<Distanzen> getDistanzen() {
        if (distanzen == null) {
            distanzen = new ArrayList<Distanzen>();
        }
        return this.distanzen;
    }

    /**
     * Gets the value of the distanzenSport property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the distanzenSport property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getDistanzenSport().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link DistanzenSport }
     *
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public List<DistanzenSport> getDistanzenSport() {
        if (distanzenSport == null) {
            distanzenSport = new ArrayList<DistanzenSport>();
        }
        return this.distanzenSport;
    }

    /**
     * Gets the value of the userDefinedSimplefield property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the userDefinedSimplefield property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getUserDefinedSimplefield().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link UserDefinedSimplefield }
     *
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public List<UserDefinedSimplefield> getUserDefinedSimplefield() {
        if (userDefinedSimplefield == null) {
            userDefinedSimplefield = new ArrayList<UserDefinedSimplefield>();
        }
        return this.userDefinedSimplefield;
    }

    /**
     * Gets the value of the userDefinedAnyfield property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the userDefinedAnyfield property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getUserDefinedAnyfield().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link UserDefinedAnyfield }
     *
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public List<UserDefinedAnyfield> getUserDefinedAnyfield() {
        if (userDefinedAnyfield == null) {
            userDefinedAnyfield = new ArrayList<UserDefinedAnyfield>();
        }
        return this.userDefinedAnyfield;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public String toString() {
        final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE2;
        final StringBuilder buffer = new StringBuilder();
        append(null, buffer, strategy);
        return buffer.toString();
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
        strategy.appendStart(locator, this, buffer);
        appendFields(locator, buffer, strategy);
        strategy.appendEnd(locator, this, buffer);
        return buffer;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
        {
            Boolean theZulieferung;
            theZulieferung = this.getZulieferung();
            strategy.appendField(locator, this, "zulieferung", buffer, theZulieferung, (this.zulieferung!= null));
        }
        {
            Ausblick theAusblick;
            theAusblick = this.getAusblick();
            strategy.appendField(locator, this, "ausblick", buffer, theAusblick, (this.ausblick!= null));
        }
        {
            List<Distanzen> theDistanzen;
            theDistanzen = (((this.distanzen!= null)&&(!this.distanzen.isEmpty()))?this.getDistanzen():null);
            strategy.appendField(locator, this, "distanzen", buffer, theDistanzen, ((this.distanzen!= null)&&(!this.distanzen.isEmpty())));
        }
        {
            List<DistanzenSport> theDistanzenSport;
            theDistanzenSport = (((this.distanzenSport!= null)&&(!this.distanzenSport.isEmpty()))?this.getDistanzenSport():null);
            strategy.appendField(locator, this, "distanzenSport", buffer, theDistanzenSport, ((this.distanzenSport!= null)&&(!this.distanzenSport.isEmpty())));
        }
        {
            List<UserDefinedSimplefield> theUserDefinedSimplefield;
            theUserDefinedSimplefield = (((this.userDefinedSimplefield!= null)&&(!this.userDefinedSimplefield.isEmpty()))?this.getUserDefinedSimplefield():null);
            strategy.appendField(locator, this, "userDefinedSimplefield", buffer, theUserDefinedSimplefield, ((this.userDefinedSimplefield!= null)&&(!this.userDefinedSimplefield.isEmpty())));
        }
        {
            List<UserDefinedAnyfield> theUserDefinedAnyfield;
            theUserDefinedAnyfield = (((this.userDefinedAnyfield!= null)&&(!this.userDefinedAnyfield.isEmpty()))?this.getUserDefinedAnyfield():null);
            strategy.appendField(locator, this, "userDefinedAnyfield", buffer, theUserDefinedAnyfield, ((this.userDefinedAnyfield!= null)&&(!this.userDefinedAnyfield.isEmpty())));
        }
        return buffer;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public Object clone() {
        return copyTo(createNewInstance());
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public Object copyTo(Object target) {
        final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE2;
        return copyTo(null, target, strategy);
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
        final Object draftCopy = ((target == null)?createNewInstance():target);
        if (draftCopy instanceof Infrastruktur) {
            final Infrastruktur copy = ((Infrastruktur) draftCopy);
            {
                Boolean zulieferungShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.zulieferung!= null));
                if (zulieferungShouldBeCopiedAndSet == Boolean.TRUE) {
                    Boolean sourceZulieferung;
                    sourceZulieferung = this.getZulieferung();
                    Boolean copyZulieferung = ((Boolean) strategy.copy(LocatorUtils.property(locator, "zulieferung", sourceZulieferung), sourceZulieferung, (this.zulieferung!= null)));
                    copy.setZulieferung(copyZulieferung);
                } else {
                    if (zulieferungShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.zulieferung = null;
                    }
                }
            }
            {
                Boolean ausblickShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.ausblick!= null));
                if (ausblickShouldBeCopiedAndSet == Boolean.TRUE) {
                    Ausblick sourceAusblick;
                    sourceAusblick = this.getAusblick();
                    Ausblick copyAusblick = ((Ausblick) strategy.copy(LocatorUtils.property(locator, "ausblick", sourceAusblick), sourceAusblick, (this.ausblick!= null)));
                    copy.setAusblick(copyAusblick);
                } else {
                    if (ausblickShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.ausblick = null;
                    }
                }
            }
            {
                Boolean distanzenShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.distanzen!= null)&&(!this.distanzen.isEmpty())));
                if (distanzenShouldBeCopiedAndSet == Boolean.TRUE) {
                    List<Distanzen> sourceDistanzen;
                    sourceDistanzen = (((this.distanzen!= null)&&(!this.distanzen.isEmpty()))?this.getDistanzen():null);
                    @SuppressWarnings("unchecked")
                    List<Distanzen> copyDistanzen = ((List<Distanzen> ) strategy.copy(LocatorUtils.property(locator, "distanzen", sourceDistanzen), sourceDistanzen, ((this.distanzen!= null)&&(!this.distanzen.isEmpty()))));
                    copy.distanzen = null;
                    if (copyDistanzen!= null) {
                        List<Distanzen> uniqueDistanzenl = copy.getDistanzen();
                        uniqueDistanzenl.addAll(copyDistanzen);
                    }
                } else {
                    if (distanzenShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.distanzen = null;
                    }
                }
            }
            {
                Boolean distanzenSportShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.distanzenSport!= null)&&(!this.distanzenSport.isEmpty())));
                if (distanzenSportShouldBeCopiedAndSet == Boolean.TRUE) {
                    List<DistanzenSport> sourceDistanzenSport;
                    sourceDistanzenSport = (((this.distanzenSport!= null)&&(!this.distanzenSport.isEmpty()))?this.getDistanzenSport():null);
                    @SuppressWarnings("unchecked")
                    List<DistanzenSport> copyDistanzenSport = ((List<DistanzenSport> ) strategy.copy(LocatorUtils.property(locator, "distanzenSport", sourceDistanzenSport), sourceDistanzenSport, ((this.distanzenSport!= null)&&(!this.distanzenSport.isEmpty()))));
                    copy.distanzenSport = null;
                    if (copyDistanzenSport!= null) {
                        List<DistanzenSport> uniqueDistanzenSportl = copy.getDistanzenSport();
                        uniqueDistanzenSportl.addAll(copyDistanzenSport);
                    }
                } else {
                    if (distanzenSportShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.distanzenSport = null;
                    }
                }
            }
            {
                Boolean userDefinedSimplefieldShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.userDefinedSimplefield!= null)&&(!this.userDefinedSimplefield.isEmpty())));
                if (userDefinedSimplefieldShouldBeCopiedAndSet == Boolean.TRUE) {
                    List<UserDefinedSimplefield> sourceUserDefinedSimplefield;
                    sourceUserDefinedSimplefield = (((this.userDefinedSimplefield!= null)&&(!this.userDefinedSimplefield.isEmpty()))?this.getUserDefinedSimplefield():null);
                    @SuppressWarnings("unchecked")
                    List<UserDefinedSimplefield> copyUserDefinedSimplefield = ((List<UserDefinedSimplefield> ) strategy.copy(LocatorUtils.property(locator, "userDefinedSimplefield", sourceUserDefinedSimplefield), sourceUserDefinedSimplefield, ((this.userDefinedSimplefield!= null)&&(!this.userDefinedSimplefield.isEmpty()))));
                    copy.userDefinedSimplefield = null;
                    if (copyUserDefinedSimplefield!= null) {
                        List<UserDefinedSimplefield> uniqueUserDefinedSimplefieldl = copy.getUserDefinedSimplefield();
                        uniqueUserDefinedSimplefieldl.addAll(copyUserDefinedSimplefield);
                    }
                } else {
                    if (userDefinedSimplefieldShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.userDefinedSimplefield = null;
                    }
                }
            }
            {
                Boolean userDefinedAnyfieldShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, ((this.userDefinedAnyfield!= null)&&(!this.userDefinedAnyfield.isEmpty())));
                if (userDefinedAnyfieldShouldBeCopiedAndSet == Boolean.TRUE) {
                    List<UserDefinedAnyfield> sourceUserDefinedAnyfield;
                    sourceUserDefinedAnyfield = (((this.userDefinedAnyfield!= null)&&(!this.userDefinedAnyfield.isEmpty()))?this.getUserDefinedAnyfield():null);
                    @SuppressWarnings("unchecked")
                    List<UserDefinedAnyfield> copyUserDefinedAnyfield = ((List<UserDefinedAnyfield> ) strategy.copy(LocatorUtils.property(locator, "userDefinedAnyfield", sourceUserDefinedAnyfield), sourceUserDefinedAnyfield, ((this.userDefinedAnyfield!= null)&&(!this.userDefinedAnyfield.isEmpty()))));
                    copy.userDefinedAnyfield = null;
                    if (copyUserDefinedAnyfield!= null) {
                        List<UserDefinedAnyfield> uniqueUserDefinedAnyfieldl = copy.getUserDefinedAnyfield();
                        uniqueUserDefinedAnyfieldl.addAll(copyUserDefinedAnyfield);
                    }
                } else {
                    if (userDefinedAnyfieldShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.userDefinedAnyfield = null;
                    }
                }
            }
        }
        return draftCopy;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public Object createNewInstance() {
        return new Infrastruktur();
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
        if ((object == null)||(this.getClass()!= object.getClass())) {
            return false;
        }
        if (this == object) {
            return true;
        }
        final Infrastruktur that = ((Infrastruktur) object);
        {
            Boolean lhsZulieferung;
            lhsZulieferung = this.getZulieferung();
            Boolean rhsZulieferung;
            rhsZulieferung = that.getZulieferung();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "zulieferung", lhsZulieferung), LocatorUtils.property(thatLocator, "zulieferung", rhsZulieferung), lhsZulieferung, rhsZulieferung, (this.zulieferung!= null), (that.zulieferung!= null))) {
                return false;
            }
        }
        {
            Ausblick lhsAusblick;
            lhsAusblick = this.getAusblick();
            Ausblick rhsAusblick;
            rhsAusblick = that.getAusblick();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "ausblick", lhsAusblick), LocatorUtils.property(thatLocator, "ausblick", rhsAusblick), lhsAusblick, rhsAusblick, (this.ausblick!= null), (that.ausblick!= null))) {
                return false;
            }
        }
        {
            List<Distanzen> lhsDistanzen;
            lhsDistanzen = (((this.distanzen!= null)&&(!this.distanzen.isEmpty()))?this.getDistanzen():null);
            List<Distanzen> rhsDistanzen;
            rhsDistanzen = (((that.distanzen!= null)&&(!that.distanzen.isEmpty()))?that.getDistanzen():null);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "distanzen", lhsDistanzen), LocatorUtils.property(thatLocator, "distanzen", rhsDistanzen), lhsDistanzen, rhsDistanzen, ((this.distanzen!= null)&&(!this.distanzen.isEmpty())), ((that.distanzen!= null)&&(!that.distanzen.isEmpty())))) {
                return false;
            }
        }
        {
            List<DistanzenSport> lhsDistanzenSport;
            lhsDistanzenSport = (((this.distanzenSport!= null)&&(!this.distanzenSport.isEmpty()))?this.getDistanzenSport():null);
            List<DistanzenSport> rhsDistanzenSport;
            rhsDistanzenSport = (((that.distanzenSport!= null)&&(!that.distanzenSport.isEmpty()))?that.getDistanzenSport():null);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "distanzenSport", lhsDistanzenSport), LocatorUtils.property(thatLocator, "distanzenSport", rhsDistanzenSport), lhsDistanzenSport, rhsDistanzenSport, ((this.distanzenSport!= null)&&(!this.distanzenSport.isEmpty())), ((that.distanzenSport!= null)&&(!that.distanzenSport.isEmpty())))) {
                return false;
            }
        }
        {
            List<UserDefinedSimplefield> lhsUserDefinedSimplefield;
            lhsUserDefinedSimplefield = (((this.userDefinedSimplefield!= null)&&(!this.userDefinedSimplefield.isEmpty()))?this.getUserDefinedSimplefield():null);
            List<UserDefinedSimplefield> rhsUserDefinedSimplefield;
            rhsUserDefinedSimplefield = (((that.userDefinedSimplefield!= null)&&(!that.userDefinedSimplefield.isEmpty()))?that.getUserDefinedSimplefield():null);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "userDefinedSimplefield", lhsUserDefinedSimplefield), LocatorUtils.property(thatLocator, "userDefinedSimplefield", rhsUserDefinedSimplefield), lhsUserDefinedSimplefield, rhsUserDefinedSimplefield, ((this.userDefinedSimplefield!= null)&&(!this.userDefinedSimplefield.isEmpty())), ((that.userDefinedSimplefield!= null)&&(!that.userDefinedSimplefield.isEmpty())))) {
                return false;
            }
        }
        {
            List<UserDefinedAnyfield> lhsUserDefinedAnyfield;
            lhsUserDefinedAnyfield = (((this.userDefinedAnyfield!= null)&&(!this.userDefinedAnyfield.isEmpty()))?this.getUserDefinedAnyfield():null);
            List<UserDefinedAnyfield> rhsUserDefinedAnyfield;
            rhsUserDefinedAnyfield = (((that.userDefinedAnyfield!= null)&&(!that.userDefinedAnyfield.isEmpty()))?that.getUserDefinedAnyfield():null);
            if (!strategy.equals(LocatorUtils.property(thisLocator, "userDefinedAnyfield", lhsUserDefinedAnyfield), LocatorUtils.property(thatLocator, "userDefinedAnyfield", rhsUserDefinedAnyfield), lhsUserDefinedAnyfield, rhsUserDefinedAnyfield, ((this.userDefinedAnyfield!= null)&&(!this.userDefinedAnyfield.isEmpty())), ((that.userDefinedAnyfield!= null)&&(!that.userDefinedAnyfield.isEmpty())))) {
                return false;
            }
        }
        return true;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:30:44+02:00", comments = "JAXB RI v2.3.0")
    public boolean equals(Object object) {
        final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE2;
        return equals(null, null, object, strategy);
    }

}


text:
using System;
using System.Runtime.Serialization;

namespace System.IO
{
    public class IOException : SystemException
    {
        public IOException()
            : base(SR.Arg_IOException)
        {
            HResult = __HResults.COR_E_IO;
        }

        public IOException(String message)
            : base(message)
        {
            HResult = __HResults.COR_E_IO;
        }

        public IOException(String message, int hresult)
            : base(message)
        {
            HResult = hresult;
        }

        public IOException(String message, Exception innerException)
            : base(message, innerException)
        {
            HResult = __HResults.COR_E_IO;
        }

        protected IOException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            throw new PlatformNotSupportedException();
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
Dataset of 50,000 32x32 color training images, labeled over 10 categories, and 10,000 test images.

### Usage:

```python
from keras.datasets import cifar10

(X_train, y_train), (X_test, y_test) = cifar10.load_data()
```

- __Return:__
    - 2 tuples:
        - __X_train, X_test__: uint8 array of RGB image data with shape (nb_samples, 3, 32, 32).
        - __y_train, y_test__: uint8 array of category labels (integers in range 0-9) with shape (nb_samples,).

---

## CIFAR100 small image classification

Dataset of 50,000 32x32 color training images, labeled over 100 categories, and 10,000 test images.

### Usage:

```python
from keras.datasets import cifar100

(X_train, y_train), (X_test, y_test) = cifar100.load_data(label_mode='fine')
```

- __Return:__
    - 2 tuples:
        - __X_train, X_test__: uint8 array of RGB image data with shape (nb_samples, 3, 32, 32).
        - __y_train, y_test__: uint8 array of category labels with shape (nb_samples,).

- __Arguments:__

    - __label_mode__: "fine" or "coarse".

---

## IMDB Movie reviews sentiment classification

Dataset of 25,000 movies reviews from IMDB, labeled by sentiment (positive/negative). Reviews have been preprocessed, and each review is encoded as a [sequence](preprocessing/sequence.md) of word indexes (integers). For convenience, words are indexed by overall frequency in the dataset, so that for instance the integer "3" encodes the 3rd most frequent word in the data. This allows for quick filtering operations such as: "only consider the top 10,000 most common words, but eliminate the top 20 most common words".

As a convention, "0" does not stand for a specific word, but instead is used to encode any unknown word.

### Usage:

```python
from keras.datasets import imdb

(X_train, y_train), (X_test, y_test) = imdb.load_data(path="imdb.pkl",
                                                      nb_words=None,
                                                      skip_top=0,
                                                      maxlen=None,
                                                      test_split=0.1)
```
- __Return:__
    - 2 tuples:
        - __X_train, X_test__: list of sequences, which are lists of indexes (integers). If the nb_words argument was specific, the maximum possible index value is nb_words-1. If the maxlen argument was specified, the largest possible sequence length is maxlen.
        - __y_train, y_test__: list of integer labels (1 or 0).

- __Arguments:__

    - __path__: if you do have the data locally (at `'~/.keras/datasets/' + path`), if will be downloaded to this location (in cPickle format).
    - __nb_words__: integer or None. Top most frequent words to consider. Any less frequent word will appear as 0 in the sequence data.
    - __skip_top__: integer. Top most frequent words to ignore (they will appear as 0s in the sequence data).
    - __maxlen__: int. Maximum sequence length. Any longer sequence will be truncated.
    - __test_split__: float. Fraction of the dataset to be used as test data.
    - __seed__: int. Seed for reproducible data shuffling.

---

## Reuters newswire topics classification

Dataset of 11,228 newswires from Reuters, labeled over 46 topics. As with the IMDB dataset, each wire is encoded as a sequence of word indexes (same conventions).

### Usage:

```python
from keras.datasets import reuters

(X_train, y_train), (X_test, y_test) = reuters.load_data(path="reuters.pkl",
                                                         nb_words=None,
                                                         skip_top=0,
                                                         maxlen=None,
                                                         test_split=0.1)
```

The specifications are the same as that of the IMDB dataset.

This dataset also makes available the word index used for encoding the sequences:

```python
word_index = reuters.get_word_index(path="reuters_word_index.pkl")
```

- __Return:__ A dictionary where key are words (str) and values are indexes (integer). eg. `word_index["giraffe"]` might return `1234`.

- __Arguments:__

    - __path__: if you do have the index file locally (at `'~/.keras/datasets/' + path`), if will be downloaded to this location (in cPickle format).

## MNIST database of handwritten digits

Dataset of 60,000 28x28 grayscale images of the 10 digits, along with a test set of 10,000 images.

### Usage:

```python
from keras.datasets import mnist

(X_train, y_train), (X_test, y_test) = mnist.load_data()
```

- __Return:__
    - 2 tuples:
        - __X_train, X_test__: uint8 array of grayscale image data with shape (nb_samples, 28, 28).
        - __y_train, y_test__: uint8 array of digit labels (integers in range 0-9) with shape (nb_samples,).

- __Arguments:__

    - __path__: if you do have the index file locally (at `'~/.keras/datasets/' + path`), if will be downloaded to this location (in cPickle format).


text:
/**
 Create by Huy: codocmm@gmail.com ~ nqhuy2k6@gmail.com
 07/31/2015
 */
define(["durandal/app", "knockout", "knockback", "plugins/router", "q", "../models/report", "moment", "jqplot", "cursor", "dateAxisRenderer", "canvasTextRenderer", "canvasAxisLabelRenderer", "../bindings/datetime.picker", "bootstrap-datepicker", "css!../../lib/nqhlib/css/jquery.jqplot.min.css"], function (app, ko, kb, router, Q, Report, Moment) {
    return function () {
        var me = this;
        me.Temps = [], me.Hums = [], apis = app.services.getService("apis"), buff = app.buff;
        var report = new Report({
            fromTime: moment().subtract(1, "day").format(app.CMASConfig.DateTimeFormat.GLOBAL),
            toTime: moment().format(app.CMASConfig.DateTimeFormat.GLOBAL)
        });

        function dateRangeUpdated() {
            renderChart()
        }

        function getHistories() {
            var deferred = Q.defer();
            var fromTime = moment(report.get("fromTime")).format("YYYY-MM-DDTHH:mm:ss.SSSZ");
            var toTime = moment(report.get("toTime")).format("YYYY-MM-DDTHH:mm:ss.SSSZ");
            console.log(fromTime);
            console.log(toTime);
            apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "DPMA_kW")[0].id, fromTime, toTime).then(function (rs) {
                if (rs.result)me.DPMA_kW(Math.round(rs.result * 10) / 10);
                apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "DPMB_kW")[0].id, fromTime, toTime).then(function (rs) {
                    if (rs.result)me.DPMB_kW(Math.round(rs.result * 10) / 10);
                    me.csd(me.DPMA_kW() + Math.round(rs.result * 10) / 10)
                })
            });
            apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "DPMA_kWh")[0].id, fromTime, toTime).then(function (rs) {
                if (rs.result)me.DPMA_kWh(Math.round(rs.result * 10) / 10);
                apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "DPMB_kWh")[0].id, fromTime, toTime).then(function (rs) {
                    me.nld(me.DPMA_kWh() + Math.round(rs.result * 10) / 10)
                })
            });
            apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS1_kW1out")[0].id, fromTime, toTime).then(function (rs) {
                if (rs.result)me.UPS1_kW1out(Math.round(rs.result * 10) / 10);
                apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS1_kW2out")[0].id, fromTime, toTime).then(function (rs) {
                    if (rs.result)me.UPS1_kW2out(Math.round(rs.result * 10) / 10);
                    apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS1_kW3out")[0].id, fromTime, toTime).then(function (rs) {
                        me.UPS1_kW((me.UPS1_kW1out() + me.UPS1_kW2out() + Math.round(rs.result * 10) / 10) / 3)
                    })
                })
            });
            apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS2_kW1out")[0].id, fromTime, toTime).then(function (rs) {
                if (rs.result)me.UPS2_kW1out(Math.round(rs.result * 10) / 10);
                apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS2_kW2out")[0].id, fromTime, toTime).then(function (rs) {
                    if (rs.result)me.UPS2_kW2out(Math.round(rs.result * 10) / 10);
                    apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS2_kW3out")[0].id, fromTime, toTime).then(function (rs) {
                        me.UPS2_kW((me.UPS2_kW1out() + me.UPS2_kW2out() + Math.round(rs.result * 10) / 10) / 3)
                    })
                })
            });
            apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS3_kW1out")[0].id, fromTime, toTime).then(function (rs) {
                if (rs.result)me.UPS3_kW1out(Math.round(rs.result * 10) / 10);
                apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS3_kW2out")[0].id, fromTime, toTime).then(function (rs) {
                    if (rs.result)me.UPS3_kW2out(Math.round(rs.result * 10) / 10);
                    apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS3_kW3out")[0].id, fromTime, toTime).then(function (rs) {
                        me.UPS3_kW((me.UPS3_kW1out() + me.UPS3_kW2out() + Math.round(rs.result * 10) / 10) / 3)
                    })
                })
            });
            apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS1_I1out")[0].id, fromTime, toTime).then(function (rs) {
                if (rs.result)me.UPS1_I1out(Math.round(rs.result * 10) / 10);
                apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS1_I2out")[0].id, fromTime, toTime).then(function (rs) {
                    if (rs.result)me.UPS1_I2out(Math.round(rs.result * 10) / 10);
                    apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS1_I3out")[0].id, fromTime, toTime).then(function (rs) {
                        me.UPS1_I((me.UPS1_I1out() + me.UPS1_I2out() + Math.round(rs.result * 10) / 10) / 3)
                    })
                })
            });
            apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS2_I1out")[0].id, fromTime, toTime).then(function (rs) {
                if (rs.result)me.UPS2_I1out(Math.round(rs.result * 10) / 10);
                apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS2_I2out")[0].id, fromTime, toTime).then(function (rs) {
                    if (rs.result)me.UPS2_I2out(Math.round(rs.result * 10) / 10);
                    apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS2_I3out")[0].id, fromTime, toTime).then(function (rs) {
                        me.UPS2_I((me.UPS2_I1out() + me.UPS2_I2out() + Math.round(rs.result * 10) / 10) / 3)
                    })
                })
            });
            apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS3_I1out")[0].id, fromTime, toTime).then(function (rs) {
                if (rs.result)me.UPS3_I1out(Math.round(rs.result * 10) / 10);
                apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS3_I2out")[0].id, fromTime, toTime).then(function (rs) {
                    if (rs.result)me.UPS3_I2out(Math.round(rs.result * 10) / 10);
                    apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "UPS3_I3out")[0].id, fromTime, toTime).then(function (rs) {
                        me.UPS3_I((me.UPS3_I1out() + me.UPS3_I2out() + Math.round(rs.result * 10) / 10) / 3)
                    })
                })
            });
            apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "DPMA_In")[0].id, fromTime, toTime).then(function (rs) {
                if (rs.result)me.DPMA_I(Math.round(rs.result * 10) / 10)
            });
            apis.averageByTimeRange(buff.find(buff.getByKey("ChannelsAll"), "code", "DPMB_In")[0].id, fromTime, toTime).then(function (rs) {
                if (rs.result)me.DPMB_I(Math.round(rs.result * 10) / 10)
            });
            var idtemp = buff.find(buff.getByKey("ChannelsAll"), "code", "ENV_ServerTemp1")[0].id;
            apis.getHistories1(idtemp, fromTime, toTime, 1E3).then(function (r) {
                response = r.result.sort(function (a, b) {
                    return a.createdAt < b.createdAt ? 1 : a.createdAt > b.createdAt ? -1 : 0
                });
                apis.averageByTimeRange(idtemp, fromTime, toTime).then(function (rs) {
                    if (rs.result)me.Temp(Math.round(rs.result * 10) / 10)
                });
                if (response != undefined)for (var i in response)me.Temps.push([Moment(response[i]["createdAt"]).format("MM/DD/YYYY hh:mm:ss"), response[i]["value"]]);
                var idhum = buff.find(buff.getByKey("ChannelsAll"), "code", "ENV_ServerHum1")[0].id;
                apis.getHistories1(idhum, fromTime, toTime, 1E3).then(function (r) {
                    response = r.result.sort(function (a, b) {
                        return a.createdAt < b.createdAt ? 1 : a.createdAt > b.createdAt ? -1 : 0
                    });
                    apis.averageByTimeRange(idhum, fromTime, toTime).then(function (rs) {
                        if (rs.result)me.Hum(Math.round(rs.result * 10) / 10)
                    });
                    if (response != undefined)for (var i in response)me.Hums.push([Moment(response[i]["createdAt"]).format("MM/DD/YYYY hh:mm:ss"), response[i]["value"]]);
                    deferred.resolve()
                })
            });
            return deferred.promise
        }

        function renderChart() {
            getHistories().then(function () {
                var plot1 = $.jqplot("chart123", [me.Temps, me.Hums], {
                    title: "Environmental",
                    animate: true,
                    animateReplot: true,
                    seriesDefaults: {showMarker: false},
                    series: [{rendererOptions: {animation: {speed: 2E3}}}, {
                        yaxis: "y2axis",
                        rendererOptions: {animation: {speed: 2E3}}
                    }],
                    cursor: {show: true, tooltipLocation: "sw", zoom: false},
                    axesDefaults: {useSeriesColor: true},
                    axes: {
                        xaxis: {
                            renderer: $.jqplot.DateAxisRenderer,
                            labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
                            tickRenderer: $.jqplot.CanvasAxisTickRenderer,
                            tickOptions: {angle: -30, formatString: "%#d/%#m/%Y"}
                        },
                        yaxis: {labelRenderer: $.jqplot.CanvasAxisLabelRenderer, label: "Temperature"},
                        y2axis: {labelRenderer: $.jqplot.CanvasAxisLabelRenderer, label: "Humidity"}
                    }
                })
            })
        }

        me.fromTime = kb.observable(report, "fromTime");
        me.toTime = kb.observable(report, "toTime");
        me.nld = ko.observable(0);
        me.csd = ko.observable(0);
        me.Temp = ko.observable(0);
        me.Hum = ko.observable(0);
        me.DPMA_kW = ko.observable(0);
        me.DPMB_kW = ko.observable(0);
        me.DPMA_kWh = ko.observable(0);
        me.DPMB_kWh = ko.observable(0);
        me.UPS1_kW = ko.observable(0);
        me.UPS1_kW1out = ko.observable(0);
        me.UPS1_kW2out = ko.observable(0);
        me.UPS1_kW3out = ko.observable(0);
        me.UPS2_kW = ko.observable(0);
        me.UPS2_kW1out = ko.observable(0);
        me.UPS2_kW2out = ko.observable(0);
        me.UPS2_kW3out = ko.observable(0);
        me.UPS3_kW = ko.observable(0);
        me.UPS3_kW1out = ko.observable(0);
        me.UPS3_kW2out = ko.observable(0);
        me.UPS3_kW3out = ko.observable(0);
        me.DPMA_I = ko.observable(0);
        me.DPMB_I = ko.observable(0);
        me.UPS1_I = ko.observable(0);
        me.UPS1_I1out = ko.observable(0);
        me.UPS1_I2out = ko.observable(0);
        me.UPS2_I = ko.observable(0);
        me.UPS2_I1out = ko.observable(0);
        me.UPS2_I2out = ko.observable(0);
        me.UPS3_I = ko.observable(0);
        me.UPS3_I1out = ko.observable(0);
        me.UPS3_I2out = ko.observable(0);
        me.Show = function () {
            dateRangeUpdated()
        }
    }
});


text:
document.addEventListener("DOMContentLoaded", function() {
  var lazyloadImages = document.querySelectorAll("img.lazy");
  var lazyloadThrottleTimeout;

  function lazyload () {
    if(lazyloadThrottleTimeout) {
      clearTimeout(lazyloadThrottleTimeout);
    }

    lazyloadThrottleTimeout = setTimeout(function() {
        var scrollTop = window.pageYOffset;
        lazyloadImages.forEach(function(img) {
            if(img.offsetTop < (window.innerHeight + scrollTop)) {
              img.src = img.dataset.src;
              img.classList.remove('lazy');
            }
        });
        if(lazyloadImages.length == 0) {
          document.removeEventListener("scroll", lazyload);
          window.removeEventListener("resize", lazyload);
          window.removeEventListener("orientationChange", lazyload);
        }
    }, 20);
  }

  document.addEventListener("scroll", lazyload);
  window.addEventListener("resize", lazyload);
  window.addEventListener("orientationChange", lazyload);
});


text: LeetCode solutions in js.


text:
rancheradm - a simple rancher server administration utility. Supports some tasks that rancher-cli
does not provide. Can be used for supporting automated rancher setups.

Requires Rancher 1.2.0 or later.

```
Usage: rancheradm [options] command...

  rancheradm token              -- create admin token
  rancheradm localauth (on|off) -- check, enable or disable local authentication
                                   (enabling will use adminuser/adminpassword)
  rancheradm get SETTING        -- get setting
  rancheradm set SETTING VALUE  -- set setting to value
  rancheradm environments       -- list environments
  rancheradm registration ENV   -- get registration url for environment ENV (default: Default)
  rancheradm envapikey ENV      -- create environment api key for ENV (default: Default)
  rancheradm apikey             -- create admin api key
```

Most commands require authentication by one of admin user/password, admin access/secret key
or admin jwt token. Those and the RANCHER_URL can be set in the environment.

```
Options:

  -adminaccesskey string
    	rancher admin access key (env RANCHER_ADMIN_ACCESS_KEY)
  -adminpassword string
    	rancher admin password (env RANCHER_ADMIN_PASSWORD)
  -adminsecretkey string
    	rancher admin secret key (env RANCHER_ADMIN_SECRET_KEY)
  -admintoken string
    	rancher admin jwt token (env RANCHER_ADMIN_TOKEN)
  -adminuser string
    	rancher admin user (env RANCHER_ADMIN_USER)
  -debug
    	debug mode
  -url string
    	rancher url (env RANCHER_URL) (default "http://localhost:8080/")
  -waitretry int
    	wait/retry until rancher is up (in seconds)
```

To get the registration URL for an enviroment, you need to set the api.host first, for example

```
rancheradm set api.host $RANCHER_URL
```


text:
async function getPullRequestLabel(githubRepo, validLabels, pullRequestId, { githubClient }) {
    const validLabelNames = Array.from(validLabels.keys());

    const [owner, repo] = githubRepo.split('/');
    const params = { owner, repo, issue_number: pullRequestId };
    const { data: labels } = await githubClient.issues.listLabelsOnIssue(params);

    const listOfLabels = validLabelNames.join(', ');
    const filteredLabels = labels.filter((label) => {
        return validLabelNames.includes(label.name);
    });

    if (filteredLabels.length > 1) {
        throw new Error(`Pull Request #${pullRequestId} has multiple labels of ${listOfLabels}`);
    } else if (filteredLabels.length === 0) {
        throw new Error(`Pull Request #${pullRequestId} has no label of ${listOfLabels}`);
    }

    return filteredLabels[0].name;
}

export default getPullRequestLabel;


text:
[![PyPI](https://img.shields.io/pypi/v/nba_py.svg?style=flat-square)](https://pypi.python.org/pypi/nba_py) [![Travis](https://img.shields.io/travis/seemethere/nba_py.svg?style=flat-square)](https://travis-ci.org/seemethere/nba_py)    [![License](https://img.shields.io/pypi/l/nba_py.svg?style=flat-square)](https://github.com/seemethere/nba_py/blob/master/LICENSE)
[![Documentation Status](https://readthedocs.org/projects/nba-py/badge/?version=0.1a2)](http://nba-py.readthedocs.org/en/0.1a2/)
[![Join the chat at https://gitter.im/seemethere/nba_py](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/seemethere/nba_py?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

# *nba_py - [stats.nba.com](http://stats.nba.com) API for python*

#### [stats.nba.com Endpoint Documentation](https://github.com/seemethere/nba_py/wiki/stats.nba.com-Endpoint-Documentation)

Stable version: **v0.1a1**

This branches version: **v0.1a2**

## Summary
A python facing API for stats.nba.com (Still in heavy development)

Originally based off [https://github.com/bradleyfay/NBAStats](https://github.com/bradleyfay/NBAStats)

## Installation
NOTE: Developmental builds, are by no means stable If you want the stable version use:

```
$ pip install nba_py
```

Else:
- Download from source (git clone, zipped package)
- Run from the root directory:

```
$ pip install .
```

## Requirements [![Requires.io](https://img.shields.io/requires/github/seemethere/nba_py.svg?style=flat-square)](https://requires.io/github/seemethere/nba_py/requirements/?branch=master)
- [requests](http://www.python-requests.org/en/latest/)

## Nice to have
Pandas is nice to have because it'll put the data in an easy to manage object, but it is by no means necessary. All data, if pandas is not installed is returned in a nice json list format with headers!
- [pandas](http://pandas.pydata.org/) [(Installation Help)](https://github.com/seemethere/nba_py/wiki/Installing-pandas)

Requests-cache is nice to have when you are downloading very large datasets so that subsequent downloads take much less time, but again, it is by no means necessary.
- [requests-cache](https://github.com/reclosedev/requests-cache)

## Completed work
- See the [wiki](https://github.com/seemethere/nba_py/wiki/Completed-Work-Log)

## Planned development
### 1. Documentation
- All around documentation not only of nba_py but also stats.nba.com (it's pretty nonexistent)

### ~~2. Map rest of API~~ (Completed)


text:
package org.jbpm.formModeler.service.error;

import org.jbpm.formModeler.service.annotation.config.Config;
import org.jbpm.formModeler.service.bb.mvc.taglib.formatter.Formatter;
import org.jbpm.formModeler.service.bb.mvc.taglib.formatter.FormatterException;

import javax.inject.Inject;
import javax.inject.Named;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Named("ErrorReportFormatter")
public class ErrorReportFormatter extends Formatter {

    @Inject @Config("/formModeler/components/errorReport/images/32x32/info.gif")
    protected String messagesImg;

    @Inject @Config("/formModeler/components/errorReport/images/32x32/warning.gif")
    protected String warningsImg;

    @Inject @Config("/formModeler/components/errorReport/images/32x32/error.gif")
    protected String errorsImg;

    public void service(HttpServletRequest request, HttpServletResponse response) throws FormatterException {
        ErrorReportHandler errorReportHandler = ErrorReportHandler.lookup();
        ErrorReport errorReport = errorReportHandler.getErrorReport();
        if (errorReport != null) {
            setAttribute("errorIcon", getErrorIcon(errorReport));
            setAttribute("errorMessage", errorReport.printErrorMessage());
            setAttribute("closeEnabled", errorReportHandler.isCloseEnabled());
            if (!errorReport.isBusinessAppError()) setAttribute("technicalDetails", errorReport.printContext(0));
            renderFragment("errorMessage");
        }
    }

    protected String getErrorIcon(ErrorReport errorReport) {
        if (errorReport.isBusinessAppError()) {
            BusinessError appError = (BusinessError) ErrorManager.lookup().getApplicationErrorCause(errorReport.getException());
            switch (appError.getLevel()) {
                case BusinessError.ERROR: return errorsImg;
                case BusinessError.WARN: return warningsImg;
                case BusinessError.INFO: return messagesImg;
            }
        }
        return errorsImg;
    }
}


text:
layout:     post
permalink:  prague-czech-republic
ref:        prague-czech-republic
lang:       ru
title:      Прага, Чехия
date:       2015-12-26 12:00:00
image:      https://content.11route.com/posts/2015/prague-czech-republic/cover.jpg
summary:    Рождество в Праге
categories: travel czech
location:
  latitude:   50.0855107
  longitude:  14.3937384
---

Прилетели в Прагу 25-го вечером, и сразу же пошли гулять в центр.
С собой мы взяли только 1100 CZK, продав 50 Евро в аэропорту Дюссельдорфа.
Проезд из аэропорта в отель стоил 64 кроны на двоих. Мы взяли билет на 90 минут.
По городу мы покупали короткий билет на 30 мин за 24 кроны с человека.

В центре все еще находится рождественский рынок. В Германии их уже убрали :)
На рынке мы съели сосиску за 60 крон, чай за 40 крон и блинчик с нутеллой за 65 крон.
Дешевле, чем в Германии, но дорого по местным меркам.

На рынке продают разную еду, например Трыдло.

Еще продают всякую фигню.

Весело тут.

После прогулки зашли в ближайшее заведение - ресторан Котлета.
Там заказали гуляш с кнедликами. На вкус он лучше, чем выглядит :)

Старопармен резаный. Пиво тут стоило 45 крон.

В Котлете были интересные лампы.

Следующим утром...

Утром, после завтрака в отеле, опять пошли гулять.

Мы начали с парка Летенские сады. Очень много пространства, но интересен он только хорошим видом на Старый Город.

Мосты на Влтаве.

В парке на столбе висит обувь. У нас с собой было только по одной паре, так что мы решили не добавлять свои пары на провода.

В Праге (да и везде в Европе) очень теплая погода. На кустах распустились цветы и проснулись пчелы.

Они еще не знают, что через неделю будет -2.

Хотели зайти в Королевский сад, но он оказался закрыт на зиму.

Пришлось обходить и идти в Пражский Град, к собору святого Вита.

На входе в град стоит охрана, с автоматами.

Собор святого Вита.

Рядом с собором был еще один Рождественский рынок.

Тут продавали сосиски и шашлыки.

Пошли дальше, вид на Прагу.

Подарок Британского общества народам Чехии и Словакии.

Просторные площади.

В служебном трамвае - елка.

Трамваи, как в Днепропетровске :)

Улицы такие узкие, что пришлось ставить светофор.

На самом деле, это просто завлекалка в ресторан :)

Вид на башни Карлового моста. Вид сзади.

Состоятельные граждане перемещаются на таких автомобилях.

Какой-то костел.

Кафе "У черта", напротив костела.

Магазин пряников.

Органный зал внутри одного из костелов.

На Карловом мосту очень много народу.

Вид с моста, на другой мост.

Современный трамвай. Цена проезда в антикварном трамвае и в этом - одинакова.

На реке несколько маленьких плотин. Зачем они нужны, мы так и не поняли.

Карлов мост, вид сбоку.

Архитектура.

Интересный дом.

На крыше висит памятник.

Реклама чешского мультфильма "Аж по уши в меху", насколько мне хватает знаний чешского.

Мини-рождественские рынки есть почти на каждой площади.

Подход к главной площади города.

Вечером пошли на ужин.

Картофельные крокеты.

Вепрево колено.

После ужина вечерня прогулка.

Пражская филармония.

Пражский град и собор святого Вита.

Карлов мост.

Вид на Старый город.


text:
package org.wso2.carbon.integration.test.client;

import org.testng.Assert;
import org.wso2.carbon.databridge.commons.Credentials;
import org.wso2.carbon.databridge.commons.Event;
import org.wso2.carbon.databridge.commons.StreamDefinition;
import org.wso2.carbon.databridge.commons.thrift.utils.HostAddressFinder;
import org.wso2.carbon.databridge.core.AgentCallback;
import org.wso2.carbon.databridge.core.DataBridge;
import org.wso2.carbon.databridge.core.Utils.AgentSession;
import org.wso2.carbon.databridge.core.definitionstore.InMemoryStreamDefinitionStore;
import org.wso2.carbon.databridge.core.exception.DataBridgeException;
import org.wso2.carbon.databridge.core.internal.authentication.AuthenticationHandler;
import org.wso2.carbon.databridge.receiver.thrift.ThriftDataReceiver;
import org.wso2.carbon.user.api.UserStoreException;

import java.net.SocketException;
import java.util.List;
import java.util.concurrent.atomic.AtomicLong;

public class TestAgentServer implements Runnable {
//    private Logger log = Logger.getLogger(TestAgentServer.class);
    private ThriftDataReceiver thriftDataReceiver;
    private boolean eventReceived = false;
    private AtomicLong msgCount = new AtomicLong(0);

    public void startServer() throws DataBridgeException {
        msgCount.set(0);
        start(7661);
    }

    public void start(int receiverPort) throws DataBridgeException {
        KeyStoreUtil.setKeyStoreParams();
        DataBridge databridge = new DataBridge(new AuthenticationHandler() {
            @Override
            public boolean authenticate(String userName,
                                        String password) {
                return true;// allays authenticate to true
            }

            @Override
            public String getTenantDomain(String userName) {
                return "admin";
            }

            @Override
            public int getTenantId(String s) throws UserStoreException {
                return -1234;
            }

            @Override
            public void initContext(AgentSession agentSession) {

            }

            @Override
            public void destroyContext(AgentSession agentSession) {

            }

        }, new InMemoryStreamDefinitionStore());
        thriftDataReceiver = new ThriftDataReceiver(receiverPort, databridge);

        databridge.subscribe(new AgentCallback() {

            @Override
            public void definedStream(StreamDefinition streamDefinition, int tenantId) {
                System.out.println("Added StreamDefinition " + streamDefinition);
            }

            @Override
            public void removeStream(StreamDefinition streamDefinition, int tenantId) {
                System.out.println("Removed StreamDefinition " + streamDefinition);
            }

            @Override
            public void receive(List<Event> eventList, Credentials credentials) {
                System.out.println("eventListSize=" + eventList.size() + " eventList " + eventList + " for username " + credentials.getUsername());
                eventReceived = true;
                msgCount.addAndGet(eventList.size());
            }

        });

        try {
            String address = HostAddressFinder.findAddress("localhost");
            System.out.println("Test Server starting on " + address);
            thriftDataReceiver.start(address);
            System.out.println("Test Server Started");
        } catch (SocketException e) {
            System.out.println("Test Server not started !"+ e);
        }
    }

    public void stop() {
        Assert.assertTrue(eventReceived);
        thriftDataReceiver.stop();
        System.out.println("Test Server Stopped");
    }

    @Override
    public void run() {
        try {
            startServer();
        } catch (DataBridgeException e) {
            e.printStackTrace();
        }
    }

    public long getMsgCount() {
        return msgCount.get();
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>cynomys-client</artifactId>
        <groupId>cn.howardliu.monitor</groupId>
        <version>0.1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>cynomys-agent</artifactId>
    <version>0.1.0-SNAPSHOT</version>

    <packaging>jar</packaging>

    <dependencies>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.2.3</version>
        </dependency>
        <dependency>
            <groupId>cn.howardliu.monitor</groupId>
            <artifactId>cynomys-client-common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
        </dependency>
        <dependency>
            <groupId>cn.howardliu</groupId>
            <artifactId>gear-monitor-core</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>validation-api</artifactId>
                    <groupId>javax.validation</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.9.4</version>
        </dependency>
        <dependency>
            <groupId>org.ehcache</groupId>
            <artifactId>ehcache</artifactId>
            <version>3.4.0</version>
        </dependency>
        <dependency>
            <groupId>javax.cache</groupId>
            <artifactId>cache-api</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.0.29</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <appendAssemblyId>true</appendAssemblyId>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <outputDirectory>target</outputDirectory>
                    <archive>
                        <manifestEntries>
                            <Premain-Class>cn.howardliu.monitor.cynomys.agent.MonitorAgent</Premain-Class>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>


text:
namespace Chaos {

class Any {
  class Placeholder {
  public:
    virtual ~Placeholder(void) = default;

    virtual const std::type_info& get_type(void) const = 0;
    virtual Placeholder* clone(void) const = 0;
  };

  template <typename ValueType>
  class Holder : public Placeholder {
    Holder& operator=(const Holder&) = delete;
  public:
    ValueType held_;
  public:
    Holder(const ValueType& value)
      : held_(value) {
    }

    Holder(const ValueType&& value)
      : held_(std::move(value)) {
    }

    virtual const std::type_info& get_type(void) const override {
      return typeid(ValueType);
    }

    virtual Placeholder* clone(void) const override {
      return new Holder(held_);
    }
  };

  Placeholder* content_{};

  template <typename ValueType> friend ValueType* any_cast(Any* operand);
  template <typename ValueType> friend ValueType* unsafe_any_cast(Any* operand);
public:
  Any(void) = default;

  ~Any(void) {
    if (nullptr != content_)
      delete content_;
  }

  template <typename ValueType>
  Any(const ValueType& value)
    : content_(new Holder<
        RemoveCV_t<typename std::decay<const ValueType>::trype>>(value)) {
  }

  template <typename ValueType>
  Any(ValueType&& value,
      DisableIf_t<std::is_same<Any&, ValueType>::value>* = nullptr,
      DisableIf_t<std::is_const<ValueType>::value>* = nullptr)
    : content_(new Holder<
        typename std::decay<ValueType>::type>(std::move(value))) {
  }

  Any(const Any& r)
    : content_(nullptr != r.content_ ? r.content_->clone() : nullptr) {
  }

  Any(Any&& r)
    : content_(r.content_) {
    r.content_ = nullptr;
  }

  Any& operator=(const Any& r) {
    Any(r).swap(*this);
    return *this;
  }

  Any& operator=(Any&& r) {
    r.swap(*this);
    Any().swap(r);
    return *this;
  }

  template <typename ValueType>
  Any& operator=(const ValueType& r) {
    Any(r).swap(*this);
    return *this;
  }

  template <typename ValueType>
  Any& operator=(ValueType&& r) {
    Any(std::move(r)).swap(*this);
    return *this;
  }

  void swap(Any& r) {
    std::swap(content_, r.content_);
  }

  bool empty(void) const {
    return nullptr == content_;
  }

  void clear(void) {
    Any().swap(*this);
  }

  const std::type_info& get_type(void) const {
    return (nullptr != content_) ? content_->get_type() : typeid(void);
  }
};

class BadAnyCast : public std::bad_cast {
public:
  virtual const char* what(void) const noexcept override {
    return "Chaos::BadAnyCast - failed conversion using Chaos::any_cast";
  }
};

template <typename ValueType>
inline ValueType* any_cast(Any* operand) {
  return operand && operand->get_type() == typeid(ValueType)
    ? &static_cast<
        Any::Holder<RemoveCV_t<ValueType>>*>(operand->content_)->held_
    : nullptr;
}

template <typename ValueType>
inline const ValueType* any_cast(const Any* operand) {
  return any_cast<ValueType>(const_cast<Any*>(operand));
}

template <typename ValueType>
ValueType any_cast(Any& operand) {
  using NonRef = RemoveRef_t<ValueType>;

  NonRef* result = any_cast<NonRef>(&operand);
  if (!result)
    __chaos_throw_exception(BadAnyCast());

  using RefType = typename std::conditional<
    std::is_reference<ValueType>::value, ValueType, AddRef_t<ValueType>>::type;

  return static_cast<RefType>(*result);
}

template <typename ValueType>
inline const ValueType any_cast(const Any& operand) {
  return any_cast<const RemoveRef_t<ValueType>&>(const_cast<Any&>(operand));
}

template <typename ValueType>
inline ValueType* unsafe_any_cast(Any* operand) {
  return &static_cast<Any::Holder<ValueType>*>(operand->content_)->held_;
}

template <typename ValueType>
inline const ValueType* unsafe_any_cast(const Any* operand) {
  return unsafe_any_cast<ValueType>(const_cast<Any*>(operand));
}

}


text:
@interface YLResponses : NSObject

@end


text:
package com.google.cloud.testing;

import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;

/**
 * Utility class that executes system commands on both Windows and Unix.
 */
class CommandWrapper {

  private final List<String> prefix;
  private List<String> command;
  private String nullFilename;
  private boolean redirectOutputToNull;
  private boolean redirectErrorStream;
  private boolean redirectErrorInherit;
  private Path directory;

  private CommandWrapper() {
    this.prefix = new ArrayList<>();
    if (BaseEmulatorHelper.isWindows()) {
      this.prefix.add("cmd");
      this.prefix.add("/C");
      this.nullFilename = "NUL:";
    } else {
      this.prefix.add("bash");
      this.nullFilename = "/dev/null";
    }
  }

  CommandWrapper setCommand(List<String> command) {
    this.command = new ArrayList<>(command.size() + this.prefix.size());
    this.command.addAll(prefix);
    this.command.addAll(command);
    return this;
  }

  CommandWrapper setRedirectOutputToNull() {
    this.redirectOutputToNull = true;
    return this;
  }

  CommandWrapper setRedirectErrorStream() {
    this.redirectErrorStream = true;
    return this;
  }

  CommandWrapper setRedirectErrorInherit() {
    this.redirectErrorInherit = true;
    return this;
  }

  CommandWrapper setDirectory(Path directory) {
    this.directory = directory;
    return this;
  }

  ProcessBuilder getBuilder() {
    ProcessBuilder builder = new ProcessBuilder(command);
    if (redirectOutputToNull) {
      builder.redirectOutput(new File(nullFilename));
    }
    if (directory != null) {
      builder.directory(directory.toFile());
    }
    if (redirectErrorStream) {
      builder.redirectErrorStream(true);
    }
    if (redirectErrorInherit) {
      builder.redirectError(ProcessBuilder.Redirect.INHERIT);
    }
    return builder;
  }

  public Process start() throws IOException {
    return getBuilder().start();
  }

  static CommandWrapper create() {
    return new CommandWrapper();
  }
}


text:
using System.Linq;
using System.Text.Json;
using Husky.Diagnostics.Data;
using Husky.Principal;
using Microsoft.AspNetCore.Antiforgery;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;

namespace Husky.Diagnostics
{
	internal static class LogPropertyValueEvaluationHelper
	{
		internal static void ReadValuesFromHttpContext(this HttpLevelLogBase log, HttpContext http) {
			var antiforgery = http.RequestServices.GetService<IAntiforgery>()?.GetTokens(http).FormFieldName ?? "__RequestVerificationToken";

			log.HttpMethod = http.Request.Method;
			log.Url = http.Request.FullUrl();
			log.Referer = http.Request.Referer();
			log.Data = http.Request.HasFormContentType ? JsonSerializer.Serialize(http.Request.Form.Where(x => x.Key != antiforgery)) : null;
			log.UserAgent = http.Request.UserAgent();
			log.UserIp = http.Connection?.RemoteIpAddress;
			log.IsAjax = http.Request.IsAjaxRequest();
		}

		internal static void ReadValuesFromPrincipal(this LogBase log, IPrincipalUser principal) {
			log.AnonymousId = principal.AnonymousId;
			log.UserId = principal.Id;
			log.UserName = principal.DisplayName;
		}
	}
}


text:
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.firebase.firestore.local;

import androidx.annotation.Nullable;
import com.google.firebase.firestore.model.DocumentKey;
import com.google.firebase.firestore.model.ResourcePath;
import com.google.firebase.firestore.model.mutation.Mutation;
import com.google.firebase.firestore.model.mutation.Overlay;
import java.util.Map;
import java.util.SortedSet;

/**
 * Provides methods to read and write document overlays.
 *
 *
An overlay is a saved {@link Mutation}, that gives a local view of a document when applied to
 * the remote version of the document.
 *
 *
Each overlay stores the largest batch ID that is included in the overlay, which allows us to
 * remove the overlay once all batches leading up to it have been acknowledged.
 */
public interface DocumentOverlayCache {
  /**
   * Gets the saved overlay mutation for the given document key. Returns null if there is no overlay
   * for that key.
   */
  @Nullable
  Overlay getOverlay(DocumentKey key);

  /**
   * Gets the saved overlay mutation for the given document keys. Skips keys for which there are no
   * overlays.
   */
  Map<DocumentKey, Overlay> getOverlays(SortedSet<DocumentKey> keys);

  /**
   * Saves the given document key to mutation map to persistence as overlays. All overlays will have
   * their largest batch id set to {@code largestBatchId}.
   */
  void saveOverlays(int largestBatchId, Map<DocumentKey, Mutation> overlays);

  /** Removes the overlay whose largest-batch-id equals to the given Id. */
  void removeOverlaysForBatchId(int batchId);

  /**
   * Returns all saved overlays for the given collection.
   *
   * @param collection The collection path to get the overlays for.
   * @param sinceBatchId The minimum batch ID to filter by (exclusive). Only overlays that contain a
   *     change past `sinceBatchId` are returned.
   * @return Mapping of each document key in the collection to its overlay.
   */
  Map<DocumentKey, Overlay> getOverlays(ResourcePath collection, int sinceBatchId);

  /**
   * Returns {@code count} overlays with a batch ID higher than {@code sinceBatchId} for the
   * provided collection group, processed by ascending batch ID. The method always returns all
   * overlays for a batch even if the last batch contains more documents than the remaining limit.
   *
   * @param collectionGroup The collection group to get the overlays for.
   * @param sinceBatchId The minimum batch ID to filter by (exclusive). Only overlays that contain a
   *     change past `sinceBatchId` are returned.
   * @param count The number of overlays to return. Can be exceeded if the last batch contains more
   *     entries.
   * @return Mapping of each document key in the collection group to its overlay.
   */
  Map<DocumentKey, Overlay> getOverlays(String collectionGroup, int sinceBatchId, int count);
}


text:
.thumbnail p { margin-top: 15px }
input[type="file"] { position: absolute; top: -100px }


text:
import 'mocha';

import { expect, ifExitCodeIsOtherThan, logOutput, PickEvent } from '@integration/testing-tools';
import {
    ActivityFinished,
    ActivityStarts,
    SceneFinished,
    SceneFinishes,
    SceneStarts,
    SceneTagged,
    TestRunFinished,
    TestRunFinishes,
    TestRunnerDetected,
    TestRunStarts,
} from '@serenity-js/core/lib/events';
import { ExecutionSuccessful, FeatureTag, Name, Timestamp } from '@serenity-js/core/lib/model';

import { cucumber, cucumberVersion } from '../src';

describe(`@serenity-js/cucumber with Cucumber ${ cucumberVersion() }`, function () {

    it('recognises a passing scenario', () =>
        cucumber('features/passing_scenario.feature', 'common.steps.ts')
            .then(ifExitCodeIsOtherThan(0, logOutput))
            .then(result => {
                expect(result.exitCode).to.equal(0);

                PickEvent.from(result.events)
                    .next(TestRunStarts,       event => expect(event.timestamp).to.be.instanceof(Timestamp))
                    .next(SceneStarts,         event => {
                        expect(event.details.name).to.equal(new Name('A passing scenario'))
                        expect(event.details.location.path.value).to.match(/features\/passing_scenario.feature$/)
                        expect(event.details.location.line).to.equal(3);
                        expect(event.details.location.column).to.equal(3);
                    })
                    .next(TestRunnerDetected,  event => expect(event.name).to.equal(new Name('Cucumber')))
                    .next(SceneTagged,         event => expect(event.tag).to.equal(new FeatureTag('Serenity/JS recognises a passing scenario')))
                    .next(ActivityStarts,      event => expect(event.details.name).to.equal(new Name('Given a step that passes')))
                    .next(ActivityFinished,    event => expect(event.outcome).to.equal(new ExecutionSuccessful()))
                    .next(SceneFinishes,       event => expect(event.outcome).to.equal(new ExecutionSuccessful()))
                    .next(SceneFinished,       event => expect(event.outcome).to.equal(new ExecutionSuccessful()))
                    .next(TestRunFinishes,     event => expect(event.timestamp).to.be.instanceof(Timestamp))
                    .next(TestRunFinished,     event => expect(event.timestamp).to.be.instanceof(Timestamp))
                ;
            })
    );
});


text:
package ru.maksimov.andrey.golos4j.serializer;

import java.io.IOException;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.BeanDescription;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.BeanSerializerFactory;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;

import ru.maksimov.andrey.golos4j.dto.operation.BaseOperation;
import ru.maksimov.andrey.golos4j.dto.operation.CommentDto;
import ru.maksimov.andrey.golos4j.dto.operation.CommentOptionsDto;
import ru.maksimov.andrey.golos4j.dto.operation.TransferDto;
import ru.maksimov.andrey.golos4j.dto.operation.VoteDto;

/**
 * Serializer for BaseOperation
 *
 * @author amaksimov
 */
public class BaseOperationSerializer extends StdSerializer<BaseOperation> {

/*	private static final String authorField = "author";
	private static final String permlinkField = "permlink";
	private static final String voterField = "voter";
	private static final String weightField = "weight";

	private static final String parentAuthorField = "parent_author";
	private static final String parentPermlinkField = "parent_permlink";

	private static final String titleField = "title";
	private static final String bodyField = "body";
	private static final String jsonMetadataField = "json_metadata";

	private static final String parentFromField = "from";
	private static final String parentToField = "to";
	private static final String parentAmountField = "amount";
	private static final String parentMemoField = "memo";*/

	private static final long serialVersionUID = 1L;

	public BaseOperationSerializer() {
		this(null);
	}

	public BaseOperationSerializer(Class<BaseOperation> t) {
		super(t);
	}

	@Override
	public void serialize(BaseOperation operation, JsonGenerator jgen, SerializerProvider provider)
			throws IOException, JsonProcessingException {
		//TODO уйти от явного определения
		jgen.writeStartArray();
		jgen.writeString(operation.getType().getCaption().toLowerCase());
		if (operation instanceof VoteDto) {
			serialize(operation, VoteDto.class, provider, jgen);
		} else if (operation instanceof CommentDto) {
			serialize(operation, CommentDto.class, provider, jgen);
		} else if (operation instanceof CommentOptionsDto) {
			serialize(operation, CommentOptionsDto.class, provider, jgen);
		} else if (operation instanceof TransferDto) {
			serialize(operation, TransferDto.class, provider, jgen);
		}
		jgen.writeEndArray();
	}

	private void serialize(BaseOperation operation, Class<? extends BaseOperation > aClass, SerializerProvider provider, JsonGenerator jgen) throws JsonProcessingException, IOException {
		JavaType javaType = provider.constructType(aClass);
		BeanDescription beanDesc = provider.getConfig().introspect(javaType);
		JsonSerializer<Object> serializer = BeanSerializerFactory.instance.findBeanSerializer(provider,
				javaType, beanDesc);
		serializer.serialize(aClass.cast(operation), jgen, provider);

	}

}


text:
require 'spec_helper'
require 'open3'

describe 'detect script', :integration do

  it 'should return zero if success' do
    Dir.mktmpdir do |root|
      FileUtils.cp_r 'spec/fixtures/integration_valid/.', root

      with_memory_limit('1G') do
        Open3.popen3("bin/detect #{root}") do |stdin, stdout, stderr, wait_thr|
          expect(wait_thr.value).to be_success
        end
      end

    end
  end

  it 'should fail to detect when no containers detect' do
    Dir.mktmpdir do |root|
      with_memory_limit('1G') do
        Open3.popen3("bin/detect #{root}") do |stdin, stdout, stderr, wait_thr|
          expect(wait_thr.value).to_not be_success
        end
      end
    end
  end

  def with_memory_limit(memory_limit)
    previous_value = ENV['MEMORY_LIMIT']
    begin
      ENV['MEMORY_LIMIT'] = memory_limit
      yield
    ensure
      ENV['MEMORY_LIMIT'] = previous_value
    end
  end

end


text:
'use strict';
var gulp = require('gulp');
var es = require('event-stream');
var sass = require('gulp-sass');
var less = require('gulp-less');
//var sourcemaps = require('gulp-sourcemaps');
var autoprefixer = require('gulp-autoprefixer');
var concat = require('gulp-concat');
var order = require('gulp-order');
var size = require('gulp-size');
var minifycss = require('gulp-minify-css');
var gulpif = require('gulp-if');
var constants = require('../common/constants')();
var helper = require('../common/helper');
var gmux = require('gulp-mux');
var gutil = require('gulp-util');

var taskFont = function(constants) {

    var dest = constants.dist.distFolder;
    dest = helper.isMobile(constants) ? dest + '/www/' + constants.fonts.dest : dest + '/' + constants.fonts.dest;

    var srcFont = constants.fonts['src_' + constants.targetName];
    if (!srcFont) {
        srcFont = constants.fonts.src;
    }
    return gulp.src(srcFont)
        .pipe(gulp.dest(dest))
        .pipe(size({
            title: 'font:' + constants.targetName
        }));
};

gulp.task('font', 'Copy fonts.', function(done) {
    var taskname = 'font';
    gmux.targets.setClientFolder(constants.clientFolder);
    if (global.options === null) {
        global.options = gmux.targets.askForMultipleTargets(taskname);
    }
    return gmux.createAndRunTasks(gulp, taskFont, taskname, global.options.target, global.options.mode, constants, done);
});

var taskStyle = function(constants, done) {
    var dest = constants.dist.distFolder;
    dest = helper.isMobile(constants) ? dest + '/www/' + constants.style.dest : dest + '/' + constants.style.dest;

    var sassFiles = gulp.src(constants.style.sass.src)
        .pipe(sass({
            errLogToConsole: false
        }).on('error', sass.logError))
        .on('error', function(err) {
            gutil.beep();
            gutil.log(gutil.colors.red('Sass failed'));
        })
        .pipe(concat('sass.css'));

    var lessFiles = gulp.src(constants.style.less.src)
        .pipe(less())
        .pipe(concat('less.css'));

    es.concat(lessFiles, sassFiles)
        .pipe(order(['less.css', 'sass.css']))
        .pipe(concat(constants.style.destName))
        .pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'))
        .pipe(gulpif(constants.mode === 'prod', minifycss()))
        .pipe(gulp.dest(dest))
        .pipe(size({
            title: 'css files',
            showFiles: true
        }))
        .pipe(es.wait(done));
};

gulp.task('style', 'Generates a bundle for style files.', function(done) {
    var taskname = 'style';
    gmux.targets.setClientFolder(constants.clientFolder);
    if (global.options === null) {
        global.options = gmux.targets.askForMultipleTargets(taskname);
    }
    gmux.createAndRunTasks(gulp, taskStyle, taskname, global.options.target, global.options.mode, constants, done);
});


text:
package org.apache.isis.core.metamodel.facets.properties.property;

import java.lang.reflect.Method;
import org.junit.Before;
import org.apache.isis.applib.annotation.Mandatory;
import org.apache.isis.core.metamodel.facetapi.Facet;
import org.apache.isis.core.metamodel.facets.AbstractFacetFactoryTest;
import org.apache.isis.core.metamodel.facets.FacetFactory.ProcessMethodContext;
import org.apache.isis.core.metamodel.facets.properties.property.mandatory.MandatoryFacetForMandatoryAnnotationOnProperty;
import org.apache.isis.core.metamodel.facets.objectvalue.mandatory.MandatoryFacet;

public class MandatoryAnnotationFacetFactoryTest extends AbstractFacetFactoryTest {

    private PropertyAnnotationFacetFactory facetFactory;

    @Before
    public void setUp() throws Exception {
        super.setUp();
        facetFactory = new PropertyAnnotationFacetFactory();
    }

    public void testMandatoryAnnotationPickedUpOnProperty() {

        class Customer {
            @Mandatory
            public String getFirstName() {
                return null;
            }
        }
        final Method method = findMethod(Customer.class, "getFirstName");

        facetFactory.processOptional(new ProcessMethodContext(Customer.class, null, null, method, methodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(MandatoryFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof MandatoryFacetForMandatoryAnnotationOnProperty);
    }

}


text:
<?php

// Protection against direct access
defined('AKEEBAENGINE') or die();

/**
 * System Restore Point - Directories
 */
class AEFilterSrpdirs extends AEAbstractFilter
{
	protected $params				= array();
	protected $alloweddirs			= array();
	protected $strictalloweddirs	= array();

	function __construct()
	{
		$this->object	 = 'dir';
		$this->subtype	 = 'all';
		$this->method	 = 'api';

		if (AEFactory::getKettenrad()->getTag() != 'restorepoint')
		{
			$this->enabled = false;
		}
		else
		{
			$this->init();
		}
	}

	protected function init()
	{
		// Fetch the configuration
		$config			 = AEFactory::getConfiguration();
		$this->params	 = (object) array(
				'type'			 => $config->get('core.filters.srp.type', 'component'),
				'group'			 => $config->get('core.filters.srp.group', 'group'),
				'name'			 => $config->get('core.filters.srp.name', 'name'),
				'customdirs'	 => $config->get('core.filters.srp.customdirs', array()),
				'customfiles'	 => $config->get('core.filters.srp.customfiles', array()),
				'langfiles'		 => $config->get('core.filters.srp.langfiles', array())
		);

		$this->alloweddirs = array();

		// Process custom directories
		if (is_array($this->params->customdirs))
		{
			foreach ($this->params->customdirs as $dir)
			{
				$dir				 = $this->treatDirectory($dir);
				$this->alloweddirs[] = $dir;
			}
		}

		// Process custom files
		if (is_array($this->params->customfiles))
		{
			foreach ($this->params->customfiles as $file)
			{
				$dir = dirname($file);
				$dir = $this->treatDirectory($dir);

				if (!in_array($dir, $this->strictalloweddirs))
				{
					$this->strictalloweddirs[] = $dir;
				}

				if (!in_array($dir, $this->alloweddirs))
				{
					$this->alloweddirs[] = $dir;
				}
			}
		}

		$this->alloweddirs[] = 'language';
		$this->alloweddirs[] = 'administrator/language';

		// Process core directorires
		switch ($this->params->type)
		{
			case 'component':
				$this->alloweddirs[] = 'components/com_' . $this->params->name;
				$this->alloweddirs[] = 'administrator/components/com_' . $this->params->name;
				$this->alloweddirs[] = 'media/com_' . $this->params->name;
				$this->alloweddirs[] = 'media/' . $this->params->name;
				break;

			case 'plugin':
				// This is required for Joomla! 1.5 compatibility
				// $this->alloweddirs[] = 'plugins/'.$this->params->group;
				// This is required for Joomla! 1.6 compatibility
				$this->alloweddirs[] = 'plugins/' . $this->params->group . '/' . $this->params->name;
				break;

			case 'module':
				if ($this->params->group == 'admin')
				{
					$this->alloweddirs[] = 'administrator/modules/mod_' . $this->params->name;
				}
				else
				{
					$this->alloweddirs[] = 'modules/mod_' . $this->params->name;
				}

				break;

			case 'template':
				if ($this->params->group == 'admin')
				{
					$this->alloweddirs[] = 'administrator/templates/' . $this->params->name;
				}
				else
				{
					$this->alloweddirs[] = 'templates/' . $this->params->name;
				}
				break;

			default:
				$this->alloweddirs = array();
		}
	}

	protected function is_excluded_by_api($test, $root)
	{
		// Allow scanning the root
		if (empty($test))
		{
			return false;
		}

		if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')
		{
			$siteRoot	 = rtrim(AEPlatform::getInstance()->get_site_root(), '/' . DIRECTORY_SEPARATOR);
			$thisTest	 = rtrim($test, '/' . DIRECTORY_SEPARATOR);

			if ($thisTest == $siteRoot)
			{
				return false;
			}
		}

		// If the directory is a subdirectory of a strictly allowed path, exclude it
		if (!empty($this->strictalloweddirs))
		{
			foreach ($this->strictalloweddirs as $dir)
			{
				$len = strlen($dir);

				if (strlen($test) > $len)
				{
					if ($test == $dir)
					{
						return false;
					}

					if (substr($test, 0, $len + 1) == $dir . '/')
					{
						return true;
					}
				}
			}
		}

		// Look if the directory is within the allowed paths
		foreach ($this->alloweddirs as $dir)
		{
			$len = strlen($dir);
			if (strlen($test) < $len)
			{
				// We have to allow scanning parent directories
				$len = strlen($test);
				if (substr($dir, 0, $len) == $test)
				{
					// We need a different slash count. If the slash count is the same
					// we have a border case, e.g. administrator/com_admin is perceived
					// as the parent to administrator/com_adminTOOLS which is, of course,
					// false!

					$stringStatsTest = count_chars($test, 1);
					$stringStatsDir	 = count_chars($dir, 1);

					if (!array_key_exists(47, $stringStatsTest) || !array_key_exists(47, $stringStatsDir))
					{
						return false;
					}

					if ($stringStatsTest[47] == $stringStatsDir[47])
					{
						// Border case!
						continue;
					}
					else
					{
						return false;
					}
				}
			}
			else
			{
				// We have to fully allow explicitly allowed directories
				if (substr($test, 0, $len) == $dir)
				{
					return false;
				}
			}
		}

		// Exclude directories by default
		return true;
	}

	private static function treatDirectory($directory)
	{
		static $site_root = null;

		if (is_null($site_root))
		{
			$site_root = AEUtilFilesystem::TrimTrailingSlash(AEUtilFilesystem::TranslateWinPath(JPATH_ROOT));
		}

		$directory = AEUtilFilesystem::TrimTrailingSlash(AEUtilFilesystem::TranslateWinPath($directory));

		// Trim site root from beginning of directory
		if (substr($directory, 0, strlen($site_root)) == $site_root)
		{
			$directory = substr($directory, strlen($site_root));

			if (substr($directory, 0, 1) == '/')
			{
				$directory = substr($directory, 1);
			}
		}

		return $directory;
	}

}


text:
// Copyright 2018 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * Level.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
 */

package com.google.api.ads.adwords.axis.v201809.cm;

public class Level implements java.io.Serializable {
    private java.lang.String _value_;
    private static java.util.HashMap _table_ = new java.util.HashMap();

    // Constructor
    protected Level(java.lang.String value) {
        _value_ = value;
        _table_.put(_value_,this);
    }

    public static final java.lang.String _CREATIVE = "CREATIVE";
    public static final java.lang.String _ADGROUP = "ADGROUP";
    public static final java.lang.String _CAMPAIGN = "CAMPAIGN";
    public static final java.lang.String _UNKNOWN = "UNKNOWN";
    public static final Level CREATIVE = new Level(_CREATIVE);
    public static final Level ADGROUP = new Level(_ADGROUP);
    public static final Level CAMPAIGN = new Level(_CAMPAIGN);
    public static final Level UNKNOWN = new Level(_UNKNOWN);
    public java.lang.String getValue() { return _value_;}
    public static Level fromValue(java.lang.String value)
          throws java.lang.IllegalArgumentException {
        Level enumeration = (Level)
            _table_.get(value);
        if (enumeration==null) throw new java.lang.IllegalArgumentException();
        return enumeration;
    }
    public static Level fromString(java.lang.String value)
          throws java.lang.IllegalArgumentException {
        return fromValue(value);
    }
    public boolean equals(java.lang.Object obj) {return (obj == this);}
    public int hashCode() { return toString().hashCode();}
    public java.lang.String toString() { return _value_;}
    public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new org.apache.axis.encoding.ser.EnumSerializer(
            _javaType, _xmlType);
    }
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new org.apache.axis.encoding.ser.EnumDeserializer(
            _javaType, _xmlType);
    }
    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(Level.class);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201809", "Level"));
    }
    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

}


text:
package com.amazonaws.services.iotfleetwise.model;

import javax.annotation.Generated;

/**
 *

 * The request has conflicting operations. This can occur if you're trying to perform more than one operation on the
 * same resource at the same time.
 *

 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ConflictException extends com.amazonaws.services.iotfleetwise.model.AWSIoTFleetWiseException {
    private static final long serialVersionUID = 1L;

    /**
     *

     * The resource on which there are conflicting operations.
     *

     */
    private String resource;
    /**
     *

     * The type of resource on which there are conflicting operations..
     *

     */
    private String resourceType;

    /**
     * Constructs a new ConflictException with the specified error message.
     *
     * @param message
     *        Describes the error encountered.
     */
    public ConflictException(String message) {
        super(message);
    }

    /**
     *

     * The resource on which there are conflicting operations.
     *

     *
     * @param resource
     *        The resource on which there are conflicting operations.
     */

    @com.fasterxml.jackson.annotation.JsonProperty("resource")
    public void setResource(String resource) {
        this.resource = resource;
    }

    /**
     *

     * The resource on which there are conflicting operations.
     *

     *
     * @return The resource on which there are conflicting operations.
     */

    @com.fasterxml.jackson.annotation.JsonProperty("resource")
    public String getResource() {
        return this.resource;
    }

    /**
     *

     * The resource on which there are conflicting operations.
     *

     *
     * @param resource
     *        The resource on which there are conflicting operations.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ConflictException withResource(String resource) {
        setResource(resource);
        return this;
    }

    /**
     *

     * The type of resource on which there are conflicting operations..
     *

     *
     * @param resourceType
     *        The type of resource on which there are conflicting operations..
     */

    @com.fasterxml.jackson.annotation.JsonProperty("resourceType")
    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }

    /**
     *

     * The type of resource on which there are conflicting operations..
     *

     *
     * @return The type of resource on which there are conflicting operations..
     */

    @com.fasterxml.jackson.annotation.JsonProperty("resourceType")
    public String getResourceType() {
        return this.resourceType;
    }

    /**
     *

     * The type of resource on which there are conflicting operations..
     *

     *
     * @param resourceType
     *        The type of resource on which there are conflicting operations..
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public ConflictException withResourceType(String resourceType) {
        setResourceType(resourceType);
        return this;
    }

}


text:
<?php

namespace spec\Aisel\PageBundle\Entity;

use PhpSpec\ObjectBehavior;

/**
 * @author Ivan Proskoryakov <volgodark@gmail.com>
 */
class PageSpec extends ObjectBehavior
{
    public function it_is_initializable()
    {
        $this->shouldHaveType('Aisel\PageBundle\Entity\Page');
    }

    public function it_should_not_have_id()
    {
        $this->getId()->shouldReturn(null);
    }

}