text:
package me.smartco.akstore.store.mongodb.market;

import me.smartco.akstore.common.model.IShopInfo;
import me.smartco.akstore.common.model.Nameable;
import me.smartco.akstore.common.model.AbstractDocument;
import me.smartco.akstore.common.model.OrderStatus;
import me.smartco.akstore.store.mongodb.partner.Partner;
import me.smartco.akstore.store.mongodb.partner.Shop;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 * Created by libin on 14-12-21.
 */
@Document
public class DispatchOrder extends AbstractDocument implements Nameable,IShopInfo {
    private Shop shop;
    @DBRef
    private Partner partner;

    private Set<DispatchOrderItem> orderItems=new HashSet<DispatchOrderItem>();

    private int status= OrderStatus.created;

    public DispatchOrder(Shop shop) {
        this.shop = shop;
        this.partner=shop.partner();
    }

    public Set<DispatchOrderItem> getOrderItems() {
        return orderItems;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getStatus() {
        return status;
    }
    public String getStatusText() {
        return OrderStatus.text(this.status);
    }

    public void addItem(DispatchProduct product, int amount){
        orderItems.add(new DispatchOrderItem(product,amount));
    }

    public boolean hasFlag(int status){
        return OrderStatus.hasFlag(this.status, status);
    }

    public BigDecimal getTotal() {

        BigDecimal total = BigDecimal.ZERO;

        for (DispatchOrderItem item : orderItems) {
            total = total.add(item.getTotal());
        }

        if(total.doubleValue()<0.0){
            total=BigDecimal.ZERO;
        }

        return total;
    }

    public void merge(Map<DispatchProduct,Integer> elements){
        for(DispatchProduct dp:elements.keySet()){
            boolean dpExists=false;
            for(DispatchOrderItem item:orderItems){
                if(item.getProduct().equals(dp)){
                    item.setAmount(item.getAmount()+elements.get(dp));
                    dpExists=true;
                }
            }
            if(!dpExists){
                orderItems.add(new DispatchOrderItem(dp,elements.get(dp)));
            }
        }
    }

    @Override
    public String getName() {
        return shop.getName();
    }

    @Override
    public String getId() {
        return super.getId();
    }

    @Override
    public Date getCreateTime() {
        return super.getCreateTime();
    }

    @Override
    public String getShopName() {
        return shop.getName();
    }

    @Override
    public String getShopId() {
        return shop.getId();
    }

    @Override
    public String getShopPhone() {
        return shop.getContact().getPhone();
    }

    @Override
    public String getShopAddress() {
        return shop.getAddress().toString();
    }
}


text:
/**
 * The main package of the integration with TestNG.
 *
 * @author Dmytro Serdiuk (dmytro.serdiuk@gmail.com)
 * @version $Id$
 * @since 0.2
 */
package org.tatools.sunshine.testng;

redpajama_set_name: RedPajamaGithub


text:
#ifndef _FSL_GPC_H_
#define _FSL_GPC_H_

#include "fsl_common.h"

/*!
 * @addtogroup gpc
 * @{
 */

/*******************************************************************************
 * Definitions
 ******************************************************************************/

/*! @name Driver version */
/*@{*/
/*! @brief GPC driver version 2.2.0. */
#define FSL_GPC_RIVER_VERSION (MAKE_VERSION(2, 2, 0))
/*! @}*/

#define GPC_RESERVED_USE_MACRO 0xFFFFFFFFU

/* GPC CPU module step control register offset. */
#define GPC_CM_SLEEP_SSAR_CTRL_OFFSET   (0x200)
#define GPC_CM_SLEEP_LPCG_CTRL_OFFSET   (0x208)
#define GPC_CM_SLEEP_PLL_CTRL_OFFSET    (0x210)
#define GPC_CM_SLEEP_ISO_CTRL_OFFSET    (0x218)
#define GPC_CM_SLEEP_RESET_CTRL_OFFSET  (0x220)
#define GPC_CM_SLEEP_POWER_CTRL_OFFSET  (0x228)
#define GPC_CM_WAKEUP_POWER_CTRL_OFFSET (0x290)
#define GPC_CM_WAKEUP_RESET_CTRL_OFFSET (0x298)
#define GPC_CM_WAKEUP_ISO_CTRL_OFFSET   (0x2A0)
#define GPC_CM_WAKEUP_PLL_CTRL_OFFSET   (0x2A8)
#define GPC_CM_WAKEUP_LPCG_CTRL_OFFSET  (0x2B0)
#define GPC_CM_WAKEUP_SSAR_CTRL_OFFSET  (0x2B8)

/* GPC set point module step control register offset. */
#define GPC_SP_SSAR_SAVE_CTRL_OFFSET    (0x100)
#define GPC_SP_LPCG_OFF_CTRL_OFFSET     (0x110)
#define GPC_SP_GROUP_DOWN_CTRL_OFFSET   (0x120)
#define GPC_SP_ROOT_DOWN_CTRL_OFFSET    (0x130)
#define GPC_SP_PLL_OFF_CTRL_OFFSET      (0x140)
#define GPC_SP_ISO_ON_CTRL_OFFSET       (0x150)
#define GPC_SP_RESET_EARLY_CTRL_OFFSET  (0x160)
#define GPC_SP_POWER_OFF_CTRL_OFFSET    (0x170)
#define GPC_SP_BIAS_OFF_CTRL_OFFSET     (0x180)
#define GPC_SP_BG_PLDO_OFF_CTRL_OFFSET  (0x190)
#define GPC_SP_LDO_PRE_CTRL_OFFSET      (0x1A0)
#define GPC_SP_DCDC_DOWN_CTRL_OFFSET    (0x1B0)
#define GPC_SP_DCDC_UP_CTRL_OFFSET      (0x2B0)
#define GPC_SP_LDO_POST_CTRL_OFFSET     (0x210)
#define GPC_SP_BG_PLDO_ON_CTRL_OFFSET   (0x220)
#define GPC_SP_BIAS_ON_CTRL_OFFSET      (0x230)
#define GPC_SP_POWER_ON_CTRL_OFFSET     (0x240)
#define GPC_SP_RESET_LATE_CTRL_OFFSET   (0x250)
#define GPC_SP_ISO_OFF_CTRL_OFFSET      (0x260)
#define GPC_SP_PLL_ON_CTRL_OFFSET       (0x270)
#define GPC_SP_ROOT_UP_CTRL_OFFSET      (0x280)
#define GPC_SP_GROUP_UP_CTRL_OFFSET     (0x290)
#define GPC_SP_LPCG_ON_CTRL_OFFSET      (0x2A0)
#define GPC_SP_SSAR_RESTORE_CTRL_OFFSET (0x2B0)

/* GPC standby module step control register offset. */
#define GPC_STBY_LPCG_IN_CTRL_OFFSET     (0xF0)
#define GPC_STBY_PLL_IN_CTRL_OFFSET      (0x100)
#define GPC_STBY_BIAS_IN_CTRL_OFFSET     (0x110)
#define GPC_STBY_PLDO_IN_CTRL_OFFSET     (0x120)
#define GPC_STBY_BANDGAP_IN_CTRL_OFFSET  (0x128)
#define GPC_STBY_LDO_IN_CTRL_OFFSET      (0x130)
#define GPC_STBY_DCDC_IN_CTRL_OFFSET     (0x140)
#define GPC_STBY_PMIC_IN_CTRL_OFFSET     (0x150)
#define GPC_STBY_PMIC_OUT_CTRL_OFFSET    (0x200)
#define GPC_STBY_DCDC_OUT_CTRL_OFFSET    (0x210)
#define GPC_STBY_LDO_OUT_CTRL_OFFSET     (0x220)
#define GPC_STBY_BANDGAP_OUT_CTRL_OFFSET (0x238)
#define GPC_STBY_PLDO_OUT_CTRL_OFFSET    (0x238)
#define GPC_STBY_BIAS_OUT_CTRL_OFFSET    (0x240)
#define GPC_STBY_PLL_OUT_CTRL_OFFSET     (0x250)
#define GPC_STBY_LPCG_OUT_CTRL_OFFSET    (0x260)

/* GPC CPU module step register offset. */
#define GPC_CM_STEP_REG_OFFSET                                                                               \
    {                                                                                \
        GPC_CM_SLEEP_SSAR_CTRL_OFFSET, GPC_CM_SLEEP_LPCG_CTRL_OFFSET, GPC_CM_SLEEP_PLL_CTRL_OFFSET,          \
            GPC_CM_SLEEP_ISO_CTRL_OFFSET, GPC_CM_SLEEP_RESET_CTRL_OFFSET, GPC_CM_SLEEP_POWER_CTRL_OFFSET,    \
            GPC_RESERVED_USE_MACRO, GPC_RESERVED_USE_MACRO, GPC_RESERVED_USE_MACRO, GPC_RESERVED_USE_MACRO,  \
            GPC_CM_WAKEUP_POWER_CTRL_OFFSET, GPC_CM_WAKEUP_RESET_CTRL_OFFSET, GPC_CM_WAKEUP_ISO_CTRL_OFFSET, \
            GPC_CM_WAKEUP_PLL_CTRL_OFFSET, GPC_CM_WAKEUP_LPCG_CTRL_OFFSET, GPC_CM_WAKEUP_SSAR_CTRL_OFFSET,   \
    }

/* GPC set point module step control register offset. */
#define GPC_SP_STEP_REG_OFFSET                                                                         \
    {                                                                                \
        GPC_SP_SSAR_SAVE_CTRL_OFFSET, GPC_SP_LPCG_OFF_CTRL_OFFSET, GPC_SP_GROUP_DOWN_CTRL_OFFSET,      \
            GPC_SP_ROOT_DOWN_CTRL_OFFSET, GPC_SP_PLL_OFF_CTRL_OFFSET, GPC_SP_ISO_ON_CTRL_OFFSET,       \
            GPC_SP_RESET_EARLY_CTRL_OFFSET, GPC_SP_POWER_OFF_CTRL_OFFSET, GPC_SP_BIAS_OFF_CTRL_OFFSET, \
            GPC_SP_BG_PLDO_OFF_CTRL_OFFSET, GPC_SP_LDO_PRE_CTRL_OFFSET, GPC_SP_DCDC_DOWN_CTRL_OFFSET,  \
            GPC_SP_DCDC_UP_CTRL_OFFSET, GPC_SP_LDO_POST_CTRL_OFFSET, GPC_SP_BG_PLDO_ON_CTRL_OFFSET,    \
            GPC_SP_BIAS_ON_CTRL_OFFSET, GPC_SP_POWER_ON_CTRL_OFFSET, GPC_SP_RESET_LATE_CTRL_OFFSET,    \
            GPC_SP_ISO_OFF_CTRL_OFFSET, GPC_SP_PLL_ON_CTRL_OFFSET, GPC_SP_ROOT_UP_CTRL_OFFSET,         \
            GPC_SP_GROUP_UP_CTRL_OFFSET, GPC_SP_LPCG_ON_CTRL_OFFSET, GPC_SP_SSAR_RESTORE_CTRL_OFFSET,  \
    }

/* GPC standby module step register offset. */
#define GPC_STBY_STEP_REG_OFFSET                                                                           \
    {                                                                                \
        GPC_STBY_LPCG_IN_CTRL_OFFSET, GPC_STBY_PLL_IN_CTRL_OFFSET, GPC_STBY_BIAS_IN_CTRL_OFFSET,           \
            GPC_STBY_PLDO_IN_CTRL_OFFSET, GPC_STBY_BANDGAP_IN_CTRL_OFFSET, GPC_STBY_LDO_IN_CTRL_OFFSET,    \
            GPC_STBY_DCDC_IN_CTRL_OFFSET, GPC_STBY_PMIC_IN_CTRL_OFFSET, GPC_STBY_PMIC_OUT_CTRL_OFFSET,     \
            GPC_STBY_DCDC_OUT_CTRL_OFFSET, GPC_STBY_LDO_OUT_CTRL_OFFSET, GPC_STBY_BANDGAP_OUT_CTRL_OFFSET, \
            GPC_STBY_PLDO_OUT_CTRL_OFFSET, GPC_STBY_BIAS_OUT_CTRL_OFFSET, GPC_STBY_PLL_OUT_CTRL_OFFSET,    \
            GPC_STBY_LPCG_OUT_CTRL_OFFSET,                                                                 \
    }

/* Make/Get status. */
/* Make the mask/shift value of GPC status register in a variable. */
#define GPC_STAT(mask, shift) (uint32_t)(((uint32_t)(shift) << 16UL) + ((uint32_t)(mask) >> (uint32_t)(shift)))

#define GPC_CM_ALL_INTERRUPT_STATUS                                     \
    (GPC_CPU_MODE_CTRL_CM_INT_CTRL_SP_REQ_NOT_ALLOWED_SLEEP_INT_MASK |  \
     GPC_CPU_MODE_CTRL_CM_INT_CTRL_SP_REQ_NOT_ALLOWED_WAKEUP_INT_MASK | \
     GPC_CPU_MODE_CTRL_CM_INT_CTRL_SP_REQ_NOT_ALLOWED_SOFT_INT_MASK)

/*! @brief _gpc_cm_non_irq_wakeup_request GPC Non-IRQ wakeup request. */
enum
{
    kGPC_CM_EventWakeupRequest =
        GPC_CPU_MODE_CTRL_CM_NON_IRQ_WAKEUP_MASK_EVENT_WAKEUP_MASK_MASK, /*!< Event wakeup request. */
    kGPC_CM_DebugWakeupRequest =
        GPC_CPU_MODE_CTRL_CM_NON_IRQ_WAKEUP_MASK_DEBUG_WAKEUP_MASK_MASK, /*!< Debug wakeup request. */
};

/* @brief _gpc_setpoint_map GPC setpoint map. */
enum
{
    kGPC_SetPoint0  = 1UL << 0UL,  /*!< GPC set point 0. */
    kGPC_SetPoint1  = 1UL << 1UL,  /*!< GPC set point 1. */
    kGPC_SetPoint2  = 1UL << 2UL,  /*!< GPC set point 2. */
    kGPC_SetPoint3  = 1UL << 3UL,  /*!< GPC set point 3. */
    kGPC_SetPoint4  = 1UL << 4UL,  /*!< GPC set point 4. */
    kGPC_SetPoint5  = 1UL << 5UL,  /*!< GPC set point 5. */
    kGPC_SetPoint6  = 1UL << 6UL,  /*!< GPC set point 6. */
    kGPC_SetPoint7  = 1UL << 7UL,  /*!< GPC set point 7. */
    kGPC_SetPoint8  = 1UL << 8UL,  /*!< GPC set point 8. */
    kGPC_SetPoint9  = 1UL << 9UL,  /*!< GPC set point 9. */
    kGPC_SetPoint10 = 1UL << 10UL, /*!< GPC set point 10. */
    kGPC_SetPoint11 = 1UL << 11UL, /*!< GPC set point 11. */
    kGPC_SetPoint12 = 1UL << 12UL, /*!< GPC set point 12. */
    kGPC_SetPoint13 = 1UL << 13UL, /*!< GPC set point 13. */
    kGPC_SetPoint14 = 1UL << 14UL, /*!< GPC set point 14. */
    kGPC_SetPoint15 = 1UL << 15UL, /*!< GPC set point 15. */
};

/*!
 * @brief _gpc_cm_interrupt_status_flag
 */
enum
{
    kGPC_CM_SoftSPNotAllowedStatusFlag  = GPC_CPU_MODE_CTRL_CM_INT_CTRL_SP_REQ_NOT_ALLOWED_SOFT_INT_MASK,
    kGPC_CM_WaitSPNotAllowedStatusFlag  = GPC_CPU_MODE_CTRL_CM_INT_CTRL_SP_REQ_NOT_ALLOWED_WAKEUP_INT_MASK,
    kGPC_CM_SleepSPNotAllowedStatusFlag = GPC_CPU_MODE_CTRL_CM_INT_CTRL_SP_REQ_NOT_ALLOWED_SLEEP_INT_MASK,
};

/*! @brief CPU standby mode status. */
typedef enum _gpc_cm_standby_mode_status
{
    kGPC_CM_SleepBusy = GPC_STAT(
        GPC_CPU_MODE_CTRL_CM_STBY_CTRL_STBY_SLEEP_BUSY_MASK,
        GPC_CPU_MODE_CTRL_CM_STBY_CTRL_STBY_SLEEP_BUSY_SHIFT), /*!< Indicate the CPU is busy entering standby mode. */
    kGPC_CM_WakeupBusy = GPC_STAT(
        GPC_CPU_MODE_CTRL_CM_STBY_CTRL_STBY_WAKEUP_BUSY_MASK,
        GPC_CPU_MODE_CTRL_CM_STBY_CTRL_STBY_WAKEUP_BUSY_SHIFT), /*!< Indicate the CPU is busy exiting standby mode. */
} gpc_cm_standby_mode_status_t;

/*! @brief CPU mode transition step in sleep/wakeup sequence. */
typedef enum _gpc_cm_tran_step
{
    kGPC_CM_SleepSsar   = 0UL,  /*!< SSAR (State Save And Restore) sleep step. */
    kGPC_CM_SleepLpcg   = 1UL,  /*!< LPCG (Low Power Clock Gating) sleep step. */
    kGPC_CM_SleepPll    = 2UL,  /*!< PLL sleep step. */
    kGPC_CM_SleepIso    = 3UL,  /*!< ISO (Isolation) sleep step. */
    kGPC_CM_SleepReset  = 4UL,  /*!< Reset sleep step. */
    kGPC_CM_SleepPower  = 5UL,  /*!< Power sleep step. */
    kGPC_CM_SleepSP     = 6UL,  /*!< Setpoint sleep step. Note that this step is controlled by setpoint controller. */
    kGPC_CM_SleepSTBY   = 7UL,  /*!< Standby sleep step. Note that this step is controlled by standby controller. */
    kGPC_CM_WakeupSTBY  = 8UL,  /*!< Standby wakeup step. Note that this step is controlled by standby controller. */
    kGPC_CM_WakeupSP    = 9UL,  /*!< Setpoint wakeup step. Note that this step is controlled by setpoint countroller. */
    kGPC_CM_WakeupPower = 10UL, /*!< Power wakeup step. */
    kGPC_CM_WakeupReset = 11UL, /*!< Reset wakeup step. */
    kGPC_CM_WakeupIso   = 12UL, /*!< ISO wakeup step. */
    kGPC_CM_WakeupPll   = 13UL, /*!< PLL wakeup step. */
    kGPC_CM_WakeupLpcg  = 14UL, /*!< LPCG wakeup step. */
    kGPC_CM_WakeupSsar  = 15UL, /*!< SSAR wakeup step. */
} gpc_cm_tran_step_t;

/*! @brief Step counter work mode. */
typedef enum _gpc_tran_step_counter_mode
{
    kGPC_StepCounterDisableMode =
        0UL, /*!< Counter disable mode: not use step counter, step completes once receiving step_done. */
    kGPC_StepCounterDelayMode =
        1UL, /*!< Counter delay mode: delay after receiving step_done, delay cycle number is STEP_CNT */
    kGPC_StepCounterIgnoreResponseMode = 2UL, /*!< Ignore step_done response, the counter starts to count once step
                                                    begins, when counter reaches STEP_CNT value, the step completes. */
    kGPC_StepCounterTimeOutMode = 3UL,        /*!< Time out mode, the counter starts to count once step begins, the step
                                                    completes when either step_done received or counting to STEP_CNT value. */
} gpc_tran_step_counter_mode_t;

/*! @brief GPC set point transition steps. */
typedef enum _gpc_sp_tran_step
{
    kGPC_SP_SsarSave         = 0UL,  /*!< SSAR save step. */
    kGPC_SP_LpcgOff          = 1UL,  /*!< LPCG off step. */
    kGPC_SP_GroupDown        = 2UL,  /*!< Group down step. */
    kGPC_SP_RootDown         = 3UL,  /*!< Root down step. */
    kGPC_SP_PllOff           = 4UL,  /*!< PLL off step. */
    kGPC_SP_IsoOn            = 5UL,  /*!< ISO on. */
    kGPC_SP_ResetEarly       = 6UL,  /*!< Reset early step. */
    kGPC_SP_PowerOff         = 7UL,  /*!< Power off step. */
    kGPC_SP_BiasOff          = 8UL,  /*!< Bias off step. */
    kGPC_SP_BandgapPllLdoOff = 9UL,  /*!< Bandgap and PLL_LDO off step. */
    kGPC_SP_LdoPre           = 10UL, /*!< LDO (Low-Dropout) pre step. */
    kGPC_SP_DcdcDown         = 11UL, /*!< DCDC down step. */
    kGPC_SP_DcdcUp           = 12UL, /*!< DCDC up step. */
    kGPC_SP_LdoPost          = 13UL, /*!< LDO post step. */
    kGPC_SP_BandgapPllLdoOn  = 14UL, /*!< Bandgap and PLL_LDO on step. */
    kGPC_SP_BiasOn           = 15UL, /*!< Bias on step. */
    kGPC_SP_PowerOn          = 16UL, /*!< Power on step. */
    kGPC_SP_ResetLate        = 17UL, /*!< Reset late step. */
    kGPC_SP_IsoOff           = 18UL, /*!< ISO off step. */
    kGPC_SP_PllOn            = 19UL, /*!< PLL on step */
    kGPC_SP_RootUp           = 20UL, /*!< Root up step. */
    kGPC_SP_GroupUp          = 21UL, /*!< Group up step. */
    kGPC_SP_LpcgOn           = 22UL, /*!< LPCG on step. */
    kGPC_SP_SsarRestore      = 23UL, /*!< SSAR restore step. */
} gpc_sp_tran_step_t;

/*! @brief CPU mode. */
typedef enum _gpc_cpu_mode
{
    kGPC_RunMode     = 0x0UL, /*!< Stay in RUN mode. */
    kGPC_WaitMode    = 0x1UL, /*!< Transit to WAIT mode. */
    kGPC_StopMode    = 0x2UL, /*!< Transit to STOP mode. */
    kGPC_SuspendMode = 0x3UL, /*!< Transit to SUSPEND mode. */
} gpc_cpu_mode_t;

/*! @brief Configuration for GPC transition step. */
typedef struct _gpc_tran_step_config
{
    uint32_t stepCount;                   /*!< Step count, which is depended on the value of cntMode. */
    gpc_tran_step_counter_mode_t cntMode; /*!< Step counter working mode. */
    bool enableStep;                      /*!< Enable the step. */
} gpc_tran_step_config_t;

/*! @brief CPU wakeup sequence setpoint options. */
typedef enum _gpc_cm_wakeup_sp_sel
{
    kGPC_CM_WakeupSetpoint =
        0UL, /*!< Request SP transition to CPU_SP_WAKEUP (param "setPointWakeup" in gpc_cm_sleep_sp_tran_config_t). */
    kGPC_CM_RequestPreviousSetpoint = 1UL, /*!< Request SP transition to the set point when the sleep event happens. */
} gpc_cm_wakeup_sp_sel_t;

/*! @brief GPC standby mode transition steps. */
typedef enum _gpc_stby_tran_step
{
    kGPC_STBY_LpcgIn     = 0UL,  /*!< LPCG in step. */
    kGPC_STBY_PllIn      = 1UL,  /*!< PLL in step. */
    kGPC_STBY_BiasIn     = 2UL,  /*!< Bias in step. */
    kGPC_STBY_PldoIn     = 3UL,  /*!< PLDO in step. */
    kGPC_STBY_BandgapIn  = 4UL,  /*!< Bandgap in step. */
    kGPC_STBY_LdoIn      = 5UL,  /*!< LDO in step. */
    kGPC_STBY_DcdcIn     = 6UL,  /*!< DCDC in step. */
    kGPC_STBY_PmicIn     = 7UL,  /*!< PMIC in step. */
    kGPC_STBY_PmicOut    = 8UL,  /*!< PMIC out step. */
    kGPC_STBY_DcdcOut    = 9UL,  /*!< DCDC out step. */
    kGPC_STBY_LdoOut     = 10UL, /*!< LDO out step. */
    kGPC_STBY_BandgapOut = 11UL, /*!< Bandgap out step. */
    kGPC_STBY_PldoOut    = 12UL, /*!< PLDO out step. */
    kGPC_STBY_BiasOut    = 13UL, /*!< Bias out step. */
    kGPC_STBY_PllOut     = 14UL, /*!< PLL out step. */
    kGPC_STBY_LpcgOut    = 15UL, /*!< LPCG out step. */
} gpc_stby_tran_step_t;
/*******************************************************************************
 * API
 ******************************************************************************/
#if defined(__cplusplus)
extern "C" {
#endif

/*!
 * @name CPU mode control
 * @{
 */

/*
 * @brief Hold core in sleep state.
 *
 * This function is used to hold the core in sleep state once it enters WFI, and until finishing wakeup sequence. If a
 * wakeup IRQ happens during the delay between core sleeps and core clock stops, the core will be woken up but GPC is on
 * sleep sequence and shut off the clock when core is processing the IRQ, this may leads to an unpredictable status.
 *
 * @param base GPC CPU module base address.
 */
static inline void GPC_CM_EnableCpuSleepHold(GPC_CPU_MODE_CTRL_Type *base, bool enable)
{
    if (enable)
    {
        base->CM_MISC |= GPC_CPU_MODE_CTRL_CM_MISC_SLEEP_HOLD_EN_MASK;
    }
    else
    {
        base->CM_MISC &= ~GPC_CPU_MODE_CTRL_CM_MISC_SLEEP_HOLD_EN_MASK;
    }
}

/*!
 * @brief Set the CPU mode on the next sleep event.
 *
 * This function configures the CPU mode that the CPU core will transmit to on next sleep event.
 *
 * @note This API must be called each time before entering sleep.
 *
 * @param base GPC CPU module base address.
 * @param mode The CPU mode that the core will transmit to, refer to "gpc_cpu_mode_t".
 */
static inline void GPC_CM_SetNextCpuMode(GPC_CPU_MODE_CTRL_Type *base, gpc_cpu_mode_t mode)
{
    base->CM_MODE_CTRL = (base->CM_MODE_CTRL & ~GPC_CPU_MODE_CTRL_CM_MODE_CTRL_CPU_MODE_TARGET_MASK) |
                         GPC_CPU_MODE_CTRL_CM_MODE_CTRL_CPU_MODE_TARGET(mode);
}

/*!
 * @brief Get current CPU mode.
 *
 * @param base GPC CPU module base address.
 * @return The current CPU mode, in type of @ref gpc_cpu_mode_t.
 */
static inline gpc_cpu_mode_t GPC_CM_GetCurrentCpuMode(GPC_CPU_MODE_CTRL_Type *base)
{
    return (gpc_cpu_mode_t)(uint32_t)((base->CM_MODE_STAT & GPC_CPU_MODE_CTRL_CM_MODE_STAT_CPU_MODE_CURRENT_MASK) >>
                                      GPC_CPU_MODE_CTRL_CM_MODE_STAT_CPU_MODE_CURRENT_SHIFT);
}

/*!
 * @brief Get previous CPU mode.
 *
 * @param base GPC CPU module base address.
 * @return The previous CPU mode, in type of @ref gpc_cpu_mode_t.
 */
static inline gpc_cpu_mode_t GPC_CM_GetPreviousCpuMode(GPC_CPU_MODE_CTRL_Type *base)
{
    return (gpc_cpu_mode_t)(uint32_t)((base->CM_MODE_STAT & GPC_CPU_MODE_CTRL_CM_MODE_STAT_CPU_MODE_PREVIOUS_MASK) >>
                                      GPC_CPU_MODE_CTRL_CM_MODE_STAT_CPU_MODE_PREVIOUS_SHIFT);
}

/*!
 * @brief Enable IRQ wakeup request.
 *
 * This function enables the IRQ request which can wakeup the CPU platform.
 *
 * @param base GPC CPU module base address.
 * @param irqId ID of the IRQ, accessible range is 0-255.
 * @param enable Enable the IRQ request or not.
 */
void GPC_CM_EnableIrqWakeup(GPC_CPU_MODE_CTRL_Type *base, uint32_t irqId, bool enable);

/*!
 * @brief Enable Non-IRQ wakeup request.
 *
 * This function enables the non-IRQ request which can wakeup the CPU platform.
 *
 * @param base GPC CPU module base address.
 * @param mask Non-IRQ type, refer to "_gpc_cm_non_irq_wakeup_request".
 * @param enable Enable the Non-IRQ request or not.
 */
static inline void GPC_CM_EnableNonIrqWakeup(GPC_CPU_MODE_CTRL_Type *base, uint32_t mask, bool enable)
{
    assert(mask < 2UL);

    if (true == enable)
    {
        base->CM_NON_IRQ_WAKEUP_MASK &= ~mask;
    }
    else
    {
        base->CM_NON_IRQ_WAKEUP_MASK |= mask;
    }
}

/*!
 * @brief Get the status of the IRQ wakeup request.
 *
 * @param base GPC CPU module base address.
 * @param irqId ID of the IRQ, accessible range is 0-255.
 * @return Indicate the IRQ request is asserted or not.
 */
bool GPC_CM_GetIrqWakeupStatus(GPC_CPU_MODE_CTRL_Type *base, uint32_t irqId);

/*!
 * @brief Get the status of the Non-IRQ wakeup request.
 *
 * @param base GPC CPU module base address.
 * @param mask Non-IRQ type, refer to "_gpc_cm_non_irq_wakeup_request".
 * @return Indicate the Non-IRQ request is asserted or not.
 */
static inline bool GPC_CM_GetNonIrqWakeupStatus(GPC_CPU_MODE_CTRL_Type *base, uint32_t mask)
{
    return (mask == (base->CM_NON_IRQ_WAKEUP_STAT & mask));
}

/*!
 * @brief Config the cpu mode transition step.
 *
 * @note This function can not config the setpoint sleep/wakeup operation for those
 * operation is controlled by setpoint control. This funcion can not config the standby
 * sleep/wakeup too, because those operation is controlled by standby controlled.
 *
 * @param base GPC CPU module base address.
 * @param step step type, refer to "gpc_cm_tran_step_t".
 * @param config transition step configuration, refer to "gpc_tran_step_config_t".
 */
void GPC_CM_ConfigCpuModeTransitionStep(GPC_CPU_MODE_CTRL_Type *base,
                                        gpc_cm_tran_step_t step,
                                        const gpc_tran_step_config_t *config);

/*!
 * @brief Request a set point transition before the CPU transfers into a sleep mode.
 *
 * This function triggers the set point transition during a CPU Sleep/wakeup event and selects which one the CMC want
 * to transfer to.
 *
 * @param base GPC CPU module base address.
 * @param setPointSleep The set point CPU want the system to transit to on next CPU platform sleep sequence.
 * @param setPointWakeup The set point CPU want the system to transit to on next CPU platform wakeup sequence.
 * @param wakeupSel Select the set point transition on the next CPU platform wakeup sequence.
 */
void GPC_CM_RequestSleepModeSetPointTransition(GPC_CPU_MODE_CTRL_Type *base,
                                               uint8_t setPointSleep,
                                               uint8_t setPointWakeup,
                                               gpc_cm_wakeup_sp_sel_t wakeupSel);

/*!
 * @brief Request a set point transition during run mode.
 *
 * This function triggers the set point transition and selects which one the CMC want to transfer to.
 *
 * @param base GPC CPU module base address.
 * @param setPointRun The set point CPU want the system to transit in the run mode.
 */
void GPC_CM_RequestRunModeSetPointTransition(GPC_CPU_MODE_CTRL_Type *base, uint8_t setPointRun);

/*!
 * @brief Set the set point mapping value for each set point.
 *
 * This function configures which set point is allowed after current set point. If there are multiple setpoints, use:
 * @code
 *    map = kkGPC_SetPoint0 | kGPC_SetPoint1 | ... | kGPC_SetPoint15;
 * @endcode
 *
 * @param base GPC CPU module base address.
 * @param setPoint Set point index, available range is 0-15.
 * @param map Map value of the set point. Refer to "_gpc_setpoint_map".
 */
static inline void GPC_CM_SetSetPointMapping(GPC_CPU_MODE_CTRL_Type *base, uint32_t setPoint, uint32_t map)
{
    assert(setPoint < 16UL);

    base->CM_SP_MAPPING[setPoint] = (map & 0xFFFFUL);
}

/*!
 * @brief Set the set point mapping value for each cpu mode.
 *
 * This function configures which set point is allowed when CPU enters RUN/WAIT/STOP/SUSPEND. If there are multiple
 * setpoints, use:
 * @code
 *    map = kkGPC_SetPoint0 | kGPC_SetPoint1 | ... | kGPC_SetPoint15;
 * @endcode
 *
 * @param base GPC CPU module base address.
 * @param mode CPU mode. Refer to "gpc_cpu_mode_t".
 * @param map Map value of the set point. Refer to "_gpc_setpoint_map".
 */
void GPC_CM_SetCpuModeSetPointMapping(GPC_CPU_MODE_CTRL_Type *base, gpc_cpu_mode_t mode, uint32_t map);

/*!
 * @brief Request the chip into standby mode.
 *
 * @param base GPC CPU module base address.
 * @param mode CPU mode. Refer to "gpc_cpu_mode_t".
 */
void GPC_CM_RequestStandbyMode(GPC_CPU_MODE_CTRL_Type *base, const gpc_cpu_mode_t mode);

/*!
 * @brief Clear the standby mode request.
 *
 * @param base GPC CPU module base address.
 * @param mode CPU mode. Refer to "gpc_cpu_mode_t".
 */
void GPC_CM_ClearStandbyModeRequest(GPC_CPU_MODE_CTRL_Type *base, const gpc_cpu_mode_t mode);

/*!
 * @brief Get the status of the CPU standby mode transition.
 *
 * @param base GPC CPU module base address.
 * @param mask Standby mode transition status mask, refer to "gpc_cm_standby_mode_status_t".
 * @return Indicate the CPU's standby transition status.
 */
static inline bool GPC_CM_GetStandbyModeStatus(GPC_CPU_MODE_CTRL_Type *base, uint32_t mask)
{
    return (mask == (base->CM_STBY_CTRL & mask));
}

/*!
 * @brief Get the status flags of the GPC CPU module.
 *
 * @param base GPC CPU module base address.
 * @return The OR'ed value of status flags.
 */
static inline uint32_t GPC_CM_GetInterruptStatusFlags(GPC_CPU_MODE_CTRL_Type *base)
{
    return ((base->CM_INT_CTRL) & GPC_CM_ALL_INTERRUPT_STATUS);
}

/*!
 * @brief Clears CPU module interrut status flags.
 *
 * @param base GPC CPU module base address.
 * @param mask The interrupt status flags to be cleared. Should be the OR'ed value of _gpc_cm_interrupt_status_flag.
 */
void GPC_CM_ClearInterruptStatusFlags(GPC_CPU_MODE_CTRL_Type *base, uint32_t mask);

/*!
 * @}
 */

/*!
 * @name Set point request control
 * @{
 */

/*!
 * @brief Set the priority of set point.
 *
 * This function will configure the priority of the set point. If the result of API GPC_SP_GetAllowedSetPointMap() has
 * more than one valid bit, high priority set point will be taken.
 *
 * @param base GPC Setpoint controller base address.
 * @param setPoint Set point index, available range is 0-15.
 * @param priority Priority level, available range is 0-15.
 */
static inline void GPC_SP_SetSetpointPriority(GPC_SET_POINT_CTRL_Type *base, uint32_t setPoint, uint32_t priority)
{
    assert(priority < 16UL);
    assert(setPoint < 16UL);

    if (setPoint < 8UL)
    {
        base->SP_PRIORITY_0_7 |= (priority << (setPoint * 4UL));
    }
    else
    {
        base->SP_PRIORITY_8_15 |= (priority << ((setPoint - 8UL) * 4UL));
    }
}

/*!
 * @brief Config the set point transition step.
 *
 * @param base GPC Setpoint controller base address.
 * @param step step type, refer to "gpc_sp_tran_step_t".
 * @param config transition step configuration, refer to "gpc_tran_step_config_t".
 */
void GPC_SP_ConfigSetPointTransitionStep(GPC_SET_POINT_CTRL_Type *base,
                                         gpc_sp_tran_step_t step,
                                         const gpc_tran_step_config_t *config);

/*!
 * @brief Get system current setpoint, only valid when setpoint trans not busy.
 *
 * @param base GPC Setpoint controller base address.
 * @return The current setpoint number, range from 0 to 15.
 */
static inline uint8_t GPC_SP_GetCurrentSetPoint(GPC_SET_POINT_CTRL_Type *base)
{
    return (uint8_t)((base->SP_SYS_STAT & GPC_SET_POINT_CTRL_SP_SYS_STAT_SYS_SP_CURRENT_MASK) >>
                     GPC_SET_POINT_CTRL_SP_SYS_STAT_SYS_SP_CURRENT_SHIFT);
}

/*!
 * @brief Get system previous setpoint, only valid when setpoint trans not busy.
 *
 * @param base GPC Setpoint controller base address.
 * @return The previous setpoint number, range from 0 to 15.
 */
static inline uint8_t GPC_SP_GetPreviousSetPoint(GPC_SET_POINT_CTRL_Type *base)
{
    return (uint8_t)((base->SP_SYS_STAT & GPC_SET_POINT_CTRL_SP_SYS_STAT_SYS_SP_PREVIOUS_MASK) >>
                     GPC_SET_POINT_CTRL_SP_SYS_STAT_SYS_SP_PREVIOUS_SHIFT);
}

/*!
 * @brief Get target setpoint.
 *
 * @param base GPC Setpoint controller base address.
 * @return The target setpoint number, range from 0 to 15.
 */
static inline uint8_t GPC_SP_GetTargetSetPoint(GPC_SET_POINT_CTRL_Type *base)
{
    return (uint8_t)((base->SP_SYS_STAT & GPC_SET_POINT_CTRL_SP_SYS_STAT_SYS_SP_TARGET_MASK) >>
                     GPC_SET_POINT_CTRL_SP_SYS_STAT_SYS_SP_TARGET_SHIFT);
}
/*!
 * @}
 */

/*!
 * @name Standby mode control
 * @{
 */

/*!
 * @brief Config the standby transition step.
 *
 * @param base GPC Setpoint controller base address.
 * @param step step type, refer to "gpc_stby_tran_step_t".
 * @param config transition step configuration, refer to "gpc_tran_step_config_t".
 */
void GPC_STBY_ConfigStandbyTransitionStep(GPC_STBY_CTRL_Type *base,
                                          gpc_stby_tran_step_t step,
                                          const gpc_tran_step_config_t *config);

/*!
 * @}
 */

#if defined(__cplusplus)
}
#endif
/*!
 * @}
 */
#endif /* _FSL_GPC_H_ */


text:
<?php

namespace AppBundle\Entity\DTP;

/**
 * Team
 */
class Team
{
    /**
     * @var string
     */
    private $name;

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

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

    /**
     * @var integer
     */
    private $id;

    /**
     * Set name
     *
     * @param string $name
     *
     * @return Team
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set shortname
     *
     * @param string $shortname
     *
     * @return Team
     */
    public function setShortname($shortname)
    {
        $this->shortname = $shortname;

        return $this;
    }

    /**
     * Get shortname
     *
     * @return string
     */
    public function getShortname()
    {
        return $this->shortname;
    }

    /**
     * Set slug
     *
     * @param string $slug
     *
     * @return Team
     */
    public function setSlug($slug)
    {
        $this->slug = $slug;

        return $this;
    }

    /**
     * Get slug
     *
     * @return string
     */
    public function getSlug()
    {
        return $this->slug;
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * @var \Doctrine\Common\Collections\Collection
     */
    private $home_matches;

    /**
     * @var \Doctrine\Common\Collections\Collection
     */
    private $away_matches;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->home_matches = new \Doctrine\Common\Collections\ArrayCollection();
        $this->away_matches = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Add homeMatch
     *
     * @param \AppBundle\Entity\DTP\Match $homeMatch
     *
     * @return Team
     */
    public function addHomeMatch(\AppBundle\Entity\DTP\Match $homeMatch)
    {
        $this->home_matches[] = $homeMatch;

        return $this;
    }

    /**
     * Remove homeMatch
     *
     * @param \AppBundle\Entity\DTP\Match $homeMatch
     */
    public function removeHomeMatch(\AppBundle\Entity\DTP\Match $homeMatch)
    {
        $this->home_matches->removeElement($homeMatch);
    }

    /**
     * Get homeMatches
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getHomeMatches()
    {
        return $this->home_matches;
    }

    /**
     * Add awayMatch
     *
     * @param \AppBundle\Entity\DTP\Match $awayMatch
     *
     * @return Team
     */
    public function addAwayMatch(\AppBundle\Entity\DTP\Match $awayMatch)
    {
        $this->away_matches[] = $awayMatch;

        return $this;
    }

    /**
     * Remove awayMatch
     *
     * @param \AppBundle\Entity\DTP\Match $awayMatch
     */
    public function removeAwayMatch(\AppBundle\Entity\DTP\Match $awayMatch)
    {
        $this->away_matches->removeElement($awayMatch);
    }

    /**
     * Get awayMatches
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getAwayMatches()
    {
        return $this->away_matches;
    }

    function __toString()
    {
        return $this->getName();
    }

}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>The WebM Project | WebM Container Guidelines </title>
  <meta name="google-site-verification" content="k48O6zrnreFHIEU7DjyqpOK8REgb_WD1_OyorIE4Ti0">

  <link rel="stylesheet" href="/media/css/bootstrap.css">

  <link rel="stylesheet" href="/media/css/bootstrap-responsive.css">
  <link rel="stylesheet" href="/media/css/webm.css">

  <link rel="shortcut icon" href="/media/images/webm-48px.png">

                    About

About WebM

FAQ

Discuss

Supporters

                  Developer

Overview & Code Repos

Contribute

Submitting Patches

Code Reviews

Workflow

Conventions

Bug Reporting

Build Prerequisites

Repository Layout

Releases

Roadmap

Hardware

                  Docs

libvpx API

RFC 6386: VP8 Data Format

WebM Container Format

VP8 RTP Proposal (Draft)

Encoder Examples

Wiki

Tools

Hardware

Blog

              <form  action="http://www.google.com/cse" class="navbar-search pull-right searchbox">

                      <input type="text" name="q" id="q" autocomplete="on" class="span2" placeholder="" style="background-image: none;">
                      <input type="hidden" name="cx" value="003367860376540524942:a7a4auyo1la">
                      <input type="hidden" name="ie" value="UTF-8">

              </form>

        Home

        >

          Code

        >

          Specs

        >

          Container

WebM Container Guidelines

Show Contents

Overview

Goals

Short Term

Long Term

Naming

HTML5 Video Type Parameters

Video Codec

Audio Codecs

canPlayType function

Smart Client

WebM Guidelines

Demuxer and Muxer Guidelines

Muxer Guidelines

VP8 Alternate Reference Frames

Encode Example

Decode Example

Demuxer Guidelines

WebVTT Guidelines

Storing WebVTT data in a WebM Track

Storing WebVTT cue in a WebM Block

General WebVTT Notes

WebVTT Chapter cues

Implementation Details

EBML Basics

Global Elements   (Used throughout the format)

Segment

Meta Seek Information

Segment Information

Cluster

Track

Cueing Data

Attachment

Chapters

Tagging

Target Types

Official Tags

Overview

WebM is a digital multimedia container file format promoted by the
open-source WebM Project.  It comprises a subset of the Matroska
multimedia container format.

Goals

Short Term

Select a container format that’s suitable for VP8 and ideal for the
    open web.

Make it easy for web content providers to create and distribute VP8
    videos.

Long Term

Foster the popularity of our open format so video can be enjoyed
    everywhere, with no effort by users.

Naming

Note: This document does not yet make reference to VP9-related
conditions. It will be updated once implementation details are settled.

Container Format Name
WebM

Filename Extension
.webm

MIME-type
video/webm

Audio-only MIME-type
audio/webm

Video Codec Name
VP8

Audio Codec Name
Vorbis

HTML5 Video Type Parameters

Video Codec

VP8: vp8.X codec is vp8, bitstream is version X.

VP8 currently only has bitstream version 0.

This will also match to a fourcc of VP8X for applications that
    need a fourcc.

Audio Codecs

Vorbis

Audio-only files SHOULD have a mime of “audio/webm”

canPlayType function

canPlayType('video/webm') SHOULD return maybe

canPlayType('audio/webm') SHOULD return maybe

canPlayType('video/webm; codecs="vp8, vorbis"') SHOULD return
    probably

canPlayType('video/webm; codecs="vp8.0, vorbis"') SHOULD return
    probably

canPlayType('audio/webm; codecs="vorbis"') SHOULD return
    probably

Smart Client

One of the major goals is to allow content creators to have advanced
playback capabilities, such as fast seeking and fast start using only
an HTTP server. To achieve this, the WebM file format guidelines below
should be followed when creating content.

WebM Guidelines

These guidelines are currently for file streaming over an HTTP
connection, and indicate the areas where WebM is strict, relative to
the more permissive
Matroska specification.

Demuxer and Muxer Guidelines

DocType element SHOULD be “webm”.

Video codec SHOULD be VP8.

The Codec ID SHOULD be “V_VP8”.

There is no CodecPrivate data for VP8.

Audio codec SHOULD be Vorbis.

Vorbis specification

The project will develop specific guidance on how Vorbis should
    be deployed in WebM (profile, bitrate, channels)

Initial WebM release does not support subtitles.

WHATWG / W3C RFC will release guidance on subtitles and other
    overlays in HTML5 <video> in the near future.  WebM intends
    to follow that guidance. Ref:
    WebVTT.

DocReadTypeVersion SHOULD follow the Matroska specification.

Example:  Files with v2 elements should have a
    DocReadTypeVersion of 2.

Muxer Guidelines

Muxers should treat all guidelines marked SHOULD in this section as
MUST. This will foster consistency across WebM files in the real
world.

WebM SHOULD contain the SeekHead element.

Reason: Allows the client to know if the file contains a Cues
    element.

WebM files SHOULD include a keyframe-only Cues element.

The Cues element SHOULD contain only video key frames, to
    decrease the size of the file header.

It is recommended that the Cues element be before any
    clusters, so that the client can seek to a point in the data
    that has not yet been downloaded in a single  seek operation.
    Ref:  a tool
    that will put the Cues at the front.

All absolute (block + cluster) timecodes MUST be monotonically
    increasing.

All timecodes are associated with the start time of the block.

The TimecodeScale element SHOULD be set to a default of
    1.000.000 nanoseconds.

Reason: Allows every cluster to have blocks with positive
    values up to 32.767 seconds.

Key frames SHOULD be placed at the beginning of clusters.

Having key frames at the beginning of clusters should make
    seeking faster and easier for the client.

Audio blocks that contain the video key frame’s timecode SHOULD
    be in the same cluster as the video key frame block.

Audio blocks that have same absolute timecode as video blocks
    SHOULD be written before the video blocks.

WebM files MUST only support pixels for the DisplayUnit
    element.

VP8 frames SHOULD be muxed in the SimpleBlock element.

VP8 Alternate Reference Frames

When enabled, the VP8 encoder will at its discretion inject a new frame
— the alternate reference (AR) — into the output prior to the frame
that depends on it. There will be at MOST 1 frame added between
I/P-frames. The dependent frame (D) will always be a P-frame. The
AR will be marked with the invisible flag by the codec SDK. This frame
MUST be decoded before D, but will produce no output on its own.

The encoder will currently set the AR’s timestamp as close as possible
to the previous frame while attempting to provide a timestamp that is
strictly increasing. In cases where the time base given to the encoder
at configure time is not granular enough to allow for this the AR will
share the same timestamp as D, but SHOULD be treated as having no
duration.

Ideally the AR’s timestamp should be as close as possible to frame D-1
to allow the decoder as much time as possible to decode AR before
needing to display D.

Encode Example

Input
F0

F1

Output
I/P
AR
D

PTS
0
1
2

Decode Example

Input
I/P
AR
D

Output
F0

F1

PTS
0

2

Demuxer Guidelines

The demuxer MUST only open webm DocType files.

Once the demuxer deems the header and metadata of the file to be
    valid for a WebM file and the player starts playing the file, the
    demuxer MUST do all it can to parse the file, so playback can
    occur as correctly as possible.

Seeking will be disabled if the webm file does not have a key frame
    Cues element.

The project is considering support for seeking without a Cues
    element.

If the Cues element is not at the beginning of the file its
    retrival should be deferred to allow playback to start as soon as
    possible.

WebVTT Guidelines

Storing WebVTT data in a WebM Track

The contents of the WebVTT file is stored as its own WebM track.  The
information that would appear as attributes of the HTML5 track tag can
be embedded in WebM Track element as follows:

The TrackType sub-element value is 0x11 for WebVTT SUBTITLES and
    CAPTIONS, and 0x21 for WebVTT DESCRIPTIONS, and METADATA.

The label attribute is stored as the Name sub-element.

The srclang attribute is stored as the Language sub-element.

Per the convention (see the
Matroska Codec Specifications)
used for flavors of a particular video or audio codec, the CodecID for
a WebVTT track is “D_WEBVTT/kind“, where kind is one of SUBTITLES,
CAPTIONS, DESCRIPTIONS, or METADATA.

Storing WebVTT cue in a WebM Block

The WebVTT cues are stored as the data portion of Block elements in the
track, per the formatting described below. All WebVTT data stored
within a WebM Block MUST be encoded as UTF-8. The timestamp of the WebM
block and its duration are synthesized from the start and end times
specified on the timestamp of the WebVTT cue.  A BlockGroup element
(not a SimpleBlock) MUST be used to contain the Block element, in order
to also use a BlockDuration element, which is necessary to losslessly
encode the original timestamp of the WebVTT cue.

If the WebVTT cue
includes a
WebVTT cue identifier
then the WebVTT cue identifier is written to the WebM Block followed by
a WebVTT line terminator.
If the WebVTT cue does not have a WebVTT cue identifier then a WebVTT
line terminator is written to the WebM Block. The empty line is used to
distinguish that there was no WebVTT cue identifier in the original
WebVTT cue.

The WebVTT cue timings
is not written to the WebM Block. The start and end time of the WebVTT
cue is synthesized from the start time and duration of the WebM Block.

If the WebVTT cue includes a
WebVTT cue settings
then the WebVTT cue settings is written to the WebM Block followed by a
WebVTT line terminator. If the WebVTT cue  does not have a WebVTT cue
settings then a WebVTT line terminator is written to the WebM Block.

The cue payload is then
written to the WebM Block.

General WebVTT Notes

Note that no WebVTT data is stored in the CodecPrivate element of the
WebM Track header.  All WebVTT cues are stored as Block elements for
the track.

The timestamps for WebVTT cues can overlap in time.  This is how
roll-up captions work: multiple cues are rendered simultaneously, and
when the top cue expires, the other cues move up and a new cue appears
at the bottom.  The WebM block timestamps must therefore be allowed to
be monotonically increasing (a requirement already needed for the WebM
container to support VP8 alt-ref frames), and the duration for a block
MUST be allowed to overlap the start time of the next block.

WebVTT Chapter cues

WebVTT chapter cues are used for navigation and so they are handled
differently, because they must all be together and immediately
available.  For this reason, WebVTT chapter cues should not be embedded
the same as for timed cues (a representation that would vitiate their
use for navigation); instead they should be converted to Matroska
chapters (see the
Matroska Chapter Specifications)
and embedded that way.  Matroska chapters are a superset of WebVTT
chapter cues and therefore the conversion is lossless.

Implementation Details

At initial release, WebM supports a subset of the Matroska
specification.  Support for additional Matroska functionality will be
under consideration as the project matures.

Following is a more detailed description of the currently supported
elements, and the features still being evaluated.

EBML Basics

Element Name
Description

Supported
EBML
Set the EBML characteristics of the data to follow. Each EBML document has to start with this.

Supported
EBMLVersion
The version of EBML parser used to create the file.

Supported
EBMLReadVersion
The minimum EBML version a parser has to support to read this file.

Supported
EBMLMaxIDLength
The maximum length of the IDs you’ll find in this file (4 or less in Matroska).

Supported
EBMLMaxSizeLength
The maximum length of the sizes you’ll find in this file (8 or less in Matroska). This does not override the element size indicated at the beginning of an element. Elements that have an indicated size which is larger than what is allowed by EBMLMaxSizeLength shall be considered invalid.

Supported
DocType
A string that describes the type of document that follows this EBML header (‘webm’ in our case).

Supported
DocTypeVersion
The version of DocType interpreter used to create the file.

Supported
DocTypeReadVersion
The minimum DocType version an interpreter has to support to read this file.

Global Elements   (Used throughout the format)

Element Name
Description

Unsupported
CRC-32
The CRC is computed on all the data of the Master element it’s in, regardless of its position. It’s recommended to put the CRC value at the beggining of the Master element for easier reading. All level 1 elements should include a CRC-32.

Supported
Void
Used to void damaged data, to avoid unexpected behaviors when using damaged data. The content is discarded. Also used to reserve space in a sub-element for later use.

Signature Start

Unsupported
SignatureSlot
Contain signature of some (coming) elements in the stream.

Unsupported
SignatureAlgo
Signature algorithm used (1=RSA, 2=elliptic).

Unsupported
SignatureHash
Hash algorithm used (1=SHA1-160, 2=MD5).

Unsupported
SignaturePublicKey
The public key to use with the algorithm (in the case of a PKI-based signature).

Unsupported
Signature
The signature of the data (until a new.

Unsupported
SignatureElements
Contains elements that will be used to compute the signature.

Unsupported
SignatureElementList
A list consists of a number of consecutive elements that represent one case where data is used in signature. Ex: Cluster

Unsupported
SignedElement
An element ID whose data will be used to compute the signature.

Signature End

Segment

Element Name
Description

Supported
Segment
This element contains all other top-level (level 1) elements. Typically a Matroska file is composed of 1 segment.

Meta Seek Information

Element Name
Description

Supported
SeekHead
Contains the position of other level 1 elements.

Supported
Seek
Contains a single seek entry to an EBML element.

Supported
SeekID
The binary ID corresponding to the element name.

Supported
SeekPosition
The position of the element in the segment in octets (0 = first level 1 element).

Segment Information

Element Name
Description

Supported
Info
Contains miscellaneous general information and statistics on the file.

Unsupported
SegmentUID
A randomly generated unique ID to identify the current segment between many others (128 bits).

Unsupported
SegmentFilename
A filename corresponding to this segment.

Unsupported
PrevUID
A unique ID to identify the previous chained segment (128 bits).

Unsupported
PrevFilename
An escaped filename corresponding to the previous segment.

Unsupported
NextUID
A unique ID to identify the next chained segment (128 bits).

Unsupported
NextFilename
An escaped filename corresponding to the next segment.

Unsupported
SegmentFamily
A randomly generated unique ID that all segments related to each other MUST use (128 bits).

Unsupported
ChapterTranslate
A tuple of corresponding ID used by chapter codecs to represent this segment.

Unsupported
ChapterTranslateEditionUID
Specify an edition UID on which this correspondance applies. When not specified, it means for all editions found in the segment.

Unsupported
ChapterTranslateCodec
The chapter codec using this ID (0: Matroska Script, 1: DVD-menu).

Unsupported
ChapterTranslateID
The binary value used to represent this segment in the chapter codec data. The format depends on the ChapProcessCodecID used.

Supported
TimecodeScale
Timecode scale in nanoseconds (1.000.000 means all timecodes in the segment are expressed in milliseconds).

Supported
Duration
Duration of the segment (based on TimecodeScale).

Supported
DateUTC
Date of the origin of timecode (value 0), i.e. production date.

Supported
Title
General name of the segment.

Supported
MuxingApp
Muxing application or library (“libmatroska-0.4.3”).

Supported
WritingApp
Writing application (“mkvmerge-0.3.3”).

Cluster

Element Name
Description

Supported
Cluster
The lower level element containing the (monolithic) Block structure.

Supported
Timecode
Absolute timecode of the cluster (based on TimecodeScale).

Unsupported
SilentTracks
The list of tracks that are not used in that part of the stream. It is useful when using overlay tracks on seeking. Then you should decide what track to use.

Unsupported
SilentTrackNumber
One of the track number that are not used from now on in the stream. It could change later if not specified as silent in a further Cluster.

Unsupported
Position
Position of the Cluster in the segment (0 in live broadcast streams). It might help to resynchronise offset on damaged streams.

Supported
PrevSize
Size of the previous Cluster, in octets. Can be useful for backward playing.

Supported
BlockGroup
Basic container of information containing a single Block or BlockVirtual, and information specific to that Block/VirtualBlock.

Supported
Block
Block containing the actual data to be rendered and a timecode relative to the Cluster Timecode.

Unsupported
BlockVirtual
A Block with no data. It MUST be stored in the stream at the place the real Block should be in display order.

Unsupported
BlockAdditions
Contain additional blocks to complete the main one. An EBML parser that has no knowledge of the Block structure could still see and use/skip these data.

Unsupported
BlockMore
Contain the BlockAdditional and some parameters.

Unsupported
BlockAddID
An ID to identify the BlockAdditional level.

Unsupported
BlockAdditional
Interpreted by the codec as it wishes (using the BlockAddID).

Supported
BlockDuration
The duration of the Block (based on TimecodeScale). This element is mandatory when DefaultDuration is set for the track. When not written and with no DefaultDuration, the value is assumed to be the difference between the timecode of this Block and the timecode of the next Block in “display” order (not coding order). This element can be useful at the end of a Track (as there is not other Block available), or when there is a break in a track like for subtitle tracks.

Unsupported
ReferencePriority
This frame is referenced and has the specified cache priority. In cache only a frame of the same or higher priority can replace this frame. A value of 0 means the frame is not referenced.

Supported
ReferenceBlock
Timecode of another frame used as a reference (ie: B or P frame). The timecode is relative to the block it’s attached to.

Unsupported
ReferenceVirtual
Relative position of the data that should be in position of the virtual block.

Unsupported
CodecState
The new codec state to use. Data interpretation is private to the codec. This information should always be referenced by a seek entry.

Unsupported
Slices
Contains slices description.

Unsupported
TimeSlice
Contains extra time information about the data contained in the Block. While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback.

Supported
LaceNumber
The reverse number of the frame in the lace (0 is the last frame, 1 is the next to last, etc). While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback.

Unsupported
FrameNumber
The number of the frame to generate from this lace with this delay (allow you to generate many frames from the same Block/Frame).

Unsupported
BlockAdditionID
The ID of the BlockAdditional element (0 is the main Block).

Unsupported
Delay
The (scaled) delay to apply to the element.

Unsupported
Duration
The (scaled) duration to apply to the element.

Supported
SimpleBlock
Similar to Block but without all the extra information, mostly used to reduced overhead when no extra feature is needed.

Unsupported
EncryptedBlock
Similar to SimpleBlock but the data inside the Block are Transformed (encrypt and/or signed).

Track

Element Name
Description

Supported
Tracks
A top-level block of information with many tracks described.

Supported
TrackEntry
Describes a track with all elements.

Supported
TrackNumber
The track number as used in the Block Header (using more than 127 tracks is not encouraged, though the design allows an unlimited number).

Supported
TrackUID
A unique ID to identify the Track. This should be kept the same when making a direct stream copy of the Track to another file.

Supported
TrackType
A set of track types coded on 8 bits (1: video, 2: audio, 3: complex, 0x10: logo, 0x11: subtitle, 0x12: buttons, 0x20: control).

Supported
FlagEnabled
Set if the track is used.

Supported
FlagDefault
Set if that track (audio, video or subs) SHOULD be used if no language found matches the user preference.

Supported
FlagForced
Set if that track MUST be used during playback. There can be many forced track for a kind (audio, video or subs), the player should select the one which language matches the user preference or the default + forced track. Overlay MAY happen between a forced and non-forced track of the same kind.

Supported
FlagLacing
Set if the track may contain blocks using lacing.

Unsupported
MinCache
The minimum number of frames a player should be able to cache during playback. If set to 0, the reference pseudo-cache system is not used.

Unsupported
MaxCache
The maximum cache size required to store referenced frames in and the current frame. 0 means no cache is needed.

Supported
DefaultDuration
Number of nanoseconds (i.e. not scaled) per frame.

Unsupported
TrackTimecodeScale
The scale to apply on this track to work at normal speed in relation with other tracks (mostly used to adjust video speed when the audio length differs).

Unsupported
TrackOffset
A value to add to the Block’s Timecode. This can be used to adjust the playback offset of a track.

Unsupported
MaxBlockAdditionID
The maximum value of BlockAddID. A value 0 means there is no BlockAdditions for this track.

Supported
Name
A human-readable track name.

Supported
Language
Specifies the language of the track in the Matroska languages form.

Supported
CodecID
An ID corresponding to the codec, see the codec page for more info.

Supported
CodecPrivate
Private data only known to the codec.

Supported
CodecName
A human-readable string specifying the codec.

Unsupported
AttachmentLink
The UID of an attachment that is used by this codec.

Unsupported
CodecSettings
A string describing the encoding setting used.

Unsupported
CodecInfoURL
A URL to find information about the codec used.

Unsupported
CodecDownloadURL
A URL to download about the codec used.

Unsupported
CodecDecodeAll
The codec can decode potentially damaged data.

Unsupported
TrackOverlay
Specify that this track is an overlay track for the Track specified (in the u-integer). That means when this track has a gap (see SilentTracks) the overlay track should be used instead. The order of multiple TrackOverlay matters, the first one is the one that should be used. If not found it should be the second, etc.

Unsupported
TrackTranslate
The track identification for the given Chapter Codec.

Unsupported
TrackTranslateEditionUID
Specify an edition UID on which this translation applies. When not specified, it means for all editions found in the segment.

Unsupported
TrackTranslateCodec
The chapter codec using this ID (0: Matroska Script, 1: DVD-menu).

Unsupported
TrackTranslateTrackID
The binary value used to represent this track in the chapter codec data. The format depends on the ChapProcessCodecID used.

Video Start

Supported
Video
Video settings.

Supported
FlagInterlaced
Set if the video is interlaced.

Supported
StereoMode
Stereo-3D video mode.

Supported Modes: 0: mono, 1: side by side (left eye is first), 2: top-bottom (right eye is first), 3: top-bottom (left eye is first), 11: side by side (right eye is first)

Unsupported Modes: 4: checkboard (right is first), 5: checkboard (left is first), 6: row interleaved (right is first), 7: row interleaved (left is first), 8: column interleaved (right is first), 9: column interleaved (left is first), 10: anaglyph (cyan/red)

Supported
PixelWidth
Width of the encoded video frames in pixels.

Supported
PixelHeight
Height of the encoded video frames in pixels.

Supported
PixelCropBottom
The number of video pixels to remove at the bottom of the image (for HDTV content).

Supported
PixelCropTop
The number of video pixels to remove at the top of the image.

Supported
PixelCropLeft
The number of video pixels to remove on the left of the image.

Supported
PixelCropRight
The number of video pixels to remove on the right of the image.

Supported
DisplayWidth
Width of the video frames to display.

Supported
DisplayHeight
Height of the video frames to display.

Supported
DisplayUnit
Type of the unit for DisplayWidth/Height (0: pixels, 1: centimeters, 2: inches). Pixels only supported.

Supported
AspectRatioType
Specify the possible modifications to the aspect ratio (0: free resizing, 1: keep aspect ratio, 2: fixed).

Unsupported
ColourSpace
Same value as in AVI (32 bits).

Unsupported
GammaValue
Gamma Value.

Supported
FrameRate
Number of frames per second. Informational only.

Video End

Audio Start

Supported
Audio
Audio settings.

Supported
SamplingFrequency
Sampling frequency in Hz.

Supported
OutputSamplingFrequency
Real output sampling frequency in Hz (used for SBR techniques).

Supported
Channels
Numbers of channels in the track.

Unsupported
ChannelPositions
Table of horizontal angles for each successive channel, see appendix.

Supported
BitDepth
Bits per sample, mostly used for PCM.

Audio End

Content Encoding Start

Unsupported
ContentEncodings
Settings for several content encoding mechanisms like compression or encryption.

Unsupported
ContentEncoding
Settings for one content encoding like compression or encryption.

Unsupported
ContentEncodingOrder
Tells when this modification was used during encoding/muxing starting with 0 and counting upwards. The decoder/demuxer has to start with the highest order number it finds and work its way down. This value has to be unique over all ContentEncodingOrder elements in the segment.

Unsupported
ContentEncodingScope
A bit field that describes which elements have been modified in this way. Values (big endian) can be OR’ed. Possible values: 1 - all frame contents; 2 - the track’s private data; 4 - the next ContentEncoding (next ContentEncodingOrder. Either the data inside ContentCompression and/or ContentEncryption)

Unsupported
ContentEncodingType
A value describing what kind of transformation has been done. Possible values: 0 - compression; 1 - encryption.

Unsupported
ContentCompression
Settings describing the compression used. Must be present if the value of ContentEncodingType is 0 and absent otherwise. Each block MUST be decompressable even if no previous block is available in order not to prevent seeking.

Unsupported
ContentCompAlgo
The compression algorithm used. Algorithms that have been specified so far are: 0 - zlib; 1 - bzlib; 2 - lzo1x; 3 - Header Stripping.

Unsupported
ContentCompSettings
Settings that might be needed by the decompressor. For Header Stripping (ContentCompAlgo=3), the bytes that were removed from the beggining of each frame of the track.

Unsupported
ContentEncryption
Settings describing the encryption used. Must be present if the value of ContentEncodingType is 1 and absent otherwise.

Unsupported
ContentEncAlgo
The encryption algorithm used. The value ‘0’ means that the contents have not been encrypted but only signed. Predefined values: 1 - DES; 2 - 3DES; 3 - Twofish; 4 - Blowfish; 5 - AES.

Unsupported
ContentEncKeyID
For public key algorithms this is the ID of the public key the the data was encrypted with.

Unsupported
ContentSignature
A cryptographic signature of the contents.

Unsupported
ContentSigKeyID
This is the ID of the private key the data was signed with.

Unsupported
ContentSigAlgo
The algorithm used for the signature. A value of ‘0’ means that the contents have not been signed but only encrypted. Predefined values: 1 - RSA

Unsupported
ContentSigHashAlgo
The hash algorithm used for the signature. A value of ‘0’ means that the contents have not been signed but only encrypted. Predefined values: 1 - SHA1-160; 2 - MD5.

Content Encoding End

Cueing Data

Element Name
Description

Supported
Cues
A top-level element to speed seeking access. All entries are local to the segment.

Supported
CuePoint
Contains all information relative to a seek point in the segment.

Supported
CueTime
Absolute timecode according to the segment time base.

Supported
CueTrackPositions
Contain positions for different tracks corresponding to the timecode.

Supported
CueTrack
The track for which a position is given.

Supported
CueClusterPosition
The position of the Cluster containing the required Block.

Supported
CueBlockNumber
Number of the Block in the specified Cluster.

Unsupported
CueCodecState
The position of the Codec State corresponding to this Cue element. 0 means that the data is taken from the initial Track Entry.

Unsupported
CueReference
The Clusters containing the required referenced Blocks.

Unsupported
CueRefTime
Timecode of the referenced Block.

Unsupported
CueRefCluster
Position of the Cluster containing the referenced Block.

Unsupported
CueRefNumber
Number of the referenced Block of Track X in the specified Cluster.

Unsupported
CueRefCodecState
The position of the Codec State corresponding to this referenced element. 0 means that the data is taken from the initial Track Entry.

Attachment

Element Name
Description

Unsupported
Attachments
Contain attached files.

Unsupported
AttachedFile
An attached file.

Unsupported
FileDescription
A human-friendly name for the attached file.

Unsupported
FileName
Filename of the attached file.

Unsupported
FileMimeType
MIME type of the file.

Unsupported
FileData
The data of the file.

Unsupported
FileUID
Unique ID representing the file, as random as possible.

Unsupported
FileReferral
A binary value that a track/codec can refer to when the attachment is needed.

Chapters

Element Name
Description

Unsupported
Chapters
A system to define basic menus and partition data. For more detailed information, look at the Chapters Explanation.

Unsupported
EditionEntry
Contains all information about a segment edition.

Unsupported
EditionUID
A unique ID to identify the edition. It’s useful for tagging an edition.

Unsupported
EditionFlagHidden
If an edition is hidden (1), it should not be available to the user interface (but still to Control Tracks).

Unsupported
EditionFlagDefault
If a flag is set (1) the edition should be used as the default one.

Unsupported
EditionFlagOrdered
Specify if the chapters can be defined multiple times and the order to play them is enforced.

Unsupported
ChapterAtom
Contains the atom information to use as the chapter atom (apply to all tracks).

Unsupported
ChapterUID
A unique ID to identify the Chapter.

Unsupported
ChapterTimeStart
Timecode of the start of Chapter (not scaled).

Unsupported
ChapterTimeEnd
Timecode of the end of Chapter (timecode excluded, not scaled).

Unsupported
ChapterFlagHidden
If a chapter is hidden (1), it should not be available to the user interface (but still to Control Tracks).

Unsupported
ChapterFlagEnabled
Specify wether the chapter is enabled. It can be enabled/disabled by a Control Track. When disabled, the movie should skip all the content between the TimeStart and TimeEnd of this chapter.

Unsupported
ChapterSegmentUID
A segment to play in place of this chapter. Edition ChapterSegmentEditionUID should be used for this segment, otherwise no edition is used.

Unsupported
ChapterSegmentEditionUID
The edition to play from the segment linked in ChapterSegmentUID.

Unsupported
ChapterPhysicalEquiv
Specify the physical equivalent of this ChapterAtom like “DVD” (60) or “SIDE” (50), see complete list of values.

Unsupported
ChapterTrack
List of tracks on which the chapter applies. If this element is not present, all tracks apply

Unsupported
ChapterTrackNumber
UID of the Track to apply this chapter too. In the absense of a control track, choosing this chapter will select the listed Tracks and deselect unlisted tracks. Absense of this element indicates that the Chapter should be applied to any currently used Tracks.

Unsupported
ChapterDisplay
Contains all possible strings to use for the chapter display.

Unsupported
ChapString
Contains the string to use as the chapter atom.

Unsupported
ChapLanguage
The languages corresponding to the string, in the bibliographic ISO-639-2 form.

Unsupported
ChapCountry
The countries corresponding to the string, same 2 octets as in Internet domains.

Unsupported
ChapProcess
Contains all the commands associated to the Atom.

Unsupported
ChapProcessCodecID
Contains the type of the codec used for the processing. A value of 0 means native Matroska processing (to be defined), a value of 1 means the DVD command set is used. More codec IDs can be added later.

Unsupported
ChapProcessPrivate
Some optional data attached to the ChapProcessCodecID information. For ChapProcessCodecID = 1, it is the “DVD level” equivalent.

Unsupported
ChapProcessCommand
Contains all the commands associated to the Atom.

Unsupported
ChapProcessTime
Defines when the process command should be handled (0: during the whole chapter, 1: before starting playback, 2: after playback of the chapter).

Unsupported
ChapProcessData
Contains the command information. The data should be interpreted depending on the ChapProcessCodecID value. For ChapProcessCodecID = 1, the data correspond to the binary DVD cell pre/post commands.

Tagging

The Tags element SHOULD be placed at the end of the file to
    allow for trivial updates.

TagName SHOULD appear before the tag data, i.e., TagString,
    TagBinary.

A SimpleTag SHOULD NOT contain other SimpleTags.

When concatenating multiple files, new Segments should be used to
    avoid merging tags common to each file.

Element Name
Description

Supported
Tags
Element containing elements specific to Tracks/Chapters. A list of valid tags can be found here.

Supported
Tag
Element containing elements specific to Tracks/Chapters.

Supported
Targets
Contain all UIDs where the specified meta data apply. It is void to describe everything in the segment.

Supported
TargetTypeValue
A number to indicate the logical level of the target (see TargetType).

Supported
TargetType
An informational string that can be used to display the logical level of the target like “ALBUM”, “TRACK”, “MOVIE”, “CHAPTER”, etc (see TargetType).

Supported
TrackUID
This value SHOULD be 0, meaning the tags apply to all tracks in the Segment.

Unsupported
EditionUID
A unique ID to identify the EditionEntry(s) the tags belong to. If the value is 0 at this level, the tags apply to all editions in the Segment.

Unsupported
ChapterUID
A unique ID to identify the Chapter(s) the tags belong to. If the value is 0 at this level, the tags apply to all chapters in the Segment.

Unsupported
AttachmentUID
A unique ID to identify the Attachment(s) the tags belong to. If the value is 0 at this level, the tags apply to all the attachments in the Segment.

Supported
SimpleTag
Contains general information about the target.

Supported
TagName
The name of the Tag that is going to be stored.

Supported
TagLanguage
Specifies the language of the tag specified, in the Matroska languages form.

Supported
TagDefault
Indication to know if this is the default/original language to use for the given tag.

Supported
TagString
The value of the Tag.

Supported
TagBinary
The values of the Tag if it is binary. Note that this cannot be used in the same SimpleTag as TagString.

Target Types

See the Matroska Tag Specifications.

Official Tags

Work in-progress.  See the wiki.

About

About WebM

FAQ

Discuss

Supporters

More

Tools

Hardware

Licenses

Downloads

Developer

Overview

Contribute

Submitting Patches

Code Reviews

Workflow

Conventions

Bug Reporting

Build Prerequisites

Repository Layout

Releases

Roadmap

Docs

libvpx API

RFC 6386: VP8 Data Format

WebM Container Format

VP8 RTP Proposal (Draft)

Encoder Examples

Wiki

            Copyright 2010 - 2014

            The WebM Project

            Follow @WebM

            webmaster@webmproject.org


text:
package io.sidecar.client;

import static com.google.common.base.Throwables.propagate;
import static io.sidecar.util.DateUtils.nowUtc;

import java.net.URL;

import com.squareup.okhttp.Request;
import com.squareup.okhttp.RequestBody;
import io.sidecar.jackson.ModelMapper;
import io.sidecar.security.signature.SignatureVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

class SidecarPostRequest extends SidecarRequest {

    private static final ModelMapper mapper = new ModelMapper();

    private static Logger LOGGER = LoggerFactory.getLogger(SidecarPostRequest.class);
    private URL url;
    private Object payload;

    @Override
    public SidecarResponse send() {
        try {
            String payloadAsJson = mapper.writeValueAsString(payload);

            LOGGER.debug("Creating sidecar POST request... " + url);
            LOGGER.debug("JSON_MEDIA_TYPE payload is {}", payloadAsJson);

            Request.Builder request = new Request.Builder()
                    .url(url)
                    .post(RequestBody.create(JSON_MEDIA_TYPE, payloadAsJson));

            // add the required headers for signing the request
            signHeaders("POST", url.getPath(), request, payloadAsJson);
            return send(request.build());
        } catch (Exception e) {
            throw propagate(e);
        }
    }

    public static class Builder {

        private SidecarPostRequest sidecarRequest;

        public Builder(String accessKeyId, String password, String secret) {
            sidecarRequest = new SidecarPostRequest();
            sidecarRequest.secret = secret;
            sidecarRequest.accessKey = accessKeyId;
            sidecarRequest.password = password;
        }

        public Builder withSignatureVersion(SignatureVersion.Version version) {
            sidecarRequest.signatureVersion = version.digit;
            return this;
        }

        public Builder withUrl(URL url) {
            sidecarRequest.url = url;
            return this;
        }

        public Builder withPayload(Object payload) {
            sidecarRequest.payload = payload;
            return this;
        }

        public SidecarPostRequest build() {

            // set defaults if they are not there
            if (sidecarRequest.requestDate == null) {
                sidecarRequest.requestDate = nowUtc().toString();
            }
            return sidecarRequest;
        }
    }
}


text:
import {
  Component,
  OnInit,
  ViewChild
} from '@angular/core';
import { Config } from '../shared/config/env.config';
import '../operators';
import { AuthenticationService } from '../_services/authentication.service';
import { MdSidenav } from '@angular/material';

@Component({
  moduleId: module.id,
  selector: 'sd-main',
  templateUrl: 'main.component.html',
  styleUrls: ['main.component.css'],
})

export class MainComponent implements OnInit {

  @ViewChild('sidenav')
  sidenav: MdSidenav;
  sidenav_opened: boolean = false;

  constructor(private authHelper: AuthenticationService) {
    console.log('Environment config', Config);
  }

  ngOnInit(): void {
  }

  toogleSideNav() {
    this.sidenav.toggle();
  }
}


text:
package org.ema.entities;

import java.util.Date;
import java.util.UUID;

import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;

public class PlayStats  extends RealmObject {

    @PrimaryKey
    private String id = UUID.randomUUID().toString();
    private Date start;
    private Date end;
    private double totalPoints;
    private String userId;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Date getStart() {
        return start;
    }

    public void setStart(Date start) {
        this.start = start;
    }

    public Date getEnd() {
        return end;
    }

    public void setEnd(Date end) {
        this.end = end;
    }

    public double getTotalPoints() {
        return totalPoints;
    }

    public void setTotalPoints(double totalPoints) {
        this.totalPoints = totalPoints;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public void addPoint(int point){
        this.totalPoints+=point;
    }

}


text:
package org.apache.flink.streaming.connectors.kafka;

import org.apache.flink.api.common.typeinfo.TypeInformation;
import org.apache.flink.api.java.typeutils.RowTypeInfo;
import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.streaming.connectors.kafka.partitioner.FlinkKafkaPartitioner;
import org.apache.flink.streaming.util.serialization.KeyedSerializationSchemaWrapper;
import org.apache.flink.streaming.util.serialization.SerializationSchema;
import org.apache.flink.table.api.Types;
import org.apache.flink.types.Row;

import org.junit.Test;

import java.util.Properties;

import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotSame;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;

/**
 * Abstract test base for all Kafka table sink tests.
 */
public abstract class KafkaTableSinkTestBase {

	private static final String TOPIC = "testTopic";
	protected static final String[] FIELD_NAMES = new String[] {"field1", "field2"};
	private static final TypeInformation[] FIELD_TYPES = new TypeInformation[] { Types.INT(), Types.STRING() };
	private static final FlinkKafkaPartitioner<Row> PARTITIONER = new CustomPartitioner();
	private static final Properties PROPERTIES = createSinkProperties();
	@SuppressWarnings("unchecked")
	private final FlinkKafkaProducerBase<Row> producer = new FlinkKafkaProducerBase<Row>(
		TOPIC, new KeyedSerializationSchemaWrapper(getSerializationSchema()), PROPERTIES, PARTITIONER) {

		@Override
		protected void flush() {}
	};

	@Test
	@SuppressWarnings("unchecked")
	public void testKafkaTableSink() throws Exception {
		DataStream dataStream = mock(DataStream.class);

		KafkaTableSink kafkaTableSink = spy(createTableSink());
		kafkaTableSink.emitDataStream(dataStream);

		verify(dataStream).addSink(eq(producer));

		verify(kafkaTableSink).createKafkaProducer(
			eq(TOPIC),
			eq(PROPERTIES),
			any(getSerializationSchema().getClass()),
			eq(PARTITIONER));
	}

	@Test
	public void testConfiguration() {
		KafkaTableSink kafkaTableSink = createTableSink();
		KafkaTableSink newKafkaTableSink = kafkaTableSink.configure(FIELD_NAMES, FIELD_TYPES);
		assertNotSame(kafkaTableSink, newKafkaTableSink);

		assertArrayEquals(FIELD_NAMES, newKafkaTableSink.getFieldNames());
		assertArrayEquals(FIELD_TYPES, newKafkaTableSink.getFieldTypes());
		assertEquals(new RowTypeInfo(FIELD_TYPES), newKafkaTableSink.getOutputType());
	}

	protected abstract KafkaTableSink createTableSink(String topic, Properties properties,
			FlinkKafkaPartitioner<Row> partitioner, FlinkKafkaProducerBase<Row> kafkaProducer);

	protected abstract SerializationSchema<Row> getSerializationSchema();

	private KafkaTableSink createTableSink() {
		return createTableSink(TOPIC, PROPERTIES, PARTITIONER, producer);
	}

	private static Properties createSinkProperties() {
		Properties properties = new Properties();
		properties.setProperty("bootstrap.servers", "localhost:12345");
		return properties;
	}

	private static class CustomPartitioner extends FlinkKafkaPartitioner<Row> {
		@Override
		public int partition(Row record, byte[] key, byte[] value, String targetTopic, int[] partitions) {
			return 0;
		}
	}
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpGL.SceneGraph.Effects;
using SharpGL.SceneGraph.Core;
using System.ComponentModel;
using System.Xml.Serialization;
using System.IO;

namespace SharpGL.SceneGraph.Shaders
{
    /// <summary>
    /// The Shader base class.
    /// </summary>
    public abstract class Shader :
        Effect,
        IHasOpenGLContext
    {
        /// <summary>
        /// Pops the effect off the specified parent element.
        /// </summary>
        /// <param name="gl">The OpenGL instance.</param>
        /// <param name="parentElement">The parent element.</param>
        public override void Pop(OpenGL gl, SceneElement parentElement)
        {

        }

        /// <summary>
        /// Pushes the effect onto the specified parent element.
        /// </summary>
        /// <param name="gl">The OpenGL instance.</param>
        /// <param name="parentElement">The parent element.</param>
        public override void Push(OpenGL gl, SceneElement parentElement)
        {
        }

        /// <summary>
        /// Create in the context of the supplied OpenGL instance.
        /// </summary>
        /// <param name="gl">The OpenGL instance.</param>
        public abstract void CreateInContext(OpenGL gl);

        /// <summary>
        /// Destroy in the context of the supplied OpenGL instance.
        /// </summary>
        /// <param name="gl">The OpenGL instance.</param>
        public void DestroyInContext(OpenGL gl)
        {
            //  Delete the shader.
            gl.DeleteShader(ShaderObject);
            ShaderObject = 0;
            CurrentOpenGLContext = null;
        }

        /// <summary>
        /// Sets the shader source.
        /// </summary>
        /// <param name="source">The source.</param>
        public void SetSource(string source)
        {
            //  Set the shader source.
            CurrentOpenGLContext.ShaderSource(ShaderObject, source);
        }

        /// <summary>
        /// Loads the shader source.
        /// </summary>
        /// <param name="path">The path to the shader file.</param>
        public void LoadSource(string path)
        {
            using (FileStream stream = new FileStream(path, FileMode.Open))
            {
                StreamReader reader = new StreamReader(stream);
                SetSource(reader.ReadToEnd());
                reader.Close();
            }
        }

        /// <summary>
        /// Compiles this instance.
        /// </summary>
        public void Compile()
        {
            //  Compile the shader.
            CurrentOpenGLContext.CompileShader(ShaderObject);
        }

        /// <summary>
        /// The internal shader object.
        /// </summary>
        private uint shaderObject = 0;

        /// <summary>
        /// Gets or sets the shader object.
        /// </summary>
        /// <value>
        /// The shader object.
        /// </value>
        [Category("Shader"), Description("The internal shader object.")]
        [XmlIgnore]
        [Browsable(false)]
        public uint ShaderObject
        {
            get { return shaderObject; }
            protected set { shaderObject = value; }
        }

        /// <summary>
        /// Gets the current OpenGL that the object exists in context.
        /// </summary>
        [Category("Shader"), Description("The current context.")]
        [XmlIgnore]
        [Browsable(false)]
        public OpenGL CurrentOpenGLContext
        {
            get;
            protected set;
        }

        /// <summary>
        /// Gets the compile status.
        /// </summary>
        [Category("Shader"), Description("The compile status.")]
        public bool? CompileStatus
        {
            get
            {
                if (ShaderObject == 0 || CurrentOpenGLContext == null)
                    return null;

                //  Get the compile info.
                int[] parameters = new int[] { 0 };
                CurrentOpenGLContext.GetShader(ShaderObject, OpenGL.GL_COMPILE_STATUS,
                    parameters);

                return parameters[0] == OpenGL.GL_TRUE;
            }
        }

        /// <summary>
        /// Gets the info log.
        /// </summary>
        [Category("Shader"), Description("The info log.")]
        public string InfoLog
        {
            get
            {
                if (ShaderObject == 0 || CurrentOpenGLContext == null)
                    return null;

                //  Get the info log length.
                int[] infoLength = new int[] { 0 };
                CurrentOpenGLContext.GetShader(ShaderObject,
                    OpenGL.GL_INFO_LOG_LENGTH, infoLength);

                //  Get the compile info.
                StringBuilder il = new StringBuilder(1000);
                CurrentOpenGLContext.GetShaderInfoLog(ShaderObject, 10000,
                   IntPtr.Zero, il);

                return il.ToString();
            }
        }

        /// <summary>
        /// Gets the source code.
        /// </summary>
        [Category("Shader"), Description("Source code.")]
        public string SourceCode
        {
            get
            {
                if (ShaderObject == 0 || CurrentOpenGLContext == null)
                    return null;

                //  Get the info log length.
                int[] infoLength = new int[] { 0 };
                CurrentOpenGLContext.GetShader(ShaderObject,
                    OpenGL.GL_INFO_LOG_LENGTH, infoLength);

                //  Get the source info.
                StringBuilder src = new StringBuilder(1000);
                CurrentOpenGLContext.GetShaderSource(ShaderObject, 10000,
                   IntPtr.Zero, src);

                return src.ToString();
            }
        }
    }
}


text:
package org.hibernate.metamodel.source.binder;

import org.hibernate.EntityMode;
import org.hibernate.engine.OptimisticLockStyle;
import org.hibernate.metamodel.binding.Caching;

/**
 * Contract for the entity that is the root of an inheritance hierarchy.
 *

 * NOTE : I think most of this could be moved to {@link EntityHierarchy} much like was done with
 * {@link org.hibernate.metamodel.binding.HierarchyDetails}
 *
 * @author Steve Ebersole
 *
 * @todo Move these concepts to {@link EntityHierarchy} ?
 */
public interface RootEntitySource extends EntitySource {
	/**
	 * Obtain source information about this entity's identifier.
	 *
	 * @return Identifier source information.
	 */
	public IdentifierSource getIdentifierSource();

	/**
	 * Obtain the source information about the attribute used for versioning.
	 *
	 * @return the source information about the attribute used for versioning
	 */
	public SingularAttributeSource getVersioningAttributeSource();

	/**
	 * Obtain the source information about the discriminator attribute for single table inheritance
	 *
	 * @return the source information about the discriminator attribute for single table inheritance
	 */
	public DiscriminatorSource getDiscriminatorSource();

	/**
	 * Obtain the entity mode for this entity.
	 *
	 * @return The entity mode.
	 */
	public EntityMode getEntityMode();

	/**
	 * Is this root entity mutable?
	 *
	 * @return {@code true} indicates mutable; {@code false} non-mutable.
	 */
	public boolean isMutable();

	/**
	 * Should explicit polymorphism (querying) be applied to this entity?
	 *
	 * @return {@code true} indicates explicit polymorphism; {@code false} implicit.
	 */
	public boolean isExplicitPolymorphism();

	/**
	 * Obtain the specified extra where condition to be applied to this entity.
	 *
	 * @return The extra where condition
	 */
	public String getWhere();

	/**
	 * Obtain the row-id name for this entity
	 *
	 * @return The row-id name
	 */
	public String getRowId();

	/**
	 * Obtain the optimistic locking style for this entity.
	 *
	 * @return The optimistic locking style.
	 */
	public OptimisticLockStyle getOptimisticLockStyle();

	/**
	 * Obtain the caching configuration for this entity.
	 *
	 * @return The caching configuration.
	 */
	public Caching getCaching();
}


text:
/*
 * $Log: OperationalPatternConstant.java,v $
 * Revision 1.5  2011/07/27 12:20:00  vizigoth
 * Added RP224 SMPTE label registry leaf-node constants.
 *
 * Revision 1.4  2011/01/04 10:43:58  vizigoth
 * Refactor all package names to simpler forms more consistent with typical Java usage.
 *
 * Revision 1.3  2009/05/14 16:15:24  vizigoth
 * Major refactor to remove dependency on JPA and introduce better interface and implementation separation. Removed all setPropertiesFromInterface and castFromInterface methods.
 *
 * Revision 1.2  2009/03/30 09:05:00  vizigoth
 * Refactor to use SMPTE harmonized names and add early KLV file support.
 *
 * Revision 1.1  2008/01/23 14:22:46  vizigoth
 * Fixed name of OperationalProtocolConstant to OperationalPatternConstant.
 *
 * Revision 1.1  2008/01/23 14:20:49  vizigoth
 * Added operational pattern constants and descriptions.
 *
 */

package tv.amwa.maj.constant;

import tv.amwa.maj.record.AUID;

/**
 *
Implement this interface to access unique identifiers for operational patterns or AAF protocols, such as
 * as the AAF edit protocol. An operational pattern constraints levels of file complexity.

 *
 *
 *
 * @see OperationalPatternDescription
 * @see tv.amwa.maj.model.Preface#getOperationalPattern()
 */
public interface OperationalPatternConstant {

	/**
	 *
File complexity is constrained to that specified by the
	 * AAF edit protocol.

	 */
	@OperationalPatternDescription(
			description = "Operational Pattern for the AAF Edit Protocol",
			aliases = "OPDef_EditProtocol")
	public final static AUID EditProtocol = new tv.amwa.maj.record.impl.AUIDImpl(
			0x0d011201, (short) 0x0100, (short) 0x0000,
			new byte[] { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x05 });

	/**
	 *
File complexity is not constrained by an optional pattern.

	 */
	@OperationalPatternDescription(
			description = "Unconstrained by an Operational Pattern",
			aliases = "OPDef_Unconstrained")
	public final static AUID Unconstrained = new tv.amwa.maj.record.impl.AUIDImpl(
			0x0d011201, (short) 0x0200, (short) 0x0000,
			new byte[] { 0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x09 });
}


text:
{% extends "layout-webfiling.html" %}

{% block pageTitle %}
  Company authentication
{% endblock %}

{% block main %}

Signed in to
Companies House

			Sign out

Change account details

My recent filings

Sign in to a company

                <input style="display:none" type="password">
				<fieldset class="selection-group">
					<legend>
Where was the company registered?
</legend>

							<input name="companySignInPage.companySignInForm.coType" id="companySignInPage.EW" value="EW" checked="checked" type="radio">
							England / Wales

							<input name="companySignInPage.companySignInForm.coType" id="companySignInPage.SC" value="SC" type="radio">
							Scotland

							<input name="companySignInPage.companySignInForm.coType" id="companySignInPage.NI" value="NI" type="radio">
							Northern Ireland

				</fieldset>

				<fieldset>
					<legend class="hidden">Company sign in information</legend>

							Company number
							<input id="companySignInPage.coNum" name="companySignInPage.companySignInForm.coNum" maxlength="8" value="" class="medium" type="text">

							Authentication code
							<input name="companySignInPage.companySignInForm.authCode" id="companySignInPage.authCode" maxlength="8" value="" class="medium" type="password">

Request an authentication code

				</fieldset>

Sign in

            Email Companies House
            Telephone +44 (0)303 1234 500 8:30am to 6pm (UK time) Monday to Friday
            Help

Cymraeg

{% endblock %}


text:
package pl.zankowski.iextrading4j.hist.api.message.administrative;

import pl.zankowski.iextrading4j.hist.api.message.IEXMessage;
import pl.zankowski.iextrading4j.hist.api.message.administrative.field.IEXOperationalHaltStatus;
import pl.zankowski.iextrading4j.hist.api.util.IEXByteConverter;

import java.util.Arrays;
import java.util.Objects;

import static pl.zankowski.iextrading4j.hist.api.IEXMessageType.OPERATIONAL_HALT_STATUS;

public class IEXOperationalHaltStatusMessage extends IEXMessage {

    public static final int LENGTH = 18;

    private final IEXOperationalHaltStatus operationalHaltStatus;
    private final long timestamp;
    private final String symbol;

    private IEXOperationalHaltStatusMessage(
            final IEXOperationalHaltStatus operationalHaltStatus,
            final long timestamp,
            final String symbol) {
        super(OPERATIONAL_HALT_STATUS);
        this.operationalHaltStatus = operationalHaltStatus;
        this.timestamp = timestamp;
        this.symbol = symbol;
    }

    public static IEXOperationalHaltStatusMessage createIEXMessage(final byte[] bytes) {
        final IEXOperationalHaltStatus operationalHaltStatus = IEXOperationalHaltStatus.getOperationalHaltStatus(bytes[1]);
        final long timestamp = IEXByteConverter.convertBytesToLong(Arrays.copyOfRange(bytes, 2, 10));
        final String symbol = IEXByteConverter.convertBytesToString(Arrays.copyOfRange(bytes, 10, 18));

        return new IEXOperationalHaltStatusMessage(operationalHaltStatus, timestamp, symbol);
    }

    public IEXOperationalHaltStatus getOperationalHaltStatus() {
        return operationalHaltStatus;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public String getSymbol() {
        return symbol;
    }

    @Override
    public boolean equals(final Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        final IEXOperationalHaltStatusMessage that = (IEXOperationalHaltStatusMessage) o;
        return timestamp == that.timestamp &&
                operationalHaltStatus == that.operationalHaltStatus &&
                Objects.equals(symbol, that.symbol);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), operationalHaltStatus, timestamp, symbol);
    }

    @Override
    public String toString() {
        return "IEXOperationalHaltStatusMessage{" +
                "operationalHaltStatus=" + operationalHaltStatus +
                ", timestamp=" + timestamp +
                ", symbol='" + symbol + '\'' +
                "} " + super.toString();
    }
}


text:
package org.mrgeo.vector.mrsvector;

public interface MrsVectorPyramidMetadataProvider
{
  public MrsVectorPyramidMetadata loadMetadata();
}


text:
// ***********************************************************************
// Copyright (c) 2008 Charlie Poole
//
// 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;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using NUnit.Framework.Interfaces;

namespace NUnit.Framework.Internal.Builders
{
    /// <summary>
    /// SequentialStrategy creates test cases by using all of the
    /// parameter data sources in parallel, substituting <c>null</c>
    /// when any of them run out of data.
    /// </summary>
    public class SequentialStrategy : ICombiningStrategy
    {
        /// <summary>
        /// Gets the test cases generated by the CombiningStrategy.
        /// </summary>
        /// <returns>The test cases.</returns>
        public IEnumerable<ITestCaseData> GetTestCases(IEnumerable[] sources)
        {
            List<ITestCaseData> testCases = new List<ITestCaseData>();

            IEnumerator[] enumerators = new IEnumerator[sources.Length];
            for (int i = 0; i < sources.Length; i++)
                enumerators[i] = sources[i].GetEnumerator();

            for (; ; )
            {
                bool gotData = false;
                object[] testdata = new object[sources.Length];

                for (int i = 0; i < sources.Length; i++)
                    if (enumerators[i].MoveNext())
                    {
                        testdata[i] = enumerators[i].Current;
                        gotData = true;
                    }
                    else
                        testdata[i] = null;

                if (!gotData)
                    break;

                TestCaseParameters parms = new TestCaseParameters(testdata);
                testCases.Add(parms);
            }

            return testCases;
        }
    }
}


text:
require File.dirname(__FILE__) + '/../spec_helper'

describe <%= plural_class_name %>Controller do
  fixtures :all
  integrate_views

  <%= controller_methods 'tests/rspec/actions' %>
end


text:
<?xml version="1.0" encoding="utf-8"?>
<application xmlns="http://www.kinoma.com/kpr/application/1" id="i2chover.example.kinoma.marvell.com" program="src/main" title="I2C Hover Board">

</application>


text:
package org.apache.commons.math3.analysis.interpolation;

import java.io.Serializable;

import org.apache.commons.math3.analysis.polynomials.PolynomialFunctionLagrangeForm;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.exception.NumberIsTooSmallException;
import org.apache.commons.math3.exception.NonMonotonicSequenceException;

/**
 * Implements the
 * Neville's Algorithm for interpolation of real univariate functions. For
 * reference, see Introduction to Numerical Analysis, ISBN 038795452X,
 * chapter 2.
 *

 * The actual code of Neville's algorithm is in PolynomialFunctionLagrangeForm,
 * this class provides an easy-to-use interface to it.

 *
 * @version $Id: NevilleInterpolator.java 1379904 2012-09-01 23:54:52Z erans $
 * @since 1.2
 */
public class NevilleInterpolator implements UnivariateInterpolator,
    Serializable {

    /** serializable version identifier */
    static final long serialVersionUID = 3003707660147873733L;

    /**
     * Computes an interpolating function for the data set.
     *
     * @param x Interpolating points.
     * @param y Interpolating values.
     * @return a function which interpolates the data set
     * @throws DimensionMismatchException if the array lengths are different.
     * @throws NumberIsTooSmallException if the number of points is less than 2.
     * @throws NonMonotonicSequenceException if two abscissae have the same
     * value.
     */
    public PolynomialFunctionLagrangeForm interpolate(double x[], double y[])
        throws DimensionMismatchException,
               NumberIsTooSmallException,
               NonMonotonicSequenceException {
        return new PolynomialFunctionLagrangeForm(x, y);
    }
}


text:
require 'liquid'
require_rel 'liquid/*.rb'

module Hippo

    module Templates

        class Liquid < Base

            def extension
                '.liquid'
            end

            def render
                template.render(variables.stringify_keys)
            end

            def template
                @template ||= ::Liquid::Template.parse(source, :error_mode => :warn)
            end

        end

    end
end


text:
#import "AWSRequest.h"

@class NSString, NSArray;

@interface AWSElasticLoadBalancingCreateLoadBalancerListenerInput : AWSRequest {
	NSArray* _listeners;
	NSString* _loadBalancerName;
}
@property(retain, nonatomic) NSArray* listeners;
@property(retain, nonatomic) NSString* loadBalancerName;
+ (id)JSONKeyPathsByPropertyKey;
+ (id)listenersJSONTransformer;
- (void).cxx_destruct;
@end