text:
package com.asakusafw.testtools.inspect;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Calendar;

import org.apache.hadoop.io.Writable;

import com.asakusafw.runtime.value.Date;
import com.asakusafw.runtime.value.DateOption;
import com.asakusafw.runtime.value.DateTime;
import com.asakusafw.runtime.value.DateTimeOption;
import com.asakusafw.runtime.value.StringOption;
import com.asakusafw.runtime.value.ValueOption;
import com.asakusafw.testtools.ColumnInfo;
import com.asakusafw.testtools.inspect.Cause.Type;

/**
 * 標準的な{@link Inspector}の実装。
 */
public final class DefaultInspector extends AbstractInspector {

    @Override
    protected void inspect(Writable expectRow, Writable actualRow) {
        for (ColumnInfo columnInfo : getColumnInfos()) {
            Method method;
            try {
                method = expectRow.getClass().getMethod(columnInfo.getGetterName());
                ValueOption<?> expectVal = (ValueOption<?>) method.invoke(expectRow);
                ValueOption<?> actualVal = (ValueOption<?>) method.invoke(actualRow);
                inspect(expectRow, actualRow, expectVal, actualVal, columnInfo);
            } catch (SecurityException e) {
                throw new RuntimeException(e);
            } catch (NoSuchMethodException e) {
                throw new RuntimeException(e);
            } catch (IllegalArgumentException e) {
                throw new RuntimeException(e);
            } catch (IllegalAccessException e) {
                throw new RuntimeException(e);
            } catch (InvocationTargetException e) {
                throw new RuntimeException(e);
            }
        }
    }

    /**
     * 指定のレコードに対する値を検査する。
     * @param expect 期待値のレコード(エラーメッセージの作成に使用)
     * @param actual 実値のレコード(エラーメッセージの作成に使用)
     * @param expectVal 期待値
     * @param actualVal 実値
     * @param columnInfo カラム情報
     */
    private void inspect(
            Writable expect,
            Writable actual,
            ValueOption<?> expectVal,
            ValueOption<?> actualVal,
            ColumnInfo columnInfo) {
        if (actualVal.isNull()) {
            switch (columnInfo.getNullValueCondition()) {
            case NULL_IS_NG:
                fail(Type.COLUMN_VALUE_MISSMATCH, expect, actual, expectVal, actualVal, columnInfo);
                return;
            case NULL_IS_OK:
                return;
            case NORMAL:
            case NOT_NULL_IS_NG:
            case NOT_NULL_IS_OK:
                break; // 次に進む
            default:
                throw new RuntimeException("Unsupported test condition");
            }
        }
        if (!actualVal.isNull()) {
            switch (columnInfo.getNullValueCondition()) {
            case NOT_NULL_IS_NG:
                fail(Type.COLUMN_VALUE_MISSMATCH, expect, actual, expectVal, actualVal, columnInfo);
                return;
            case NOT_NULL_IS_OK:
                return;
            case NORMAL:
            case NULL_IS_OK:
            case NULL_IS_NG:
                break; // 次に進む
            default:
                throw new RuntimeException("Unsupported test condition");
            }
        }
        switch (columnInfo.getColumnMatchingCondition()) {
        case EXACT: // 完全一致
            inspectExact(expect, actual, expectVal, actualVal, columnInfo);
            break;
        case NONE: // 検査しない場合常に成功
            return;
        case NOW: // 現在時刻
            inspectNow(expect, actual, expectVal, actualVal, columnInfo);
            break;
        case TODAY: // 現在日
            inspectToday(expect, actual, expectVal, actualVal, columnInfo);
            break;
        case PARTIAL: // 部分一致
            inspectPartialt(expect, actual, expectVal, actualVal, columnInfo);
            break;
        default:
            throw new RuntimeException("Unsupported test Condition");
        }
    }

    /**
     * 指定のレコードに対する値を厳密に検査する。
     * @param expect 期待値のレコード(エラーメッセージの作成に使用)
     * @param actual 実値のレコード(エラーメッセージの作成に使用)
     * @param expectVal 期待値
     * @param actualVal 実値
     * @param columnInfo カラム情報
     */
    private void inspectExact(
            Writable expect,
            Writable actual,
            ValueOption<?> expectVal,
            ValueOption<?> actualVal,
            ColumnInfo columnInfo) {
        if (!expectVal.equals(actualVal)) {
            fail(Type.COLUMN_VALUE_MISSMATCH, expect, actual, expectVal, actualVal, columnInfo);
            return;
        } else {
            return;
        }
    }

    /**
     * 指定のレコードに対する値を部分的に検査する。
     * @param expect 期待値のレコード(エラーメッセージの作成に使用)
     * @param actual 実値のレコード(エラーメッセージの作成に使用)
     * @param expectVal 期待値
     * @param actualVal 実値
     * @param columnInfo カラム情報
     */
    private void inspectPartialt(
            Writable expect,
            Writable actual,
            ValueOption<?> expectVal,
            ValueOption<?> actualVal,
            ColumnInfo columnInfo) {
        // StringOptionにキャスト
        StringOption actualStringOption;
        StringOption expectStringOption;
        if (actualVal instanceof StringOption) {
            actualStringOption = (StringOption) actualVal;
            expectStringOption = (StringOption) expectVal;
        } else {
            fail(Type.CONDITION_PARTIAL_ON_INVALID_COLUMN, expect, actual, expectVal, actualVal, columnInfo);
            return;
        }
        // まず完全一致をテストする(期待値と実値が両方ともNULLまたはNULL文字列の場合も
        // 完全一致とみなされるため、以降期待値と実値が両方ともNULLまたはNULL文字列の場合を
        // 考慮しなくてもよい
        if (actualStringOption.equals(expectStringOption)) {
            return;
        }
        // 期待値、実地のどちらかがNULLかNULL文字列の場合、検証を失敗させる
        if (actualStringOption.isNull()
                || expectStringOption.isNull()
                || actualStringOption.getAsString().length() == 0
                || expectStringOption.getAsString().length() == 0) {
            fail(Type.COLUMN_VALUE_MISSMATCH, expect, actual, expectVal, actualVal, columnInfo);
            return;
        }
        String actualString = actualStringOption.getAsString();
        String expectString = expectStringOption.getAsString();
        if (actualString.indexOf(expectString) == -1) {
            fail(Type.COLUMN_VALUE_MISSMATCH, expect, actual, expectVal, actualVal, columnInfo);
            return;
        } else {
            return;
        }
    }

    /**
     * 「現在」に関する項目を検査する。
     * @param expect 期待値のレコード(エラーメッセージの作成に使用)
     * @param actual 実値のレコード(エラーメッセージの作成に使用)
     * @param expectVal 期待値
     * @param actualVal 実値
     * @param columnInfo カラム情報
     */
    private void inspectNow(
            Writable expect,
            Writable actual,
            ValueOption<?> expectVal,
            ValueOption<?> actualVal,
            ColumnInfo columnInfo) {
        Calendar cal = Calendar.getInstance();
        if (actualVal instanceof DateTimeOption) {
            if (actualVal.isNull()) {
                fail(Type.NOT_IN_TESTING_TIME, expect, actual, expectVal, actualVal, columnInfo);
                return;
            }
            DateTimeOption dateTimeOption = (DateTimeOption) actualVal;
            DateTime dateTime = dateTimeOption.get();
            int y = dateTime.getYear();
            int m = dateTime.getMonth();
            int d = dateTime.getDay();
            int h = dateTime.getHour();
            int min = dateTime.getMinute();
            int s = dateTime.getSecond();
            cal.clear();
            cal.set(y, m - 1, d, h, min, s);
        } else {
            fail(Type.CONDITION_NOW_ON_INVALID_COLUMN, expect, actual, expectVal, actualVal, columnInfo);
            return;
        }
        long time = cal.getTimeInMillis();
        // getStartTime()はミリ秒の値を持つのに対し、timeはミリ秒の値を持たない
        // この影響を排除するため、startTime - 1秒の値を使用して比較する
        if (getStartTime() - 1000 <= time && time <= getFinishTime()) {
            return;
        } else {
            fail(Type.NOT_IN_TESTING_TIME, expect, actual, expectVal, actualVal, columnInfo);
            return;
        }
    }

    /**
     * 「本日」に関する項目を検査する。
     * @param expect 期待値のレコード(エラーメッセージの作成に使用)
     * @param actual 実値のレコード(エラーメッセージの作成に使用)
     * @param expectVal 期待値
     * @param actualVal 実値
     * @param columnInfo カラム情報
     */
    private void inspectToday(
            Writable expect,
            Writable actual,
            ValueOption<?> expectVal,
            ValueOption<?> actualVal,
            ColumnInfo columnInfo) {
        Calendar cal = Calendar.getInstance();
        if (actualVal instanceof DateOption) {
            if (actualVal.isNull()) {
                fail(Type.NOT_IN_TEST_DAY, expect, actual, expectVal, actualVal, columnInfo);
                return;
            }
            DateOption dateOption = (DateOption) actualVal;
            Date date = dateOption.get();
            cal.clear();
            cal.set(date.getYear(), date.getMonth() - 1, date.getDay());
        } else if (actualVal instanceof DateTimeOption) {
            if (actualVal.isNull()) {
                fail(Type.NOT_IN_TEST_DAY, expect, actual, expectVal, actualVal, columnInfo);
                return;
            }
            DateTimeOption dateTimeOption = (DateTimeOption) actualVal;
            DateTime dateTime = dateTimeOption.get();
            int y = dateTime.getYear();
            int m = dateTime.getMonth();
            int d = dateTime.getDay();
            int h = dateTime.getHour();
            int min = dateTime.getMinute();
            int s = dateTime.getSecond();
            cal.clear();
            cal.set(y, m - 1, d, h, min, s);
        } else {
            fail(Type.CONDITION_TODAY_ON_INVALID_COLUMN, expect, actual, expectVal, actualVal, columnInfo);
            return;
        }
        Calendar startDay = Calendar.getInstance();
        startDay.setTimeInMillis(getStartTime());
        truncateCalendar(startDay);
        Calendar finishDay = Calendar.getInstance();
        finishDay.setTimeInMillis(getFinishTime());
        truncateCalendar(finishDay);
        finishDay.add(Calendar.DAY_OF_MONTH, 1);
        long time = cal.getTimeInMillis();
        if (startDay.getTimeInMillis() <= time && time < finishDay.getTimeInMillis()) {
            return;
        } else {
            fail(Type.NOT_IN_TEST_DAY, expect, actual, expectVal, actualVal, columnInfo);
            return;
        }
    }

    /**
     * 指定したカレンダーオブジェクトの時分秒を切り捨てる。
     * @param cal 対象のカレンダー
     */
    private void truncateCalendar(Calendar cal) {
        int y = cal.get(Calendar.YEAR);
        int m = cal.get(Calendar.MONTH);
        int d = cal.get(Calendar.DAY_OF_MONTH);
        cal.clear();
        cal.set(y, m, d);
    }
}


text:
package one.util.streamex;

import java.util.Spliterator;
import java.util.function.Consumer;

import one.util.streamex.Internals.TailSpliterator;

/**
 * @author Tagir Valeev
 *
 * @param <T> type of the elements
 */
/* package */class PrependSpliterator<T> implements TailSpliterator<T> {
    private Spliterator<T> source;
    private T element;
    private int mode;

    public PrependSpliterator(Spliterator<T> source, T element) {
        this.source = source;
        this.element = element;
        this.mode = source.estimateSize() < Long.MAX_VALUE - 1 ? 1 : 2;
    }

    @Override
    public boolean tryAdvance(Consumer<? super T> action) {
        if (mode == 0)
            return source.tryAdvance(action);
        action.accept(element);
        element = null;
        mode = 0;
        return true;
    }

    @Override
    public Spliterator<T> tryAdvanceOrTail(Consumer<? super T> action) {
        if (mode == 0) {
            Spliterator<T> s = source;
            source = null;
            return s;
        }
        action.accept(element);
        element = null;
        mode = 0;
        return this;
    }

    @Override
    public void forEachRemaining(Consumer<? super T> action) {
        if (mode != 0)
            action.accept(element);
        element = null;
        mode = 0;
        source.forEachRemaining(action);
    }

    @Override
    public Spliterator<T> forEachOrTail(Consumer<? super T> action) {
        if (mode != 0) {
            action.accept(element);
        }
        Spliterator<T> s = source;
        element = null;
        mode = 0;
        source = null;
        return s;
    }

    @Override
    public Spliterator<T> trySplit() {
        if (mode == 0)
            return source.trySplit();
        mode = 0;
        return new ConstSpliterator.OfRef<>(element, 1, true);
    }

    @Override
    public long estimateSize() {
        long size = source.estimateSize();
        return mode == 0 || size == Long.MAX_VALUE ? size : size + 1;
    }

    @Override
    public int characteristics() {
        switch (mode) {
        case 1:
            return source.characteristics() & (ORDERED | SIZED | SUBSIZED);
        case 2:
            return source.characteristics() & ORDERED;
        default:
            return source.characteristics();
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
Chart - BaseAxis.has_gridlines
==============================

A chart axis can have gridlines that extend the axis tick marks across the
body of the plot area. Gridlines for major and minor tick marks can be
controlled separately. Both vertical and horizontal axes can have gridlines.

Candidate protocol
------------------

::

    >>> value_axis = chart.value_axis
    >>> value_axis.has_major_gridlines
    False
    >>> value_axis.has_major_gridlines = True
    >>> value_axis.has_major_gridlines
    True
    >>> category_axis = chart.category_axis
    >>> category_axis.has_minor_gridlines
    False
    >>> category_axis.has_minor_gridlines = True
    >>> category_axis.has_minor_gridlines
    True

Can be implemented in BaseAxis since the controlling element appears in
``EG_AxShared``.

Microsoft API
-------------

Axis.HasMajorGridlines
    True if the axis has major gridlines. Read/write Boolean.

Axis.HasMinorGridlines
    True if the axis has minor gridlines. Read/write Boolean.

Axis.MajorGridlines
    Returns the major gridlines for the specified axis. Read-only Gridlines.

Axis.MinorGridlines
    Returns the minor gridlines for the specified axis. Read-only Gridlines.

Gridlines.Border

Gridlines.Format.Line

Gridlines.Format.Shadow

PowerPoint behavior
-------------------

* Turning gridlines on and off is controlled from the ribbon (on the Mac at
  least)
* Each set of gridlines (horz/vert, major/minor) can be formatted
  individually.
* The formatting dialog has panes for Line, Shadow, and Glow & Soft Edges

XML Semantics
-------------

* Each axis can have a ``<c:majorGridlines>`` and a ``<c:minorGridlines>``
  element.
* The corresponding gridlines appear if the element is present and not if it
  doesn't.
* Line formatting, like width and color, is specified in the child
  ``<c:spPr>`` element.

XML specimens
-------------

.. highlight:: xml

Example axis XML for a single-series line plot::

  <c:catAx>
    <c:axId val="-2097691448"/>
    <c:scaling>
      <c:orientation val="minMax"/>
    </c:scaling>
    <c:delete val="0"/>
    <c:axPos val="b"/>
    <c:majorGridlines/>
    <c:minorGridlines/>
    <c:numFmt formatCode="General" sourceLinked="0"/>
    <c:majorTickMark val="out"/>
    <c:minorTickMark val="none"/>
    <c:tickLblPos val="nextTo"/>
    <c:txPr>
      <a:bodyPr/>
      <a:lstStyle/>
      <a:p>
        <a:pPr>
          <a:defRPr sz="1000"/>
        </a:pPr>
        <a:endParaRPr lang="en-US"/>
      </a:p>
    </c:txPr>
    <c:crossAx val="-2097683336"/>
    <c:crosses val="autoZero"/>
    <c:auto val="1"/>
    <c:lblAlgn val="ctr"/>
    <c:lblOffset val="100"/>
    <c:noMultiLvlLbl val="0"/>
  </c:catAx>

Related Schema Definitions
--------------------------

::

  <xsd:complexType name="CT_CatAx">  <!-- denormalized -->
    <xsd:sequence>
      <xsd:element name="axId"           type="CT_UnsignedInt"/>
      <xsd:element name="scaling"        type="CT_Scaling"/>
      <xsd:element name="delete"         type="CT_Boolean"           minOccurs="0"/>
      <xsd:element name="axPos"          type="CT_AxPos"/>
      <xsd:element name="majorGridlines" type="CT_ChartLines"        minOccurs="0"/>
      <xsd:element name="minorGridlines" type="CT_ChartLines"        minOccurs="0"/>
      <xsd:element name="title"          type="CT_Title"             minOccurs="0"/>
      <xsd:element name="numFmt"         type="CT_NumFmt"            minOccurs="0"/>
      <xsd:element name="majorTickMark"  type="CT_TickMark"          minOccurs="0"/>
      <xsd:element name="minorTickMark"  type="CT_TickMark"          minOccurs="0"/>
      <xsd:element name="tickLblPos"     type="CT_TickLblPos"        minOccurs="0"/>
      <xsd:element name="spPr"           type="a:CT_ShapeProperties" minOccurs="0"/>
      <xsd:element name="txPr"           type="a:CT_TextBody"        minOccurs="0"/>
      <xsd:element name="crossAx"        type="CT_UnsignedInt"/>
      <xsd:choice                                                    minOccurs="0">
        <xsd:element name="crosses"      type="CT_Crosses"/>
        <xsd:element name="crossesAt"    type="CT_Double"/>
      </xsd:choice>
      <xsd:element name="auto"           type="CT_Boolean"           minOccurs="0"/>
      <xsd:element name="lblAlgn"        type="CT_LblAlgn"           minOccurs="0"/>
      <xsd:element name="lblOffset"      type="CT_LblOffset"         minOccurs="0"/>
      <xsd:element name="tickLblSkip"    type="CT_Skip"              minOccurs="0"/>
      <xsd:element name="tickMarkSkip"   type="CT_Skip"              minOccurs="0"/>
      <xsd:element name="noMultiLvlLbl"  type="CT_Boolean"           minOccurs="0"/>
      <xsd:element name="extLst"         type="CT_ExtensionList"     minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="CT_ValAx">  <!-- denormalized -->
    <xsd:sequence>
      <xsd:element name="axId"           type="CT_UnsignedInt"/>
      <xsd:element name="scaling"        type="CT_Scaling"/>
      <xsd:element name="delete"         type="CT_Boolean"           minOccurs="0"/>
      <xsd:element name="axPos"          type="CT_AxPos"/>
      <xsd:element name="majorGridlines" type="CT_ChartLines"        minOccurs="0"/>
      <xsd:element name="minorGridlines" type="CT_ChartLines"        minOccurs="0"/>
      <xsd:element name="title"          type="CT_Title"             minOccurs="0"/>
      <xsd:element name="numFmt"         type="CT_NumFmt"            minOccurs="0"/>
      <xsd:element name="majorTickMark"  type="CT_TickMark"          minOccurs="0"/>
      <xsd:element name="minorTickMark"  type="CT_TickMark"          minOccurs="0"/>
      <xsd:element name="tickLblPos"     type="CT_TickLblPos"        minOccurs="0"/>
      <xsd:element name="spPr"           type="a:CT_ShapeProperties" minOccurs="0"/>
      <xsd:element name="txPr"           type="a:CT_TextBody"        minOccurs="0"/>
      <xsd:element name="crossAx"        type="CT_UnsignedInt"/>
      <xsd:choice                                                    minOccurs="0">
        <xsd:element name="crosses"   type="CT_Crosses"/>
        <xsd:element name="crossesAt" type="CT_Double"/>
      </xsd:choice>
      <xsd:element name="crossBetween"   type="CT_CrossBetween"      minOccurs="0"/>
      <xsd:element name="majorUnit"      type="CT_AxisUnit"          minOccurs="0"/>
      <xsd:element name="minorUnit"      type="CT_AxisUnit"          minOccurs="0"/>
      <xsd:element name="dispUnits"      type="CT_DispUnits"         minOccurs="0"/>
      <xsd:element name="extLst"         type="CT_ExtensionList"     minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="CT_DateAx">
    <xsd:sequence>
      <xsd:group    ref="EG_AxShared"/>
      <xsd:element name="auto"          type="CT_Boolean"       minOccurs="0"/>
      <xsd:element name="lblOffset"     type="CT_LblOffset"     minOccurs="0"/>
      <xsd:element name="baseTimeUnit"  type="CT_TimeUnit"      minOccurs="0"/>
      <xsd:element name="majorUnit"     type="CT_AxisUnit"      minOccurs="0"/>
      <xsd:element name="majorTimeUnit" type="CT_TimeUnit"      minOccurs="0"/>
      <xsd:element name="minorUnit"     type="CT_AxisUnit"      minOccurs="0"/>
      <xsd:element name="minorTimeUnit" type="CT_TimeUnit"      minOccurs="0"/>
      <xsd:element name="extLst"        type="CT_ExtensionList" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="CT_SerAx">
    <xsd:sequence>
      <xsd:group    ref="EG_AxShared"/>
      <xsd:element name="tickLblSkip"  type="CT_Skip"          minOccurs="0"/>
      <xsd:element name="tickMarkSkip" type="CT_Skip"          minOccurs="0"/>
      <xsd:element name="extLst"       type="CT_ExtensionList" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:group name="EG_AxShared">
    <xsd:sequence>
      <xsd:element name="axId"           type="CT_UnsignedInt"/>
      <xsd:element name="scaling"        type="CT_Scaling"/>
      <xsd:element name="delete"         type="CT_Boolean"           minOccurs="0"/>
      <xsd:element name="axPos"          type="CT_AxPos"/>
      <xsd:element name="majorGridlines" type="CT_ChartLines"        minOccurs="0"/>
      <xsd:element name="minorGridlines" type="CT_ChartLines"        minOccurs="0"/>
      <xsd:element name="title"          type="CT_Title"             minOccurs="0"/>
      <xsd:element name="numFmt"         type="CT_NumFmt"            minOccurs="0"/>
      <xsd:element name="majorTickMark"  type="CT_TickMark"          minOccurs="0"/>
      <xsd:element name="minorTickMark"  type="CT_TickMark"          minOccurs="0"/>
      <xsd:element name="tickLblPos"     type="CT_TickLblPos"        minOccurs="0"/>
      <xsd:element name="spPr"           type="a:CT_ShapeProperties" minOccurs="0"/>
      <xsd:element name="txPr"           type="a:CT_TextBody"        minOccurs="0"/>
      <xsd:element name="crossAx"        type="CT_UnsignedInt"/>
      <xsd:choice minOccurs="0" maxOccurs="1">
        <xsd:element name="crosses"   type="CT_Crosses"/>
        <xsd:element name="crossesAt" type="CT_Double"/>
      </xsd:choice>
    </xsd:sequence>
  </xsd:group>

  <xsd:complexType name="CT_ChartLines">
    <xsd:sequence>
      <xsd:element name="spPr" type="a:CT_ShapeProperties" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>


text:
function UniversalAnalyticsPlugin() {}

UniversalAnalyticsPlugin.prototype.startTrackerWithId = function(id, success, error) {
  cordova.exec(success, error, 'UniversalAnalytics', 'startTrackerWithId', [id]);
};

UniversalAnalyticsPlugin.prototype.setUserId = function(id, success, error) {
  cordova.exec(success, error, 'UniversalAnalytics', 'setUserId', [id]);
};

/* enables verbose logging */
UniversalAnalyticsPlugin.prototype.debugMode = function(success, error) {
  cordova.exec(success, error, 'UniversalAnalytics', 'debugMode', []);
};

UniversalAnalyticsPlugin.prototype.trackView = function(screen, success, error) {
  cordova.exec(success, error, 'UniversalAnalytics', 'trackView', [screen]);
};

UniversalAnalyticsPlugin.prototype.addCustomDimension = function(key, value, success, error) {
  cordova.exec(success, error, 'UniversalAnalytics', 'addCustomDimension', [key, value]);
};

UniversalAnalyticsPlugin.prototype.trackEvent = function(category, action, label, value, success, error) {
  if (typeof label === 'undefined' || label === null) {
    label = '';
  }
	if (typeof value === 'undefined' || value === null) {
		value = 0;
  }

	cordova.exec(success, error, 'UniversalAnalytics', 'trackEvent', [category, action, label, value]);
};

module.exports = new UniversalAnalyticsPlugin();


text:
/**
 * App
 *
 * Write down all business related codes here
 */

(function() {

}).call(this);


text:
/**
 *Interface Local CapacitacionAlumnoFacadeLocal que contiene el
 * CRUD(crear,borrar,modificar,buscar) de la clase de entidad CapacitacionAlumno
 */
package ec.edu.espe.educat.dao;

import ec.edu.espe.edu.educat.model.CapacitacionAlumno;
import java.util.List;
import javax.ejb.Local;

/**
 * @version 1.0
 * @author Jefferson Tambaco
 */
@Local
public interface CapacitacionAlumnoFacadeLocal {

    void create(CapacitacionAlumno capacitacionAlumno);

    void edit(CapacitacionAlumno capacitacionAlumno);

    void remove(CapacitacionAlumno capacitacionAlumno);

    CapacitacionAlumno find(Object id);

    List<CapacitacionAlumno> findAll();

    List<CapacitacionAlumno> findRange(int[] range);

    int count();

}


text:
\section{Class List}
Here are the classes, structs, unions and interfaces with brief descriptions\+:\begin{DoxyCompactList}
\item\contentsline{section}{\hyperlink{class_basic__window}{Basic\+\_\+window} }{\pageref{class_basic__window}}{}
\item\contentsline{section}{\hyperlink{classc_fw_access}{c\+Fw\+Access} }{\pageref{classc_fw_access}}{}
\item\contentsline{section}{\hyperlink{classc_i_p}{c\+I\+P} }{\pageref{classc_i_p}}{}
\item\contentsline{section}{\hyperlink{class_country___data}{Country\+\_\+\+Data} }{\pageref{class_country___data}}{}
\item\contentsline{section}{\hyperlink{class_country_data_dialog}{Country\+Data\+Dialog} }{\pageref{class_country_data_dialog}}{}
\item\contentsline{section}{\hyperlink{class_t_c_p_form}{T\+C\+P\+Form} }{\pageref{class_t_c_p_form}}{}
\item\contentsline{section}{\hyperlink{struct_country___data_1_1_value}{Country\+\_\+\+Data\+::\+Value} }{\pageref{struct_country___data_1_1_value}}{}
\end{DoxyCompactList}


text:
// [[[[INFO>
// Copyright 2015 Epicycle (http://epicycle.org, https://github.com/open-epicycle)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// For more information check https://github.com/open-epicycle/Epicycle.Graphics-cs
// ]]]]

using Epicycle.Graphics.Images;
using System;

namespace Epicycle.Graphics.Platform.SystemDrawing.Images
{
    using System.Drawing;
    // TODO: Test

    public static class ImageUtils
    {
        public static Bitmap ToBitmap<TType>(this IReadOnlyImageByte<TType> @this)
        {
            if (typeof(TType).Equals(typeof(MonoImageType)))
            {
                return ((IReadOnlyImageByte<MonoImageType>)@this).ToBitmap();
            }

            if (typeof(TType).Equals(typeof(RgbImageType)))
            {
                return ((IReadOnlyImageByte<RgbImageType>)@this).ToBitmap();
            }

            throw new NotImplementedException(string.Format("Unsupported image type {0}", typeof(TType)));
        }

        public static unsafe Bitmap ToBitmap(this IReadOnlyImageByte<RgbImageType> @this)
        {
            var answer = new Bitmap(@this.Width(), @this.Height());

            var step = @this.Step;
            var dimensions = @this.Dimensions;

            using (var pin = @this.Open())
            {
                var ptr = pin.Ptr;

                for (var j = 0; j < dimensions.Y; j++)
                {
                    var pixelPtr = ptr;

                    for (var i = 0; i < dimensions.X; i++)
                    {
                        var colour = Color.FromArgb(pixelPtr[0], pixelPtr[1], pixelPtr[2]);
                        answer.SetPixel(i, j, colour);

                        pixelPtr += step.X;
                    }

                    ptr += step.Y;
                }
            }

            return answer;
        }

        public static unsafe Bitmap ToBitmap(this IReadOnlyImageByte<MonoImageType> @this)
        {
            var answer = new Bitmap(@this.Width(), @this.Height());

            var step = @this.Step;
            var dimensions = @this.Dimensions;

            using (var pin = @this.Open())
            {
                var ptr = pin.Ptr;

                for (var j = 0; j < dimensions.Y; j++)
                {
                    var pixelPtr = ptr;

                    for (var i = 0; i < dimensions.X; i++)
                    {
                        var colour = Color.FromArgb(*pixelPtr, *pixelPtr, *pixelPtr);
                        answer.SetPixel(i, j, colour);

                        pixelPtr += step.X;
                    }

                    ptr += step.Y;
                }
            }

            return answer;
        }

        public static unsafe IImageByte<RgbImageType> ToMetaqubeImage(this Bitmap @this)
        {
            var answer = new ImageByte<RgbImageType>(@this.Width, @this.Height);

            var step = answer.Step;
            var dimensions = answer.Dimensions;

            using (var pin = answer.Open())
            {
                var ptr = pin.Ptr;

                for (var j = 0; j < dimensions.Y; j++)
                {
                    var pixelPtr = ptr;

                    for (var i = 0; i < dimensions.X; i++)
                    {
                        var colour = @this.GetPixel(i, j); // TODO: Implement using Bitmap.LockBits

                        pixelPtr[0] = colour.R;
                        pixelPtr[1] = colour.G;
                        pixelPtr[2] = colour.B;

                        pixelPtr += step.X;
                    }

                    ptr += step.Y;
                }
            }

            return answer;
        }
    }
}


text:
namespace foundation    { class IAbortSwitch; }
namespace renderer      { class Project; }

using namespace foundation;
using namespace std;

namespace renderer
{

namespace
{
    //
    // An environment EDF implementing the Preetham day sky model.
    //
    // References:
    //
    //   http://www.cs.utah.edu/~shirley/papers/sunsky/sunsky.pdf
    //   http://www.cg.tuwien.ac.at/research/publications/2007/zotti-2007-wscg/zotti-2007-wscg-.pdf
    //   http://liveweb.archive.org/http://www.eisscholle.de/articles/daysky.pdf
    //   http://ompf2.com/viewtopic.php?f=3&t=33
    //

    const char* Model = "preetham_environment_edf";

    // The smallest valid turbidity value.
    const float BaseTurbidity = 2.0f;

    class PreethamEnvironmentEDF
      : public EnvironmentEDF
    {
      public:
        PreethamEnvironmentEDF(
            const char*             name,
            const ParamArray&       params)
          : EnvironmentEDF(name, params)
        {
            m_inputs.declare("sun_theta", InputFormatFloat);
            m_inputs.declare("sun_phi", InputFormatFloat);
            m_inputs.declare("turbidity", InputFormatFloat);
            m_inputs.declare("turbidity_multiplier", InputFormatFloat, "2.0");
            m_inputs.declare("luminance_multiplier", InputFormatFloat, "1.0");
            m_inputs.declare("luminance_gamma", InputFormatFloat, "1.0");
            m_inputs.declare("saturation_multiplier", InputFormatFloat, "1.0");
            m_inputs.declare("horizon_shift", InputFormatFloat, "0.0");
        }

        virtual void release() override
        {
            delete this;
        }

        virtual const char* get_model() const override
        {
            return Model;
        }

        virtual bool on_frame_begin(
            const Project&          project,
            const BaseGroup*        parent,
            OnFrameBeginRecorder&   recorder,
            IAbortSwitch*           abort_switch) override
        {
            if (!EnvironmentEDF::on_frame_begin(project, parent, recorder, abort_switch))
                return false;

            // Evaluate uniform values.
            m_inputs.evaluate_uniforms(&m_uniform_values);

            // Compute the sun direction.
            m_sun_theta = deg_to_rad(m_uniform_values.m_sun_theta);
            m_sun_phi = deg_to_rad(m_uniform_values.m_sun_phi);
            m_sun_dir = Vector3f::make_unit_vector(m_sun_theta, m_sun_phi);
            m_cos_sun_theta = cos(m_sun_theta);

            // Precompute some stuff if turbidity is uniform.
            m_uniform_turbidity = m_inputs.source("turbidity")->is_uniform();
            if (m_uniform_turbidity)
            {
                // Apply turbidity multiplier and bias.
                m_uniform_values.m_turbidity *= m_uniform_values.m_turbidity_multiplier;
                m_uniform_values.m_turbidity += BaseTurbidity;

                // Precompute the coefficients of the luminance and chromaticity distribution functions.
                compute_x_coefficients(m_uniform_values.m_turbidity, m_uniform_x_coeffs);
                compute_y_coefficients(m_uniform_values.m_turbidity, m_uniform_y_coeffs);
                compute_Y_coefficients(m_uniform_values.m_turbidity, m_uniform_Y_coeffs);

                // Precompute the luminance and chromaticity at zenith.
                m_uniform_x_zenith = compute_zenith_x(m_uniform_values.m_turbidity, m_sun_theta);
                m_uniform_y_zenith = compute_zenith_y(m_uniform_values.m_turbidity, m_sun_theta);
                m_uniform_Y_zenith = compute_zenith_Y(m_uniform_values.m_turbidity, m_sun_theta);
            }

            return true;
        }

        virtual void sample(
            const ShadingContext&   shading_context,
            const Vector2f&         s,
            Vector3f&               outgoing,
            Spectrum&               value,
            float&                  probability) const override
        {
            const Vector3f local_outgoing = sample_hemisphere_cosine(s);

            Transformd scratch;
            const Transformd& transform = m_transform_sequence.evaluate(0.0f, scratch);
            outgoing = transform.vector_to_parent(local_outgoing);
            const Vector3f shifted_outgoing = shift(local_outgoing);

            RegularSpectrum31f radiance;
            if (shifted_outgoing.y > 0.0f)
                compute_sky_radiance(shading_context, shifted_outgoing, radiance);
            else radiance.set(0.0f);

            value.set(radiance, g_std_lighting_conditions, Spectrum::Illuminance);
            probability = shifted_outgoing.y > 0.0f ? shifted_outgoing.y * RcpPi<float>() : 0.0f;
        }

        virtual void evaluate(
            const ShadingContext&   shading_context,
            const Vector3f&         outgoing,
            Spectrum&               value) const override
        {
            assert(is_normalized(outgoing));

            Transformd scratch;
            const Transformd& transform = m_transform_sequence.evaluate(0.0f, scratch);
            const Vector3f local_outgoing = transform.vector_to_local(outgoing);
            const Vector3f shifted_outgoing = shift(local_outgoing);

            RegularSpectrum31f radiance;
            if (shifted_outgoing.y > 0.0f)
                compute_sky_radiance(shading_context, shifted_outgoing, radiance);
            else radiance.set(0.0f);

            value.set(radiance, g_std_lighting_conditions, Spectrum::Illuminance);
        }

        virtual void evaluate(
            const ShadingContext&   shading_context,
            const Vector3f&         outgoing,
            Spectrum&               value,
            float&                  probability) const override
        {
            assert(is_normalized(outgoing));

            Transformd scratch;
            const Transformd& transform = m_transform_sequence.evaluate(0.0f, scratch);
            const Vector3f local_outgoing = transform.vector_to_local(outgoing);
            const Vector3f shifted_outgoing = shift(local_outgoing);

            RegularSpectrum31f radiance;
            if (shifted_outgoing.y > 0.0f)
                compute_sky_radiance(shading_context, shifted_outgoing, radiance);
            else radiance.set(0.0f);

            value.set(radiance, g_std_lighting_conditions, Spectrum::Illuminance);
            probability = shifted_outgoing.y > 0.0f ? shifted_outgoing.y * RcpPi<float>() : 0.0f;
        }

        virtual float evaluate_pdf(
            const Vector3f&         outgoing) const override
        {
            assert(is_normalized(outgoing));

            Transformd scratch;
            const Transformd& transform = m_transform_sequence.evaluate(0.0f, scratch);
            const Vector3f local_outgoing = transform.vector_to_local(outgoing);
            const Vector3f shifted_outgoing = shift(local_outgoing);

            return shifted_outgoing.y > 0.0f ? shifted_outgoing.y * RcpPi<float>() : 0.0f;
        }

      private:
        APPLESEED_DECLARE_INPUT_VALUES(InputValues)
        {
            float   m_sun_theta;                    // sun zenith angle in degrees, 0=zenith
            float   m_sun_phi;                      // degrees
            float   m_turbidity;                    // atmosphere turbidity
            float   m_turbidity_multiplier;
            float   m_luminance_multiplier;
            float   m_luminance_gamma;
            float   m_saturation_multiplier;
            float   m_horizon_shift;
        };

        InputValues                 m_uniform_values;

        float                       m_sun_theta;    // sun zenith angle in radians, 0=zenith
        float                       m_sun_phi;      // radians
        Vector3f                    m_sun_dir;
        float                       m_cos_sun_theta;

        bool                        m_uniform_turbidity;
        float                       m_uniform_x_coeffs[5];
        float                       m_uniform_y_coeffs[5];
        float                       m_uniform_Y_coeffs[5];
        float                       m_uniform_x_zenith;
        float                       m_uniform_y_zenith;
        float                       m_uniform_Y_zenith;

        // Compute the coefficients of the luminance distribution function.
        static void compute_Y_coefficients(
            const float             turbidity,
            float                   coeffs[5])
        {
            coeffs[0] =  0.1787f * turbidity - 1.4630f;
            coeffs[1] = -0.3554f * turbidity + 0.4275f;
            coeffs[2] = -0.0227f * turbidity + 5.3251f;
            coeffs[3] =  0.1206f * turbidity - 2.5771f;
            coeffs[4] = -0.0670f * turbidity + 0.3703f;
        }

        // Compute the coefficients of the x chromaticity distribution function.
        static void compute_x_coefficients(
            const float             turbidity,
            float                   coeffs[5])
        {
            coeffs[0] = -0.0193f * turbidity - 0.2592f;
            coeffs[1] = -0.0665f * turbidity + 0.0008f;
            coeffs[2] = -0.0004f * turbidity + 0.2125f;
            coeffs[3] = -0.0641f * turbidity - 0.8989f;
            coeffs[4] = -0.0033f * turbidity + 0.0452f;
        }

        // Compute the coefficients of the y chromaticity distribution function.
        static void compute_y_coefficients(
            const float             turbidity,
            float                   coeffs[5])
        {
            coeffs[0] = -0.0167f * turbidity - 0.2608f;
            coeffs[1] = -0.0950f * turbidity + 0.0092f;
            coeffs[2] = -0.0079f * turbidity + 0.2102f;
            coeffs[3] = -0.0441f * turbidity - 1.6537f;
            coeffs[4] = -0.0109f * turbidity + 0.0529f;
        }

        // Compute the luminance at zenith, in cd.m^-2.
        static float compute_zenith_Y(
            const float             turbidity,
            const float             sun_theta)
        {
            const float chi = ((4.0f / 9.0f) - turbidity / 120.0f) * (Pi<float>() - 2.0f * sun_theta);
            return 1000.0f * ((4.0453f * turbidity - 4.9710f) * tan(chi) - 0.2155f * turbidity + 2.4192f);
        }

        // Compute the x chromaticity at zenith.
        static float compute_zenith_x(
            const float             turbidity,
            const float             sun_theta)
        {
            const float a = ( 0.00166f * turbidity - 0.02903f) * turbidity + 0.11693f;
            const float b = (-0.00375f * turbidity + 0.06377f) * turbidity - 0.21196f;
            const float c = ( 0.00209f * turbidity - 0.03202f) * turbidity + 0.06052f;
            const float d = (                        0.00394f) * turbidity + 0.25886f;
            return ((a * sun_theta + b) * sun_theta + c) * sun_theta + d;
        }

        // Compute the y chromaticity at zenith.
        static float compute_zenith_y(
            const float             turbidity,
            const float             sun_theta)
        {
            const float e = ( 0.00275f * turbidity - 0.04214f) * turbidity + 0.15346f;
            const float f = (-0.00610f * turbidity + 0.08970f) * turbidity - 0.26756f;
            const float g = ( 0.00317f * turbidity - 0.04153f) * turbidity + 0.06670f;
            const float h = (                        0.00516f) * turbidity + 0.26688f;
            return ((e * sun_theta + f) * sun_theta + g) * sun_theta + h;
        }

        // Perez formula describing the sky luminance distribution.
        static float perez(
            const float             rcp_cos_theta,
            const float             gamma,
            const float             cos_gamma,
            const float             coeffs[5])
        {
            const float u = 1.0f + coeffs[0] * exp(coeffs[1] * rcp_cos_theta);
            const float v = 1.0f + coeffs[2] * exp(coeffs[3] * gamma)
                                 + coeffs[4] * cos_gamma * cos_gamma;
            return u * v;
        }

        // Compute one the three quantity defining the sky aspect: the sky luminance Y and the sky chromaticities x and y.
        static float compute_quantity(
            const float             rcp_cos_theta,
            const float             gamma,
            const float             cos_gamma,
            const float             sun_theta,
            const float             cos_sun_theta,
            const float             zenith_val,
            const float             coeffs[5])
        {
            return
                  zenith_val
                * perez(rcp_cos_theta, gamma, cos_gamma, coeffs)
                / perez(1.0f, sun_theta, cos_sun_theta, coeffs);     // todo: build into zenith_val
        }

        // Compute the sky radiance along a given direction.
        void compute_sky_radiance(
            const ShadingContext&   shading_context,
            const Vector3f&         outgoing,
            RegularSpectrum31f&     radiance) const
        {
            if (m_uniform_values.m_luminance_multiplier == 0.0f)
            {
                radiance.set(0.0f);
                return;
            }

            const float rcp_cos_theta = 1.0f / outgoing.y;
            const float cos_gamma = clamp(dot(outgoing, m_sun_dir), -1.0f, 1.0f);
            const float gamma = acos(cos_gamma);

            Color3f xyY;

            if (m_uniform_turbidity)
            {
                // Compute the sky color in the xyY color space.
                xyY[0] = compute_quantity(rcp_cos_theta, gamma, cos_gamma, m_sun_theta, m_cos_sun_theta, m_uniform_x_zenith, m_uniform_x_coeffs);
                xyY[1] = compute_quantity(rcp_cos_theta, gamma, cos_gamma, m_sun_theta, m_cos_sun_theta, m_uniform_y_zenith, m_uniform_y_coeffs);
                xyY[2] = compute_quantity(rcp_cos_theta, gamma, cos_gamma, m_sun_theta, m_cos_sun_theta, m_uniform_Y_zenith, m_uniform_Y_coeffs);
            }
            else
            {
                // Evaluate turbidity.
                float theta, phi;
                float u, v;
                unit_vector_to_angles(outgoing, theta, phi);
                angles_to_unit_square(theta, phi, u, v);
                InputValues values;
                m_inputs.evaluate(shading_context.get_texture_cache(), Vector2f(u, v), &values);
                float turbidity = values.m_turbidity;

                // Apply turbidity multiplier and bias.
                turbidity *= m_uniform_values.m_turbidity_multiplier;
                turbidity += BaseTurbidity;

                // Compute the coefficients of the luminance and chromaticity distribution functions.
                float Y_coeffs[5], x_coeffs[5], y_coeffs[5];
                compute_Y_coefficients(turbidity, Y_coeffs);
                compute_x_coefficients(turbidity, x_coeffs);
                compute_y_coefficients(turbidity, y_coeffs);

                // Compute the luminance and chromaticity at zenith.
                const float x_zenith = compute_zenith_x(turbidity, m_sun_theta);
                const float y_zenith = compute_zenith_y(turbidity, m_sun_theta);
                const float Y_zenith = compute_zenith_Y(turbidity, m_sun_theta);

                // Compute the sky color in the xyY color space.
                xyY[0] = compute_quantity(rcp_cos_theta, gamma, cos_gamma, m_sun_theta, m_cos_sun_theta, x_zenith, x_coeffs);
                xyY[1] = compute_quantity(rcp_cos_theta, gamma, cos_gamma, m_sun_theta, m_cos_sun_theta, y_zenith, y_coeffs);
                xyY[2] = compute_quantity(rcp_cos_theta, gamma, cos_gamma, m_sun_theta, m_cos_sun_theta, Y_zenith, Y_coeffs);
            }

            // Apply an optional saturation correction.
            if (m_uniform_values.m_saturation_multiplier != 1.0f)
            {
                // Convert the sky color: CIE xyY -> CIE XYZ -> linear RGB -> HSL.
                Color3f ciexyz = ciexyy_to_ciexyz(xyY);
                Color3f linear_rgb = ciexyz_to_linear_rgb(ciexyz);
                Color3f hsl = linear_rgb_to_hsl(linear_rgb);

                // Apply the saturation multiplier.
                hsl[1] *= m_uniform_values.m_saturation_multiplier;

                // Convert the result back: HSL -> linear RGB -> CIE XYZ -> CIE xyY.
                linear_rgb = hsl_to_linear_rgb(hsl);
                ciexyz = linear_rgb_to_ciexyz(linear_rgb);
                xyY = ciexyz_to_ciexyy(ciexyz);
            }

            // Split sky color into luminance and chromaticity.
            float luminance = xyY[2];
            daylight_ciexy_to_spectrum(xyY[0], xyY[1], radiance);

            // Apply luminance gamma and multiplier.
            if (m_uniform_values.m_luminance_gamma != 1.0f)
                luminance = fast_pow(luminance, m_uniform_values.m_luminance_gamma);
            luminance *= m_uniform_values.m_luminance_multiplier;

            // Compute the final sky radiance.
            radiance *=
                  luminance                                         // start with computed luminance
                / sum_value(radiance * XYZCMFCIE19312Deg[1])        // normalize to unit luminance
                * (1.0f / 683.0f)                                   // convert lumens to Watts
                * RcpPi<float>();                                   // convert irradiance to radiance
        }

        Vector3f shift(Vector3f v) const
        {
            v.y -= m_uniform_values.m_horizon_shift;
            return normalize(v);
        }
    };
}

//
// PreethamEnvironmentEDFFactory class implementation.
//

const char* PreethamEnvironmentEDFFactory::get_model() const
{
    return Model;
}

Dictionary PreethamEnvironmentEDFFactory::get_model_metadata() const
{
    return
        Dictionary()
            .insert("name", Model)
            .insert("label", "Preetham Environment EDF")
            .insert("help", "Physical sky environment");
}

DictionaryArray PreethamEnvironmentEDFFactory::get_input_metadata() const
{
    DictionaryArray metadata;

    add_common_sky_input_metadata(metadata);

    return metadata;
}

auto_release_ptr<EnvironmentEDF> PreethamEnvironmentEDFFactory::create(
    const char*         name,
    const ParamArray&   params) const
{
    return
        auto_release_ptr<EnvironmentEDF>(
            new PreethamEnvironmentEDF(name, params));
}

auto_release_ptr<EnvironmentEDF> PreethamEnvironmentEDFFactory::static_create(
    const char*         name,
    const ParamArray&   params)
{
    return
        auto_release_ptr<EnvironmentEDF>(
            new PreethamEnvironmentEDF(name, params));
}

}   // namespace renderer


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>Google Chart Test</title>


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context="app.next.udacity.com.nextthing.AddNextThingActivity$PlaceholderFragment">

    <TextView android:text="@string/product_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/for_example"
        android:id="@+id/product_title"/>

    <TextView android:text="@string/product_url"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>
    <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/begin_with"
        android:id="@+id/product_url"/>

    <TextView android:text="@string/product_description"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>
    <EditText
        android:layout_width="match_parent"

        android:layout_height="wrap_content"
        android:hint="@string/describe_with_one"
        android:id="@+id/product_description"/>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/submit"
        android:text="@string/submit"/>

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/logout"
        android:text="@string/logout"
        android:visibility="invisible"/>

</LinearLayout>


text:
<?php

namespace EightPoints\Bundle\GuzzleBundle\Tests\Events;

use EightPoints\Bundle\GuzzleBundle\Events\PreTransactionEvent;

/**
 * @version   4.5
 * @since     2016-01
 */
class PreTransactionEventTest extends \PHPUnit_Framework_TestCase
{
    /**
     * Test Instance
     *
     * @version 4.5
     * @since   2016-01
     *
     * @covers  EightPoints\Bundle\GuzzleBundle\Events\PreTransactionEvent::__construct
     */
    public function testConstruct()
    {
        $serviceName = 'service name';
        $request     = $this->getMockBuilder('GuzzleHttp\Psr7\Request')
                            ->setConstructorArgs(array('GET', '/'))
                            ->getMock();

        $preEvent = new PreTransactionEvent($request, $serviceName);

        $this->assertSame($serviceName, $preEvent->getServiceName());
    }

    /**
     * Test Transaction
     *
     * @version 4.5
     * @since   2016-01
     *
     * @covers  EightPoints\Bundle\GuzzleBundle\Events\PreTransactionEvent::setTransaction
     * @covers  EightPoints\Bundle\GuzzleBundle\Events\PreTransactionEvent::getTransaction
     */
    public function testTranscation()
    {
        $method   = 'POST';
        $request  = $this->getMockBuilder('GuzzleHttp\Psr7\Request')
                         ->setConstructorArgs(array('GET', '/'))
                         ->getMock();

        $preEvent = new PreTransactionEvent($request, null);

        $transMock = $this->getMockBuilder('GuzzleHttp\Psr7\Request')
                          ->setConstructorArgs(array($method, '/'))
                          ->getMock();

        $transMock->method('getMethod')->willReturn($method);

        $preEvent->setTransaction($transMock);

        $transaction = $preEvent->getTransaction();

        $this->assertSame($transaction, $transMock);
        $this->assertSame($method, $transaction->getMethod());
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
        "http://struts.apache.org/dtds/struts-2.3.dtd">

<struts>
    <package name="test" namespace="/" extends="struts-default">

        <!--
        全局结果页面的配置

        -->
        <!--<global-results>-->
            <!--<result name="success">/index.jsp</result>-->
        <!--</global-results>-->

        <!--<action name="book" class="cn.action.BookAction">-->
            <!--<!–-->
            <!--type="dispatcher":转发操作-->
            <!--–>-->
            <!--<result name="success" type="dispatcher">/book.jsp</result>-->
        <!--</action>-->

        <!--<action name="orders" class="cn.action.OrdersAction" >-->
            <!--<result name="success" type="redirect">/Orders.jsp</result>-->
        <!--</action>-->

        <!--跳转到其他action-->
        <action name="book" class="cn.action.BookAction">

            <result name="success" type="chain">orders</result>
        </action>

        <action name="orders" class="cn.action.OrdersAction" >
            <result name="success" type="redirect">/Orders.jsp</result>
        </action>
    </package>

    <package name="demo1" extends="struts-default" namespace="/">
        <action name="form1" class="cn.form.form1">
        </action>
        <action name="form2" class="cn.form.form2">
        </action>
        <action name="form4" class="cn.form.form4">
        </action>
        <action name="data1" class="cn.data.dataDemo1Action"></action>
        <action name="data2" class="cn.data.data2Action"></action>
        <action name="data3" class="cn.data.data3Action"></action>

        <action name="list" class="cn.data.listAction"></action>
        <action name="map" class="cn.data.mapAction"></action>

    </package>

</struts>