text:
/**
 * DocumentLineDetail.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.2.1 Jun 14, 2005 (09:15:57 EDT) WSDL2Java emitter.
 */

package com.avalara.avatax.services.account;

public class DocumentLineDetail  implements java.io.Serializable {
    private long addressId;
    private java.lang.String countyFips;
    private java.lang.String country;
    private long documentLineDetailId;
    private long documentLineId;
    private java.math.BigDecimal exemptAmount;
    private java.lang.Long exemptReasonId;
    private java.lang.Boolean inState;
    private java.lang.String jurisCode;
    private java.lang.Integer jurisdictionId;
    private java.lang.String jurisName;
    private com.avalara.avatax.services.account.JurisTypeId jurisTypeId;
    private java.math.BigDecimal nonTaxableAmount;
    private java.lang.Integer nonTaxableRuleId;
    private com.avalara.avatax.services.account.TaxRuleTypeId nonTaxableTypeId;
    private java.math.BigDecimal rate;
    private java.lang.String rateTypeId;
    private java.lang.Integer rateRuleId;
    private java.lang.Integer rateSourceId;
    private java.lang.String region;
    private java.lang.String SERCode;
    private java.lang.String sourcing;
    private java.lang.String signatureCode;
    private java.lang.String stateCode;
    private java.lang.String stateAssignedNo;
    private java.math.BigDecimal tax;
    private java.math.BigDecimal taxableAmount;
    private java.math.BigDecimal taxCalculated;
    private com.avalara.avatax.services.account.TaxTypeId taxTypeId;
    private java.lang.String taxName;
    private int taxAuthorityTypeId;
    private java.lang.Integer taxRegionId;
    private java.math.BigDecimal taxOverride;

    public DocumentLineDetail() {
    }

    public DocumentLineDetail(
           long addressId,
           java.lang.String countyFips,
           java.lang.String country,
           long documentLineDetailId,
           long documentLineId,
           java.math.BigDecimal exemptAmount,
           java.lang.Long exemptReasonId,
           java.lang.Boolean inState,
           java.lang.String jurisCode,
           java.lang.Integer jurisdictionId,
           java.lang.String jurisName,
           com.avalara.avatax.services.account.JurisTypeId jurisTypeId,
           java.math.BigDecimal nonTaxableAmount,
           java.lang.Integer nonTaxableRuleId,
           com.avalara.avatax.services.account.TaxRuleTypeId nonTaxableTypeId,
           java.math.BigDecimal rate,
           java.lang.String rateTypeId,
           java.lang.Integer rateRuleId,
           java.lang.Integer rateSourceId,
           java.lang.String region,
           java.lang.String SERCode,
           java.lang.String sourcing,
           java.lang.String signatureCode,
           java.lang.String stateCode,
           java.lang.String stateAssignedNo,
           java.math.BigDecimal tax,
           java.math.BigDecimal taxableAmount,
           java.math.BigDecimal taxCalculated,
           com.avalara.avatax.services.account.TaxTypeId taxTypeId,
           java.lang.String taxName,
           int taxAuthorityTypeId,
           java.lang.Integer taxRegionId,
           java.math.BigDecimal taxOverride) {
           this.addressId = addressId;
           this.countyFips = countyFips;
           this.country = country;
           this.documentLineDetailId = documentLineDetailId;
           this.documentLineId = documentLineId;
           this.exemptAmount = exemptAmount;
           this.exemptReasonId = exemptReasonId;
           this.inState = inState;
           this.jurisCode = jurisCode;
           this.jurisdictionId = jurisdictionId;
           this.jurisName = jurisName;
           this.jurisTypeId = jurisTypeId;
           this.nonTaxableAmount = nonTaxableAmount;
           this.nonTaxableRuleId = nonTaxableRuleId;
           this.nonTaxableTypeId = nonTaxableTypeId;
           this.rate = rate;
           this.rateTypeId = rateTypeId;
           this.rateRuleId = rateRuleId;
           this.rateSourceId = rateSourceId;
           this.region = region;
           this.SERCode = SERCode;
           this.sourcing = sourcing;
           this.signatureCode = signatureCode;
           this.stateCode = stateCode;
           this.stateAssignedNo = stateAssignedNo;
           this.tax = tax;
           this.taxableAmount = taxableAmount;
           this.taxCalculated = taxCalculated;
           this.taxTypeId = taxTypeId;
           this.taxName = taxName;
           this.taxAuthorityTypeId = taxAuthorityTypeId;
           this.taxRegionId = taxRegionId;
           this.taxOverride = taxOverride;
    }

    /**
     * Gets the addressId value for this DocumentLineDetail.
     *
     * @return addressId
     */
    public long getAddressId() {
        return addressId;
    }

    /**
     * Sets the addressId value for this DocumentLineDetail.
     *
     * @param addressId
     */
    public void setAddressId(long addressId) {
        this.addressId = addressId;
    }

    /**
     * Gets the countyFips value for this DocumentLineDetail.
     *
     * @return countyFips
     */
    public java.lang.String getCountyFips() {
        return countyFips;
    }

    /**
     * Sets the countyFips value for this DocumentLineDetail.
     *
     * @param countyFips
     */
    public void setCountyFips(java.lang.String countyFips) {
        this.countyFips = countyFips;
    }

    /**
     * Gets the country value for this DocumentLineDetail.
     *
     * @return country
     */
    public java.lang.String getCountry() {
        return country;
    }

    /**
     * Sets the country value for this DocumentLineDetail.
     *
     * @param country
     */
    public void setCountry(java.lang.String country) {
        this.country = country;
    }

    /**
     * Gets the documentLineDetailId value for this DocumentLineDetail.
     *
     * @return documentLineDetailId
     */
    public long getDocumentLineDetailId() {
        return documentLineDetailId;
    }

    /**
     * Sets the documentLineDetailId value for this DocumentLineDetail.
     *
     * @param documentLineDetailId
     */
    public void setDocumentLineDetailId(long documentLineDetailId) {
        this.documentLineDetailId = documentLineDetailId;
    }

    /**
     * Gets the documentLineId value for this DocumentLineDetail.
     *
     * @return documentLineId
     */
    public long getDocumentLineId() {
        return documentLineId;
    }

    /**
     * Sets the documentLineId value for this DocumentLineDetail.
     *
     * @param documentLineId
     */
    public void setDocumentLineId(long documentLineId) {
        this.documentLineId = documentLineId;
    }

    /**
     * Gets the exemptAmount value for this DocumentLineDetail.
     *
     * @return exemptAmount
     */
    public java.math.BigDecimal getExemptAmount() {
        return exemptAmount;
    }

    /**
     * Sets the exemptAmount value for this DocumentLineDetail.
     *
     * @param exemptAmount
     */
    public void setExemptAmount(java.math.BigDecimal exemptAmount) {
        this.exemptAmount = exemptAmount;
    }

    /**
     * Gets the exemptReasonId value for this DocumentLineDetail.
     *
     * @return exemptReasonId
     */
    public java.lang.Long getExemptReasonId() {
        return exemptReasonId;
    }

    /**
     * Sets the exemptReasonId value for this DocumentLineDetail.
     *
     * @param exemptReasonId
     */
    public void setExemptReasonId(java.lang.Long exemptReasonId) {
        this.exemptReasonId = exemptReasonId;
    }

    /**
     * Gets the inState value for this DocumentLineDetail.
     *
     * @return inState
     */
    public java.lang.Boolean getInState() {
        return inState;
    }

    /**
     * Sets the inState value for this DocumentLineDetail.
     *
     * @param inState
     */
    public void setInState(java.lang.Boolean inState) {
        this.inState = inState;
    }

    /**
     * Gets the jurisCode value for this DocumentLineDetail.
     *
     * @return jurisCode
     */
    public java.lang.String getJurisCode() {
        return jurisCode;
    }

    /**
     * Sets the jurisCode value for this DocumentLineDetail.
     *
     * @param jurisCode
     */
    public void setJurisCode(java.lang.String jurisCode) {
        this.jurisCode = jurisCode;
    }

    /**
     * Gets the jurisdictionId value for this DocumentLineDetail.
     *
     * @return jurisdictionId
     */
    public java.lang.Integer getJurisdictionId() {
        return jurisdictionId;
    }

    /**
     * Sets the jurisdictionId value for this DocumentLineDetail.
     *
     * @param jurisdictionId
     */
    public void setJurisdictionId(java.lang.Integer jurisdictionId) {
        this.jurisdictionId = jurisdictionId;
    }

    /**
     * Gets the jurisName value for this DocumentLineDetail.
     *
     * @return jurisName
     */
    public java.lang.String getJurisName() {
        return jurisName;
    }

    /**
     * Sets the jurisName value for this DocumentLineDetail.
     *
     * @param jurisName
     */
    public void setJurisName(java.lang.String jurisName) {
        this.jurisName = jurisName;
    }

    /**
     * Gets the jurisTypeId value for this DocumentLineDetail.
     *
     * @return jurisTypeId
     */
    public com.avalara.avatax.services.account.JurisTypeId getJurisTypeId() {
        return jurisTypeId;
    }

    /**
     * Sets the jurisTypeId value for this DocumentLineDetail.
     *
     * @param jurisTypeId
     */
    public void setJurisTypeId(com.avalara.avatax.services.account.JurisTypeId jurisTypeId) {
        this.jurisTypeId = jurisTypeId;
    }

    /**
     * Gets the nonTaxableAmount value for this DocumentLineDetail.
     *
     * @return nonTaxableAmount
     */
    public java.math.BigDecimal getNonTaxableAmount() {
        return nonTaxableAmount;
    }

    /**
     * Sets the nonTaxableAmount value for this DocumentLineDetail.
     *
     * @param nonTaxableAmount
     */
    public void setNonTaxableAmount(java.math.BigDecimal nonTaxableAmount) {
        this.nonTaxableAmount = nonTaxableAmount;
    }

    /**
     * Gets the nonTaxableRuleId value for this DocumentLineDetail.
     *
     * @return nonTaxableRuleId
     */
    public java.lang.Integer getNonTaxableRuleId() {
        return nonTaxableRuleId;
    }

    /**
     * Sets the nonTaxableRuleId value for this DocumentLineDetail.
     *
     * @param nonTaxableRuleId
     */
    public void setNonTaxableRuleId(java.lang.Integer nonTaxableRuleId) {
        this.nonTaxableRuleId = nonTaxableRuleId;
    }

    /**
     * Gets the nonTaxableTypeId value for this DocumentLineDetail.
     *
     * @return nonTaxableTypeId
     */
    public com.avalara.avatax.services.account.TaxRuleTypeId getNonTaxableTypeId() {
        return nonTaxableTypeId;
    }

    /**
     * Sets the nonTaxableTypeId value for this DocumentLineDetail.
     *
     * @param nonTaxableTypeId
     */
    public void setNonTaxableTypeId(com.avalara.avatax.services.account.TaxRuleTypeId nonTaxableTypeId) {
        this.nonTaxableTypeId = nonTaxableTypeId;
    }

    /**
     * Gets the rate value for this DocumentLineDetail.
     *
     * @return rate
     */
    public java.math.BigDecimal getRate() {
        return rate;
    }

    /**
     * Sets the rate value for this DocumentLineDetail.
     *
     * @param rate
     */
    public void setRate(java.math.BigDecimal rate) {
        this.rate = rate;
    }

    /**
     * Gets the rateTypeId value for this DocumentLineDetail.
     *
     * @return rateTypeId
     */
    public java.lang.String getRateTypeId() {
        return rateTypeId;
    }

    /**
     * Sets the rateTypeId value for this DocumentLineDetail.
     *
     * @param rateTypeId
     */
    public void setRateTypeId(java.lang.String rateTypeId) {
        this.rateTypeId = rateTypeId;
    }

    /**
     * Gets the rateRuleId value for this DocumentLineDetail.
     *
     * @return rateRuleId
     */
    public java.lang.Integer getRateRuleId() {
        return rateRuleId;
    }

    /**
     * Sets the rateRuleId value for this DocumentLineDetail.
     *
     * @param rateRuleId
     */
    public void setRateRuleId(java.lang.Integer rateRuleId) {
        this.rateRuleId = rateRuleId;
    }

    /**
     * Gets the rateSourceId value for this DocumentLineDetail.
     *
     * @return rateSourceId
     */
    public java.lang.Integer getRateSourceId() {
        return rateSourceId;
    }

    /**
     * Sets the rateSourceId value for this DocumentLineDetail.
     *
     * @param rateSourceId
     */
    public void setRateSourceId(java.lang.Integer rateSourceId) {
        this.rateSourceId = rateSourceId;
    }

    /**
     * Gets the region value for this DocumentLineDetail.
     *
     * @return region
     */
    public java.lang.String getRegion() {
        return region;
    }

    /**
     * Sets the region value for this DocumentLineDetail.
     *
     * @param region
     */
    public void setRegion(java.lang.String region) {
        this.region = region;
    }

    /**
     * Gets the SERCode value for this DocumentLineDetail.
     *
     * @return SERCode
     */
    public java.lang.String getSERCode() {
        return SERCode;
    }

    /**
     * Sets the SERCode value for this DocumentLineDetail.
     *
     * @param SERCode
     */
    public void setSERCode(java.lang.String SERCode) {
        this.SERCode = SERCode;
    }

    /**
     * Gets the sourcing value for this DocumentLineDetail.
     *
     * @return sourcing
     */
    public java.lang.String getSourcing() {
        return sourcing;
    }

    /**
     * Sets the sourcing value for this DocumentLineDetail.
     *
     * @param sourcing
     */
    public void setSourcing(java.lang.String sourcing) {
        this.sourcing = sourcing;
    }

    /**
     * Gets the signatureCode value for this DocumentLineDetail.
     *
     * @return signatureCode
     */
    public java.lang.String getSignatureCode() {
        return signatureCode;
    }

    /**
     * Sets the signatureCode value for this DocumentLineDetail.
     *
     * @param signatureCode
     */
    public void setSignatureCode(java.lang.String signatureCode) {
        this.signatureCode = signatureCode;
    }

    /**
     * Gets the stateCode value for this DocumentLineDetail.
     *
     * @return stateCode
     */
    public java.lang.String getStateCode() {
        return stateCode;
    }

    /**
     * Sets the stateCode value for this DocumentLineDetail.
     *
     * @param stateCode
     */
    public void setStateCode(java.lang.String stateCode) {
        this.stateCode = stateCode;
    }

    /**
     * Gets the stateAssignedNo value for this DocumentLineDetail.
     *
     * @return stateAssignedNo
     */
    public java.lang.String getStateAssignedNo() {
        return stateAssignedNo;
    }

    /**
     * Sets the stateAssignedNo value for this DocumentLineDetail.
     *
     * @param stateAssignedNo
     */
    public void setStateAssignedNo(java.lang.String stateAssignedNo) {
        this.stateAssignedNo = stateAssignedNo;
    }

    /**
     * Gets the tax value for this DocumentLineDetail.
     *
     * @return tax
     */
    public java.math.BigDecimal getTax() {
        return tax;
    }

    /**
     * Sets the tax value for this DocumentLineDetail.
     *
     * @param tax
     */
    public void setTax(java.math.BigDecimal tax) {
        this.tax = tax;
    }

    /**
     * Gets the taxableAmount value for this DocumentLineDetail.
     *
     * @return taxableAmount
     */
    public java.math.BigDecimal getTaxableAmount() {
        return taxableAmount;
    }

    /**
     * Sets the taxableAmount value for this DocumentLineDetail.
     *
     * @param taxableAmount
     */
    public void setTaxableAmount(java.math.BigDecimal taxableAmount) {
        this.taxableAmount = taxableAmount;
    }

    /**
     * Gets the taxCalculated value for this DocumentLineDetail.
     *
     * @return taxCalculated
     */
    public java.math.BigDecimal getTaxCalculated() {
        return taxCalculated;
    }

    /**
     * Sets the taxCalculated value for this DocumentLineDetail.
     *
     * @param taxCalculated
     */
    public void setTaxCalculated(java.math.BigDecimal taxCalculated) {
        this.taxCalculated = taxCalculated;
    }

    /**
     * Gets the taxTypeId value for this DocumentLineDetail.
     *
     * @return taxTypeId
     */
    public com.avalara.avatax.services.account.TaxTypeId getTaxTypeId() {
        return taxTypeId;
    }

    /**
     * Sets the taxTypeId value for this DocumentLineDetail.
     *
     * @param taxTypeId
     */
    public void setTaxTypeId(com.avalara.avatax.services.account.TaxTypeId taxTypeId) {
        this.taxTypeId = taxTypeId;
    }

    /**
     * Gets the taxName value for this DocumentLineDetail.
     *
     * @return taxName
     */
    public java.lang.String getTaxName() {
        return taxName;
    }

    /**
     * Sets the taxName value for this DocumentLineDetail.
     *
     * @param taxName
     */
    public void setTaxName(java.lang.String taxName) {
        this.taxName = taxName;
    }

    /**
     * Gets the taxAuthorityTypeId value for this DocumentLineDetail.
     *
     * @return taxAuthorityTypeId
     */
    public int getTaxAuthorityTypeId() {
        return taxAuthorityTypeId;
    }

    /**
     * Sets the taxAuthorityTypeId value for this DocumentLineDetail.
     *
     * @param taxAuthorityTypeId
     */
    public void setTaxAuthorityTypeId(int taxAuthorityTypeId) {
        this.taxAuthorityTypeId = taxAuthorityTypeId;
    }

    /**
     * Gets the taxRegionId value for this DocumentLineDetail.
     *
     * @return taxRegionId
     */
    public java.lang.Integer getTaxRegionId() {
        return taxRegionId;
    }

    /**
     * Sets the taxRegionId value for this DocumentLineDetail.
     *
     * @param taxRegionId
     */
    public void setTaxRegionId(java.lang.Integer taxRegionId) {
        this.taxRegionId = taxRegionId;
    }

    /**
     * Gets the taxOverride value for this DocumentLineDetail.
     *
     * @return taxOverride
     */
    public java.math.BigDecimal getTaxOverride() {
        return taxOverride;
    }

    /**
     * Sets the taxOverride value for this DocumentLineDetail.
     *
     * @param taxOverride
     */
    public void setTaxOverride(java.math.BigDecimal taxOverride) {
        this.taxOverride = taxOverride;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof DocumentLineDetail)) return false;
        DocumentLineDetail other = (DocumentLineDetail) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true &&
            this.addressId == other.getAddressId() &&
            ((this.countyFips==null && other.getCountyFips()==null) ||
             (this.countyFips!=null &&
              this.countyFips.equals(other.getCountyFips()))) &&
            ((this.country==null && other.getCountry()==null) ||
             (this.country!=null &&
              this.country.equals(other.getCountry()))) &&
            this.documentLineDetailId == other.getDocumentLineDetailId() &&
            this.documentLineId == other.getDocumentLineId() &&
            ((this.exemptAmount==null && other.getExemptAmount()==null) ||
             (this.exemptAmount!=null &&
              this.exemptAmount.equals(other.getExemptAmount()))) &&
            ((this.exemptReasonId==null && other.getExemptReasonId()==null) ||
             (this.exemptReasonId!=null &&
              this.exemptReasonId.equals(other.getExemptReasonId()))) &&
            ((this.inState==null && other.getInState()==null) ||
             (this.inState!=null &&
              this.inState.equals(other.getInState()))) &&
            ((this.jurisCode==null && other.getJurisCode()==null) ||
             (this.jurisCode!=null &&
              this.jurisCode.equals(other.getJurisCode()))) &&
            ((this.jurisdictionId==null && other.getJurisdictionId()==null) ||
             (this.jurisdictionId!=null &&
              this.jurisdictionId.equals(other.getJurisdictionId()))) &&
            ((this.jurisName==null && other.getJurisName()==null) ||
             (this.jurisName!=null &&
              this.jurisName.equals(other.getJurisName()))) &&
            ((this.jurisTypeId==null && other.getJurisTypeId()==null) ||
             (this.jurisTypeId!=null &&
              this.jurisTypeId.equals(other.getJurisTypeId()))) &&
            ((this.nonTaxableAmount==null && other.getNonTaxableAmount()==null) ||
             (this.nonTaxableAmount!=null &&
              this.nonTaxableAmount.equals(other.getNonTaxableAmount()))) &&
            ((this.nonTaxableRuleId==null && other.getNonTaxableRuleId()==null) ||
             (this.nonTaxableRuleId!=null &&
              this.nonTaxableRuleId.equals(other.getNonTaxableRuleId()))) &&
            ((this.nonTaxableTypeId==null && other.getNonTaxableTypeId()==null) ||
             (this.nonTaxableTypeId!=null &&
              this.nonTaxableTypeId.equals(other.getNonTaxableTypeId()))) &&
            ((this.rate==null && other.getRate()==null) ||
             (this.rate!=null &&
              this.rate.equals(other.getRate()))) &&
            ((this.rateTypeId==null && other.getRateTypeId()==null) ||
             (this.rateTypeId!=null &&
              this.rateTypeId.equals(other.getRateTypeId()))) &&
            ((this.rateRuleId==null && other.getRateRuleId()==null) ||
             (this.rateRuleId!=null &&
              this.rateRuleId.equals(other.getRateRuleId()))) &&
            ((this.rateSourceId==null && other.getRateSourceId()==null) ||
             (this.rateSourceId!=null &&
              this.rateSourceId.equals(other.getRateSourceId()))) &&
            ((this.region==null && other.getRegion()==null) ||
             (this.region!=null &&
              this.region.equals(other.getRegion()))) &&
            ((this.SERCode==null && other.getSERCode()==null) ||
             (this.SERCode!=null &&
              this.SERCode.equals(other.getSERCode()))) &&
            ((this.sourcing==null && other.getSourcing()==null) ||
             (this.sourcing!=null &&
              this.sourcing.equals(other.getSourcing()))) &&
            ((this.signatureCode==null && other.getSignatureCode()==null) ||
             (this.signatureCode!=null &&
              this.signatureCode.equals(other.getSignatureCode()))) &&
            ((this.stateCode==null && other.getStateCode()==null) ||
             (this.stateCode!=null &&
              this.stateCode.equals(other.getStateCode()))) &&
            ((this.stateAssignedNo==null && other.getStateAssignedNo()==null) ||
             (this.stateAssignedNo!=null &&
              this.stateAssignedNo.equals(other.getStateAssignedNo()))) &&
            ((this.tax==null && other.getTax()==null) ||
             (this.tax!=null &&
              this.tax.equals(other.getTax()))) &&
            ((this.taxableAmount==null && other.getTaxableAmount()==null) ||
             (this.taxableAmount!=null &&
              this.taxableAmount.equals(other.getTaxableAmount()))) &&
            ((this.taxCalculated==null && other.getTaxCalculated()==null) ||
             (this.taxCalculated!=null &&
              this.taxCalculated.equals(other.getTaxCalculated()))) &&
            ((this.taxTypeId==null && other.getTaxTypeId()==null) ||
             (this.taxTypeId!=null &&
              this.taxTypeId.equals(other.getTaxTypeId()))) &&
            ((this.taxName==null && other.getTaxName()==null) ||
             (this.taxName!=null &&
              this.taxName.equals(other.getTaxName()))) &&
            this.taxAuthorityTypeId == other.getTaxAuthorityTypeId() &&
            ((this.taxRegionId==null && other.getTaxRegionId()==null) ||
             (this.taxRegionId!=null &&
              this.taxRegionId.equals(other.getTaxRegionId()))) &&
            ((this.taxOverride==null && other.getTaxOverride()==null) ||
             (this.taxOverride!=null &&
              this.taxOverride.equals(other.getTaxOverride())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        _hashCode += new Long(getAddressId()).hashCode();
        if (getCountyFips() != null) {
            _hashCode += getCountyFips().hashCode();
        }
        if (getCountry() != null) {
            _hashCode += getCountry().hashCode();
        }
        _hashCode += new Long(getDocumentLineDetailId()).hashCode();
        _hashCode += new Long(getDocumentLineId()).hashCode();
        if (getExemptAmount() != null) {
            _hashCode += getExemptAmount().hashCode();
        }
        if (getExemptReasonId() != null) {
            _hashCode += getExemptReasonId().hashCode();
        }
        if (getInState() != null) {
            _hashCode += getInState().hashCode();
        }
        if (getJurisCode() != null) {
            _hashCode += getJurisCode().hashCode();
        }
        if (getJurisName() != null) {
            _hashCode += getJurisName().hashCode();
        }
        if (getJurisTypeId() != null) {
            _hashCode += getJurisTypeId().hashCode();
        }
        if (getNonTaxableAmount() != null) {
            _hashCode += getNonTaxableAmount().hashCode();
        }
        if (getNonTaxableRuleId() != null) {
            _hashCode += getNonTaxableRuleId().hashCode();
        }
        if (getNonTaxableTypeId() != null) {
            _hashCode += getNonTaxableTypeId().hashCode();
        }
        if (getRate() != null) {
            _hashCode += getRate().hashCode();
        }
        if (getRateTypeId() != null) {
            _hashCode += getRateTypeId().hashCode();
        }
        if (getRateRuleId() != null) {
            _hashCode += getRateRuleId().hashCode();
        }
        if (getRateSourceId() != null) {
            _hashCode += getRateSourceId().hashCode();
        }
        if (getRegion() != null) {
            _hashCode += getRegion().hashCode();
        }
        if (getSERCode() != null) {
            _hashCode += getSERCode().hashCode();
        }
        if (getSourcing() != null) {
            _hashCode += getSourcing().hashCode();
        }
        if (getSignatureCode() != null) {
            _hashCode += getSignatureCode().hashCode();
        }
        if (getStateCode() != null) {
            _hashCode += getStateCode().hashCode();
        }
        if (getStateAssignedNo() != null) {
            _hashCode += getStateAssignedNo().hashCode();
        }
        if (getTax() != null) {
            _hashCode += getTax().hashCode();
        }
        if (getTaxableAmount() != null) {
            _hashCode += getTaxableAmount().hashCode();
        }
        if (getTaxCalculated() != null) {
            _hashCode += getTaxCalculated().hashCode();
        }
        if (getTaxTypeId() != null) {
            _hashCode += getTaxTypeId().hashCode();
        }
        if (getTaxName() != null) {
            _hashCode += getTaxName().hashCode();
        }
        _hashCode += getTaxAuthorityTypeId();
        if (getTaxRegionId() != null) {
            _hashCode += getTaxRegionId().hashCode();
        }
        if (getTaxOverride() != null) {
            _hashCode += getTaxOverride().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(DocumentLineDetail.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "DocumentLineDetail"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("addressId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "AddressId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("countyFips");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "CountyFips"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("country");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "Country"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("documentLineDetailId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "DocumentLineDetailId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("documentLineId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "DocumentLineId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("exemptAmount");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "ExemptAmount"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "decimal"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("exemptReasonId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "ExemptReasonId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("inState");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "InState"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("jurisCode");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "JurisCode"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("jurisdictionId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "JurisdictionId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("jurisName");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "JurisName"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("jurisTypeId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "JurisTypeId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "JurisTypeId"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("nonTaxableAmount");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "NonTaxableAmount"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "decimal"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("nonTaxableRuleId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "NonTaxableRuleId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("nonTaxableTypeId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "NonTaxableTypeId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "TaxRuleTypeId"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("rate");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "Rate"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "decimal"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("rateTypeId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "RateTypeId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("rateRuleId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "RateRuleId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("rateSourceId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "RateSourceId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("region");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "Region"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("SERCode");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "SERCode"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("sourcing");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "Sourcing"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("signatureCode");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "SignatureCode"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("stateCode");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "StateCode"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("stateAssignedNo");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "StateAssignedNo"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("tax");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "Tax"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "decimal"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("taxableAmount");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "TaxableAmount"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "decimal"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("taxCalculated");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "TaxCalculated"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "decimal"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("taxTypeId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "TaxTypeId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "TaxTypeId"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("taxName");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "TaxName"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("taxAuthorityTypeId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "TaxAuthorityTypeId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("taxRegionId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "TaxRegionId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("taxOverride");
        elemField.setXmlName(new javax.xml.namespace.QName("http://avatax.avalara.com/services", "TaxOverride"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "decimal"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    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.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  com.avalara.avatax.services.base.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}


text:
/**
 * Classes implementing meter data company endpoints.
 */
package energy.usef.mdc.event.endpoint;

redpajama_set_name: RedPajamaGithub


text:
using ppapi::NetAddressPrivateImpl;
using ppapi::host::NetErrorToPepperError;

namespace {

size_t g_num_instances = 0;

}  // namespace

namespace content {

PepperTCPServerSocketMessageFilter::PepperTCPServerSocketMessageFilter(
    ContentBrowserPepperHostFactory* factory,
    BrowserPpapiHostImpl* host,
    PP_Instance instance,
    bool private_api)
    : ppapi_host_(host->GetPpapiHost()),
      factory_(factory),
      instance_(instance),
      state_(STATE_BEFORE_LISTENING),
      external_plugin_(host->external_plugin()),
      private_api_(private_api),
      render_process_id_(0),
      render_frame_id_(0) {
  ++g_num_instances;
  DCHECK(factory_);
  DCHECK(ppapi_host_);
  if (!host->GetRenderFrameIDsForInstance(
          instance, &render_process_id_, &render_frame_id_)) {
    NOTREACHED();
  }
}

PepperTCPServerSocketMessageFilter::~PepperTCPServerSocketMessageFilter() {
  --g_num_instances;
}

// static
size_t PepperTCPServerSocketMessageFilter::GetNumInstances() {
  return g_num_instances;
}

scoped_refptr<base::TaskRunner>
PepperTCPServerSocketMessageFilter::OverrideTaskRunnerForMessage(
    const IPC::Message& message) {
  switch (message.type()) {
    case PpapiHostMsg_TCPServerSocket_Listen::ID:
      return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI);
    case PpapiHostMsg_TCPServerSocket_Accept::ID:
    case PpapiHostMsg_TCPServerSocket_StopListening::ID:
      return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
  }
  return NULL;
}

int32_t PepperTCPServerSocketMessageFilter::OnResourceMessageReceived(
    const IPC::Message& msg,
    ppapi::host::HostMessageContext* context) {
  PPAPI_BEGIN_MESSAGE_MAP(PepperTCPServerSocketMessageFilter, msg)
    PPAPI_DISPATCH_HOST_RESOURCE_CALL(PpapiHostMsg_TCPServerSocket_Listen,
                                      OnMsgListen)
    PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_TCPServerSocket_Accept,
                                        OnMsgAccept)
    PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(
        PpapiHostMsg_TCPServerSocket_StopListening, OnMsgStopListening)
  PPAPI_END_MESSAGE_MAP()
  return PP_ERROR_FAILED;
}

int32_t PepperTCPServerSocketMessageFilter::OnMsgListen(
    const ppapi::host::HostMessageContext* context,
    const PP_NetAddress_Private& addr,
    int32_t backlog) {
  DCHECK_CURRENTLY_ON(BrowserThread::UI);
  DCHECK(context);

  SocketPermissionRequest request =
      pepper_socket_utils::CreateSocketPermissionRequest(
          content::SocketPermissionRequest::TCP_LISTEN, addr);
  if (!pepper_socket_utils::CanUseSocketAPIs(external_plugin_,
                                             private_api_,
                                             &request,
                                             render_process_id_,
                                             render_frame_id_)) {
    return PP_ERROR_NOACCESS;
  }

  BrowserThread::PostTask(
      BrowserThread::IO,
      FROM_HERE,
      base::Bind(&PepperTCPServerSocketMessageFilter::DoListen,
                 this,
                 context->MakeReplyMessageContext(),
                 addr,
                 backlog));
  return PP_OK_COMPLETIONPENDING;
}

int32_t PepperTCPServerSocketMessageFilter::OnMsgAccept(
    const ppapi::host::HostMessageContext* context) {
  DCHECK_CURRENTLY_ON(BrowserThread::IO);
  DCHECK(context);

  if (state_ != STATE_LISTENING)
    return PP_ERROR_FAILED;

  state_ = STATE_ACCEPT_IN_PROGRESS;
  ppapi::host::ReplyMessageContext reply_context(
      context->MakeReplyMessageContext());
  int net_result = socket_->Accept(
      &accepted_socket_,
      &accepted_address_,
      base::Bind(&PepperTCPServerSocketMessageFilter::OnAcceptCompleted,
                 base::Unretained(this),
                 reply_context));
  if (net_result != net::ERR_IO_PENDING)
    OnAcceptCompleted(reply_context, net_result);
  return PP_OK_COMPLETIONPENDING;
}

int32_t PepperTCPServerSocketMessageFilter::OnMsgStopListening(
    const ppapi::host::HostMessageContext* context) {
  DCHECK_CURRENTLY_ON(BrowserThread::IO);
  DCHECK(context);

  state_ = STATE_CLOSED;
  socket_.reset();
  return PP_OK;
}

void PepperTCPServerSocketMessageFilter::DoListen(
    const ppapi::host::ReplyMessageContext& context,
    const PP_NetAddress_Private& addr,
    int32_t backlog) {
  DCHECK_CURRENTLY_ON(BrowserThread::IO);

  net::IPAddressNumber address;
  int port;
  if (state_ != STATE_BEFORE_LISTENING ||
      !NetAddressPrivateImpl::NetAddressToIPEndPoint(addr, &address, &port)) {
    SendListenError(context, PP_ERROR_FAILED);
    state_ = STATE_CLOSED;
    return;
  }

  state_ = STATE_LISTEN_IN_PROGRESS;

  socket_.reset(new net::TCPSocket(NULL, net::NetLog::Source()));
  int net_result = net::OK;
  do {
    net::IPEndPoint ip_end_point(address, port);
    net_result = socket_->Open(ip_end_point.GetFamily());
    if (net_result != net::OK)
      break;
    net_result = socket_->SetDefaultOptionsForServer();
    if (net_result != net::OK)
      break;
    net_result = socket_->Bind(ip_end_point);
    if (net_result != net::OK)
      break;
    net_result = socket_->Listen(backlog);
  } while (false);

  if (net_result != net::ERR_IO_PENDING)
    OnListenCompleted(context, net_result);
}

void PepperTCPServerSocketMessageFilter::OnListenCompleted(
    const ppapi::host::ReplyMessageContext& context,
    int net_result) {
  if (state_ != STATE_LISTEN_IN_PROGRESS) {
    SendListenError(context, PP_ERROR_FAILED);
    state_ = STATE_CLOSED;
    return;
  }
  if (net_result != net::OK) {
    SendListenError(context, NetErrorToPepperError(net_result));
    state_ = STATE_BEFORE_LISTENING;
    return;
  }

  DCHECK(socket_.get());

  net::IPEndPoint end_point;
  PP_NetAddress_Private addr;

  int32_t pp_result =
      NetErrorToPepperError(socket_->GetLocalAddress(&end_point));
  if (pp_result != PP_OK) {
    SendListenError(context, pp_result);
    state_ = STATE_BEFORE_LISTENING;
    return;
  }
  if (!NetAddressPrivateImpl::IPEndPointToNetAddress(
          end_point.address(), end_point.port(), &addr)) {
    SendListenError(context, PP_ERROR_FAILED);
    state_ = STATE_BEFORE_LISTENING;
    return;
  }

  SendListenReply(context, PP_OK, addr);
  state_ = STATE_LISTENING;
}

void PepperTCPServerSocketMessageFilter::OnAcceptCompleted(
    const ppapi::host::ReplyMessageContext& context,
    int net_result) {
  if (state_ != STATE_ACCEPT_IN_PROGRESS) {
    SendAcceptError(context, PP_ERROR_FAILED);
    state_ = STATE_CLOSED;
    return;
  }

  state_ = STATE_LISTENING;

  if (net_result != net::OK) {
    SendAcceptError(context, NetErrorToPepperError(net_result));
    return;
  }

  DCHECK(accepted_socket_.get());

  net::IPEndPoint ip_end_point_local;
  PP_NetAddress_Private local_addr = NetAddressPrivateImpl::kInvalidNetAddress;
  PP_NetAddress_Private remote_addr = NetAddressPrivateImpl::kInvalidNetAddress;

  int32_t pp_result = NetErrorToPepperError(
      accepted_socket_->GetLocalAddress(&ip_end_point_local));
  if (pp_result != PP_OK) {
    SendAcceptError(context, pp_result);
    return;
  }
  if (!NetAddressPrivateImpl::IPEndPointToNetAddress(
          ip_end_point_local.address(),
          ip_end_point_local.port(),
          &local_addr) ||
      !NetAddressPrivateImpl::IPEndPointToNetAddress(
          accepted_address_.address(),
          accepted_address_.port(),
          &remote_addr)) {
    SendAcceptError(context, PP_ERROR_FAILED);
    return;
  }

  scoped_ptr<ppapi::host::ResourceHost> host =
      factory_->CreateAcceptedTCPSocket(instance_,
                                        ppapi::TCP_SOCKET_VERSION_PRIVATE,
                                        accepted_socket_.Pass());
  if (!host) {
    SendAcceptError(context, PP_ERROR_NOSPACE);
    return;
  }
  int pending_resource_id = ppapi_host_->AddPendingResourceHost(host.Pass());
  if (pending_resource_id) {
    SendAcceptReply(
        context, PP_OK, pending_resource_id, local_addr, remote_addr);
  } else {
    SendAcceptError(context, PP_ERROR_NOSPACE);
  }
}

void PepperTCPServerSocketMessageFilter::SendListenReply(
    const ppapi::host::ReplyMessageContext& context,
    int32_t pp_result,
    const PP_NetAddress_Private& local_addr) {
  ppapi::host::ReplyMessageContext reply_context(context);
  reply_context.params.set_result(pp_result);
  SendReply(reply_context,
            PpapiPluginMsg_TCPServerSocket_ListenReply(local_addr));
}

void PepperTCPServerSocketMessageFilter::SendListenError(
    const ppapi::host::ReplyMessageContext& context,
    int32_t pp_result) {
  SendListenReply(
      context, pp_result, NetAddressPrivateImpl::kInvalidNetAddress);
}

void PepperTCPServerSocketMessageFilter::SendAcceptReply(
    const ppapi::host::ReplyMessageContext& context,
    int32_t pp_result,
    int pending_resource_id,
    const PP_NetAddress_Private& local_addr,
    const PP_NetAddress_Private& remote_addr) {
  ppapi::host::ReplyMessageContext reply_context(context);
  reply_context.params.set_result(pp_result);
  SendReply(reply_context,
            PpapiPluginMsg_TCPServerSocket_AcceptReply(
                pending_resource_id, local_addr, remote_addr));
}

void PepperTCPServerSocketMessageFilter::SendAcceptError(
    const ppapi::host::ReplyMessageContext& context,
    int32_t pp_result) {
  SendAcceptReply(context,
                  pp_result,
                  0,
                  NetAddressPrivateImpl::kInvalidNetAddress,
                  NetAddressPrivateImpl::kInvalidNetAddress);
}

}  // namespace content


text:
layout: page
title: Gentry Networks Award Ceremony
date: 2016-05-24
author: Gabriel Acevedo
tags: weekly links, java
status: published
summary: Sed vel mauris a eros hendrerit ornare. Ut.
banner: images/banner/office-01.jpg
booking:
  startDate: 05/02/2017
  endDate: 05/07/2017
  ctyhocn: MCOWHHX
  groupCode: GNAC
published: true
---
Curabitur et lectus dolor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc a vestibulum ante. Donec vitae eleifend neque. Vestibulum porttitor ipsum vel nunc malesuada, ut volutpat tellus feugiat. Etiam hendrerit turpis non ipsum fringilla tempus. Aliquam quis felis id elit gravida feugiat. Nulla quis porta turpis. Donec convallis odio sed felis auctor venenatis. Mauris accumsan non erat vitae interdum. Cras et orci sed libero porttitor aliquam vitae vitae massa. Vestibulum vitae varius odio, eu accumsan ante. Phasellus viverra pretium quam, ut finibus odio. Sed ullamcorper magna ac leo mattis, eget porttitor augue bibendum.
Nulla consectetur efficitur elit. Proin rutrum tristique vulputate. Duis et felis non justo venenatis pulvinar. Phasellus scelerisque quis orci in mollis. Maecenas ornare sapien nec tortor dictum consequat. Suspendisse sed congue libero. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis congue, odio ac tristique dictum, eros ante laoreet enim, vel aliquam risus nunc ut risus. Duis mollis blandit feugiat. In odio risus, finibus non libero et, tristique pellentesque neque. Vestibulum dui sapien, ornare sed dolor vel, dignissim posuere risus.

1 Ut in dui pharetra, sollicitudin dui a, pharetra dui
1 Aliquam pharetra elit a urna ultricies dictum
1 Sed placerat ligula ullamcorper libero semper imperdiet.

In id odio nec dolor ornare suscipit. Nulla pharetra condimentum orci et porta. Sed lorem turpis, commodo non leo finibus, interdum varius erat. Interdum et malesuada fames ac ante ipsum primis in faucibus. Curabitur nec commodo magna. Duis ut elit sed enim tempor suscipit. Mauris sit amet diam vitae augue interdum aliquam.


text:
package gk.nickles.ndimes.ui.actions;

import gk.nickles.ndimes.ui.EventDetails;

public interface EventDetailsAction extends Action<EventDetails> {
}


text:
package langheiter;

import java.util.ArrayList;
import java.util.Comparator;

public class Blumenliste {

	private ArrayList<Blume> blumen;

	public Blumenliste() {
		blumen = new ArrayList<>();
		for(int i = 0; i < 30; i++) {
			if(Math.random() < 0.5) {
				blumen.add(new Blume("Fantasie " + i, "Gattung " + i, "Farbe " + i, (int) (Math.random()*30), (int) (Math.random()*30), (int) (Math.random()*30)));
			} else {
				blumen.add(new Hahnenfuss("Hahnenfuss " + i, (int) (Math.random()*4+3), (int) (Math.random()*7+3), (int) (Math.random()*30)));
			}
		}
	}

	public void print() {
		System.out.println("---------------------------------------------------------------------------------------------------------------------------------");
		System.out.println("Blumenliste (" + blumen.size() + "):");
		System.out.println("------------");
		for(Blume b : blumen) {
			System.out.println(b.toString());
		}
		System.out.println("---------------------------------------------------------------------------------------------------------------------------------");
	}

	public void remove() {
		blumen.remove(3);
		blumen.remove(7);
		blumen.remove(13);
		blumen.remove(17);
		blumen.remove(20);
		blumen.remove(23);
	}

	public ArrayList<Blume> getBlumen() {
		return blumen;
	}

	public void sortGattungArt() {
		blumen.sort(new Comparator<Blume>() {

			@Override
			public int compare(Blume a, Blume b) {
				int sComp = a.getName().compareTo(b.getName());

				if(sComp != 0) {
					return sComp;
				}

				return a.getGattung().compareTo(b.getGattung());
			}

		});
	}

	public void sortKronblaetter() {
		blumen.sort((a, b) -> ((Integer)a.getKronblaetter()).compareTo(b.getKronblaetter()));
	}

	public void sortStaubblaetter() {
		blumen.sort((a, b) -> ((Integer)a.getStaubblaetter()).compareTo(b.getStaubblaetter()));
	}

}


text:
namespace password_manager {

namespace {

using ::testing::Return;
using ::testing::StrictMock;

}  // namespace

class PasswordSyncControllerDelegateAndroidTest : public testing::Test {
 protected:
  PasswordSyncControllerDelegateAndroidTest() {
    sync_controller_delegate_ =
        std::make_unique<PasswordSyncControllerDelegateAndroid>(
            CreateBridge(), &sync_delegate_);
  }

  ~PasswordSyncControllerDelegateAndroidTest() override {
    testing::Mock::VerifyAndClearExpectations(bridge_);
  }

  void RunUntilIdle() { task_environment_.RunUntilIdle(); }

  MockPasswordSyncControllerDelegateBridge* bridge() { return bridge_; }
  MockPasswordBackendSyncDelegate* sync_delegate() { return &sync_delegate_; }
  PasswordSyncControllerDelegateAndroid* sync_controller_delegate() {
    return sync_controller_delegate_.get();
  }
  PasswordSyncControllerDelegateBridge::Consumer& consumer() {
    return *sync_controller_delegate_;
  }

 private:
  std::unique_ptr<PasswordSyncControllerDelegateBridge> CreateBridge() {
    auto unique_delegate_bridge = std::make_unique<
        StrictMock<MockPasswordSyncControllerDelegateBridge>>();
    bridge_ = unique_delegate_bridge.get();
    EXPECT_CALL(*bridge_, SetConsumer);
    return unique_delegate_bridge;
  }

  base::test::SingleThreadTaskEnvironment task_environment_;
  MockPasswordBackendSyncDelegate sync_delegate_;
  std::unique_ptr<PasswordSyncControllerDelegateAndroid>
      sync_controller_delegate_;
  raw_ptr<StrictMock<MockPasswordSyncControllerDelegateBridge>> bridge_;
};

TEST_F(PasswordSyncControllerDelegateAndroidTest,
       UpdateSyncStatusOnStartUpSyncDisabled) {
  // We don't care about returned value, as only calls to sync_delegate() are
  // interesting.
  sync_controller_delegate()->CreateProxyModelControllerDelegate();

  EXPECT_CALL(*sync_delegate(), IsSyncingPasswordsEnabled)
      .WillOnce(Return(false));

  RunUntilIdle();
}

TEST_F(PasswordSyncControllerDelegateAndroidTest,
       UpdateSyncStatusOnStartUpSyncEnabled) {
  // We don't care about returned value, as only calls to sync_delegate() are
  // interesting.
  sync_controller_delegate()->CreateProxyModelControllerDelegate();

  EXPECT_CALL(*sync_delegate(), IsSyncingPasswordsEnabled)
      .WillOnce(Return(true));
  EXPECT_CALL(*sync_delegate(), GetSyncingAccount).Times(1);

  RunUntilIdle();
}

TEST_F(PasswordSyncControllerDelegateAndroidTest, OnSyncStarting) {
  syncer::DataTypeActivationRequest test_request;

  EXPECT_CALL(*bridge(), NotifyCredentialManagerWhenSyncing);
  sync_controller_delegate()->OnSyncStarting(test_request, base::DoNothing());

  RunUntilIdle();
}

TEST_F(PasswordSyncControllerDelegateAndroidTest, OnSyncStoppingTemporary) {
  EXPECT_CALL(*bridge(), NotifyCredentialManagerWhenNotSyncing).Times(0);
  sync_controller_delegate()->OnSyncStopping(syncer::KEEP_METADATA);

  RunUntilIdle();
}

TEST_F(PasswordSyncControllerDelegateAndroidTest, OnSyncStoppingPermanently) {
  EXPECT_CALL(*bridge(), NotifyCredentialManagerWhenNotSyncing);
  sync_controller_delegate()->OnSyncStopping(syncer::CLEAR_METADATA);

  RunUntilIdle();
}

TEST_F(PasswordSyncControllerDelegateAndroidTest,
       MetrcisWhenCredentialManagerNotificationSucceeds) {
  base::HistogramTester histogram_tester;

  // Imitate credential manager notification success and check recorded metrics.
  consumer().OnCredentialManagerNotified();
  histogram_tester.ExpectBucketCount(
      "PasswordManager.SyncControllerDelegateNotifiesCredentialManager.Success",
      true, 1);
  histogram_tester.ExpectTotalCount(
      "PasswordManager.SyncControllerDelegateNotifiesCredentialManager.Success",
      1);
}

TEST_F(PasswordSyncControllerDelegateAndroidTest,
       MetrcisWhenCredentialManagerNotificationFails) {
  base::HistogramTester histogram_tester;

  // Imitate failure and check recorded metrics.
  AndroidBackendError expected_error(AndroidBackendErrorType::kUncategorized);
  consumer().OnCredentialManagerError(expected_error, 0);

  histogram_tester.ExpectBucketCount(
      "PasswordManager.SyncControllerDelegateNotifiesCredentialManager.Success",
      false, 1);
  histogram_tester.ExpectTotalCount(
      "PasswordManager.SyncControllerDelegateNotifiesCredentialManager.Success",
      1);
  histogram_tester.ExpectBucketCount(
      "PasswordManager.SyncControllerDelegateNotifiesCredentialManager."
      "ErrorCode",
      expected_error.type, 1);
  histogram_tester.ExpectTotalCount(
      "PasswordManager.SyncControllerDelegateNotifiesCredentialManager."
      "ErrorCode",
      1);
}

}  // namespace password_manager


text:
package net.nemerosa.ontrack.extension.gitlab.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import net.nemerosa.ontrack.model.form.Form;
import net.nemerosa.ontrack.model.form.Password;
import net.nemerosa.ontrack.model.form.Text;
import net.nemerosa.ontrack.model.form.YesNo;
import net.nemerosa.ontrack.model.support.ConfigurationDescriptor;
import net.nemerosa.ontrack.model.support.UserPassword;
import net.nemerosa.ontrack.model.support.UserPasswordConfiguration;

import java.beans.ConstructorProperties;
import java.util.Optional;
import java.util.function.Function;

import static java.lang.String.format;
import static net.nemerosa.ontrack.model.form.Form.defaultNameField;

/**
 * Configuration for accessing a GitLab application.
 */
@Data
public class GitLabConfiguration implements UserPasswordConfiguration<GitLabConfiguration> {

    /**
     * Name of this configuration
     */
    private final String name;

    /**
     * End point
     */
    private final String url;

    /**
     * User name
     */
    private final String user;

    /**
     * User password (used as Personal Access Token)
     */
    private final String password;

    /**
     * Ignoring SSL issues?
     */
    private final boolean ignoreSslCertificate;

    @ConstructorProperties({"name", "url", "user", "password", "ignoreSslCertificate"})
    public GitLabConfiguration(String name, String url, String user, String password, boolean ignoreSslCertificate) {
        this.name = name;
        this.url = url;
        this.user = user;
        this.password = password;
        this.ignoreSslCertificate = ignoreSslCertificate;
    }

    @Override
    @JsonIgnore
    public ConfigurationDescriptor getDescriptor() {
        return new ConfigurationDescriptor(
                name,
                format("%s (%s)", name, url)
        );
    }

    @Override
    public GitLabConfiguration obfuscate() {
        return this.withPassword("");
    }

    @Override
    public GitLabConfiguration withPassword(String password) {
        return new GitLabConfiguration(
                name,
                url,
                user,
                password,
                ignoreSslCertificate
        );
    }

    public static Form form() {
        return Form.create()
                .with(defaultNameField())
                .with(
                        Text.of("url")
                                .label("URL")
                                .length(250)
                                .help("URL of the GitLab engine.")
                )
                .with(
                        Text.of("user")
                                .label("User")
                                .length(16)
                )
                .with(
                        Password.of("password")
                                .label("Personal Access Token")
                                .length(50)
                )
                .with(
                        YesNo.of("ignoreSslCertificate")
                                .label("Ignore SSL certificate")
                )
                ;
    }

    public Form asForm() {
        return form()
                .with(defaultNameField().readOnly().value(name))
                .fill("url", url)
                .fill("user", user)
                .fill("ignoreSslCertificate", ignoreSslCertificate)
                ;
    }

    @Override
    public GitLabConfiguration clone(String targetConfigurationName, Function<String, String> replacementFunction) {
        return new GitLabConfiguration(
                targetConfigurationName,
                replacementFunction.apply(url),
                replacementFunction.apply(user),
                password,
                ignoreSslCertificate
        );
    }

    @Override
    public Optional<UserPassword> getCredentials() {
        return Optional.of(
                new UserPassword(
                        user,
                        password
                )
        );
    }
}


text:
package org.usfirst.frc.team4342.robot.commands;

import org.usfirst.frc.team4342.robot.subsystems.TankDrive;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

public class AimBoiler extends CommandBase
{
	private TankDrive drive;

	private static final double BOILER_YAW = 135.0;
	private double desiredYaw;

	public AimBoiler(TankDrive drive)
	{
		this.requires(drive);

		this.drive = drive;
	}

	@Override
	protected void initialize()
	{
		if(this.isBlueAlliance())
			desiredYaw = -BOILER_YAW;
		else if(this.isRedAlliance())
			desiredYaw = BOILER_YAW;
		else
			desiredYaw = BOILER_YAW + 45;

		desiredYaw = SmartDashboard.getNumber("Boiler-Yaw", desiredYaw);

		drive.setHeading(desiredYaw);
	}

	@Override
	protected void end()
	{
		drive.disablePID();
		drive.set(0.0, 0.0);
	}

	@Override
	protected boolean isFinished()
	{
		return drive.onTarget() || this.isTimedOut();
	}

	@Override
	protected void execute() {}
}


text:
import redis
import urllib2
import json

infra_api = "http://jabber.khrypt.ooo:1337" # Change to your endpoint
r = redis.Redis(unix_socket_path = "/var/run/redis/redis.sock") # Change to your Redis socket

try:
	response = urllib2.urlopen("%s/status/ups" % (infra_api))
	ups_status = response.read()
except:
	ups_status = json.dumps({"status": "broken_link", "charge": 0})

try:
	ups_status = json.loads(ups_status)
except:
	raise Exception("Malformed JSON received")

r.hmset("khryptooo_ups", ups_status)


text:
package com.plusub.lib.util;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.util.Log;

/**
 * home按钮监听,使用方法:
 *<p>
 * (1)必须注册监听器{@link #setOnHomePressedListener(OnHomePressedListener)}
 * (2)开启监听{@link #startWatch()}
 * (3)关闭监听{@link #stopWatch()},注意:必须和{@link #startWatch()}成对使用,如在onStart中开启,在onStop中停止
 * Created by PLUSUB on 2015/11/12.
 */
public class HomeWatcher {
    static final String TAG = "HomeWatcher";
    private Context mContext;
    private IntentFilter mFilter;
    private OnHomePressedListener mListener;
    private InnerRecevier mRecevier;

    /**
     * home按钮回调接口
     */
    public interface OnHomePressedListener {
        /**
         * home按下
         */
        public void onHomePressed();

        /**
         * home长按
         */
        public void onHomeLongPressed();
    }

    public HomeWatcher(Context context) {
        mContext = context;
        mFilter = new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
    }

    /**
     * 设置监听
     *
     * @param listener
     */
    public void setOnHomePressedListener(OnHomePressedListener listener) {
        mListener = listener;
        mRecevier = new InnerRecevier();
    }

    /**
     * 开始监听,注册广播
     */
    public void startWatch() {
        if (mRecevier != null) {
            mContext.registerReceiver(mRecevier, mFilter);
        }
    }

    /**
     * 停止监听,注销广播
     */
    public void stopWatch() {
        if (mRecevier != null) {
            mContext.unregisterReceiver(mRecevier);
        }
    }

    /**
     * 广播接收者
     */
    class InnerRecevier extends BroadcastReceiver {
        final String SYSTEM_DIALOG_REASON_KEY = "reason";
        final String SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS = "globalactions";
        final String SYSTEM_DIALOG_REASON_RECENT_APPS = "recentapps";
        final String SYSTEM_DIALOG_REASON_HOME_KEY = "homekey";

        @Override
        public void onReceive(Context context, Intent intent) {
            String action = intent.getAction();
            if (action.equals(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)) {
                String reason = intent.getStringExtra(SYSTEM_DIALOG_REASON_KEY);
                if (reason != null) {
                    Log.i(TAG, "action:" + action + ",reason:" + reason);
                    if (mListener != null) {
                        if (reason.equals(SYSTEM_DIALOG_REASON_HOME_KEY)) {
                            // 短按home键
                            mListener.onHomePressed();
                        } else if (reason
                                .equals(SYSTEM_DIALOG_REASON_RECENT_APPS)) {
                            // 长按home键
                            mListener.onHomeLongPressed();
                        }
                    }
                }
            }
        }
    }
}


text:
module Gisele::Analysis
  class Session
    include Mixin::VarsHolder
    include Mixin::BddManagement

    def initialize
      @cudd_manager = Cudd.manager
    end
    attr_reader :cudd_manager

    def close
      @cudd_manager.close if @cudd_manager
    ensure
      @cudd_manager = nil
    end

    def session
      self
    end

    ### gHMSC MANAGEMENT #################################################################

    def ghmscs
      @ghmscs ||= []
    end

    def ghmsc(&bl)
      Ghmsc.new(self, &bl).tap do |g|
        ghmscs << g
      end
    end

    def main_ghmsc
      ghmscs.first
    end

    ### GLTS MANAGEMENT ##################################################################

    def glts(&bl)
      Glts.new(self, &bl)
    end

  end # class Session
end # module Gisele


text:
module GraphQL
  module Introspection
    # A wrapper to create `__type(name: )` dynamically.
    class TypeByNameField
      def self.create(type_hash)
        GraphQL::Field.define do
          name("__type")
          description("A type in the GraphQL system")
          type(!GraphQL::Introspection::TypeType)
          argument :name, !types.String
          resolve -> (o, args, c) { type_hash[args["name"]] }
        end
      end
    end
  end
end


text:
highed.plugins.export.install('beautify-json', {
    title: 'Beautified JSON',
    description: 'Exports well-formatted JSON',
    dependencies: [
        'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.18.2/codemirror.min.js',
        'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.18.2/codemirror.min.css',
        'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.18.2/theme/neo.min.css',
        'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.18.2/mode/javascript/javascript.min.js'
    ],
    //Set this to true to trigger a download when doing the export.
    //Useful for cases where the export is completely clientside.
    downloadOutput: true,
    //Set the title of the export button - default is "Export".
    exportTitle: 'Download',

    //Called when creating the plugin
    create: function (chart, node) {
        this.textarea = highed.dom.cr('textarea');
        highed.dom.ap(node, this.textarea);

        this.cm = CodeMirror.fromTextArea(this.textarea, {
            lineNumbers: true,
            mode: 'javascript',
            readOnly: true,
            theme: 'neo'
        });

        this.update = function (chart) {
            var json = chart.export.json();

            if (json.chart && json.chart.renderTo) {
                delete json.chart.renderTo;
            }

            this.cm.setValue(JSON.stringify(json, undefined, '    '));
            this.cm.refresh();
            this.cm.focus();
        };

        this.update.call(this, chart);
    },
    //Called when showing the UI. Also called when the options change.
    show: function (chart) {
        this.update.call(this, chart);
    },
    //Called when triggering an export
    export: function (options, chart, fn) {
        fn(false, this.cm.getValue(), 'chart.json');
    }
});


text:
package types

import (
	"testing"

	sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
	"github.com/stretchr/testify/require"
	"github.com/zigbee-alliance/distributed-compliance-ledger/testutil/sample"
)

func TestMsgRejectUpgrade_ValidateBasic(t *testing.T) {
	tests := []struct {
		name string
		msg  MsgRejectUpgrade
		err  error
	}{
		{
			name: "invalid address",
			msg: MsgRejectUpgrade{
				Creator: "invalid_address",
			},
			err: sdkerrors.ErrInvalidAddress,
		}, {
			name: "valid address",
			msg: MsgRejectUpgrade{
				Creator: sample.AccAddress(),
			},
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			err := tt.msg.ValidateBasic()
			if tt.err != nil {
				require.ErrorIs(t, err, tt.err)

				return
			}
			require.NoError(t, err)
		})
	}
}


text:
all: Point2D Point2DDemo Point2DDemo2
	@echo "compile complete"

Point2DDemo: ./src/Point2DDemo.java
	javac -cp ./class/onlyfun.jar -d ./class $^

Point2DDemo2: ./src/Point2DDemo2.java
	javac -cp ./class/onlyfun.jar -d ./class $^

Point2DDemo3: ./src/Point2DDemo3.java
	javac -cp ./class/onlyfun.jar -d ./class $^

Point2D: ./src/Point2D.java
	@-mkdir class
	@-mkdir ./bin
	javac -d ./bin $^
	jar cvf onlyfun.jar -C ./bin .
	mv onlyfun.jar ./class
	@rm -rf bin

test:
	@echo "Point2DDemo:"
	java -cp ./class:./class/onlyfun.jar Point2DDemo
	@echo "Point2DDemo2:"
	java -cp ./class:./class/onlyfun.jar Point2DDemo2
	@echo "Point2DDemo3:"
	java -cp ./class:./class/onlyfun.jar Point2DDemo3

.PHONY: clean test

clean:
	@-rm -rf class


text:
require "spec_helper"

describe Dhis2::Api::Version228::ReportTable do
  it_behaves_like "a DHIS2 listable resource",  version: "2.28"
  it_behaves_like "a DHIS2 findable resource",  version: "2.28"
  it_behaves_like "a DHIS2 creatable resource", version: "2.28", nil_id: true
  it_behaves_like "a DHIS2 updatable resource", version: "2.28"
  it_behaves_like "a DHIS2 deletable resource", version: "2.28"
end


text:
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TAIO.PSO;
using TAIO.Automata;
using System.Collections.Generic;

namespace Tests
{
    /// <summary>
    /// Particle testing routines.
    /// </summary>
    [TestClass()]
    public class ParticleTests
    {
        [TestMethod()]
        public void DistanceToTest()
        {
            // Arrange
            Particle firstParticle = new Particle(3, 2) { Position = { OnePositions = new[,] { { 1, 0 }, { 1, 0 }, { 0, 1 } } } };
            Particle secondParticle = new Particle(3, 2) { Position = { OnePositions = new[,] { { 0, 1 }, { 1, 0 }, { 0, 1 } } } };

            // Act
            double distance = firstParticle.DistanceTo(secondParticle);

            // Assert
            Assert.AreEqual(4, distance);
        }

        /// <summary>
        /// Checks particle movement.
        /// </summary>
        [TestMethod()]
        public void MoveParticleTest()
        {
            Position bestPosition = new Position(3, 4, 23) { OnePositions = new[,] { { 1, 1, 3, 1 }, { 2, 1, 3, 2 }, { 2, 1, 2, 2 } } };
            List<string> wordsSet = new List<string>();
            wordsSet.Add("012");
            TargetFunction f = new TargetFunction(new Automaton(bestPosition), wordsSet, wordsSet);
            Particle firstParticle = new Particle(3, 4) { Position = bestPosition };
            firstParticle.MoveParticle(bestPosition, 2, 2);
            Assert.AreEqual(firstParticle.Position.CompareTo(bestPosition), 0);
        }
    }
}


text:
module VsphereClients
  class VmPowerManager
    def initialize(vm, logger)
      @vm = vm
      @logger = logger
    end

    def power_off
      power_state = @vm.runtime.powerState

      @logger.info('vm_folder_client.delete_folder.power_off ' +
        "vm=#{@vm.name} power_state=#{power_state}")

      unless power_state == 'poweredOff'
        # Trying to catch
        # 'InvalidPowerState: The attempted operation cannot be performed
        # in the current state (Powered off). (RbVmomi::Fault)'
        # (http://projects.puppetlabs.com/issues/16020)
        with_retry do
          @logger.info("vm_folder_client.delete_folder.power_off vm=#{@vm.name}")
          @vm.PowerOffVM_Task.wait_for_completion
        end
      end
    end

    private

    def with_retry(tries=2, &blk)
      blk.call
    rescue Exception => e
      tries -= 1
      if e.message.start_with?('InvalidPowerState') && tries > 0
        retry
      else
        raise
      end
    end
  end
end


text:
class NavigationController;

// Attempts to get the HEAD of a host name and displays an info bar if the
// request was successful. This is used for single-word queries where we can't
// tell if the entry was a search or an intranet hostname. The autocomplete bar
// assumes it's a query and issues an AlternateNavURLFetcher to display a "did
// you mean" infobar suggesting a navigation.
//
// The memory management of this object is a bit tricky. The location bar view
// will create us and be responsible for us until we attach as an observer
// after a pending load starts (it will delete us if this doesn't happen).
// Once this pending load starts, we're responsible for deleting ourselves.
// We'll do this when the load commits, or when the navigation controller
// itself is deleted.
class AlternateNavURLFetcher : public NotificationObserver,
                               public URLFetcher::Delegate,
                               public LinkInfoBarDelegate {
 public:
  enum State {
    NOT_STARTED,
    IN_PROGRESS,
    SUCCEEDED,
    FAILED,
  };

  explicit AlternateNavURLFetcher(const GURL& alternate_nav_url);
  virtual ~AlternateNavURLFetcher();

  State state() const { return state_; }

 private:
  // NotificationObserver
  virtual void Observe(NotificationType type,
                       const NotificationSource& source,
                       const NotificationDetails& details);

  // URLFetcher::Delegate
  virtual void OnURLFetchComplete(const URLFetcher* source,
                                  const GURL& url,
                                  const net::URLRequestStatus& status,
                                  int response_code,
                                  const ResponseCookies& cookies,
                                  const std::string& data);

  // LinkInfoBarDelegate
  virtual SkBitmap* GetIcon() const;
  virtual Type GetInfoBarType() const;
  virtual string16 GetMessageTextWithOffset(size_t* link_offset) const;
  virtual string16 GetLinkText() const;
  virtual bool LinkClicked(WindowOpenDisposition disposition);
  virtual void InfoBarClosed();

  // Sets |state_| to either SUCCEEDED or FAILED depending on the result of the
  // fetch.
  void SetStatusFromURLFetch(const GURL& url,
                             const net::URLRequestStatus& status,
                             int response_code);

  // Displays the infobar if all conditions are met (the page has loaded and
  // the fetch of the alternate URL succeeded).
  void ShowInfobarIfPossible();

  GURL alternate_nav_url_;
  scoped_ptr<URLFetcher> fetcher_;
  NavigationController* controller_;
  State state_;
  bool navigated_to_entry_;

  // The TabContents the InfoBarDelegate was added to.
  TabContents* infobar_contents_;

  NotificationRegistrar registrar_;

  DISALLOW_COPY_AND_ASSIGN(AlternateNavURLFetcher);
};

#endif  // CHROME_BROWSER_ALTERNATE_NAV_URL_FETCHER_H_


text:
#ifndef _MINIX_SAFECOPIES_H
#define _MINIX_SAFECOPIES_H 1

#include <minix/sys_config.h>
#include <minix/types.h>
#include <minix/vm.h>
#include <stdint.h>

typedef struct {
	int cp_flags;	/* CPF_* below */
	union {
		struct {
			/* CPF_DIRECT */
			endpoint_t	cp_who_to;	/* grantee */
			vir_bytes	cp_start;	/* memory */
			size_t		cp_len;		/* size in bytes */
			char		cp_reserved[8]; /* future use */
		} cp_direct;
		struct {
			/* CPF_INDIRECT */
			endpoint_t	cp_who_to;	/* grantee */
			endpoint_t	cp_who_from;	/* previous granter */
			cp_grant_id_t	cp_grant;	/* previous grant */
			char		cp_reserved[8];/* future use */
		} cp_indirect;
		struct {
			/* CPF_MAGIC */
			endpoint_t	cp_who_from;	/* granter */
			endpoint_t	cp_who_to;	/* grantee */
			vir_bytes	cp_start;	/* memory */
			size_t		cp_len;		/* size in bytes */
			char		cp_reserved[8]; /* future use */
		} cp_magic;
	} cp_u;
	char cp_reserved[8];				/* future use */
} cp_grant_t;

/* Vectored safecopy. */
struct vscp_vec {
        /* Exactly one of the following must be SELF. */
        endpoint_t      v_from;         /* source */
        endpoint_t      v_to;           /* destination */

        cp_grant_id_t   v_gid;          /* grant id of other process */
        size_t          v_offset;       /* offset in other grant */
        vir_bytes       v_addr;         /* address in copier's space */
        size_t          v_bytes;        /* no. of bytes */
};

/* Invalid grant number. */
#define GRANT_INVALID	((cp_grant_id_t) -1)
#define GRANT_VALID(g)	((g) > GRANT_INVALID)

/* Operations: any combination is ok. */
#define CPF_READ	0x000001 /* Granted process may read. */
#define CPF_WRITE	0x000002 /* Granted process may write. */
#define CPF_MAP		0x000004 /* Granted process may map. */

/* Internal flags. */
#define CPF_USED	0x000100 /* Grant slot in use. */
#define CPF_DIRECT	0x000200 /* Grant from this process to another. */
#define CPF_INDIRECT	0x000400 /* Grant from grant to another. */
#define CPF_MAGIC	0x000800 /* Grant from any to any. */
#define CPF_VALID	0x001000 /* Grant slot contains valid grant. */

/* Prototypes for functions in libsys. */
_PROTOTYPE( cp_grant_id_t cpf_grant_direct, (endpoint_t, vir_bytes, size_t, int));
_PROTOTYPE( cp_grant_id_t cpf_grant_indirect, (endpoint_t, endpoint_t, cp_grant_id_t));
_PROTOTYPE( cp_grant_id_t cpf_grant_magic, (endpoint_t, endpoint_t, vir_bytes, size_t, int));
_PROTOTYPE( int cpf_revoke, (cp_grant_id_t grant_id));
_PROTOTYPE( int cpf_lookup, (cp_grant_id_t g, endpoint_t *ep, endpoint_t *ep2));

_PROTOTYPE( int cpf_getgrants, (cp_grant_id_t *grant_ids, int n));
_PROTOTYPE( int cpf_setgrant_direct, (cp_grant_id_t g, endpoint_t who,
	vir_bytes addr, size_t size, int access));
_PROTOTYPE( int cpf_setgrant_indirect, (cp_grant_id_t g, endpoint_t who_to,
	endpoint_t who_from, cp_grant_id_t his_g));
_PROTOTYPE( int cpf_setgrant_magic, (cp_grant_id_t g, endpoint_t who_to,
	endpoint_t who_from, vir_bytes addr, size_t bytes, int access));
_PROTOTYPE( int cpf_setgrant_disable, (cp_grant_id_t grant_id));
_PROTOTYPE( void cpf_reload, (void));

/* Set a process' grant table location and size (in-kernel only). */
#define _K_SET_GRANT_TABLE(rp, ptr, entries)	\
	priv(rp)->s_grant_table= (ptr);		\
	priv(rp)->s_grant_entries= (entries);

#endif	/* _MINIX_SAFECOPIES_H */


text:
//
//  CBLManager+Internal.h
//  CouchbaseLite
//
//  Created by Jens Alfke on 3/22/12.
//  Copyright (c) 2012-2013 Couchbase, Inc. All rights reserved.
//

#import "CBLManager.h"
#import "CBLStatus.h"
@class CBLDatabase, CBL_Replicator, CBL_Shared;

@interface CBLManager ()

@property (copy, nonatomic) NSString* storageType;      // @"SQLite" (default) or @"ForestDB"

- (NSString*) nameOfDatabaseAtPath: (NSString*)path;

- (NSString*) pathForDatabaseNamed: (NSString*)name;

- (CBLDatabase*) _databaseNamed: (NSString*)name
                      mustExist: (BOOL)mustExist
                          error: (NSError**)outError;

- (void) _forgetDatabase: (CBLDatabase*)db;

@property (readonly) NSArray* allOpenDatabases;

@property (readonly) CBL_Shared* shared;

- (CBLStatus) validateReplicatorProperties: (NSDictionary*)properties;

/** Creates a new CBL_Replicator, or returns an existing active one if it has the same properties. */
- (CBL_Replicator*) replicatorWithProperties: (NSDictionary*)body
                                    status: (CBLStatus*)outStatus;

@end


text:
  <title>
      Mirad Jewelries
  </title>

    <meta name="robots" content="noindex">
    <meta charset="UTF-8">

    <link rel="icon" type="image/x-icon" href="<?php echo base_url().'assets/fonts/jewel.ico'?>" />

    <link rel="stylesheet" type="text/css" href="<?php echo base_url().'assets/js/jquery-ui-1.11.4.custom/jquery-ui.min.css'?>">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url().'assets/bootstrap/css/bootstrap.min.css'?>">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url().'assets/materialize/css/materialize.min.css'?>">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url().'assets/skeleton/css/skeleton.css'?>">

    <link rel="stylesheet" type="text/css" href="<?php echo base_url().'assets/css/validationEngine.jquery.css'?>">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url().'assets/sweetalert/lib/sweet-alert.css'?>">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url().'assets/css/animate.css'?>">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

    <link rel="stylesheet" type="text/css" href="<?php echo base_url().'assets/materialize/sass/materialize.scss'?>">

    <link rel="stylesheet" type="text/css" href="<?php echo base_url().'assets/materialize/css/materialize.css'?>">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url().'assets/css/main.css'?>">

    <link href='http://fonts.googleapis.com/css?family=Abel' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Raleway:700' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Montserrat:700' rel='stylesheet' type='text/css'>

          <?php
             $this->load->view($top_navbar1);
          ?>

         <?php
              $this->load->view($content_page);
         ?>

         <?php
             $this->load->view($main_footer);
         ?>


text:
CREATE TABLE CONTACT
(
  ID INTEGER NOT NULL
, FIRSTNAME VARCHAR2(50) NOT NULL
, LASTNAME VARCHAR2(50) NOT NULL
, EMAIL VARCHAR2(255)
, TELEPHONE VARCHAR2(20)
, DEP_ID INTEGER NOT NULL
, CONSTRAINT CONTACT_PK PRIMARY KEY
  (
    ID
  )
  ENABLE
);

COMMENT ON COLUMN CONTACT.ID IS 'Contact key';

COMMENT ON COLUMN CONTACT.DEP_ID IS 'Foreign key';