text:
package com.oracle.pts.pharmacy.wsclient.generated;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;

/**
 *
Java class for patient complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="patient">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="birth" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
 *         <element name="existingPatient" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
 *         <element name="firstName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="insuranceStatus" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="lastName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="patientId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "patient", propOrder = {
    "birth",
    "existingPatient",
    "firstName",
    "insuranceStatus",
    "lastName",
    "name",
    "patientId"
})
public class Patient {

    @XmlSchemaType(name = "dateTime")
    protected XMLGregorianCalendar birth;
    protected boolean existingPatient;
    protected String firstName;
    protected String insuranceStatus;
    protected String lastName;
    protected String name;
    protected String patientId;

    /**
     * Gets the value of the birth property.
     *
     * @return
     *     possible object is
     *     {@link XMLGregorianCalendar }
     *
     */
    public XMLGregorianCalendar getBirth() {
        return birth;
    }

    /**
     * Sets the value of the birth property.
     *
     * @param value
     *     allowed object is
     *     {@link XMLGregorianCalendar }
     *
     */
    public void setBirth(XMLGregorianCalendar value) {
        this.birth = value;
    }

    /**
     * Gets the value of the existingPatient property.
     *
     */
    public boolean isExistingPatient() {
        return existingPatient;
    }

    /**
     * Sets the value of the existingPatient property.
     *
     */
    public void setExistingPatient(boolean value) {
        this.existingPatient = value;
    }

    /**
     * Gets the value of the firstName property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getFirstName() {
        return firstName;
    }

    /**
     * Sets the value of the firstName property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setFirstName(String value) {
        this.firstName = value;
    }

    /**
     * Gets the value of the insuranceStatus property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getInsuranceStatus() {
        return insuranceStatus;
    }

    /**
     * Sets the value of the insuranceStatus property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setInsuranceStatus(String value) {
        this.insuranceStatus = value;
    }

    /**
     * Gets the value of the lastName property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getLastName() {
        return lastName;
    }

    /**
     * Sets the value of the lastName property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setLastName(String value) {
        this.lastName = value;
    }

    /**
     * Gets the value of the name property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the value of the name property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setName(String value) {
        this.name = value;
    }

    /**
     * Gets the value of the patientId property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getPatientId() {
        return patientId;
    }

    /**
     * Sets the value of the patientId property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setPatientId(String value) {
        this.patientId = value;
    }

}


text:
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>Ivony.Html.Binding</name>
    </assembly>
    <members>
        <member name="T:Ivony.Html.Binding.BindingExpression">

            定义绑定表达式,绑定表达式可以由属性值或者元素来定义。

        </member>
        <member name="M:Ivony.Html.Binding.BindingExpression.GetValues(Ivony.Html.Binding.IBindingExpressionEvaluator)">

            获取所有参数的值

            <param name="evaluator">绑定表达式计算转换器 (一般是BindingContext)</param>
            <returns>所有参数和参数值</returns>
        </member>
        <member name="M:Ivony.Html.Binding.BindingExpression.TryGetValue``1(Ivony.Html.Binding.IBindingExpressionEvaluator,System.String,``0@,System.Boolean)">

            尝试获取参数指定类型的值

            <typeparam name="T">值类型</typeparam>
            <param name="evaluator">绑定表达式计算转换器 (一般是BindingContext)</param>
            <param name="name">参数名称</param>
            <param name="value">获取到的参数值</param>
            <param name="throwIfConvertFailed">当类型转换失败的时候是否应当抛出异常</param>
            <returns>是否成功获取</returns>
        </member>
        <member name="M:Ivony.Html.Binding.BindingExpression.TryGetValue(Ivony.Html.Binding.IBindingExpressionEvaluator,System.String,System.Object@)">

            尝试获取参数值

            <param name="evaluator">绑定表达式计算转换器 (一般是BindingContext)</param>
            <param name="name">参数名称</param>
            <param name="value">获取到的参数值</param>
            <returns>是否成功获取</returns>
        </member>
        <member name="M:Ivony.Html.Binding.BindingExpression.GetValue``1(Ivony.Html.Binding.IBindingExpressionEvaluator,System.String)">

            获取指定类型的值

            <typeparam name="T">值类型</typeparam>
            <param name="evaluator">绑定表达式计算转换器 (一般是BindingContext)</param>
            <param name="name">参数名称</param>
            <returns>是否成功获取</returns>
        </member>
        <member name="M:Ivony.Html.Binding.BindingExpression.ParseExpression(System.String)">

            解析绑定表达式

            <param name="expression">要从中解析的绑定表达式的字符串</param>
            <returns>解析后的结果</returns>
        </member>
        <member name="M:Ivony.Html.Binding.BindingExpression.ParseExpression(System.String,System.Int32)">

            解析绑定表达式

            <param name="expression">要从中解析的绑定表达式的字符串</param>
            <param name="index">解析绑定表达式的开始位置</param>
            <returns>解析后的结果</returns>
        </member>
        <member name="P:Ivony.Html.Binding.BindingExpression.Name">

            表达式名称

        </member>
        <member name="P:Ivony.Html.Binding.BindingExpression.Arguments">

            派生类实现此属性提供参数值列表

        </member>
        <member name="T:Ivony.Html.Binding.BindingExpression.BindingExpressionParser">

            绑定表达式解析器

        </member>
        <member name="M:Ivony.Html.Binding.BindingExpression.BindingExpressionParser.Parse(System.String,System.Int32)">

            解析绑定表达式为 BindingExpression 对象

            <param name="text">要分析的文本</param>
            <param name="index">开始分析的位置</param>
            <returns>解析出的 BindingExpression 对象</returns>
        </member>
        <member name="T:Ivony.Html.Binding.IHtmlElementBinder">

            定义特定元素数据绑定器,对特定的元素直接接管数据绑定。

        </member>
        <member name="M:Ivony.Html.Binding.IHtmlElementBinder.BindElement(Ivony.Html.Binding.HtmlBindingContext,Ivony.Html.IHtmlElement)">

            接管元素的数据绑定

            <param name="context">当前数据绑定上下文</param>
            <param name="element">当前正在执行数据绑定的元素</param>
        </member>
        <member name="P:Ivony.Html.Binding.IHtmlElementBinder.ElementName">

            要进行处理的元素的名称

        </member>
        <member name="T:Ivony.Html.Binding.HtmlElementBinderCollection">

            定义 IHtmlElementBinder 的容器

        </member>
        <member name="M:Ivony.Html.Binding.HtmlElementBinderCollection.#ctor">

            创建 HtmlElementBinderCollection 对象

        </member>
        <member name="M:Ivony.Html.Binding.HtmlElementBinderCollection.#ctor(System.Collections.Generic.IEnumerable{Ivony.Html.Binding.IHtmlElementBinder})">

            创建 HtmlElementBinderCollection 对象

            <param name="binders">要添加的绑定器</param>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlElementBinderCollection.GetKeyForItem(Ivony.Html.Binding.IHtmlElementBinder)">

            从 IHtmlElementBinder 对象中提取用作键的元素名称

            <param name="item">IHtmlElementBinder 对象</param>
            <returns>用作键的元素名称</returns>
        </member>
        <member name="T:Ivony.Html.Binding.IHtmlBindingContextProvider">

            HTML 绑定上下文提供程序

        </member>
        <member name="M:Ivony.Html.Binding.IHtmlBindingContextProvider.CreateBindingContext(Ivony.Html.Binding.HtmlBindingContext,Ivony.Html.IHtmlContainer,System.Object)">

            创建 HTML 绑定上下文

            <param name="bindingContext">当前绑定上下文(即父级上下文)</param>
            <param name="scope">要创建绑定上下文的 HTML 范围</param>
            <param name="datamodel">要创建绑定上下文的数据上下文</param>
            <returns>绑定上下文</returns>
        </member>
        <member name="P:Ivony.Html.Binding.IHtmlBindingContextProvider.ModelType">

            可以创建绑定上下文的模型类型

        </member>
        <member name="P:Ivony.Html.Binding.HtmlListBindingContextProvider.ModelType">

            获取所适用的数据模型类型

        </member>
        <member name="T:Ivony.Html.Binding.EvalExpressionBinder">

            处理{eval xxx}表达式的绑定器

            <example>
            Link;
            </example>
        </member>
        <member name="T:Ivony.Html.Binding.IExpressionBinder">

            定义处理绑定表达式的绑定器

        </member>
        <member name="M:Ivony.Html.Binding.IExpressionBinder.GetValue(Ivony.Html.Binding.HtmlBindingContext,Ivony.Html.Binding.BindingExpression)">

            进行绑定,根据给定的参数获取需要绑定的值

            <param name="context">当前绑定上下文</param>
            <param name="expression">绑定表达式</param>
            <returns>绑定的值</returns>
        </member>
        <member name="P:Ivony.Html.Binding.IExpressionBinder.ExpressionName">

            要处理的绑定表达式的名称

        </member>
        <member name="T:Ivony.Html.Binding.IElementExpressionBinder">

            这是一个标记接口,用于指示绑定表达式绑定器可用于元素表达的绑定表达式。

        </member>
        <member name="M:Ivony.Html.Binding.EvalExpressionBinder.GetDataObject(Ivony.Html.Binding.HtmlBindingContext,Ivony.Html.Binding.BindingExpression)">

            根据绑定参数获取数据对象

            <param name="context">绑定上下文</param>
            <param name="expression">绑定表达式</param>
            <returns>数据对象</returns>
        </member>
        <member name="M:Ivony.Html.Binding.EvalExpressionBinder.GetValue(Ivony.Html.Binding.HtmlBindingContext,Ivony.Html.Binding.BindingExpression)">

            获取绑定值

            <param name="context">绑定上下文</param>
            <param name="expression">绑定表达式</param>
            <returns>绑定值</returns>
        </member>
        <member name="M:Ivony.Html.Binding.EvalExpressionBinder.TryFormatValue(System.Object,Ivony.Html.Binding.HtmlBindingContext,Ivony.Html.Binding.BindingExpression)">

            尝试格式化绑定值

            <param name="dataObject">要进行格式化的数据对象</param>
            <param name="context">当前绑定上下文</param>
            <param name="expression">绑定表达式</param>
            <returns>若绑定表达式定义了 format 参数,则返回格式化后的结果,否则返回 null</returns>
        </member>
        <member name="T:Ivony.Html.Binding.ElementExpression">

            代表用元素表示的绑定表达式

        </member>
        <member name="M:Ivony.Html.Binding.ElementExpression.#ctor(Ivony.Html.IHtmlElement)">

            根据元素创建一个元素绑定表达式

            <param name="element"></param>
        </member>
        <member name="P:Ivony.Html.Binding.ElementExpression.Name">

            绑定表达式名称

        </member>
        <member name="P:Ivony.Html.Binding.ElementExpression.Arguments">

            绑定表达式参数

        </member>
        <member name="T:Ivony.Html.Binding.EvalListExpressionBinder">

            处理{eval-list xxx}绑定表达式的绑定器

        </member>
        <member name="T:Ivony.Html.Binding.IBindingExpressionEvaluator">

            定义一个可以将 BindingExpression 对象转换为值的转换器,一般是绑定上下文

        </member>
        <member name="M:Ivony.Html.Binding.IBindingExpressionEvaluator.TryConvertValue``1(System.Object,``0@)">

            尝试将字符串转换为指定类型的值

            <typeparam name="T">值类型</typeparam>
            <param name="obj">要转换的源对象</param>
            <param name="value">转换后的值</param>
            <returns>是否转换成功</returns>
        </member>
        <member name="M:Ivony.Html.Binding.IBindingExpressionEvaluator.GetValue(Ivony.Html.Binding.BindingExpression)">

            从 BindingExpression 获取需要绑定的值

            <param name="expression">绑定表达式</param>
            <returns>获取到的绑定值</returns>
        </member>
        <member name="T:Ivony.Html.Binding.IHtmlBinder">

            定义 HTML 元素绑定器

        </member>
        <member name="M:Ivony.Html.Binding.IHtmlBinder.BindElement(Ivony.Html.Binding.HtmlBindingContext,Ivony.Html.IHtmlElement)">

            HTML 元素绑定器,对元素执行一些特定的数据绑定操作

            <param name="context">数据绑定上下文</param>
            <param name="element">要绑定的元素</param>
            <returns>返回一个值,是否禁止后面的绑定器的执行</returns>
        </member>
        <member name="T:Ivony.Html.Binding.LiteralBinder">

            处理文本替换的绑定器

        </member>
        <member name="F:Ivony.Html.Binding.LiteralBinder.literalNamespace">

            文本替换属性前缀

        </member>
        <member name="M:Ivony.Html.Binding.LiteralBinder.BindElement(Ivony.Html.Binding.HtmlBindingContext,Ivony.Html.IHtmlElement)">

            绑定元素

            <param name="context">当前绑定上下文</param>
            <param name="element">要绑定的元素</param>
            <returns>永远返回 false,表示继续进行后面的绑定</returns>
        </member>
        <member name="T:Ivony.Html.Binding.ExpressionBinderCollection">

            定义表达式绑定器的容器

        </member>
        <member name="M:Ivony.Html.Binding.ExpressionBinderCollection.#ctor">

            创建 ExpressionBinderCollection 对象

        </member>
        <member name="M:Ivony.Html.Binding.ExpressionBinderCollection.#ctor(System.Collections.Generic.IEnumerable{Ivony.Html.Binding.IExpressionBinder})">

            创建 ExpressionBinderCollection 对象

            <param name="binders">要添加的绑定器</param>
        </member>
        <member name="M:Ivony.Html.Binding.ExpressionBinderCollection.GetKeyForItem(Ivony.Html.Binding.IExpressionBinder)">

            重写此方法从表达式绑定器对象中提取键

            <param name="item">要提取键(即可以处理的绑定表达式的名称)的表达式绑定器</param>
            <returns>提取的键</returns>
        </member>
        <member name="T:Ivony.Html.Binding.HtmlBinding">

            为 HTML 绑定工作提供默认的元素绑定器,以及辅助创建数据绑定上下文和进行数据绑定

        </member>
        <member name="M:Ivony.Html.Binding.HtmlBinding.RegisterBindingContextProvider(Ivony.Html.Binding.IHtmlBindingContextProvider)">

            注册一个绑定上下文提供程序

            <param name="provider">要注册的绑定上下文提供程序</param>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBinding.UnregisterBindingContextProvider(System.Type)">

            解除绑定上下文提供程序注册

            <param name="modelType">模型类型</param>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBinding.Create(Ivony.Html.IHtmlContainer,System.Object)">

            使用默认的绑定器设置创建 HtmlBindingContext 实例

            <param name="scope">要进行数据绑定的范畴</param>
            <param name="dataModel">数据模型</param>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBinding.Create(Ivony.Html.IHtmlContainer,System.Object,System.Object[])">

            创建绑定上下文

            <param name="scope">要进行数据绑定的范围</param>
            <param name="dataModel">数据模型</param>
            <param name="binders">在这一次数据绑定中要用到的绑定器列表</param>
            <returns>绑定上下文</returns>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBinding.DataBind(Ivony.Html.IHtmlContainer,System.Object)">

            使用默认的绑定器设置进行数据绑定

            <param name="scope">要进行数据绑定的范畴</param>
            <param name="dataModel">数据模型</param>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBinding.DataBind(Ivony.Html.IHtmlContainer,System.Object,System.Object[])">

            使用指定的绑定器设置进行数据绑定

            <param name="scope">要进行数据绑定的范畴</param>
            <param name="dataModel">数据模型</param>
            <param name="binders">在这一次数据绑定中要用到的绑定器列表</param>
        </member>
        <member name="P:Ivony.Html.Binding.HtmlBinding.StyleBinder">

            获取样式绑定器

        </member>
        <member name="P:Ivony.Html.Binding.HtmlBinding.LiteralBinder">

            获取文本绑定器

        </member>
        <member name="P:Ivony.Html.Binding.HtmlBinding.ScriptBinder">

            获取脚本绑定器

        </member>
        <member name="P:Ivony.Html.Binding.HtmlBinding.EvalExpressionBinder">

            获取默认的绑定表达式绑定器

        </member>
        <member name="P:Ivony.Html.Binding.HtmlBinding.EvalListExpressionBinder">

            获取默认的列表绑定表达式绑定器

        </member>
        <member name="P:Ivony.Html.Binding.HtmlBinding.HtmlBinders">

            获取或注册 HTML 绑定器

        </member>
        <member name="P:Ivony.Html.Binding.HtmlBinding.ElementBinders">

            获取或注册特定元素的绑定器

        </member>
        <member name="P:Ivony.Html.Binding.HtmlBinding.ExpressionBinders">

            获取或注册表达式绑定器

        </member>
        <member name="T:Ivony.Html.Binding.HtmlBindingContext">

            绑定上下文

        </member>
        <member name="M:Ivony.Html.Binding.HtmlBindingContext.Create(Ivony.Html.Binding.IHtmlBinder[],Ivony.Html.Binding.IHtmlElementBinder[],Ivony.Html.Binding.IExpressionBinder[],Ivony.Html.IHtmlContainer,System.Object)">

            创建 HtmlBindingContext 实例

            <param name="htmlBinders">要使用的 HTML 绑定器</param>
            <param name="elementBinders">要使用的针对特定元素的 HTML 元素绑定器</param>
            <param name="expressionBinders">要使用的绑定表达式绑定器</param>
            <param name="scope">要进行数据绑定的范畴</param>
            <param name="dataModel">数据上下文</param>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBindingContext.#ctor(Ivony.Html.Binding.HtmlBindingContext,Ivony.Html.IHtmlContainer,System.Object)">

            创建 HtmlBindingContext 实例

            <param name="scope">要进行数据绑定的范畴</param>
            <param name="bindingContext">父级数据绑定上下文</param>
            <param name="dataModel">数据模型,若不提供则使用当前的数据模型</param>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBindingContext.DataBind">

            进行数据绑定

        </member>
        <member name="M:Ivony.Html.Binding.HtmlBindingContext.BindChilds(Ivony.Html.IHtmlContainer)">

            遍历绑定所有子元素

            <param name="container">要绑定子元素的容器</param>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBindingContext.CreateBindingContext(Ivony.Html.Binding.HtmlBindingContext,Ivony.Html.IHtmlElement,System.Object)">

            创建一个绑定上下文

            <param name="bindingContext">目前的绑定上下文</param>
            <param name="element">目前正在进行绑定的元素</param>
            <param name="dataModel">元素上绑定的数据对象</param>
            <returns></returns>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBindingContext.TryGetDataModel(Ivony.Html.IHtmlElement,System.Object@)">

            尝试获取数据模型

            <param name="element">当前正在处理的元素</param>
            <param name="dataModel">获取到的数据模型</param>
            <returns>是否成功获取数据模型</returns>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBindingContext.DataBind(Ivony.Html.IHtmlElement)">

            对元素进行数据绑定

            <param name="element">要绑定数据的元素</param>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBindingContext.TryBindElement(Ivony.Html.IHtmlElement)">

            尝试使用特定元素绑定器进行数据绑定

            <param name="element">要进行数据绑定的元素</param>
            <returns>是否完成数据绑定</returns>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBindingContext.BindElement(Ivony.Html.IHtmlElement)">

            进行元素绑定

            <param name="element">要进行绑定的元素</param>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBindingContext.BindAttribute(Ivony.Html.IHtmlAttribute)">

            进行属性绑定

            <param name="attribute">要绑定的属性</param>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBindingContext.GetExpressionBinder(Ivony.Html.Binding.BindingExpression)">

            获取绑定表达式绑定器

            <param name="expression">绑定表达式</param>
            <returns>绑定表达式绑定器</returns>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBindingContext.GetElementBinder(Ivony.Html.IHtmlElement)">

            获取用于特定元素的绑定器

            <param name="element">要进行数据绑定的元素</param>
            <returns>元素绑定器</returns>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBindingContext.GetValue(Ivony.Html.Binding.BindingExpression)">

            获取绑定表达式的值

            <param name="expression">绑定表达式</param>
            <returns>绑定值</returns>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBindingContext.TryGetValue(Ivony.Html.Binding.BindingExpression,System.Object@)">

            尝试获取绑定表达式的值

            <param name="expression">绑定表达式</param>
            <param name="value">绑定值</param>
            <returns>是否成功获取</returns>
        </member>
        <member name="M:Ivony.Html.Binding.HtmlBindingContext.TryConvertValue``1(System.Object,``0@)">

            尝试转换值类型

            <typeparam name="T">转换的目标类型</typeparam>
            <param name="obj">要转换的值对象</param>
            <param name="value">转换后的结果</param>
            <returns>是否成功完成类型转换</returns>
        </member>
        <member name="P:Ivony.Html.Binding.HtmlBindingContext.ParentContext">

            父级绑定上下文

        </member>
        <member name="P:Ivony.Html.Binding.HtmlBindingContext.BindingScope">

            进行绑定的范畴

        </member>
        <member name="P:Ivony.Html.Binding.HtmlBindingContext.DataModel">

            当前的数据上下文

        </member>
        <member name="P:Ivony.Html.Binding.HtmlBindingContext.Binders">

            元素绑定器

        </member>
        <member name="P:Ivony.Html.Binding.HtmlBindingContext.ExpressionBinders">

            当前上下文可用于处理绑定表达式的绑定器

        </member>
        <member name="P:Ivony.Html.Binding.HtmlBindingContext.ElementBinders">

            当前上下文用于处理特定元素的的绑定器

        </member>
        <member name="P:Ivony.Html.Binding.HtmlBindingContext.BindCompleted">

            获取或设置一个值,指定元素绑定已经完成,无需遍历后面的绑定处理程序。

        </member>
        <member name="P:Ivony.Html.Binding.HtmlBindingContext.CancelChildsBinding">

            获取或设置一个值,指定是否取消子元素的绑定。

        </member>
        <member name="T:Ivony.Html.Binding.HtmlListBindingContext">

            进行列表绑定的绑定上下文

        </member>
        <member name="M:Ivony.Html.Binding.HtmlListBindingContext.BindChilds(Ivony.Html.IHtmlContainer)">

            重写 BindChilds 方法,进行高级绑定。

        </member>
        <member name="P:Ivony.Html.Binding.HtmlListBindingContext.DataModel">

            列表数据模型

        </member>
        <member name="T:Ivony.Html.Binding.ListBindingMode">

            定义绑定模式

        </member>
        <member name="F:Ivony.Html.Binding.ListBindingMode.StaticContent">
            静态内容,无论数据项的多寡,绑定时仅绑定数据,而不对目标元素进行增删。
        </member>
        <member name="F:Ivony.Html.Binding.ListBindingMode.DynamicContent">
            动态内容,根据数据项的多寡,对目标元素进行增删以匹配数据项
        </member>
        <member name="F:Ivony.Html.Binding.ListBindingMode.DisableGrowth">
            动态内容,但是禁止增长,根据数据项的多寡,对目标元素进行删除以匹配数据项,但不增加目标元素
        </member>
        <member name="T:Ivony.Html.Binding.ScriptBinder">

            脚本绑定器,用于解析脚本中的绑定表达式。

        </member>
        <member name="M:Ivony.Html.Binding.ScriptBinder.BindElement(Ivony.Html.Binding.HtmlBindingContext,Ivony.Html.IHtmlElement)">

            对 HTML 中的 script 元素进行绑定

            <param name="context">当前绑定上下文</param>
            <param name="element">当前绑定的元素(仅会对 script 元素起作用)</param>
            <returns>永远返回 false,表示其他绑定器可以继续执行</returns>
        </member>
        <member name="T:Ivony.Html.Binding.StyleBinder">

            默认的元素绑定器,处理 <view> 或者 <binding> 元素,以及属性绑定表达式和绑定属性处理。

        </member>
        <member name="M:Ivony.Html.Binding.StyleBinder.BindElement(Ivony.Html.Binding.HtmlBindingContext,Ivony.Html.IHtmlElement)">

            对元素进行数据绑定

            <param name="element">需要绑定数据的元素</param>
            <param name="context">绑定上下文</param>
            <returns>返回是否对元素进行了不可逆转的操作(例如移除),故而禁止后续的绑定操作</returns>
        </member>
        <member name="M:Ivony.Html.Binding.StyleBinder.BindElementStyles(Ivony.Html.IHtmlElement,Ivony.Html.IHtmlAttribute[])">

            绑定元素样式

            <param name="element">要处理的元素</param>
            <param name="styleAttributes">样式属性</param>
        </member>
        <member name="M:Ivony.Html.Binding.StyleBinder.BindElementClasses(Ivony.Html.IHtmlElement,Ivony.Html.IHtmlAttribute[])">

            绑定元素样式类

            <param name="element">要处理的元素</param>
            <param name="classAttributes">样式类属性</param>
        </member>
    </members>
</doc>

redpajama_set_name: RedPajamaGithub


text:
<?php

/**
 * @file
 * Contains \Drupal\Tests\Core\Cache\CacheCollectorHelper.
 */

namespace Drupal\Tests\Core\Cache;

use Drupal\Core\Cache\CacheCollector;

/**
 * Helper class to test the cache collector.
 */
class CacheCollectorHelper extends CacheCollector {

  /**
   * Contains data to return on a cache miss.
   * @var array
   */
  protected $cacheMissData = array();

  /**
   * Number of calls to \Drupal\Core\Cache\CacheCollector::resolveCacheMiss().
   *
   * @var int
   */
  protected $cacheMisses = 0;

  /**
   * {@inheritdoc}
   */
  public function set($key, $value) {
    parent::set($key, $value);
    $this->persist($key);
  }

  /**
   * {@inheritdoc}
   */
  public function resolveCacheMiss($key) {
    $this->cacheMisses++;
    if (isset($this->cacheMissData[$key])) {
      $this->storage[$key] = $this->cacheMissData[$key];
      $this->persist($key);
      return $this->cacheMissData[$key];
    }
  }

  /**
   * Sets data to return from a cache miss resolve.
   *
   * @param string $key
   *   The key being looked for.
   * @param mixed $value
   *   The value to return.
   */
  public function setCacheMissData($key, $value) {
    $this->cacheMissData[$key] = $value;
  }

  /**
   * Returns the number of cache misses.
   *
   * @return int
   *   Number of calls to the resolve cache miss method.
   */
  public function getCacheMisses() {
    return $this->cacheMisses;
  }

}


text:
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Progressive.PecaStarter5.Models.Broadcasts;
using Progressive.PecaStarter5.Models.Configurations;
using Progressive.PecaStarter5.Models.Dxos;
using Progressive.PecaStarter5.Models.Plugins;
using Progressive.PecaStarter5.Models.YellowPages;
using Progressive.Peercast4Net;
using Progressive.Peercast4Net.Datas;

namespace Progressive.PecaStarter5.Models.Contexts
{
    public class BroadcastModel
    {
        private readonly PeercastService service = new PeercastService();
        private readonly Peercast peercast = new Peercast();
        private readonly PeercastStation peercastStation = new PeercastStation();
        private readonly BroadcastTimer timer = new BroadcastTimer();
        private readonly Configuration configuration;
        private readonly IEnumerable<IExternalYellowPages> externalYellowPagesList;
        private readonly PluginList plugins;

        public IChannel Channel { get; private set; }

        private event UnhandledExceptionEventHandler asyncExceptionThrown;
        /// 非同期にエラーが発生した時に通知されるイベント
        public event UnhandledExceptionEventHandler AsyncExceptionThrown
        {
            add
            {
                asyncExceptionThrown += value;
                plugins.AsyncExceptionThrown += value;
            }
            remove
            {
                asyncExceptionThrown -= value;
                plugins.AsyncExceptionThrown -= value;
            }
        }

        /// チャンネル情報が更新された時に通知されるイベント
        public event EventHandler<ChannelStatusChangedEventArgs> ChannelStatusChanged = (s, e) => { };

        public BroadcastModel(Configuration configuration,
            IEnumerable<IExternalYellowPages> externalYellowPagesList,
            PluginList plugins)
        {
            this.configuration = configuration;
            this.externalYellowPagesList = externalYellowPagesList;
            this.plugins = plugins;
            timer.Ticked += timer_Ticked;
        }

        private IPeercast Peercast
        {
            get
            {
                IPeercast peca;
                if (configuration.PeercastType == PeercastType.Peercast)
                    peca = peercast;
                else
                    peca = peercastStation;
                peca.Address = "localhost:" + configuration.Port;
                return peca;
            }
        }

        public Task<Progressive.PecaStarter5.Plugins.BroadcastingParameter> BroadcastAsync(IYellowPages yellowPages, int? acceptedHash,
            Dictionary<string, string> yellowPagesParameter,
            BroadcastParameter parameter, IProgress<string> progress)
        {
            return service.BroadcastAsync(Peercast, externalYellowPagesList,
                yellowPages, acceptedHash, yellowPagesParameter, parameter, progress)
                .ContinueWith(t =>
            {
                if (t.IsFaulted)
                    throw t.Exception;
                var broadcasting = t.Result;
                Channel = ChannelDxo.ToChannel(broadcasting);
                ChannelStatusChanged(this,
                    new ChannelStatusChangedEventArgs(Channel));
                timer.BeginTimer(yellowPages, broadcasting.Id);
                // プラグイン処理
                plugins.OnBroadcastAsync(broadcasting);
                return broadcasting;
            });
        }

        public Task UpdateAsync(IYellowPages yellowPages, Dictionary<string, string> yellowPagesParameter,
            Progressive.Peercast4Net.Datas.UpdateParameter parameter, IProgress<string> progress)
        {
            return service.UpdateAsync(Peercast, externalYellowPagesList,
                yellowPages, yellowPagesParameter, parameter, progress)
                .ContinueWith(t =>
            {
                if (t.IsFaulted)
                    throw t.Exception;
                Channel = ChannelDxo.ToChannel(t.Result);
                ChannelStatusChanged(this,
                    new ChannelStatusChangedEventArgs(Channel));
                // プラグイン処理
                plugins.OnUpdateAsync(t.Result);
            });
        }

        public Task StopAsync(IYellowPages yellowPages, Dictionary<string, string> yellowPagesParameter,
            string name, string id, IProgress<string> progress)
        {
            return service.StopAsync(Peercast, externalYellowPagesList,
                yellowPages, yellowPagesParameter, name, id, progress)
                .ContinueWith(t =>
            {
                if (t.IsFaulted)
                    throw t.Exception;
                Channel = null;
                ChannelStatusChanged(this,
                    new ChannelStatusChangedEventArgs(Channel));
                // プラグイン処理
                plugins.OnStopAsync(t.Result);
                timer.EndTimer();
            });
        }

        public Task<IEnumerable<IChannel>> GetChannelsAsync()
        {
            return Peercast.GetChannelsAsync();
        }

        public void Interrupt(IYellowPages yellowPages, Progressive.PecaStarter5.Plugins.InterruptedParameter parameter)
        {
            timer.EndTimer();

            plugins.OnInterruptedAsync(parameter);

            timer.BeginTimer(yellowPages, parameter.Id);
        }

        private void timer_Ticked(long count, IYellowPages yellowPages, string id)
        {
            try
            {
                IChannel channel = null;
                // 10分おき
                if (count % 10 == 0)
                {
                    channel = service.OnTickedAsync(Peercast, yellowPages, id).Result;
                }

                // プラグイン処理
                plugins.OnTickedAwait(count, channel,
                    () => peercast.GetChannelAsync(id).Result);
            }
            catch (Exception ex)
            {
                OnAsyncExceptionThrown(ex);
            }
        }

        private void OnAsyncExceptionThrown(Exception ex)
        {
            if (asyncExceptionThrown != null)
                asyncExceptionThrown(this, new UnhandledExceptionEventArgs(ex, false));
        }
    }

    public class ChannelStatusChangedEventArgs : EventArgs
    {
        private readonly IChannel channel;
        public ChannelStatusChangedEventArgs(IChannel channel)
        {
            this.channel = channel;
        }
        public IChannel Channel { get { return channel; } }
    }
}


text:
package stroom.meta.impl.db;

import stroom.cache.impl.CacheModule;
import stroom.cluster.lock.mock.MockClusterLockModule;
import stroom.collection.mock.MockCollectionModule;
import stroom.dictionary.mock.MockWordListProviderModule;
import stroom.docrefinfo.mock.MockDocRefInfoModule;
import stroom.security.mock.MockSecurityContextModule;
import stroom.task.mock.MockTaskModule;
import stroom.test.common.util.db.DbTestModule;

import com.google.inject.Guice;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import javax.inject.Inject;

import static org.assertj.core.api.Assertions.assertThat;

class TestMetaTypeDaoImpl {

    @Inject
    private Cleanup cleanup;
    @Inject
    private MetaTypeDaoImpl metaTypeDao;
    @Inject
    private MetaDbConnProvider metaDbConnProvider;

    @BeforeEach
    void setup() {
        Guice.createInjector(
                new MetaTestModule(),
                new MetaDbModule(),
                new MetaDaoModule(),
                new MockClusterLockModule(),
                new MockSecurityContextModule(),
                new MockTaskModule(),
                new MockCollectionModule(),
                new MockDocRefInfoModule(),
                new MockWordListProviderModule(),
                new CacheModule(),
                new DbTestModule())
                .injectMembers(this);
        // Delete everything`
        cleanup.cleanup();
    }

    @Test
    void test() {
        assertThat(metaTypeDao.list().size()).isEqualTo(0);

        String typeName = "TEST";
        Integer id1 = metaTypeDao.getOrCreate(typeName);
        Integer id2 = metaTypeDao.getOrCreate(typeName);

        assertThat(id1).isEqualTo(id2);

        typeName = "TEST2";
        id1 = metaTypeDao.getOrCreate(typeName);
        id2 = metaTypeDao.getOrCreate(typeName);

        assertThat(id1).isEqualTo(id2);

        assertThat(metaTypeDao.list().size()).isEqualTo(2);
    }
}


text:
using System;
using System.IO;
using System.Xml.Serialization;

namespace TableParser
{
    public class Serializer
    {
        public void SaveToXML(String FileName)
        {
            using (Stream writer = new FileStream(FileName, FileMode.Create))
            {
                XmlSerializer serializer = new XmlSerializer(this.GetType());
                serializer.Serialize(writer, this);
            }
        }

        public static Serializer LoadFromXML(String FileName, Type type)
        {
            // загружаем данные из файла FileName
            using (Stream stream = new FileStream(FileName, FileMode.Open))
            {
                XmlSerializer serializer = new XmlSerializer(type);

                // в тут же созданную копию класса Serializer под именем ser
                Serializer ser = (Serializer)serializer.Deserialize(stream);
                return ser;
            }
        }
    }
}


text:
package org.apache.ignite.internal.processors.hadoop.impl.v2;

import org.apache.hadoop.mapred.JobContextImpl;
import org.apache.hadoop.mapreduce.InputFormat;
import org.apache.hadoop.mapreduce.InputSplit;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.OutputFormat;
import org.apache.hadoop.mapreduce.RecordReader;
import org.apache.hadoop.mapreduce.lib.map.WrappedMapper;
import org.apache.hadoop.util.ReflectionUtils;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.internal.IgniteInterruptedCheckedException;
import org.apache.ignite.internal.processors.hadoop.HadoopJobInfo;
import org.apache.ignite.internal.processors.hadoop.HadoopTaskInfo;

/**
 * Hadoop map task implementation for v2 API.
 */
public class HadoopV2MapTask extends HadoopV2Task {
    /**
     * @param taskInfo Task info.
     */
    public HadoopV2MapTask(HadoopTaskInfo taskInfo) {
        super(taskInfo);
    }

    /** {@inheritDoc} */
    @SuppressWarnings({"ConstantConditions", "unchecked"})
    @Override public void run0(HadoopV2TaskContext taskCtx) throws IgniteCheckedException {
        OutputFormat outputFormat = null;
        Exception err = null;

        JobContextImpl jobCtx = taskCtx.jobContext();

        try {
            InputSplit nativeSplit = hadoopContext().getInputSplit();

            if (nativeSplit == null)
                throw new IgniteCheckedException("Input split cannot be null.");

            InputFormat inFormat = ReflectionUtils.newInstance(jobCtx.getInputFormatClass(),
                hadoopContext().getConfiguration());

            RecordReader reader = inFormat.createRecordReader(nativeSplit, hadoopContext());

            reader.initialize(nativeSplit, hadoopContext());

            hadoopContext().reader(reader);

            HadoopJobInfo jobInfo = taskCtx.job().info();

            outputFormat = jobInfo.hasCombiner() || jobInfo.hasReducer() ? null : prepareWriter(jobCtx);

            Mapper mapper = ReflectionUtils.newInstance(jobCtx.getMapperClass(), hadoopContext().getConfiguration());

            try {
                mapper.run(new WrappedMapper().getMapContext(hadoopContext()));
            }
            finally {
                closeWriter();
            }

            commit(outputFormat);
        }
        catch (InterruptedException e) {
            err = e;

            Thread.currentThread().interrupt();

            throw new IgniteInterruptedCheckedException(e);
        }
        catch (Exception e) {
            err = e;

            throw new IgniteCheckedException(e);
        }
        finally {
            if (err != null)
                abort(outputFormat);
        }
    }
}


text:
package bienvenu;

import goalplanner.ExecutionSummary;

import java.util.ArrayList;

public abstract class ConditionPreferenceFormula {

	/** The type of conditional preference formula. */
	protected CPFType type;

	public enum CPFType {
		SUCCESS("success"),
		FAILURE("failure"),
		PROP_EQUALS("prop_equal"),
		PROP_NOT_EQUALS("prop_not_equal"),
		USED("used"),
		AND("and"),
		OR("or");

		private String name;

		private CPFType(String name) {
			this.name = name;
		}

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

	/**
	 * Construct a conditional preference formula with the given type.
	 * @param type The type of conditional preference formula
	 */
	public ConditionPreferenceFormula(CPFType type) {
		this.type = type;
	}

	/** Evaluate this conditional preference formula using metadata M. */
	public abstract int evaluate(ExecutionSummary execution);

	/**
	 * Return the set of goal names that this conditional preference formula
	 * applies to.
	 */
	public abstract ArrayList<String> getApplicableGoals();

	public String toString() {
		return this.type.toString();
	}

}


text:
using testing::_;
using testing::AnyNumber;
using testing::Mock;

namespace base {
namespace sequence_manager {
namespace internal {

class TaskQueueImplForTest : public internal::TaskQueueImpl {
 public:
  TaskQueueImplForTest(internal::SequenceManagerImpl* sequence_manager,
                       WakeUpQueue* wake_up_queue,
                       const TaskQueue::Spec& spec)
      : TaskQueueImpl(sequence_manager, wake_up_queue, spec) {}
  ~TaskQueueImplForTest() = default;

  using TaskQueueImpl::SetNextWakeUp;
};

class MockWakeUpQueue : public WakeUpQueue {
 public:
  MockWakeUpQueue()
      : WakeUpQueue(internal::AssociatedThreadId::CreateBound()) {}

  MockWakeUpQueue(const MockWakeUpQueue&) = delete;
  MockWakeUpQueue& operator=(const MockWakeUpQueue&) = delete;
  ~MockWakeUpQueue() override = default;

  using WakeUpQueue::MoveReadyDelayedTasksToWorkQueues;
  using WakeUpQueue::SetNextWakeUpForQueue;
  using WakeUpQueue::UnregisterQueue;

  void OnNextWakeUpChanged(LazyNow* lazy_now,
                           absl::optional<WakeUp> wake_up) override {
    TimeTicks time = wake_up ? wake_up->time : TimeTicks::Max();
    OnNextWakeUpChanged_TimeTicks(time);
  }
  const char* GetName() const override { return "Test"; }
  void UnregisterQueue(internal::TaskQueueImpl* queue) override {
    SetNextWakeUpForQueue(queue, nullptr, absl::nullopt);
  }

  internal::TaskQueueImpl* NextScheduledTaskQueue() const {
    if (wake_up_queue_.empty())
      return nullptr;
    return wake_up_queue_.top().queue;
  }

  TimeTicks NextScheduledRunTime() const {
    if (wake_up_queue_.empty())
      return TimeTicks::Max();
    return wake_up_queue_.top().wake_up.time;
  }

  MOCK_METHOD1(OnNextWakeUpChanged_TimeTicks, void(TimeTicks time));
};

class WakeUpQueueTest : public testing::Test {
 public:
  void SetUp() final {
    wake_up_queue_ = std::make_unique<MockWakeUpQueue>();
    task_queue_ = std::make_unique<TaskQueueImplForTest>(
        nullptr, wake_up_queue_.get(), TaskQueue::Spec("test"));
  }

  void TearDown() final {
    if (task_queue_)
      task_queue_->UnregisterTaskQueue();
  }

  std::unique_ptr<MockWakeUpQueue> wake_up_queue_;
  std::unique_ptr<TaskQueueImplForTest> task_queue_;
  SimpleTestTickClock tick_clock_;
};

TEST_F(WakeUpQueueTest, ScheduleWakeUpForQueue) {
  TimeTicks now = tick_clock_.NowTicks();
  TimeDelta delay = Milliseconds(10);
  TimeTicks delayed_runtime = now + delay;
  EXPECT_TRUE(wake_up_queue_->empty());
  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(delayed_runtime));
  LazyNow lazy_now(now);
  task_queue_->SetNextWakeUp(&lazy_now, WakeUp{delayed_runtime});

  EXPECT_FALSE(wake_up_queue_->empty());
  EXPECT_EQ(delayed_runtime, wake_up_queue_->NextScheduledRunTime());

  EXPECT_EQ(task_queue_.get(), wake_up_queue_->NextScheduledTaskQueue());
  Mock::VerifyAndClearExpectations(wake_up_queue_.get());

  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(TimeTicks::Max()))
      .Times(AnyNumber());
}

TEST_F(WakeUpQueueTest, ScheduleWakeUpForQueueSupersedesPreviousWakeUp) {
  TimeTicks now = tick_clock_.NowTicks();
  TimeDelta delay1 = Milliseconds(10);
  TimeDelta delay2 = Milliseconds(100);
  TimeTicks delayed_runtime1 = now + delay1;
  TimeTicks delayed_runtime2 = now + delay2;
  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(delayed_runtime1));
  LazyNow lazy_now(now);
  task_queue_->SetNextWakeUp(&lazy_now, WakeUp{delayed_runtime1});

  EXPECT_EQ(delayed_runtime1, wake_up_queue_->NextScheduledRunTime());

  Mock::VerifyAndClearExpectations(wake_up_queue_.get());

  // Now schedule a later wake_up, which should replace the previously
  // requested one.
  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(delayed_runtime2));
  task_queue_->SetNextWakeUp(&lazy_now, WakeUp{delayed_runtime2});

  EXPECT_EQ(delayed_runtime2, wake_up_queue_->NextScheduledRunTime());
  Mock::VerifyAndClearExpectations(wake_up_queue_.get());

  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(TimeTicks::Max()))
      .Times(AnyNumber());
}

TEST_F(
    WakeUpQueueTest,
    ScheduleFlexibleNoSoonerWakeUpForQueueSupersedesPreviousWakeUpWithLeeway) {
  TimeTicks now = tick_clock_.NowTicks();
  TimeDelta delay1 = Milliseconds(10);
  TimeDelta delay2 = Milliseconds(15);
  TimeTicks delayed_runtime1 = now + delay1;
  TimeTicks delayed_runtime2 = now + delay2;
  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(delayed_runtime1));
  LazyNow lazy_now(now);
  task_queue_->SetNextWakeUp(
      &lazy_now,
      WakeUp{delayed_runtime1, Milliseconds(10), WakeUpResolution::kLow,
             subtle::DelayPolicy::kFlexibleNoSooner});

  EXPECT_EQ((WakeUp{delayed_runtime1, Milliseconds(10), WakeUpResolution::kLow,
                    subtle::DelayPolicy::kFlexibleNoSooner}),
            wake_up_queue_->GetNextDelayedWakeUp());

  Mock::VerifyAndClearExpectations(wake_up_queue_.get());

  // Now schedule a later wake_up, which should replace the previously
  // requested one.
  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(delayed_runtime2));
  task_queue_->SetNextWakeUp(
      &lazy_now, WakeUp{delayed_runtime2, TimeDelta(), WakeUpResolution::kLow,
                        subtle::DelayPolicy::kPrecise});

  EXPECT_EQ((WakeUp{delayed_runtime2, TimeDelta(), WakeUpResolution::kLow,
                    subtle::DelayPolicy::kPrecise}),
            wake_up_queue_->GetNextDelayedWakeUp());
  Mock::VerifyAndClearExpectations(wake_up_queue_.get());

  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(TimeTicks::Max()))
      .Times(AnyNumber());
}

TEST_F(WakeUpQueueTest,
       ScheduleFlexiblePreferEarlyWakeUpForQueueSupersedesPreviousWakeUp) {
  TimeTicks now = tick_clock_.NowTicks();
  TimeDelta delay1 = Milliseconds(10);
  TimeDelta delay2 = Milliseconds(15);
  TimeTicks delayed_runtime1 = now + delay1;
  TimeTicks delayed_runtime2 = now + delay2;
  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(delayed_runtime1));
  LazyNow lazy_now(now);
  task_queue_->SetNextWakeUp(
      &lazy_now, WakeUp{delayed_runtime1, TimeDelta(), WakeUpResolution::kLow,
                        subtle::DelayPolicy::kPrecise});

  EXPECT_EQ((WakeUp{delayed_runtime1, TimeDelta(), WakeUpResolution::kLow,
                    subtle::DelayPolicy::kPrecise}),
            wake_up_queue_->GetNextDelayedWakeUp());

  Mock::VerifyAndClearExpectations(wake_up_queue_.get());

  // Now schedule a later wake_up, which should replace the previously
  // requested one.
  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(delayed_runtime2));
  task_queue_->SetNextWakeUp(
      &lazy_now,
      WakeUp{delayed_runtime2, Milliseconds(10), WakeUpResolution::kLow,
             subtle::DelayPolicy::kFlexiblePreferEarly});

  EXPECT_EQ((WakeUp{delayed_runtime2, Milliseconds(10), WakeUpResolution::kLow,
                    subtle::DelayPolicy::kFlexiblePreferEarly}),
            wake_up_queue_->GetNextDelayedWakeUp());
  Mock::VerifyAndClearExpectations(wake_up_queue_.get());

  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(TimeTicks::Max()))
      .Times(AnyNumber());
}

TEST_F(WakeUpQueueTest, SetNextDelayedDoWork_OnlyCalledForEarlierTasks) {
  std::unique_ptr<TaskQueueImplForTest> task_queue2 =
      std::make_unique<TaskQueueImplForTest>(nullptr, wake_up_queue_.get(),
                                             TaskQueue::Spec("test"));

  std::unique_ptr<TaskQueueImplForTest> task_queue3 =
      std::make_unique<TaskQueueImplForTest>(nullptr, wake_up_queue_.get(),
                                             TaskQueue::Spec("test"));

  std::unique_ptr<TaskQueueImplForTest> task_queue4 =
      std::make_unique<TaskQueueImplForTest>(nullptr, wake_up_queue_.get(),
                                             TaskQueue::Spec("test"));

  TimeDelta delay1 = Milliseconds(10);
  TimeDelta delay2 = Milliseconds(20);
  TimeDelta delay3 = Milliseconds(30);
  TimeDelta delay4 = Milliseconds(1);

  // SetNextDelayedDoWork should always be called if there are no other
  // wake-ups.
  TimeTicks now = tick_clock_.NowTicks();
  LazyNow lazy_now(now);
  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(now + delay1));
  task_queue_->SetNextWakeUp(&lazy_now, WakeUp{now + delay1});

  Mock::VerifyAndClearExpectations(wake_up_queue_.get());

  // SetNextDelayedDoWork should not be called when scheduling later tasks.
  EXPECT_CALL(*wake_up_queue_.get(), OnNextWakeUpChanged_TimeTicks(_)).Times(0);
  task_queue2->SetNextWakeUp(&lazy_now, WakeUp{now + delay2});
  task_queue3->SetNextWakeUp(&lazy_now, WakeUp{now + delay3});

  // SetNextDelayedDoWork should be called when scheduling earlier tasks.
  Mock::VerifyAndClearExpectations(wake_up_queue_.get());
  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(now + delay4));
  task_queue4->SetNextWakeUp(&lazy_now, WakeUp{now + delay4});

  Mock::VerifyAndClearExpectations(wake_up_queue_.get());

  EXPECT_CALL(*wake_up_queue_.get(), OnNextWakeUpChanged_TimeTicks(_)).Times(2);
  task_queue2->UnregisterTaskQueue();
  task_queue3->UnregisterTaskQueue();
  task_queue4->UnregisterTaskQueue();
}

TEST_F(WakeUpQueueTest, UnregisterQueue) {
  std::unique_ptr<TaskQueueImplForTest> task_queue2 =
      std::make_unique<TaskQueueImplForTest>(nullptr, wake_up_queue_.get(),
                                             TaskQueue::Spec("test"));
  EXPECT_TRUE(wake_up_queue_->empty());

  TimeTicks now = tick_clock_.NowTicks();
  LazyNow lazy_now(now);
  TimeTicks wake_up1 = now + Milliseconds(10);
  EXPECT_CALL(*wake_up_queue_.get(), OnNextWakeUpChanged_TimeTicks(wake_up1))
      .Times(1);
  task_queue_->SetNextWakeUp(&lazy_now, WakeUp{wake_up1});
  TimeTicks wake_up2 = now + Milliseconds(100);
  task_queue2->SetNextWakeUp(&lazy_now, WakeUp{wake_up2});
  EXPECT_FALSE(wake_up_queue_->empty());

  EXPECT_EQ(task_queue_.get(), wake_up_queue_->NextScheduledTaskQueue());

  testing::Mock::VerifyAndClearExpectations(wake_up_queue_.get());

  EXPECT_CALL(*wake_up_queue_.get(), OnNextWakeUpChanged_TimeTicks(wake_up2))
      .Times(1);

  wake_up_queue_->UnregisterQueue(task_queue_.get());
  EXPECT_EQ(task_queue2.get(), wake_up_queue_->NextScheduledTaskQueue());

  task_queue_->UnregisterTaskQueue();
  task_queue_ = nullptr;

  EXPECT_FALSE(wake_up_queue_->empty());
  testing::Mock::VerifyAndClearExpectations(wake_up_queue_.get());

  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(TimeTicks::Max()))
      .Times(1);

  wake_up_queue_->UnregisterQueue(task_queue2.get());
  EXPECT_FALSE(wake_up_queue_->NextScheduledTaskQueue());

  task_queue2->UnregisterTaskQueue();
  task_queue2 = nullptr;
  EXPECT_TRUE(wake_up_queue_->empty());
}

TEST_F(WakeUpQueueTest, MoveReadyDelayedTasksToWorkQueues) {
  TimeDelta delay = Milliseconds(50);
  TimeTicks now = tick_clock_.NowTicks();
  LazyNow lazy_now_1(now);
  TimeTicks delayed_runtime = now + delay;
  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(delayed_runtime));
  task_queue_->SetNextWakeUp(&lazy_now_1, WakeUp{delayed_runtime});

  EXPECT_EQ(delayed_runtime, wake_up_queue_->NextScheduledRunTime());

  wake_up_queue_->MoveReadyDelayedTasksToWorkQueues(&lazy_now_1,
                                                    EnqueueOrder());
  EXPECT_EQ(delayed_runtime, wake_up_queue_->NextScheduledRunTime());

  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(TimeTicks::Max()));
  tick_clock_.SetNowTicks(delayed_runtime);
  LazyNow lazy_now_2(&tick_clock_);
  wake_up_queue_->MoveReadyDelayedTasksToWorkQueues(&lazy_now_2,
                                                    EnqueueOrder());
  ASSERT_TRUE(wake_up_queue_->NextScheduledRunTime().is_max());
}

TEST_F(WakeUpQueueTest, MoveReadyDelayedTasksToWorkQueuesWithLeeway) {
  std::unique_ptr<TaskQueueImplForTest> task_queue2 =
      std::make_unique<TaskQueueImplForTest>(nullptr, wake_up_queue_.get(),
                                             TaskQueue::Spec("test"));

  TimeTicks now = tick_clock_.NowTicks();
  LazyNow lazy_now_1(now);

  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(now + Milliseconds(10)));
  task_queue2->SetNextWakeUp(&lazy_now_1,
                             WakeUp{now + Milliseconds(10), Milliseconds(4)});
  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(now + Milliseconds(11)));
  task_queue_->SetNextWakeUp(&lazy_now_1,
                             WakeUp{now + Milliseconds(11), TimeDelta()});

  EXPECT_EQ(now + Milliseconds(11), wake_up_queue_->NextScheduledRunTime());

  wake_up_queue_->MoveReadyDelayedTasksToWorkQueues(&lazy_now_1,
                                                    EnqueueOrder());
  EXPECT_EQ(now + Milliseconds(11), wake_up_queue_->NextScheduledRunTime());

  tick_clock_.SetNowTicks(now + Milliseconds(10));
  LazyNow lazy_now_2(&tick_clock_);
  wake_up_queue_->MoveReadyDelayedTasksToWorkQueues(&lazy_now_2,
                                                    EnqueueOrder());
  EXPECT_EQ(now + Milliseconds(11), wake_up_queue_->NextScheduledRunTime());

  Mock::VerifyAndClearExpectations(wake_up_queue_.get());
  EXPECT_CALL(*wake_up_queue_.get(), OnNextWakeUpChanged_TimeTicks(_))
      .Times(AnyNumber());
  // Tidy up.
  task_queue2->UnregisterTaskQueue();
}

TEST_F(WakeUpQueueTest, CancelDelayedWork) {
  TimeTicks now = tick_clock_.NowTicks();
  LazyNow lazy_now(now);
  TimeTicks run_time = now + Milliseconds(20);

  EXPECT_CALL(*wake_up_queue_.get(), OnNextWakeUpChanged_TimeTicks(run_time));
  task_queue_->SetNextWakeUp(&lazy_now, WakeUp{run_time});

  EXPECT_EQ(task_queue_.get(), wake_up_queue_->NextScheduledTaskQueue());

  EXPECT_CALL(*wake_up_queue_.get(),
              OnNextWakeUpChanged_TimeTicks(TimeTicks::Max()));
  task_queue_->SetNextWakeUp(&lazy_now, absl::nullopt);
  EXPECT_FALSE(wake_up_queue_->NextScheduledTaskQueue());
}

TEST_F(WakeUpQueueTest, CancelDelayedWork_TwoQueues) {
  std::unique_ptr<TaskQueueImplForTest> task_queue2 =
      std::make_unique<TaskQueueImplForTest>(nullptr, wake_up_queue_.get(),
                                             TaskQueue::Spec("test"));

  TimeTicks now = tick_clock_.NowTicks();
  LazyNow lazy_now(now);
  TimeTicks run_time1 = now + Milliseconds(20);
  TimeTicks run_time2 = now + Milliseconds(40);
  EXPECT_CALL(*wake_up_queue_.get(), OnNextWakeUpChanged_TimeTicks(run_time1));
  task_queue_->SetNextWakeUp(&lazy_now, WakeUp{run_time1});
  Mock::VerifyAndClearExpectations(wake_up_queue_.get());

  EXPECT_CALL(*wake_up_queue_.get(), OnNextWakeUpChanged_TimeTicks(_)).Times(0);
  task_queue2->SetNextWakeUp(&lazy_now, WakeUp{run_time2});
  Mock::VerifyAndClearExpectations(wake_up_queue_.get());

  EXPECT_EQ(task_queue_.get(), wake_up_queue_->NextScheduledTaskQueue());

  EXPECT_EQ(run_time1, wake_up_queue_->NextScheduledRunTime());

  EXPECT_CALL(*wake_up_queue_.get(), OnNextWakeUpChanged_TimeTicks(run_time2));
  task_queue_->SetNextWakeUp(&lazy_now, absl::nullopt);
  EXPECT_EQ(task_queue2.get(), wake_up_queue_->NextScheduledTaskQueue());

  EXPECT_EQ(run_time2, wake_up_queue_->NextScheduledRunTime());

  Mock::VerifyAndClearExpectations(wake_up_queue_.get());
  EXPECT_CALL(*wake_up_queue_.get(), OnNextWakeUpChanged_TimeTicks(_))
      .Times(AnyNumber());

  // Tidy up.
  task_queue2->UnregisterTaskQueue();
}

TEST_F(WakeUpQueueTest, HighResolutionWakeUps) {
  TimeTicks now = tick_clock_.NowTicks();
  LazyNow lazy_now(now);
  TimeTicks run_time1 = now + Milliseconds(20);
  TimeTicks run_time2 = now + Milliseconds(40);
  TaskQueueImplForTest q1(nullptr, wake_up_queue_.get(),
                          TaskQueue::Spec("test"));
  TaskQueueImplForTest q2(nullptr, wake_up_queue_.get(),
                          TaskQueue::Spec("test"));

  // Add two high resolution wake-ups.
  EXPECT_FALSE(wake_up_queue_->has_pending_high_resolution_tasks());
  wake_up_queue_->SetNextWakeUpForQueue(
      &q1, &lazy_now, WakeUp{run_time1, TimeDelta(), WakeUpResolution::kHigh});
  EXPECT_TRUE(wake_up_queue_->has_pending_high_resolution_tasks());
  wake_up_queue_->SetNextWakeUpForQueue(
      &q2, &lazy_now, WakeUp{run_time2, TimeDelta(), WakeUpResolution::kHigh});
  EXPECT_TRUE(wake_up_queue_->has_pending_high_resolution_tasks());

  // Remove one of the wake-ups.
  wake_up_queue_->SetNextWakeUpForQueue(&q1, &lazy_now, absl::nullopt);
  EXPECT_TRUE(wake_up_queue_->has_pending_high_resolution_tasks());

  // Remove the second one too.
  wake_up_queue_->SetNextWakeUpForQueue(&q2, &lazy_now, absl::nullopt);
  EXPECT_FALSE(wake_up_queue_->has_pending_high_resolution_tasks());

  // Change a low resolution wake-up to a high resolution one.
  wake_up_queue_->SetNextWakeUpForQueue(
      &q1, &lazy_now, WakeUp{run_time1, TimeDelta(), WakeUpResolution::kLow});
  EXPECT_FALSE(wake_up_queue_->has_pending_high_resolution_tasks());
  wake_up_queue_->SetNextWakeUpForQueue(
      &q1, &lazy_now, WakeUp{run_time1, TimeDelta(), WakeUpResolution::kHigh});
  EXPECT_TRUE(wake_up_queue_->has_pending_high_resolution_tasks());

  // Move a high resolution wake-up in time.
  wake_up_queue_->SetNextWakeUpForQueue(
      &q1, &lazy_now, WakeUp{run_time2, TimeDelta(), WakeUpResolution::kHigh});
  EXPECT_TRUE(wake_up_queue_->has_pending_high_resolution_tasks());

  // Cancel the wake-up twice.
  wake_up_queue_->SetNextWakeUpForQueue(&q1, &lazy_now, absl::nullopt);
  wake_up_queue_->SetNextWakeUpForQueue(&q1, &lazy_now, absl::nullopt);
  EXPECT_FALSE(wake_up_queue_->has_pending_high_resolution_tasks());

  // Tidy up.
  q1.UnregisterTaskQueue();
  q2.UnregisterTaskQueue();
}

TEST_F(WakeUpQueueTest, SetNextWakeUpForQueueInThePast) {
  constexpr auto kType = MessagePumpType::DEFAULT;
  constexpr auto kDelay = Milliseconds(20);
  auto sequence_manager = sequence_manager::CreateUnboundSequenceManager(
      SequenceManager::Settings::Builder()
          .SetMessagePumpType(kType)
          .SetTickClock(&tick_clock_)
          .Build());
  sequence_manager->BindToMessagePump(MessagePump::Create(kType));
  auto high_prio_queue =
      sequence_manager->CreateTaskQueue(TaskQueue::Spec("high_prio_queue"));
  high_prio_queue->SetQueuePriority(TaskQueue::kHighestPriority);
  auto high_prio_runner = high_prio_queue->CreateTaskRunner(kTaskTypeNone);
  auto low_prio_queue =
      sequence_manager->CreateTaskQueue(TaskQueue::Spec("low_prio_queue"));
  low_prio_queue->SetQueuePriority(TaskQueue::kBestEffortPriority);
  auto low_prio_runner = low_prio_queue->CreateTaskRunner(kTaskTypeNone);
  sequence_manager->SetDefaultTaskRunner(high_prio_runner);
  base::MockCallback<base::OnceCallback<void()>> task_1, task_2;

  testing::Sequence s;
  // Expect task_2 to run after task_1
  EXPECT_CALL(task_1, Run);
  EXPECT_CALL(task_2, Run);
  // Schedule high and low priority tasks in such a way that clock.Now() will be
  // way into the future by the time the low prio task run time is used to setup
  // a wake up.
  low_prio_runner->PostDelayedTask(FROM_HERE, task_2.Get(), kDelay);
  high_prio_runner->PostDelayedTask(FROM_HERE, task_1.Get(), kDelay * 2);
  high_prio_runner->PostTask(
      FROM_HERE, BindOnce([](SimpleTestTickClock* clock,
                             TimeDelta delay) { clock->Advance(delay); },
                          base::Unretained(&tick_clock_), kDelay * 2));
  RunLoop().RunUntilIdle();
}

}  // namespace internal
}  // namespace sequence_manager
}  // namespace base


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">

<meta name="generator" content="JDiff v1.0.9">

<meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared.">
<meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet">
<TITLE>
org.apache.hadoop.mapreduce
</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="../stylesheet-jdiff.css" TITLE="Style">

       <tt>hadoop 0.20.2-cdh3u0</tt>
       Overview
        Package
        Class
       Statistics
       Help

  Generated by
JDiff

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
   NO FRAMES
   DETAIL:
REMOVED |
ADDED |
CHANGED

Package <tt>org.apache.hadoop.mapreduce</tt>

  Added Classes

  <nobr><tt>ClusterMetrics</tt></nobr>

  Status information on the current state of the Map-Reduce cluster.

  <nobr><tt>JobACL</tt></nobr>

  Job related ACLs

  <nobr><tt>JobStatus</tt></nobr>

  Describes the current status of a job.

  <nobr><tt>JobStatus.State</tt></nobr>

  Current state of the job

  <nobr><tt>JobSubmissionFiles</tt></nobr>

  A utility to manage job submission files.
 Note that this class is for framework internal usage only and is not to be used by users directly.

  <nobr><tt>TaskType</tt></nobr>

  Enum for map reduce job-setup job-cleanup task-cleanup task types.

  Changed Classes

  <nobr>Job</nobr>

  The job submitter's view of the Job.

  <nobr>JobContext</nobr>

  A read-only view of the job that is provided to the tasks while they are running.

  <nobr>OutputCommitter</nobr>

  OutputCommitter describes the commit of task output for a Map-Reduce job.

  <nobr>ReduceContext</nobr>

  The context passed to the Reducer

  <nobr>Reducer.Context</nobr>

       <tt>hadoop 0.20.2-cdh3u0</tt>
       Overview
        Package
        Class
       Statistics
       Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
   NO FRAMES


text:
#ifndef __ShapeLayer_h__
#define __ShapeLayer_h__

class CCMoveByCustom : public CCMoveBy
{
	public :

		static  CCMoveByCustom*		create ( KDfloat fDuration, const CCPoint& tDeltaPosition );

	public :

		virtual KDvoid				update ( KDfloat fDelta );
};

#endif	// __ShapeLayer_h__


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Flora myc. Belg. , Suppl. 1 1: 56 + 330 (1887)

#### Original name
Lactarius zonarius var. lividus Lambotte

### Remarks
null


text:
package org.apache.causeway.viewer.wicket.ui.components.actionmenu.serviceactions;

import java.util.List;

import org.apache.wicket.MarkupContainer;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.markup.html.panel.Fragment;

import org.apache.causeway.commons.internal.collections._Lists;
import org.apache.causeway.viewer.wicket.ui.panels.PanelBase;
import org.apache.causeway.viewer.wicket.ui.util.Wkt;

import lombok.val;

@SuppressWarnings("rawtypes")
public abstract class MenuActionPanel extends PanelBase {

    private static final long serialVersionUID = 1L;

    public MenuActionPanel(final String id) {
        super(id);
    }

    protected ListView<CssMenuItem> subMenuItemsView(final List<CssMenuItem> subMenuItems) {
        return Wkt.listView("subMenuItems", subMenuItems, listItem->{
            val subMenuItem = listItem.getModelObject();

            switch(subMenuItem.getItemType()) {
            case SPACER:
                addSpacer(subMenuItem, listItem);
                return;
            case SECTION_LABEL:
                addSectionLabel(subMenuItem, listItem);
                return;
            default:
                // fall through
            }

            if (subMenuItem.hasSubMenuItems()) {
                addFolderItem(subMenuItem, listItem);
            } else {
                addLeafItem(subMenuItem, listItem);
            }
        });
    }

    protected List<CssMenuItem> flatten(final List<CssMenuItem> menuItems) {
        val subMenuItems = _Lists.<CssMenuItem>newArrayList();
        for (val menuItem : menuItems) {
            subMenuItems.addAll(menuItem.getSubMenuItems());
        }
        return subMenuItems;
    }

    // -- HELPER

    private void addFolderItem(final CssMenuItem menuItem, final ListItem<CssMenuItem> listItem) {
        final MarkupContainer parent = this;
        ServiceActionUtil.addFolderItem(super.getMetaModelContext(), menuItem, listItem, parent);
    }

    private void addLeafItem(final CssMenuItem menuItem, final ListItem<CssMenuItem> listItem) {
        final MarkupContainer parent = this;
        ServiceActionUtil.addLeafItem(
                super.getMetaModelContext(), menuItem, listItem, parent);
    }

    private void addSpacer(final CssMenuItem menuItem, final ListItem<CssMenuItem> listItem) {
        final MarkupContainer parent = this;
        val fragment = new Fragment("content", "separatorItem", parent);
        listItem.add(fragment);
        Wkt.cssAppend(listItem, "list-separator");
    }

    private void addSectionLabel(final CssMenuItem menuItem, final ListItem<CssMenuItem> listItem) {
        final MarkupContainer parent = this;
        val fragment = new Fragment("content", "sectionItem", parent);
        Wkt.labelAdd(fragment, "sectionLabel", menuItem.getName());
        listItem.add(fragment);
        Wkt.cssAppend(listItem, "list-section-label");
    }

}


text:
function pad(n) {return (n < 10 ? "0" : "") + n;}
function describe(ms) {
	if (ms < 0) return "in the future";
	if (ms < 1000) return "just now";
	if (ms < 60000) return Math.ceil(ms / 1000) + " seconds ago";
	if (ms < 3600000) return pad(Math.floor(ms / 60000)) + ":" + pad(Math.floor((ms % 60000) / 1000)) + " ago";
	const days = ms / 86400000;
	if (days < 1) return "earlier today";
	if (days < 2) return "yesterday";
	return Math.floor(days) + " days ago";
}

let locations = null;
function check_response(req) {
	if (req.responseURL.slice(34, 42) === "view/loc") {
		//console.log("Got one!");
		//This is *not* an API. It returns what appears to be deliberately malformed JSON.
		//assert req.responseText.slice(0,5) === ")]}'\n"
		const data = JSON.parse(req.responseText.slice(5));
		//console.log(window.data = data);
		if (!locations) locations = JSON.parse(localStorage.getItem("dancingmen_locations"));
		data[0].forEach(info => {
			const who = info[0];
			const name = who[3];
			const whenwhere = info[1];
			const [_, longitude, latitude] = whenwhere[1];
			const age = +new Date() - whenwhere[2];
			const desc = whenwhere[4];
			console.log(name, "was at", desc, describe(age));
			//TODO: Pre-code a lat/long for origin and destination, and interpolate.
			//Assume a one-hour trip. Predict arrival time.
			locations.forEach(([loc, lat, lon]) => {
				const dist = ((lat - latitude) ** 2 + (lon - longitude) ** 2) ** 0.5;
				console.log(loc, dist);
			});
		});
	}
	if (req.responseURL.slice(36, 45) === "story/pre") {
		//console.log("Got dest:", req);
		const data = JSON.parse(req.responseText.slice(5));
		//console.log(window.destdata = data);
		const locs = [data[19][0], data[19][1], ...data[19][2]].filter(x => x && x.length >= 31);
		locations = locs.map(l => [l[2], l[0][2], l[0][3]]);
		localStorage.setItem("dancingmen_locations", JSON.stringify(locations));
	}
}

const trampoline = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function() {
	this.addEventListener("readystatechange", function() {
		if(this.readyState === 4) try {check_response(this);} catch (e) {console.error(e);}
	}, false);
	trampoline.apply(this, arguments);
};


text:
// MIT License

// Copyright(c) 2017 - 2019 Stephen Mohr

// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

using System.Collections.Generic;

namespace Networks.Core
{

    public class NodeLayerTuple
    {
        public uint nodeId;
        public List<string> coordinates;
        public NodeLayerTuple(uint id, string coords)
        {
            nodeId = id;
            coordinates = new List<string>(coords.Split(','));
        }

        public NodeLayerTuple(uint id, List<string> coords)
        {
            nodeId = id;
            coordinates = coords;
        }

        public override string ToString()
        {
            return nodeId + " : " + string.Join(",", coordinates);
        }
    }

}


text:
//
//  TOS_Profile.h
//  SDKtopoos
//

#import <Foundation/Foundation.h>

@interface TOS_Profile : NSObject
/** The Birthday. */
@property (nonatomic,retain) NSDate * Birthday;

/** The Gender. */
@property (nonatomic,retain) NSString * Gender;
/**
 * Instantiates a new profile.
 *
 * @param birthday the birthday
 * @param gender the gender
 */
-(TOS_Profile *) init;

-(TOS_Profile *) initWithBirthday: (NSDate *) birthday andGender: (NSString *) gender;

/**
 * get the birthday.
 *
 * @return Date of birthday
 */
- (NSDate *) getBirthday ;

/**
 * Set the birthday date.
 *
 * @param birthday date of birthday to set
 */
- (void) setBirthday:(NSDate *) birthday ;

/**
 * get the gender.
 *
 * @return the gender
 */
- (NSString *) getGender ;

/**
 * Sets the gender.
 *
 * @param gender gender to set
 */
- (void) setGender:(NSString *) gender;

@end


text:
var loopback = require('loopback'),
    boot = require('loopback-boot'),
    consolidate = require('consolidate'),
    app = module.exports = loopback();

// define server side templating
app.engine('html', consolidate.swig);
app.set('views', __dirname + '/views');
app.set('view engine', 'html');

app.start = function() {
    // start the web server
    return app.listen(function() {
        app.emit('started');
        console.log('Web server listening at: %s', app.get('url'));
    });
};

// Bootstrap the application, configure models, datasources and middleware.
// Sub-apps like REST API are mounted via boot scripts.
boot(app, __dirname, function(err) {
    if (err) throw err;

    // start the server if `$ node server.js`
    if (require.main === module)
    app.start();
});


text:
package downsampler

import (
	"errors"
	"reflect"
	"testing"
	"time"

	"github.com/digitalocean/vulcan/cassandra"
	"github.com/digitalocean/vulcan/model"
)

func TestShouldWrite(t *testing.T) {
	var happyPathTests = []struct {
		name          string
		desc          string
		input         *model.TimeSeries
		outputBool    bool
		outputSample  *model.Sample
		resolution    time.Duration
		currLastWrite map[string]*int64
		readSamples   []*model.Sample
	}{
		{
			name: "a",
			desc: "brand new timeseries, not written recently",
			input: &model.TimeSeries{
				Labels: map[string]string{"a": "b"},
				Samples: []*model.Sample{
					&model.Sample{
						TimestampMS: int64(100000),
						Value:       float64(1),
					},
					&model.Sample{
						TimestampMS: int64(100015),
						Value:       float64(2),
					},
				},
			},
			outputBool: true,
			outputSample: &model.Sample{
				TimestampMS: int64(100015),
				Value:       float64(2),
			},
			resolution:    time.Duration(15 * time.Minute),
			currLastWrite: map[string]*int64{},
			readSamples: []*model.Sample{
				&model.Sample{TimestampMS: 0, Value: 0},
			},
		},
		{
			name: "b",
			desc: "timeseries in hash state, not written recently",
			input: &model.TimeSeries{
				Labels: map[string]string{"a": "b"},
				Samples: []*model.Sample{
					&model.Sample{
						TimestampMS: int64(100000),
						Value:       float64(1),
					},
					&model.Sample{
						TimestampMS: int64(100015),
						Value:       float64(2),
					},
				},
			},
			outputBool: true,
			outputSample: &model.Sample{
				TimestampMS: int64(100015),
				Value:       float64(2),
			},
			resolution: time.Duration(1 * time.Minute),
			currLastWrite: map[string]*int64{
				`{"a":"b"}`: int64ToPt(1),
			},
			readSamples: []*model.Sample{},
		},
		{
			name: "c ",
			desc: "timeseries in hash state, written recently",
			input: &model.TimeSeries{
				Labels: map[string]string{"a": "b"},
				Samples: []*model.Sample{
					&model.Sample{
						TimestampMS: int64(100000),
						Value:       float64(1),
					},
					&model.Sample{
						TimestampMS: int64(100015),
						Value:       float64(2),
					},
				},
			},
			outputBool:   false,
			outputSample: nil,
			resolution:   time.Duration(1 * time.Minute),
			currLastWrite: map[string]*int64{
				`{"a":"b"}`: int64ToPt(80000),
			},
			readSamples: []*model.Sample{},
		},
		{
			name: "d",
			desc: "brand new timeseries, written recently",
			input: &model.TimeSeries{
				Labels: map[string]string{"a": "b"},
				Samples: []*model.Sample{
					&model.Sample{
						TimestampMS: int64(100000),
						Value:       float64(1),
					},
					&model.Sample{
						TimestampMS: int64(100015),
						Value:       float64(2),
					},
				},
			},
			outputBool:    false,
			outputSample:  nil,
			resolution:    time.Duration(1 * time.Minute),
			currLastWrite: map[string]*int64{},
			readSamples: []*model.Sample{
				&model.Sample{TimestampMS: 80000, Value: 0},
			},
		},
	}

	for i, test := range happyPathTests {
		t.Logf("happy path test %d: %q", i, test.desc)

		t.Run(test.name, func(t *testing.T) {
			ds := NewDownsampler(&Config{
				Writer:     &MockWriter{},
				Reader:     &cassandra.MockReader{Samples: test.readSamples},
				Resolution: test.resolution,
			})

			ds.lastWrite = test.currLastWrite

			gotBool, gotSample, err := ds.shouldWrite(test.input)
			if err != nil {
				t.Fatalf(
					"shouldWrite(%v) => _, error: %v; expected nil errors",
					test.input,
					err,
				)
			}

			if gotBool != test.outputBool || !reflect.DeepEqual(gotSample, test.outputSample) {
				t.Errorf(
					"shouldWrite(%v) => %v, %v; expected %v, %v",
					test.input,
					gotBool,
					gotSample,
					test.outputBool,
					test.outputSample,
				)
			}
		})
	}

	var negativeTests = []struct {
		name          string
		desc          string
		input         *model.TimeSeries
		outputBool    bool
		outputSample  *model.Sample
		resolution    time.Duration
		currLastWrite map[string]*int64
		readSamples   []*model.Sample
		readErr       error
	}{
		{
			name: "a",
			desc: "brand new timeseries, not written recently",
			input: &model.TimeSeries{
				Labels: map[string]string{"a": "b"},
				Samples: []*model.Sample{
					&model.Sample{
						TimestampMS: int64(100000),
						Value:       float64(1),
					},
					&model.Sample{
						TimestampMS: int64(100015),
						Value:       float64(2),
					},
				},
			},
			resolution:    time.Duration(15 * time.Minute),
			currLastWrite: map[string]*int64{},
			readSamples: []*model.Sample{
				&model.Sample{TimestampMS: 0, Value: 0},
			},
			readErr: errors.New("read error"),
		},
	}

	for i, test := range negativeTests {
		t.Logf("negative path tests %d: %q", i, test.desc)

		t.Run(test.name, func(t *testing.T) {
			ds := NewDownsampler(&Config{
				Writer: &MockWriter{},
				Reader: &cassandra.MockReader{
					Samples: test.readSamples,
					Err:     test.readErr,
				},
				Resolution: test.resolution,
			})

			ds.lastWrite = test.currLastWrite

			if _, _, err := ds.shouldWrite(test.input); err == nil {
				t.Fatalf(
					"shouldWrite(%v) => _, nil error; expected an error",
					test.input,
				)
			}
		})
	}
}


text:
(function() {
    'use strict';

    /**
     * An object that triggers an event upon entering/leaving a zone
     * @param {Phaser.Game}                                 game    The phaser game istance
     * @param {Boolean}                                     enabled [description]
     * @param {Array#Phaser.Rectangle | Phaser.Rectangle}   zone    [description]
     * @param {Array#Phaser.Sprite | Phaser.Sprite}         toTrack    [description]
     */
    Game.Trigger.ZoneTrigger = function(game, enabled, zone, toTrack, criteriaActive, criteriaInactive, thisArg) {
        Game.Trigger.call(this, game, enabled);

        /**
         * The zone or zones that will dispatch this trigger as active
         * @type {Array#Phaser.Rectangle | Phaser.Rectangle}
         */
        this.zones = zone;

        /**
         * The sprite of sprites that will dispatch this trigger as active when entering a zone
         * @type {Array#Phaser.Sprite | Phaser.Sprite}
         */
        this.toTrack = toTrack;

        /**
         * Internal cache
         * @type {Array}
         */
        this._wasInZone = [];

        if (this.zones && this.zones.constructor !== Array) {
            this.zones = [this.zones];
        }

        if (this.toTrack && this.toTrack.constructor !== Array) {
            this.toTrack = [this.toTrack];
        }

        /**
         * Criteria to fulfill to make the trigger active
         * @type {function}
         */
        this.criteriaActive = criteriaActive;

        /**
         * Criteria to fulfill to make the trigger inactive
         * @type {function}
         */
        this.criteriaInactive = criteriaInactive;

        /**
         * The context that the criteria functions will be called with
         * @type {[type]}
         */
        this.thisArg = thisArg;

        /**
         * A broadphase trigger that is generated if there are more than one rectangles to track. This is to save performance
         * @type {Game.Trigger.ZoneTrigger}
         */
        this._broadTrigger = undefined;

        if (this.zones.length > 1) {
            var padding = 20;
            var top = Number.MAX_VALUE, left = Number.MAX_VALUE, right = Number.MIN_VALUE, bottom = Number.MIN_VALUE;
            _.forEach(this.zones, function(zone) {
                top = Math.min(top, zone.top);
                left = Math.min(left, zone.left);
                right = Math.max(right, zone.right);
                bottom = Math.max(bottom, zone.bottom);
            });
            // Padding is to make sure the narrow phase register that the player has exited before broadphase make it not able to check
            var rect = new Phaser.Rectangle(left - padding, top - padding, right - left + padding * 2, bottom - top + padding * 2);
            this._broadTrigger = new Game.Trigger.ZoneTrigger(this.game, true, rect, this.toTrack);
            this.game.triggerManager.addTrigger(this._broadTrigger);
        }

        this._refreshInZone();

        return this;
    };

    Game.Trigger.ZoneTrigger.prototype = Object.create(Game.Trigger.prototype);
    Game.Trigger.ZoneTrigger.prototype.constructor = Game.Trigger.ZoneTrigger;

    Game.Trigger.ZoneTrigger.prototype._refreshInZone = function() {
        this._wasInZone = [];
        for (var i = 0; i < this.toTrack.length; i++) {
            this._wasInZone.push([]);
            for (var x = 0; x < this.zones.length; x++) {
                this._wasInZone[i].push(false);
            }
        }
    };

    Game.Trigger.ZoneTrigger.prototype.update = function() {
        if (!this.enabled) return;

        if (this._broadTrigger && !this._broadTrigger.isActive) return;

        var iToTrack, iZone, insideAny;

        for (iToTrack = 0; iToTrack < this.toTrack.length; iToTrack++) {
            for (iZone = 0; iZone < this.zones.length; iZone++) {
                this._wasInZone[iToTrack][iZone] = this.zones[iZone].contains(this.toTrack[iToTrack].position.x, this.toTrack[iToTrack].position.y);

                if (this._wasInZone[iToTrack][iZone]) {
                    insideAny = true;
                    break;
                }
            }
            if (insideAny) break;
        }

        if (!this.isActive && insideAny) {
            // Entered one of the zones
            if (!this.criteriaActive) {
                this.onActive.dispatch(this, this.toTrack[iToTrack]);
            } else if (this.criteriaActive.call(this.thisArg)) {
                this.onActive.dispatch(this, this.toTrack[iToTrack]);
            }
        } else if (this.isActive && !insideAny) {
            // Left all zones
            if (!this.criteriaInactive) {
                this.onInactive.dispatch(this, this.toTrack[iToTrack]);
            } else if (this.criteriaInactive.call(this.thisArg)) {
                this.onInactive.dispatch(this, this.toTrack[iToTrack]);
            }
        }

    };

    Game.Trigger.ZoneTrigger.prototype.debug = function() {
        _.forEach(this.zones, function(zone, izones) {
            this.game.debug.geom(zone);
        }, this);

    };

})();


text:
@interface MenuCell : UITableViewCell {

	UIImageView *_iconView;
	UILabel     *_titleLabel;
}

@property (nonatomic, retain) UIImageView *iconView;
@property (nonatomic, retain) UILabel     *titleLabel;

- (void)setNormal:(BOOL)normal;

@end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace ToClient.Controls
{
    public partial class ExpressionButton : UserControl
    {
        public ExpressionButton()
        {
            InitializeComponent();
        }

        public ICommand AddExpressionCommand
        {
            get { return (ICommand)GetValue(AddExpressionCommandProperty); }
            set { SetValue(AddExpressionCommandProperty, value); }
        }
        public static readonly DependencyProperty AddExpressionCommandProperty =
            DependencyProperty.Register("AddExpressionCommand", typeof(ICommand), typeof(ExpressionButton), new PropertyMetadata(null));

        public void MouseEnterAction(object sender, MouseEventArgs e)
        {
            RootBorder.Background = new SolidColorBrush(Color.FromArgb(255, 252, 240, 193));//#FFFCF0C1
        }
        public void MouseLeaveAction(object sender, MouseEventArgs e)
        {
            RootBorder.Background = new SolidColorBrush(Color.FromArgb(255, 247, 245, 245));//#FFF7F5F5
        }
        public void MouseLeftButtonDownAction(object sender, MouseButtonEventArgs e)
        {
            ExpressionControl childWindow = new ExpressionControl();
            childWindow.Closed += (_d,_e) =>
            {
                ExpressionControl temp_d = (ExpressionControl)_d;
                if (temp_d.DialogResult == true)
                {
                    AddExpressionCommand.Execute("[^icon]"+temp_d.State+"[$icon]");
                }
                RootBorder.Background = new SolidColorBrush(Color.FromArgb(255, 247, 245, 245));
            };
            childWindow.Show();
        }
    }
}


text:
'****************************************************************************
'* Archie Jacobs
'* Manufacturing Automation, LLC
'* support@advancedhmi.com
'* 12-JUN-11
'*
'* Copyright 2011 Archie Jacobs
'*
'* Distributed under the GNU General Public License (www.gnu.org)
'*
'* This program is free software; you can redistribute it and/or
'* as published by the Free Software Foundation; either version 2
'* of the License, or (at your option) any later version.
'*
'* This program is distributed in the hope that it will be useful,
'* but WITHOUT ANY WARRANTY; without even the implied warranty of
'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'* GNU General Public License for more details.

'* You should have received a copy of the GNU General Public License
'* along with this program; if not, write to the Free Software
'* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
'*
'* 08-JUN-13 Created to make extending easier
'****************************************************************************
Public Class DigitalPanelMeter
    Inherits MfgControl.AdvancedHMI.Controls.DigitalPanelMeter

    Implements IDisposable

    Private SavedBackColor As System.Drawing.Color

#Region "PLC Related Properties"
    '*****************************************************
    '* Property - Component to communicate to PLC through
    '*****************************************************
    Private m_CommComponent As AdvancedHMIDrivers.IComComponent
    <System.ComponentModel.Category("PLC Properties")> _
    Public Property CommComponent() As AdvancedHMIDrivers.IComComponent
        Get
            Return m_CommComponent
        End Get
        Set(ByVal value As AdvancedHMIDrivers.IComComponent)
            If m_CommComponent IsNot value Then
                If SubScriptions IsNot Nothing Then
                    SubScriptions.UnsubscribeAll()
                End If

                m_CommComponent = value

                SubscribeToCommDriver()
            End If
        End Set
    End Property

    '*****************************************
    '* Property - Address in PLC to Link to
    '*****************************************
    Private m_PLCAddressText As String = ""
    <System.ComponentModel.Category("PLC Properties")> _
    Public Property PLCAddressText() As String
        Get
            Return m_PLCAddressText
        End Get
        Set(ByVal value As String)
            If m_PLCAddressText <> value Then
                m_PLCAddressText = value

                '* When address is changed, re-subscribe to new address
                SubscribeToCommDriver()
            End If
        End Set
    End Property

    '*****************************************
    '* Property - Address in PLC to Link to
    '*****************************************
    Private m_PLCAddressVisible As String = ""
    <System.ComponentModel.Category("PLC Properties")> _
    Public Property PLCAddressVisible() As String
        Get
            Return m_PLCAddressVisible
        End Get
        Set(ByVal value As String)
            If m_PLCAddressVisible <> value Then
                m_PLCAddressVisible = value

                '* When address is changed, re-subscribe to new address
                SubscribeToCommDriver()
            End If
        End Set
    End Property

    '*****************************************
    '* Property - Address in PLC to Link to
    '*****************************************
    Private m_PLCAddressValue As String = ""
    <System.ComponentModel.Category("PLC Properties")> _
    Public Property PLCAddressValue() As String
        Get
            Return m_PLCAddressValue
        End Get
        Set(ByVal value As String)
            If m_PLCAddressValue <> value Then
                m_PLCAddressValue = value

                '* When address is changed, re-subscribe to new address
                SubscribeToCommDriver()
            End If
        End Set
    End Property

    '*****************************************
    '* Property - Address in PLC to Write Data To
    '*****************************************
    Private m_PLCAddressKeypad As String = ""
    <System.ComponentModel.Category("PLC Properties")> _
    Public Property PLCAddressKeypad() As String
        Get
            Return m_PLCAddressKeypad
        End Get
        Set(ByVal value As String)
            If m_PLCAddressKeypad <> value Then
                m_PLCAddressKeypad = value
            End If
        End Set
    End Property
#End Region

#Region "Events"
    '********************************************************************
    '* When an instance is added to the form, set the comm component
    '* property. If a comm component does not exist, add one to the form
    '********************************************************************
    Protected Overrides Sub OnCreateControl()
        MyBase.OnCreateControl()

        If Me.DesignMode Then
            '********************************************************
            '* Search for AdvancedHMIDrivers.IComComponent component in parent form
            '* If one exists, set the client of this component to it
            '********************************************************
            Dim i = 0
            While m_CommComponent Is Nothing And i < Me.Site.Container.Components.Count
                If Me.Site.Container.Components(i).GetType.GetInterface("AdvancedHMIDrivers.IComComponent") IsNot Nothing Then m_CommComponent = Me.Site.Container.Components(i)
                i += 1
            End While

            '************************************************
            '* If no comm component was found, then add one and
            '* point the CommComponent property to it
            '*********************************************
            If m_CommComponent Is Nothing Then
                Me.Site.Container.Add(New AdvancedHMIDrivers.EthernetIPforCLXCom)
                m_CommComponent = Me.Site.Container.Components(Me.Site.Container.Components.Count - 1)
            End If
        Else
            SubscribeToCommDriver()
        End If
    End Sub
#End Region

#Region "Constructor/Destructor"
    '****************************************************************
    '* UserControl overrides dispose to clean up the component list.
    '****************************************************************
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing Then
                If SubScriptions IsNot Nothing Then
                    SubScriptions.dispose()
                End If
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub
#End Region

#Region "Subscribing and PLC data receiving"
    Private SubScriptions As SubscriptionHandler
    '**************************************************
    '* Subscribe to addresses in the Comm(PLC) Driver
    '**************************************************
    Private Sub SubscribeToCommDriver()
        If Not DesignMode And IsHandleCreated Then
            '* Create a subscription handler object
            If SubScriptions Is Nothing Then
                SubScriptions = New SubscriptionHandler
                SubScriptions.CommComponent = m_CommComponent
                AddHandler SubScriptions.DisplayError, AddressOf DisplaySubscribeError
            End If

            '* Check through the properties looking for PLCAddress***, then see if the suffix matches an existing property
            Dim p() As Reflection.PropertyInfo = Me.GetType().GetProperties

            For i As Integer = 0 To p.Length - 1
                '* Does this property start with "PLCAddress"?
                If p(i).Name.IndexOf("PLCAddress", StringComparison.CurrentCultureIgnoreCase) = 0 Then
                    '* Get the property value
                    Dim PLCAddress As String = p(i).GetValue(Me, Nothing)
                    If PLCAddress <> "" Then
                        '* Get the text in the name after PLCAddress
                        Dim PropertyToWrite As String = p(i).Name.Substring(10)
                        Dim j As Integer = 0
                        '* See if there is a corresponding property with the extracted name
                        While j < p.Length AndAlso p(j).Name <> PropertyToWrite
                            j += 1
                        End While

                        '* If the proprty was found, then subscribe to the PLC Address
                        If j < p.Length Then
                            SubScriptions.SubscribeTo(PLCAddress, AddressOf PolledDataReturned, PropertyToWrite)
                        End If
                    End If
                End If
            Next
        End If
    End Sub

    '***************************************
    '* Call backs for returned data
    '***************************************
    Private OriginalText As String
    Private Sub PolledDataReturned(ByVal sender As Object, ByVal e As SubscriptionHandlerEventArgs)
        If e.PLCComEventArgs.ErrorId = 0 Then
            Try
                '* Write the value to the property that came from the end of the PLCAddress... property name
                Me.GetType().GetProperty(e.SubscriptionDetail.PropertyNameToSet). _
                            SetValue(Me, CTypeDynamic(e.PLCComEventArgs.Values(0), Me.GetType().GetProperty(e.SubscriptionDetail.PropertyNameToSet).PropertyType), Nothing)
            Catch ex As Exception
                DisplayError("INVALID VALUE RETURNED!" & e.PLCComEventArgs.Values(0))
            End Try
        Else
            DisplayError("Com Error " & e.PLCComEventArgs.ErrorId & "." & e.PLCComEventArgs.ErrorMessage)
        End If
    End Sub

    Private Sub DisplaySubscribeError(ByVal sender As Object, ByVal e As MfgControl.AdvancedHMI.Drivers.Common.PlcComEventArgs)
        DisplayError(e.ErrorMessage)
    End Sub
#End Region

#Region "Error Display"
    '********************************************************
    '* Show an error via the text property for a short time
    '********************************************************
    Private WithEvents ErrorDisplayTime As System.Windows.Forms.Timer
    Private Sub DisplayError(ByVal ErrorMessage As String)
        If ErrorDisplayTime Is Nothing Then
            ErrorDisplayTime = New System.Windows.Forms.Timer
            AddHandler ErrorDisplayTime.Tick, AddressOf ErrorDisplay_Tick
            ErrorDisplayTime.Interval = 6000
        End If

        '* Save the text to return to
        If Not ErrorDisplayTime.Enabled Then
            OriginalText = Me.Text
        End If

        ErrorDisplayTime.Enabled = True

        Text = ErrorMessage
    End Sub

    '**************************************************************************************
    '* Return the text back to its original after displaying the error for a few seconds.
    '**************************************************************************************
    Private Sub ErrorDisplay_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Text = OriginalText

        If ErrorDisplayTime IsNot Nothing Then
            ErrorDisplayTime.Enabled = False
            ErrorDisplayTime.Dispose()
            ErrorDisplayTime = Nothing
        End If
    End Sub
#End Region

#Region "Keypad popup for data entry"
    Private KeypadPopUp As MfgControl.AdvancedHMI.Controls.Keypad

    'Public Property KPD As MfgControl.AdvancedHMI.Controls.Keypad

    Private m_KeypadText As String
    Public Property KeypadText() As String
        Get
            Return m_KeypadText
        End Get
        Set(ByVal value As String)
            m_KeypadText = value
        End Set
    End Property

    Private m_KeypadFontColor As Color = Color.WhiteSmoke
    Public Property KeypadFontColor() As Color
        Get
            Return m_KeypadFontColor
        End Get
        Set(ByVal value As Color)
            m_KeypadFontColor = value
        End Set
    End Property

    Private m_KeypadWidth As Integer = 300
    Public Property KeypadWidth() As Integer
        Get
            Return m_KeypadWidth
        End Get
        Set(ByVal value As Integer)
            m_KeypadWidth = value
        End Set
    End Property

    Private m_KeypadScaleFactor As Double = 1
    Public Property KeypadScaleFactor() As Double
        Get
            Return m_KeypadScaleFactor
        End Get
        Set(ByVal value As Double)
            m_KeypadScaleFactor = value
        End Set
    End Property

    Private m_KeypadMinValue As Double
    Public Property KeypadMinValue As Double
        Get
            Return m_KeypadMinValue
        End Get
        Set(value As Double)
            m_KeypadMinValue = value
        End Set
    End Property

    Private m_KeypadMaxValue As Double
    Public Property KeypadMaxValue As Double
        Get
            Return m_KeypadMaxValue
        End Get
        Set(value As Double)
            m_KeypadMaxValue = value
        End Set
    End Property

    Private Sub KeypadPopUp_ButtonClick(ByVal sender As Object, ByVal e As MfgControl.AdvancedHMI.Controls.KeyPadEventArgs)
        If e.Key = "Quit" Then
            KeypadPopUp.Visible = False
        ElseIf e.Key = "Enter" Then
            If m_CommComponent Is Nothing Then
                DisplayError("CommComponent Property not set")
            Else
                If KeypadPopUp.Value <> "" Then
                    Try
                        If m_KeypadMaxValue <> m_KeypadMinValue Then
                            If KeypadPopUp.Value < m_KeypadMinValue Or KeypadPopUp.Value > m_KeypadMaxValue Then
                                MsgBox("Value must be >" & m_KeypadMinValue & " and <" & m_KeypadMaxValue)
                                Exit Sub
                            End If
                        End If
                    Catch ex As Exception
                        MsgBox("Failed to validate value. " & ex.Message)
                        Exit Sub
                    End Try

                    Try
                        If KeypadScaleFactor = 1 Or KeypadScaleFactor = 0 Then
                            m_CommComponent.Write(m_PLCAddressKeypad, KeypadPopUp.Value)
                        Else
                            m_CommComponent.Write(m_PLCAddressKeypad, CDbl(KeypadPopUp.Value) / m_KeypadScaleFactor)
                        End If
                    Catch ex As Exception
                        MsgBox("Failed to write value. " & ex.Message)
                    End Try
                End If
                KeypadPopUp.Visible = False
            End If
        End If
    End Sub

    '***********************************************************
    '* If labeled is clicked, pop up a keypad for data entry
    '***********************************************************
    Protected Overrides Sub OnClick(e As System.EventArgs)
        MyBase.OnClick(e)

        If m_PLCAddressKeypad <> "" And Enabled Then
            If KeypadPopUp Is Nothing Then
                KeypadPopUp = New MfgControl.AdvancedHMI.Controls.Keypad(m_KeypadWidth)
            End If

            AddHandler KeypadPopUp.ButtonClick, AddressOf KeypadPopUp_ButtonClick
            KeypadPopUp.Text = m_KeypadText
            KeypadPopUp.ForeColor = m_KeypadFontColor
            KeypadPopUp.Value = ""
            KeypadPopUp.StartPosition = Windows.Forms.FormStartPosition.CenterScreen
            KeypadPopUp.TopMost = True
            KeypadPopUp.Show()
        End If
    End Sub
#End Region
End Class


text:
namespace KodiRemote.Core.Commands
{
    public abstract class CommandCollection
    {
    }
}