text:
/**************************************************************************//**
 * @file     nu_adc.h
 * @version  V0.10
 * $Revision: 2 $
 * $Date: 19/01/11 11:23a $
 * @brief    M031 Series ADC Driver Header File
 *
 * @note
 * SPDX-License-Identifier: Apache-2.0
 * Copyright (C) 2018 Nuvoton Technology Corp. All rights reserved.
 *****************************************************************************/
#ifndef __NU_ADC_H__
#define __NU_ADC_H__

#ifdef __cplusplus
extern "C"
{
#endif

/** @addtogroup Standard_Driver Standard Driver
  @{
*/

/** @addtogroup ADC_Driver ADC Driver
  @{
*/

/** @addtogroup ADC_EXPORTED_CONSTANTS ADC Exported Constants
  @{
*/

/*---------------------------------------------------------------------------------------------------------*/
/*  ADCR Constant Definitions                                                                              */
/*---------------------------------------------------------------------------------------------------------*/
#define ADC_ADCR_ADEN_CONVERTER_DISABLE (0UL<<ADC_ADCR_ADEN_Pos)     /*!< ADC converter disable \hideinitializer */
#define ADC_ADCR_ADEN_CONVERTER_ENABLE  (1UL<<ADC_ADCR_ADEN_Pos)     /*!< ADC converter enable  \hideinitializer */

#define ADC_ADCR_ADMD_SINGLE            (0UL<<ADC_ADCR_ADMD_Pos)     /*!< Single mode           \hideinitializer */
#define ADC_ADCR_ADMD_BURST             (1UL<<ADC_ADCR_ADMD_Pos)     /*!< Burst mode            \hideinitializer */
#define ADC_ADCR_ADMD_SINGLE_CYCLE      (2UL<<ADC_ADCR_ADMD_Pos)     /*!< Single cycle scan mode    \hideinitializer */
#define ADC_ADCR_ADMD_CONTINUOUS        (3UL<<ADC_ADCR_ADMD_Pos)     /*!< Continuous scan mode      \hideinitializer */

#define ADC_ADCR_DIFFEN_SINGLE_END      (0UL<<ADC_ADCR_DIFFEN_Pos)   /*!< Single-end input mode     \hideinitializer */
#define ADC_ADCR_DIFFEN_DIFFERENTIAL    (1UL<<ADC_ADCR_DIFFEN_Pos)   /*!< Differential input mode   \hideinitializer */

#define ADC_ADCR_DMOF_UNSIGNED_OUTPUT   (0UL<<ADC_ADCR_DMOF_Pos)     /*!< Select the straight binary format as the output format of the conversion result   \hideinitializer */
#define ADC_ADCR_DMOF_TWOS_COMPLEMENT   (1UL<<ADC_ADCR_DMOF_Pos)     /*!< Select the 2's complement format as the output format of the conversion result    \hideinitializer */

#define ADC_ADCR_TRGEN_DISABLE          (0UL<<ADC_ADCR_TRGEN_Pos)    /*!< Disable triggering of A/D conversion by external STADC pin or PWM     \hideinitializer */
#define ADC_ADCR_TRGEN_ENABLE           (1UL<<ADC_ADCR_TRGEN_Pos)    /*!< Enable triggering of A/D conversion by external STADC pin or PWM      \hideinitializer */

#define ADC_ADCR_TRGS_STADC             (0UL<<ADC_ADCR_TRGS_Pos)     /*!< A/D conversion is started by external STADC pin   \hideinitializer */
#define ADC_ADCR_TRGS_TIMER             (1UL<<ADC_ADCR_TRGS_Pos)     /*!< A/D conversion is started by Timer    \hideinitializer */
#define ADC_ADCR_TRGS_BPWM              (2UL<<ADC_ADCR_TRGS_Pos)     /*!< A/D conversion is started by BPWM     \hideinitializer */
#define ADC_ADCR_TRGS_PWM               (3UL<<ADC_ADCR_TRGS_Pos)     /*!< A/D conversion is started by PWM      \hideinitializer */

#define ADC_ADCR_TRGCOND_LOW_LEVEL      (0UL<<ADC_ADCR_TRGCOND_Pos)  /*!< STADC Low level active    \hideinitializer */
#define ADC_ADCR_TRGCOND_HIGH_LEVEL     (1UL<<ADC_ADCR_TRGCOND_Pos)  /*!< STADC High level active   \hideinitializer */
#define ADC_ADCR_TRGCOND_FALLING_EDGE   (2UL<<ADC_ADCR_TRGCOND_Pos)  /*!< STADC Falling edge active \hideinitializer */
#define ADC_ADCR_TRGCOND_RISING_EDGE    (3UL<<ADC_ADCR_TRGCOND_Pos)  /*!< STADC Rising edge active  \hideinitializer */

/*---------------------------------------------------------------------------------------------------------*/
/* ADCMPR Constant Definitions                                                                             */
/*---------------------------------------------------------------------------------------------------------*/
#define ADC_ADCMPR_CMPD(x)                    ((x) << ADC_ADCMPR_CMPD_Pos)          /*!< Compare value for compare function     \hideinitializer */
#define ADC_ADCMPR_CMPMATCNT(x)               (((x)-1) << ADC_ADCMPR_CMPMATCNT_Pos) /*!< Match count for compare function       \hideinitializer */
#define ADC_ADCMPR_CMPCH(x)                   ((x) << ADC_ADCMPR_CMPCH_Pos)         /*!< Compare channel for compare function   \hideinitializer */
#define ADC_ADCMPR_CMPCOND_LESS_THAN          (0<<ADC_ADCMPR_CMPCOND_Pos)           /*!< The compare condition is "less than"   \hideinitializer */
#define ADC_ADCMPR_CMPCOND_GREATER_OR_EQUAL   (1<<ADC_ADCMPR_CMPCOND_Pos)           /*!< The compare condition is "greater than or equal to"    \hideinitializer */
#define ADC_ADCMPR_CMPIE_INTERRUPT_ENABLE     (ADC_ADCMPR_CMPIE_Msk)                /*!< The compare function interrupt enable  \hideinitializer */

/*---------------------------------------------------------------------------------------------------------*/
/* ADC Interrupt Constant Definitions                                                                      */
/*---------------------------------------------------------------------------------------------------------*/
#define ADC_ADF_INT         (ADC_ADSR0_ADF_Msk)          /*!< ADC convert complete interrupt    \hideinitializer */
#define ADC_CMP0_INT        (ADC_ADSR0_CMPF0_Msk)        /*!< ADC comparator 0 interrupt        \hideinitializer */
#define ADC_CMP1_INT        (ADC_ADSR0_CMPF1_Msk)        /*!< ADC comparator 1 interrupt        \hideinitializer */

/*---------------------------------------------------------------------------------------------------------*/
/* ADC Operation Mode Constant Definitions                                                                 */
/*---------------------------------------------------------------------------------------------------------*/
#define ADC_SINGLE_MODE         0   /*!< ADC single mode            \hideinitializer */
#define ADC_BURST_MODE          1   /*!< ADC burst mode             \hideinitializer */
#define ADC_SINGLE_CYCLE_MODE   2   /*!< ADC single-cycle scan mode \hideinitializer */
#define ADC_CONTINUOUS_MODE     3   /*!< ADC continuous scan mode   \hideinitializer */

/*---------------------------------------------------------------------------------------------------------*/
/* ADC Trigger Condition Constant Definitions                                                              */
/*---------------------------------------------------------------------------------------------------------*/
#define ADC_LOW_LEVEL      0   /*!< ADC external trigger condition is low level trigger     \hideinitializer */
#define ADC_HIGH_LEVEL     1   /*!< ADC external trigger condition is high level trigger    \hideinitializer */
#define ADC_FALLING_EDGE   2   /*!< ADC external trigger condition is falling edge trigger  \hideinitializer */
#define ADC_RISING_EDGE    3   /*!< ADC external trigger condition is rising edge trigger   \hideinitializer */

/*---------------------------------------------------------------------------------------------------------*/
/* ADC Compare Condition Constant Definitions                                                              */
/*---------------------------------------------------------------------------------------------------------*/
#define ADC_LESS_THAN          0   /*!< ADC compare condition is "less than the compare value"                  \hideinitializer */
#define ADC_GREATER_OR_EQUAL   1   /*!< ADC compare condition is "greater than or equal to the compare value"   \hideinitializer */

/*@}*/ /* end of group ADC_EXPORTED_CONSTANTS */

/** @addtogroup ADC_EXPORTED_FUNCTIONS ADC Exported Functions
  @{
*/

/**
  * @brief Get conversion data of specified channel.
  * @param[in] adc The pointer of the specified ADC module.
  * @param[in] u32ChNum ADC Channel, valid value are from 0 to 15 and 29.
  * @return  16-bit data.
  * @details Read RSLT bit field to get conversion data.
  * \hideinitializer
  */
#define ADC_GET_CONVERSION_DATA(adc, u32ChNum) ((adc)->ADDR[(u32ChNum)] & ADC_ADDR_RSLT_Msk)

/**
  * @brief Return the user-specified interrupt flags.
  * @param[in] adc The pointer of the specified ADC module.
  * @param[in] u32Mask The combination of following interrupt status bits. Each bit corresponds to a interrupt status.
  *                    Valid values are:
  *                     - \ref ADC_ADF_INT          :Convert complete interrupt flag.
  *                     - \ref ADC_CMP0_INT         :Comparator 0 interrupt flag.
  *                     - \ref ADC_CMP1_INT         :Comparator 1 interrupt flag.
  * @return  User specified interrupt flags.
  * @details Get the status of the ADC interrupt flag.
  * \hideinitializer
  */
#define ADC_GET_INT_FLAG(adc, u32Mask) ((adc)->ADSR0 & (u32Mask))

/**
  * @brief This macro clear the selected interrupt status bits.
  * @param[in] adc The pointer of the specified ADC module.
  * @param[in] u32Mask The combination of following interrupt status bits. Each bit corresponds to a interrupt status.
  *                    Valid values are:
  *                     - \ref ADC_ADF_INT          :Convert complete interrupt flag.
  *                     - \ref ADC_CMP0_INT         :Comparator 0 interrupt flag.
  *                     - \ref ADC_CMP1_INT         :Comparator 1 interrupt flag.
  * @return  None
  * @details ADF (ADSR0[0])/CMPF0 (ADSR0[1])/CMPF1 (ADSR0[2]) can be cleared by writing 1 to itself.
  * \hideinitializer
  */
#define ADC_CLR_INT_FLAG(adc, u32Mask) ((adc)->ADSR0 = (u32Mask))

/**
  * @brief Get the busy state of ADC.
  * @param[in] adc The pointer of the specified ADC module.
  * @retval 0 ADC is not busy.
  * @retval 1 ADC is busy.
  * @details ADSR0[7] (BUSY) is a mirror of ADCR[11] (ADST).
  * \hideinitializer
  */
#define ADC_IS_BUSY(adc) ((adc)->ADSR0 & ADC_ADSR0_BUSY_Msk ? 1 : 0)

/**
  * @brief Check if the ADC conversion data is over written or not.
  * @param[in] adc The pointer of the specified ADC module.
  * @param[in] u32ChNum ADC Channel, valid value are from 0 to 15 and 29.
  * @retval 0 ADC data is not overrun.
  * @retval 1 ADC data is overrun.
  * @details ADSR2[31:0] (OVERRUN) is the mirror of ADDR0~31[16] OVERRUN bits.
  * \hideinitializer
  */
#define ADC_IS_DATA_OVERRUN(adc, u32ChNum) (((adc)->ADSR2 & (1<<(u32ChNum))) ? 1 : 0)

/**
  * @brief Check if the ADC conversion data is valid or not.
  * @param[in] adc The pointer of the specified ADC module.
  * @param[in] u32ChNum ADC Channel, valid value are from 0 to 15 and 29.
  * @retval 0 ADC data is not valid.
  * @retval 1 ADC data is valid.
  * @details VALID (ADDR0~31[17]) is set to 1 when corresponding channel analog input conversion is completed and cleared by hardware after ADDR register is read.
  * \hideinitializer
  */
#define ADC_IS_DATA_VALID(adc, u32ChNum) ((adc)->ADSR1 & (0x1<<(u32ChNum)) ? 1 : 0)

/**
  * @brief Power down ADC module.
  * @param[in] adc The pointer of the specified ADC module.
  * @return None
  * @details Disable A/D converter analog circuit for saving power consumption.
  * \hideinitializer
  */
#define ADC_POWER_DOWN(adc) ((adc)->ADCR &= ~ADC_ADCR_ADEN_Msk)

/**
  * @brief Power on ADC module.
  * @param[in] adc The pointer of the specified ADC module.
  * @return None
  * @details Before starting A/D conversion function, ADEN bit (ADCR[0]) should be set to 1.
  * \hideinitializer
  */
#define ADC_POWER_ON(adc) ((adc)->ADCR |= ADC_ADCR_ADEN_Msk)

/**
  * @brief Configure the comparator 0 and enable it.
  * @param[in] adc The pointer of the specified ADC module.
  * @param[in] u32ChNum  Specifies the source channel, valid value are from 0 to 15 and 29.
  * @param[in] u32Condition Specifies the compare condition. Valid values are:
  *                          - \ref ADC_ADCMPR_CMPCOND_LESS_THAN            :The compare condition is "less than the compare value".
  *                          - \ref ADC_ADCMPR_CMPCOND_GREATER_OR_EQUAL     :The compare condition is "greater than or equal to the compare value".
  * @param[in] u32Data Specifies the compare value, valid value are between 0 ~ 0xFFF.
  * @param[in] u32MatchCount Specifies the match count setting, valid values are between 1~16.
  * @return None
  * @details For example, ADC_ENABLE_CMP0(ADC, 5, ADC_ADCMPR_CMPCOND_GREATER_OR_EQUAL, 0x800, 10);
  *          means ADC will assert comparator 0 flag if channel 5 conversion result is greater than or
  *          equal to 0x800 for 10 times continuously.
  * \hideinitializer
  */
#define ADC_ENABLE_CMP0(adc, \
                        u32ChNum, \
                        u32Condition, \
                        u32Data, \
                        u32MatchCount) ((adc)->ADCMPR[0] = ((u32ChNum) << ADC_ADCMPR_CMPCH_Pos) | \
                                                           (u32Condition) | \
                                                           ((u32Data) << ADC_ADCMPR_CMPD_Pos) | \
                                                           (((u32MatchCount) - 1) << ADC_ADCMPR_CMPMATCNT_Pos) |\
                                                           ADC_ADCMPR_CMPEN_Msk)

/**
  * @brief Disable comparator 0
  * @param[in] adc The pointer of the specified ADC module
  * @return None
  * @details Set CMPEN (ADCMPR0[0]) to 0 and reset comparator 0 configurations to disable ADC compare function.
  * \hideinitializer
  */
#define ADC_DISABLE_CMP0(adc) ((adc)->ADCMPR[0] = 0)

/**
  * @brief Configure the comparator 1 and enable it.
  * @param[in] adc The pointer of the specified ADC module.
  * @param[in] u32ChNum  Specifies the source channel, valid value are from 0 to 15 and 29.
  * @param[in] u32Condition Specifies the compare condition. Valid values are:
  *                          - \ref ADC_ADCMPR_CMPCOND_LESS_THAN            :The compare condition is "less than the compare value".
  *                          - \ref ADC_ADCMPR_CMPCOND_GREATER_OR_EQUAL     :The compare condition is "greater than or equal to the compare value".
  * @param[in] u32Data Specifies the compare value, valid value are between 0 ~ 0xFFF.
  * @param[in] u32MatchCount Specifies the match count setting, valid values are between 1~16.
  * @return None
  * @details For example, ADC_ENABLE_CMP1(ADC, 5, ADC_ADCMPR_CMPCOND_GREATER_OR_EQUAL, 0x800, 10);
  *          means ADC will assert comparator 1 flag if channel 5 conversion result is greater than or
  *          equal to 0x800 for 10 times continuously.
  * \hideinitializer
  */
#define ADC_ENABLE_CMP1(adc, \
                        u32ChNum, \
                        u32Condition, \
                        u32Data, \
                        u32MatchCount) ((adc)->ADCMPR[1] = ((u32ChNum) << ADC_ADCMPR_CMPCH_Pos) | \
                                                           (u32Condition) | \
                                                           ((u32Data) << ADC_ADCMPR_CMPD_Pos) | \
                                                           (((u32MatchCount) - 1) << ADC_ADCMPR_CMPMATCNT_Pos) |\
                                                           ADC_ADCMPR_CMPEN_Msk)

/**
  * @brief Disable comparator 1.
  * @param[in] adc The pointer of the specified ADC module.
  * @return None
  * @details Set CMPEN (ADCMPR1[0]) to 0 and reset comparator 1 configurations to disable ADC compare function.
  * \hideinitializer
  */
#define ADC_DISABLE_CMP1(adc) ((adc)->ADCMPR[1] = 0)

/**
  * @brief Enable the compare window mode.
  * @param[in] adc The pointer of the specified ADC module.
  * @param[in] u32CMP Specifies the compare register, valid value are 0.
  * @return None
  * @details CMPF0 (ADSR0[1]) will be set when both ADC_CMP0 and ADC_CMP1 compared condition matched.
  * \hideinitializer
  */
#define ADC_ENABLE_CMP_WINDOW_MODE(adc, u32CMP) ((adc)->ADCMPR[(u32CMP)] |= ADC_ADCMPR_CMPWEN_Msk)

/**
  * @brief Disable the compare window mode.
  * @param[in] adc The pointer of the specified ADC module.
  * @param[in] u32CMP Specifies the compare register, valid value are 0.
  * @return None
  * @details Disable the compare window mode for specified ADC module.
  * \hideinitializer
  */
#define ADC_DISABLE_CMP_WINDOW_MODE(adc, u32CMP) ((adc)->ADCMPR[(u32CMP)] &= ~ADC_ADCMPR_CMPWEN_Msk)

/**
  * @brief Set ADC input channel.
  * @param[in] adc The pointer of the specified ADC module.
  * @param[in] u32Mask  Channel enable bit. Each bit corresponds to a input channel. Bit 0 is channel 0, bit 1 is channel 1..., bit 15 is channel 15.
  * @return None
  * @details Enabled channel will be converted while ADC starts.
  * @note In single mode, ADC can only convert 1 channel. If more than 1 channel are enabled, only the channel with smallest number will be converted.
  * \hideinitializer
  */
#define ADC_SET_INPUT_CHANNEL(adc, u32Mask) ((adc)->ADCHER = ((adc)->ADCHER & ~ADC_ADCHER_CHEN_Msk) | (u32Mask))

/**
  * @brief Set the output format mode.
  * @param[in] adc The pointer of the specified ADC module.
  * @param[in] u32Format Decides the output format. Valid values are:
  *                      - \ref ADC_ADCR_DMOF_UNSIGNED_OUTPUT      : Select the straight binary format as the output format of the conversion result.
  *                      - \ref ADC_ADCR_DMOF_TWOS_COMPLEMENT      : Select the 2's complement format as the output format of the conversion result.
  * @return None
  * @details  The macro is used to set the output format of ADC differential input mode.
  * @note ADC compare function can not support 2's complement output format, u32Format should be set to ADC_ADCR_DMOF_UNSIGNED_OUTPUT.
  * \hideinitializer
  */
#define ADC_SET_DMOF(adc, u32Format) ((adc)->ADCR = ((adc)->ADCR & ~ADC_ADCR_DMOF_Msk) | (u32Format))

/**
  * @brief Start the A/D conversion.
  * @param[in] adc The pointer of the specified ADC module.
  * @return None
  * @details Set ADST bit to 1 to start the A/D conversion.
  * \hideinitializer
  */
#define ADC_START_CONV(adc) ((adc)->ADCR |= ADC_ADCR_ADST_Msk)

/**
  * @brief Stop the A/D conversion.
  * @param[in] adc The pointer of the specified ADC module.
  * @return None
  * @details ADST (ADCR[11]) will be cleared to 0 by hardware automatically at the ends of single mode and single-cycle scan mode.
  *          In continuous scan mode and burst mode, A/D conversion is continuously performed until software writes 0 to this bit.
  * @note When the ADST bit is cleared to 0, the ADST bit must be kept at 0 at least one ADC peripheral clock period
  *       before setting it to 1 again, otherwise the A/D converter may not work.
  *       If ADST bit is cleared to 0 when ADC is in converting, the BUSY bit will be cleared to 0 immediately,
  *       ADC will terminate the current conversion and enter idle state directly.
  * \hideinitializer
  */
#define ADC_STOP_CONV(adc) ((adc)->ADCR &= ~ADC_ADCR_ADST_Msk)

/**
  * @brief Enable PDMA transfer.
  * @param[in] adc The pointer of the specified ADC module
  * @return None
  * @details Enable PDMA to transfer the conversion data.
  * @note While enable PDMA transfer, software must set ADIE = 0 to disable interrupt.
  * \hideinitializer
  */
#define ADC_ENABLE_PDMA(adc) ((adc)->ADCR |= ADC_ADCR_PTEN_Msk)

/**
  * @brief Disable PDMA transfer.
  * @param[in] adc The pointer of the specified ADC module
  * @return None
  * @details Disable PDMA to transfer the conversion data.
  * \hideinitializer
  */
#define ADC_DISABLE_PDMA(adc) ((adc)->ADCR &= ~ADC_ADCR_PTEN_Msk)

/**
  * @brief Get PDMA current transfer data
  * @param[in] adc The pointer of the specified ADC module.
  * @return  PDMA current transfer data
  * \hideinitializer
  */
#define ADC_GET_PDMA_DATA(adc) ((adc)->ADPDMA & ADC_ADPDMA_CURDAT_Msk)

/**
  * @brief Enable the interrupt(s) selected by u32Mask parameter.
  * @param[in] adc The pointer of the specified ADC module
  * @param[in] u32Mask The combination of interrupt status bits listed below. Each bit
  *                    corresponds to a interrupt status. This parameter decides which
  *                    interrupts will be enabled.
  *                     - \ref ADC_ADF_INT    :ADC convert complete interrupt
  *                     - \ref ADC_CMP0_INT   :ADC comparator 0 interrupt
  *                     - \ref ADC_CMP1_INT   :ADC comparator 1 interrupt
  * @return None
  * \hideinitializer
  */
#define ADC_ENABLE_INT  ADC_EnableInt

/**
  * @brief Disable the interrupt(s) selected by u32Mask parameter.
  * @param[in] adc The pointer of the specified ADC module
  * @param[in] u32Mask The combination of interrupt status bits listed below. Each bit
  *                    corresponds to a interrupt status. This parameter decides which
  *                    interrupts will be disabled.
  *                     - \ref ADC_ADF_INT     :ADC convert complete interrupt
  *                     - \ref ADC_CMP0_INT    :ADC comparator 0 interrupt
  *                     - \ref ADC_CMP1_INT    :ADC comparator 1 interrupt
  * @return None
  * \hideinitializer
  */
#define ADC_DISABLE_INT ADC_DisableInt

void ADC_Open(ADC_T *adc,
              uint32_t u32InputMode,
              uint32_t u32OpMode,
              uint32_t u32ChMask);
void ADC_Close(ADC_T *adc);
void ADC_EnableHWTrigger(ADC_T *adc,
                         uint32_t u32Source,
                         uint32_t u32Param);
void ADC_DisableHWTrigger(ADC_T *adc);
void ADC_EnableInt(ADC_T *adc, uint32_t u32Mask);
void ADC_DisableInt(ADC_T *adc, uint32_t u32Mask);
void ADC_SetExtendSampleTime(ADC_T *adc,
                             uint32_t u32ModuleNum,
                             uint32_t u32ExtendSampleTime);

/*@}*/ /* end of group ADC_EXPORTED_FUNCTIONS */

/*@}*/ /* end of group ADC_Driver */

/*@}*/ /* end of group Standard_Driver */

#ifdef __cplusplus
}
#endif

#endif //__NU_ADC_H__

/*** (C) COPYRIGHT 2018 Nuvoton Technology Corp. ***/


text:
/* - ploneCustom.css - */
@media all {
/* https://www.statsbiblioteket.dk/portal_css/ploneCustom.css?original=1 */
/* */
.alphaNav{
margin: 0 0 .8em;
}
.databaseSearch{
margin: .8em 0;
}
.databaseSearchText{
margin-bottom: 1em;
}
/* */
#portal-breadcrumbs .breadcrumbSeparator{
background-position:  -242px -198px;
}
/* */
.section-front-pagefront-page\.2 #portal-columns{
margin-top: 40px;
}
/* */
div.portletWrapper:first-child ul ul{
margin-bottom: 0.5em;
padding: 0 0 0 .7em;
}
/* */
dl.portletEmbed iframe{
max-width: 260px !important;
}
/* */
#portal-breadcrumbs {
line-height: 14px;
margin: 8px 0 0 2px;
}
#portal-breadcrumbs #breadcrumbs-you-are-here{
margin-right: 5px;
}
}

redpajama_set_name: RedPajamaGithub


text:
#ifndef __MALLOC_H
#define __MALLOC_H

#include <sys/types.h>
#include <compiler.h>
#include <stddef.h>

/* lib/heap provides malloc/free definitions */
#include <lib/heap.h>

#endif


text:
declare namespace queue {
    class Queue {
        maxPending: number;
        maxQueued: number;
        length: number;
        pending: number;
        add<T = any>(factory: () => Promise<T>): Promise<T>;
    }
}

declare function queue(maxPending?: number, maxQueued?: number): queue.Queue;

export = queue;


text:
require 'nokogiri'

module Slacken
  # Public: a DOM tree container parsed by Nokogiri.
  class DomContainer
    def initialize(root)
      @root = root
    end

    # Public: Create a DocumentComponent of the root node.
    #
    # Returns a DocumentComponent or nil.
    def to_component
      build_document_component(@root)
    end

    private

    # Internal: Build a DocumentComponent of the given node recursively.
    #
    # current_node - A Nokogiri::HTML::Document.
    #
    # Returns a DocumentComponent.
    def build_document_component(node)
      DocumentComponent.new(
        node.name.downcase,
        build_document_components_array(node.children),
        attrs_of(node)
      )
    end

    # Internal: Build sequence of DocumentComponent objects for each given nodes.
    #
    # nodes - A Nokogiri::XML::NodeSet.
    #
    # Returns an Array of DocumentComponents.
    def build_document_components_array(node_set)
      node_set
        .reject { |node| node.respond_to?(:html_dtd?) && node.html_dtd? }
        .map { |node| build_document_component(node) }
    end

    def attrs_of(node)
      case node.name.to_sym
      when :text
        { content: node.content }
      when :iframe, :a
        { href: node['href'] }
      when :input
        { type: node['type'], checked: node['checked'] }
      when :img
        { src: node['src'], alt: node['alt'], class: (node['class'] || '').split }
      else
        {}
      end
    end
  end
end


text:
@implementation RXChild2Manager

- (void)testChild2 {
    NSLog(@"testChild2");
}
@end


text:
namespace search
{
class TokenRange;

class QueryParams
{
public:
  using String = strings::UniString;
  using TypeIndices = std::vector<uint32_t>;
  using Langs = ::base::SafeSmallSet<StringUtf8Multilang::kMaxSupportedLanguages>;

  struct Token
  {
    Token() = default;
    Token(String const & original) : m_original(original) {}

    void AddSynonym(std::string const & s);
    void AddSynonym(String const & s);

    // Calls |fn| on the original token and on synonyms.
    template <typename Fn>
    typename std::enable_if<
        std::is_same<typename std::result_of<Fn(String)>::type, void>::value>::type
    ForEach(Fn && fn) const
    {
      fn(m_original);
      std::for_each(m_synonyms.begin(), m_synonyms.end(), std::forward<Fn>(fn));
    }

    // Calls |fn| on the original token and on synonyms until |fn| return false.
    template <typename Fn>
    typename std::enable_if<
        std::is_same<typename std::result_of<Fn(String)>::type, bool>::value>::type
    ForEach(Fn && fn) const
    {
      if (!fn(m_original))
        return;
      for (auto const & synonym : m_synonyms)
      {
        if (!fn(synonym))
          return;
      }
    }

    void Clear()
    {
      m_original.clear();
      m_synonyms.clear();
    }

    String m_original;
    std::vector<String> m_synonyms;
  };

  QueryParams() = default;

  template <typename It>
  void InitNoPrefix(It tokenBegin, It tokenEnd)
  {
    Clear();
    for (; tokenBegin != tokenEnd; ++tokenBegin)
      m_tokens.emplace_back(*tokenBegin);
    m_typeIndices.resize(GetNumTokens());
  }

  template <typename It>
  void InitWithPrefix(It tokenBegin, It tokenEnd, String const & prefix)
  {
    Clear();
    for (; tokenBegin != tokenEnd; ++tokenBegin)
      m_tokens.emplace_back(*tokenBegin);
    m_prefixToken.m_original = prefix;
    m_hasPrefix = true;
    m_typeIndices.resize(GetNumTokens());
  }

  size_t GetNumTokens() const { return m_hasPrefix ? m_tokens.size() + 1 : m_tokens.size(); }

  bool LastTokenIsPrefix() const { return m_hasPrefix; }

  bool IsEmpty() const { return GetNumTokens() == 0; }
  void Clear();

  bool IsCategorySynonym(size_t i) const;
  TypeIndices & GetTypeIndices(size_t i);
  TypeIndices const & GetTypeIndices(size_t i) const;

  bool IsPrefixToken(size_t i) const;
  Token const & GetToken(size_t i) const;
  Token & GetToken(size_t i);

  // Returns true if all tokens in |range| have integral synonyms.
  bool IsNumberTokens(TokenRange const & range) const;

  void RemoveToken(size_t i);

  Langs & GetLangs() { return m_langs; }
  Langs const & GetLangs() const { return m_langs; }
  bool LangExists(int8_t lang) const { return m_langs.Contains(lang); }

  void SetCategorialRequest(bool isCategorial) { m_isCategorialRequest = isCategorial; }
  bool IsCategorialRequest() const { return m_isCategorialRequest; }

  int GetScale() const { return m_scale; }

private:
  friend std::string DebugPrint(QueryParams const & params);

  std::vector<Token> m_tokens;
  Token m_prefixToken;
  bool m_hasPrefix = false;
  bool m_isCategorialRequest = false;

  std::vector<TypeIndices> m_typeIndices;

  Langs m_langs;
  int m_scale = scales::GetUpperScale();
};

std::string DebugPrint(QueryParams::Token const & token);
}  // namespace search


text:
package org.apache.accumulo.core.client.admin;

import java.util.Map;
import java.util.Set;

import org.apache.accumulo.core.clientImpl.CloneConfigurationImpl;

/**
 * A configuration object that can be used with the table clone command in the
 * {@link TableOperations}.
 *
 * @since 1.10 and 2.1
 */
public interface CloneConfiguration {
  /**
   * Determines if memory is flushed in the source table before cloning.
   *
   * @return true if memory is flushed in the source table before cloning.
   */
  public boolean isFlush();

  /**
   * The source table properties are copied. This allows overriding of some of those properties.
   *
   * @return The source table properties to override.
   */
  public Map<String,String> getPropertiesToSet();

  /**
   * The source table properties are copied, this allows reverting to system defaults for some of
   * those properties.
   *
   * @return The properties that are to be reverted to system defaults.
   */
  public Set<String> getPropertiesToExclude();

  /**
   * The new table is normally brought online after the cloning process. This allows leaving the new
   * table offline
   *
   * @return true if the new table is to be kept offline after cloning.
   */
  public boolean isKeepOffline();

  /**
   * A CloneConfiguration builder
   *
   * @since 1.10 and 2.1
   */
  public static interface Builder {
    /**
     * Determines if memory is flushed in the source table before cloning.
     *
     * @param flush
     *          true if memory is flushed in the source table before cloning.
     */
    public Builder setFlush(boolean flush);

    /**
     * The source table properties are copied. This allows overriding of some of those properties.
     *
     * @param propertiesToSet
     *          The source table properties to override.
     */
    public Builder setPropertiesToSet(Map<String,String> propertiesToSet);

    /**
     * The source table properties are copied, this allows reverting to system defaults for some of
     * those properties.
     *
     * @param propertiesToExclude
     *          The properties that are to be reverted to system defaults.
     */
    public Builder setPropertiesToExclude(Set<String> propertiesToExclude);

    /**
     * The new table is normally brought online after the cloning process. This allows leaving the
     * new table offline
     *
     * @param keepOffline
     *          true if the new table is to be kept offline after cloning.
     */
    public Builder setKeepOffline(boolean keepOffline);

    /**
     * Build the clone configuration
     *
     * @return the built immutable clone configuration
     */
    public CloneConfiguration build();
  }

  /**
   * @return a {@link CloneConfiguration} builder
   */
  public static CloneConfiguration.Builder builder() {
    return new CloneConfigurationImpl();
  }

}


text:
<!DOCTYPE html>

	<meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta property="og:title" content ="reboot"/>
    <meta property="og:url" content ="http://reboot.build"/>
	<meta property="og:image" content ="http://reboot.build/images/logo.png"/>
	<link rel = "shortcut icon" href = "favicon.png"/>
	<title>reboot</title>
	<link rel="stylesheet" href="hover.css">
	<link href='http://fonts.googleapis.com/css?family=Patrick+Hand|Indie+Flower|Istok+Web|Roboto+Condensed:300italic,400,300|Oxygen:400,300|Nunito:400,300' rel='stylesheet' type='text/css'>
	<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
	<link rel="stylesheet" href="flickity-docs/flickity.css">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" href="style.css">

Home

About Us

Join the Club

Blog

Contact

Home

About Us

Join the Club

Blog

Contact

Collaborate with all types of people

Step out of your comfort zone

Design, Create, Innovate

Find your passion

Hands-on collaboration

WE SHALL NOT BE SILENCED!

Reboot the culture of creation.

The Club

Creativity through collaboration; we're a community of people working to prove that the best ideas come from sharing experiences. Our members grow together, learning from each other while taking part in hands-on projects that push them out of their comfort zone. Nobody is an expert in everything, but everyone is  skilled at something.
		This is an opportunity to discover something new firsthand-- by doing it. This is where you learn something, you teach something, and together you create something amazing. It's time to show that innovation and creativity go hand-in-hand. It's time to unite those who want their ideas to become a reality. It's time to reboot the culture of creation.

What we do

<button class="active" onclick="activate(this,'one')">Creative
 Prototyping</button>

<button class ="inactive" onclick="activate(this,'two')">Mentors &amp
 Workshops</button>

<button class="inactive" onclick="activate(this,'three')">Company
 Visits</button>

We'll give you some materials, tools, and a space to use them in. You've got your experience and your know-how, but you've also got an awesome group of people around you to learn from. Together, by sharing your skills, you have two hours to design, create, and build something that you're proud of; hands-on learning at its finest. Let's see what this club can come up with.

Have an idea for a cool project? Make it come to life by  letting us know.

				reboot hosts interactive workshops with different mentors monthly; as a member, you have exclusive access to a community of innovative thinkers, entrepreneurs, and companies. We, along with our partners, offer members an opportunity to engage with and learn from role models from different disciplines in unique and collaborative environments in the area.

				Want to have your say?  Become a mentor.

				Sometimes stepping out of your comfort zone is something that you do literally. With that in mind, reboot members have the chance to step off campus throughout the term and take part in club visits to different innovative and creative companies in the Waterloo area.

				Do you have a place in mind that you'd like to check out?
  Send us a suggestion and we'll see what we can do!

 Our Supporters

Special Thanks To:

Nasser Mohieddin Abukhdeir | Suhash Aravindan | Ahmad Hussein
 Grace So | The RigidWare Team | Tom Storwick

		<button> Become a Supporter </button>


text:
//
// Created by Tucker Haydon on 4/25/17.
//

#pragma once

#include "messages/IMessage.h"
#include "Hardware.h"
#include <string>

/**
 * Message class encapsulating data between the raspi and the pololu motor encoders. The Double data represents the RPM of the motor. It may need to be scaled depending on the gear ratio.
 * TODO: to decouple the program from the hardware, the data should represent the speed of the motors in cm/s instead of rpm.
 */
class EncoderMessage: public IMessage {
public:
    /**
     * Constructor.
     * @param hardware The hardware address for the encoder
     * @param data Double representing the RPM speed of the motors
     * @throws MessageLengthException if hardware length does not match the data size
     */
    EncoderMessage(Hardware hardware, double data);

    /**
     * Destructor.
     */
    ~EncoderMessage() override;

    /**
     * Serializes the message into a string representation. The hardware address is appended to the front.
     * @return A string representation of the message.
     */
    std::string serialize() override;

    /**
     * Returns the double data the message is encapsulating
     * @return Double data the message is encapsulating.
     */
    double getData();

private:
    /**
     * Double data representing the RPM speed of a motor. Speed may need to be scaled by gear ratio.
     */
    double data;
};


text:
#pragma once
#include <aws/application-autoscaling/ApplicationAutoScaling_EXPORTS.h>
#include <aws/application-autoscaling/ApplicationAutoScalingRequest.h>
#include <aws/application-autoscaling/model/ServiceNamespace.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/application-autoscaling/model/ScalableDimension.h>

namespace Aws
{
namespace ApplicationAutoScaling
{
namespace Model
{

  /**
   */
  class AWS_APPLICATIONAUTOSCALING_API DescribeScalingActivitiesRequest : public ApplicationAutoScalingRequest
  {
  public:
    DescribeScalingActivitiesRequest();
    Aws::String SerializePayload() const override;

    Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;

    /**
     *
The namespace for the AWS service that the scaling activity is associated
     * with. For more information, see AWS
     * Service Namespaces in the Amazon Web Services General Reference.

     */
    inline const ServiceNamespace& GetServiceNamespace() const{ return m_serviceNamespace; }

    /**
     *
The namespace for the AWS service that the scaling activity is associated
     * with. For more information, see AWS
     * Service Namespaces in the Amazon Web Services General Reference.

     */
    inline void SetServiceNamespace(const ServiceNamespace& value) { m_serviceNamespaceHasBeenSet = true; m_serviceNamespace = value; }

    /**
     *
The namespace for the AWS service that the scaling activity is associated
     * with. For more information, see AWS
     * Service Namespaces in the Amazon Web Services General Reference.

     */
    inline void SetServiceNamespace(ServiceNamespace&& value) { m_serviceNamespaceHasBeenSet = true; m_serviceNamespace = value; }

    /**
     *
The namespace for the AWS service that the scaling activity is associated
     * with. For more information, see AWS
     * Service Namespaces in the Amazon Web Services General Reference.

     */
    inline DescribeScalingActivitiesRequest& WithServiceNamespace(const ServiceNamespace& value) { SetServiceNamespace(value); return *this;}

    /**
     *
The namespace for the AWS service that the scaling activity is associated
     * with. For more information, see AWS
     * Service Namespaces in the Amazon Web Services General Reference.

     */
    inline DescribeScalingActivitiesRequest& WithServiceNamespace(ServiceNamespace&& value) { SetServiceNamespace(value); return *this;}

    /**
     *
The resource type and unique identifier string for the resource associated
     * with the scaling activity. For Amazon ECS services, the resource type is
     * services, and the identifier is the cluster name and service name;
     * for example, service/default/sample-webapp. For Amazon EC2 Spot
     * fleet requests, the resource type is spot-fleet-request, and the
     * identifier is the Spot fleet request ID; for example,
     * spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. If you
     * specify a scalable dimension, you must also specify a resource ID.

     */
    inline const Aws::String& GetResourceId() const{ return m_resourceId; }

    /**
     *
The resource type and unique identifier string for the resource associated
     * with the scaling activity. For Amazon ECS services, the resource type is
     * services, and the identifier is the cluster name and service name;
     * for example, service/default/sample-webapp. For Amazon EC2 Spot
     * fleet requests, the resource type is spot-fleet-request, and the
     * identifier is the Spot fleet request ID; for example,
     * spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. If you
     * specify a scalable dimension, you must also specify a resource ID.

     */
    inline void SetResourceId(const Aws::String& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; }

    /**
     *
The resource type and unique identifier string for the resource associated
     * with the scaling activity. For Amazon ECS services, the resource type is
     * services, and the identifier is the cluster name and service name;
     * for example, service/default/sample-webapp. For Amazon EC2 Spot
     * fleet requests, the resource type is spot-fleet-request, and the
     * identifier is the Spot fleet request ID; for example,
     * spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. If you
     * specify a scalable dimension, you must also specify a resource ID.

     */
    inline void SetResourceId(Aws::String&& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; }

    /**
     *
The resource type and unique identifier string for the resource associated
     * with the scaling activity. For Amazon ECS services, the resource type is
     * services, and the identifier is the cluster name and service name;
     * for example, service/default/sample-webapp. For Amazon EC2 Spot
     * fleet requests, the resource type is spot-fleet-request, and the
     * identifier is the Spot fleet request ID; for example,
     * spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. If you
     * specify a scalable dimension, you must also specify a resource ID.

     */
    inline void SetResourceId(const char* value) { m_resourceIdHasBeenSet = true; m_resourceId.assign(value); }

    /**
     *
The resource type and unique identifier string for the resource associated
     * with the scaling activity. For Amazon ECS services, the resource type is
     * services, and the identifier is the cluster name and service name;
     * for example, service/default/sample-webapp. For Amazon EC2 Spot
     * fleet requests, the resource type is spot-fleet-request, and the
     * identifier is the Spot fleet request ID; for example,
     * spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. If you
     * specify a scalable dimension, you must also specify a resource ID.

     */
    inline DescribeScalingActivitiesRequest& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;}

    /**
     *
The resource type and unique identifier string for the resource associated
     * with the scaling activity. For Amazon ECS services, the resource type is
     * services, and the identifier is the cluster name and service name;
     * for example, service/default/sample-webapp. For Amazon EC2 Spot
     * fleet requests, the resource type is spot-fleet-request, and the
     * identifier is the Spot fleet request ID; for example,
     * spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. If you
     * specify a scalable dimension, you must also specify a resource ID.

     */
    inline DescribeScalingActivitiesRequest& WithResourceId(Aws::String&& value) { SetResourceId(value); return *this;}

    /**
     *
The resource type and unique identifier string for the resource associated
     * with the scaling activity. For Amazon ECS services, the resource type is
     * services, and the identifier is the cluster name and service name;
     * for example, service/default/sample-webapp. For Amazon EC2 Spot
     * fleet requests, the resource type is spot-fleet-request, and the
     * identifier is the Spot fleet request ID; for example,
     * spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE. If you
     * specify a scalable dimension, you must also specify a resource ID.

     */
    inline DescribeScalingActivitiesRequest& WithResourceId(const char* value) { SetResourceId(value); return *this;}

    /**
     *
The scalable dimension associated with the scaling activity. The scalable
     * dimension contains the service namespace, resource type, and scaling property,
     * such as ecs:service:DesiredCount for the desired task count of an
     * Amazon ECS service, or ec2:spot-fleet-request:TargetCapacity for
     * the target capacity of an Amazon EC2 Spot fleet request. If you specify a
     * scalable dimension, you must also specify a resource ID.

     */
    inline const ScalableDimension& GetScalableDimension() const{ return m_scalableDimension; }

    /**
     *
The scalable dimension associated with the scaling activity. The scalable
     * dimension contains the service namespace, resource type, and scaling property,
     * such as ecs:service:DesiredCount for the desired task count of an
     * Amazon ECS service, or ec2:spot-fleet-request:TargetCapacity for
     * the target capacity of an Amazon EC2 Spot fleet request. If you specify a
     * scalable dimension, you must also specify a resource ID.

     */
    inline void SetScalableDimension(const ScalableDimension& value) { m_scalableDimensionHasBeenSet = true; m_scalableDimension = value; }

    /**
     *
The scalable dimension associated with the scaling activity. The scalable
     * dimension contains the service namespace, resource type, and scaling property,
     * such as ecs:service:DesiredCount for the desired task count of an
     * Amazon ECS service, or ec2:spot-fleet-request:TargetCapacity for
     * the target capacity of an Amazon EC2 Spot fleet request. If you specify a
     * scalable dimension, you must also specify a resource ID.

     */
    inline void SetScalableDimension(ScalableDimension&& value) { m_scalableDimensionHasBeenSet = true; m_scalableDimension = value; }

    /**
     *
The scalable dimension associated with the scaling activity. The scalable
     * dimension contains the service namespace, resource type, and scaling property,
     * such as ecs:service:DesiredCount for the desired task count of an
     * Amazon ECS service, or ec2:spot-fleet-request:TargetCapacity for
     * the target capacity of an Amazon EC2 Spot fleet request. If you specify a
     * scalable dimension, you must also specify a resource ID.

     */
    inline DescribeScalingActivitiesRequest& WithScalableDimension(const ScalableDimension& value) { SetScalableDimension(value); return *this;}

    /**
     *
The scalable dimension associated with the scaling activity. The scalable
     * dimension contains the service namespace, resource type, and scaling property,
     * such as ecs:service:DesiredCount for the desired task count of an
     * Amazon ECS service, or ec2:spot-fleet-request:TargetCapacity for
     * the target capacity of an Amazon EC2 Spot fleet request. If you specify a
     * scalable dimension, you must also specify a resource ID.

     */
    inline DescribeScalingActivitiesRequest& WithScalableDimension(ScalableDimension&& value) { SetScalableDimension(value); return *this;}

    /**
     *
The maximum number of scaling activity results returned by
     * DescribeScalingActivities in paginated output. When this parameter
     * is used, DescribeScalingActivities returns up to
     * MaxResults results in a single page along with a
     * NextToken response element. The remaining results of the initial
     * request can be seen by sending another DescribeScalingActivities
     * request with the returned NextToken value. This value can be
     * between 1 and 50. If this parameter is not used, then
     * DescribeScalingActivities returns up to 50 results and a
     * NextToken value, if applicable.

     */
    inline int GetMaxResults() const{ return m_maxResults; }

    /**
     *
The maximum number of scaling activity results returned by
     * DescribeScalingActivities in paginated output. When this parameter
     * is used, DescribeScalingActivities returns up to
     * MaxResults results in a single page along with a
     * NextToken response element. The remaining results of the initial
     * request can be seen by sending another DescribeScalingActivities
     * request with the returned NextToken value. This value can be
     * between 1 and 50. If this parameter is not used, then
     * DescribeScalingActivities returns up to 50 results and a
     * NextToken value, if applicable.

     */
    inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }

    /**
     *
The maximum number of scaling activity results returned by
     * DescribeScalingActivities in paginated output. When this parameter
     * is used, DescribeScalingActivities returns up to
     * MaxResults results in a single page along with a
     * NextToken response element. The remaining results of the initial
     * request can be seen by sending another DescribeScalingActivities
     * request with the returned NextToken value. This value can be
     * between 1 and 50. If this parameter is not used, then
     * DescribeScalingActivities returns up to 50 results and a
     * NextToken value, if applicable.

     */
    inline DescribeScalingActivitiesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}

    /**
     *
The NextToken value returned from a previous paginated
     * DescribeScalingActivities request. Pagination continues from the
     * end of the previous results that returned the NextToken value. This
     * value is null when there are no more results to return.

     */
    inline const Aws::String& GetNextToken() const{ return m_nextToken; }

    /**
     *
The NextToken value returned from a previous paginated
     * DescribeScalingActivities request. Pagination continues from the
     * end of the previous results that returned the NextToken value. This
     * value is null when there are no more results to return.

     */
    inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }

    /**
     *
The NextToken value returned from a previous paginated
     * DescribeScalingActivities request. Pagination continues from the
     * end of the previous results that returned the NextToken value. This
     * value is null when there are no more results to return.

     */
    inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }

    /**
     *
The NextToken value returned from a previous paginated
     * DescribeScalingActivities request. Pagination continues from the
     * end of the previous results that returned the NextToken value. This
     * value is null when there are no more results to return.

     */
    inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }

    /**
     *
The NextToken value returned from a previous paginated
     * DescribeScalingActivities request. Pagination continues from the
     * end of the previous results that returned the NextToken value. This
     * value is null when there are no more results to return.

     */
    inline DescribeScalingActivitiesRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}

    /**
     *
The NextToken value returned from a previous paginated
     * DescribeScalingActivities request. Pagination continues from the
     * end of the previous results that returned the NextToken value. This
     * value is null when there are no more results to return.

     */
    inline DescribeScalingActivitiesRequest& WithNextToken(Aws::String&& value) { SetNextToken(value); return *this;}

    /**
     *
The NextToken value returned from a previous paginated
     * DescribeScalingActivities request. Pagination continues from the
     * end of the previous results that returned the NextToken value. This
     * value is null when there are no more results to return.

     */
    inline DescribeScalingActivitiesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}

  private:
    ServiceNamespace m_serviceNamespace;
    bool m_serviceNamespaceHasBeenSet;
    Aws::String m_resourceId;
    bool m_resourceIdHasBeenSet;
    ScalableDimension m_scalableDimension;
    bool m_scalableDimensionHasBeenSet;
    int m_maxResults;
    bool m_maxResultsHasBeenSet;
    Aws::String m_nextToken;
    bool m_nextTokenHasBeenSet;
  };

} // namespace Model
} // namespace ApplicationAutoScaling
} // namespace Aws


text:
/* jshint node: true */
/* global require, module */

var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

/*
  This Brocfile specifes the options for the dummy test app of this
  addon, located in `/tests/dummy`

  This Brocfile does *not* influence how the addon or the app using it
  behave. You most likely want to be modifying `./index.js` or app's Brocfile
*/

var app = new EmberAddon({
  'ember-prism': {
    'components': ['javascript', 'handlebars', 'scss', 'bash']
  }
});

module.exports = app.toTree();


text:
package edu.ucar.unidata.rosetta.repository.resources;

import edu.ucar.unidata.rosetta.domain.resources.MetadataProfile;
import java.util.List;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.DataRetrievalFailureException;

/**
 * The data access object representing a metadata profile.
 *
 * @author oxelson@ucar.edu
 */
public interface MetadataProfileResourceDao {

  /**
   * Looks up and retrieves a list of persisted MetadataProfile objects.
   *
   * @return A List of all persisted metadata profiles.
   * @throws DataAccessException If unable to retrieve persisted metadata profile.
   */
  public List<MetadataProfile> getMetadataProfiles() throws DataAccessException;

  /**
   * Looks up and retrieves a persisted MetadataProfile object using the provided name.
   *
   * @param name The name of the metadata profile to retrieve.
   * @return The MetadataProfile object matching the provided name.
   * @throws DataRetrievalFailureException If unable to retrieve persisted metadata profile.
   */
  public MetadataProfile lookupMetadataProfileByName(String name) throws DataRetrievalFailureException;

}


text:
Cube Designer

        <ng-form name="design_form" ng-submit="">

            <button ng-click="" ng-show="false"></button>

                        {{step.step = ($index + 1)}}
                        {{step.title}}

Note: inputs with light blue border are mandatory.

                             Back to My Cubes

                        <button class="btn btn-prev" ng-click="preView()" ng-show="curStep.title!='Cube Info'">

                            Prev
                        </button>
                        <button id="nextButton" class="btn btn-success btn-next"  ng-click="nextView()" ng-disabled="design_form.$invalid"
                                ng-show="curStep.title!='Overview'">
                            Next

                        </button>
                        <button class="btn btn-primary" ng-click="prepareCube();saveCube(design_form)" ng-disabled="design_form.$invalid"
                                ng-if="curStep.title=='Overview' && state.mode=='edit'">
                            Save
                        </button>

        </ng-form>


text:
for init in /lib/systemd/system/zoomdata-edc-*.service ; do
	systemctl start $(basename "${init}")
done
systemctl start zoomdata-spark-proxy.service
systemctl start zoomdata-scheduler.service
systemctl start zoomdata.service


text:
include ../../Library/GNU.mk

Title=		rsnapshot
Name=		rsnapshot
Version=	1.4.3
Site=		https://rsnapshot.org
Source=		https://github.com/rsnapshot/rsnapshot/releases/download/$(Version)/rsnapshot-$(Version).tar.gz
License=	GPLv2
ReadMeFile=	$(SourceDir)/README.md

define test_hook
$(BinDir)/rsnapshot --version | grep $(Version)
endef


text:
package org.elasticsearch.action.admin.indices.template.put;

import org.elasticsearch.ElasticSearchGenerationException;
import org.elasticsearch.ElasticSearchIllegalArgumentException;
import org.elasticsearch.ElasticSearchParseException;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.action.support.master.MasterNodeOperationRequest;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.collect.MapBuilder;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.support.XContentMapValues;

import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;

import static com.google.common.collect.Maps.newHashMap;
import static org.elasticsearch.action.ValidateActions.addValidationError;
import static org.elasticsearch.common.settings.ImmutableSettings.Builder.EMPTY_SETTINGS;
import static org.elasticsearch.common.settings.ImmutableSettings.readSettingsFromStream;
import static org.elasticsearch.common.settings.ImmutableSettings.writeSettingsToStream;
import static org.elasticsearch.common.unit.TimeValue.readTimeValue;

/**
 * A request to create an index template.
 */
public class PutIndexTemplateRequest extends MasterNodeOperationRequest<PutIndexTemplateRequest> {

    private String name;

    private String cause = "";

    private String template;

    private int order;

    private boolean create;

    private Settings settings = EMPTY_SETTINGS;

    private Map<String, String> mappings = newHashMap();

    private Map<String, IndexMetaData.Custom> customs = newHashMap();

    private TimeValue timeout = new TimeValue(10, TimeUnit.SECONDS);

    PutIndexTemplateRequest() {
    }

    /**
     * Constructs a new put index template request with the provided name.
     */
    public PutIndexTemplateRequest(String name) {
        this.name = name;
    }

    @Override
    public ActionRequestValidationException validate() {
        ActionRequestValidationException validationException = null;
        if (name == null) {
            validationException = addValidationError("name is missing", validationException);
        }
        if (template == null) {
            validationException = addValidationError("template is missing", validationException);
        }
        return validationException;
    }

    /**
     * Sets the name of the index template.
     */
    public PutIndexTemplateRequest name(String name) {
        this.name = name;
        return this;
    }

    /**
     * The name of the index template.
     */
    public String name() {
        return this.name;
    }

    public PutIndexTemplateRequest template(String template) {
        this.template = template;
        return this;
    }

    public String template() {
        return this.template;
    }

    public PutIndexTemplateRequest order(int order) {
        this.order = order;
        return this;
    }

    public int order() {
        return this.order;
    }

    /**
     * Set to <tt>true</tt> to force only creation, not an update of an index template. If it already
     * exists, it will fail with an {@link org.elasticsearch.indices.IndexTemplateAlreadyExistsException}.
     */
    public PutIndexTemplateRequest create(boolean create) {
        this.create = create;
        return this;
    }

    public boolean create() {
        return create;
    }

    /**
     * The settings to create the index template with.
     */
    public PutIndexTemplateRequest settings(Settings settings) {
        this.settings = settings;
        return this;
    }

    /**
     * The settings to create the index template with.
     */
    public PutIndexTemplateRequest settings(Settings.Builder settings) {
        this.settings = settings.build();
        return this;
    }

    /**
     * The settings to create the index template with (either json/yaml/properties format).
     */
    public PutIndexTemplateRequest settings(String source) {
        this.settings = ImmutableSettings.settingsBuilder().loadFromSource(source).build();
        return this;
    }

    /**
     * The settings to crete the index template with (either json/yaml/properties format).
     */
    public PutIndexTemplateRequest settings(Map<String, Object> source) {
        try {
            XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON);
            builder.map(source);
            settings(builder.string());
        } catch (IOException e) {
            throw new ElasticSearchGenerationException("Failed to generate [" + source + "]", e);
        }
        return this;
    }

    Settings settings() {
        return this.settings;
    }

    /**
     * Adds mapping that will be added when the index gets created.
     *
     * @param type   The mapping type
     * @param source The mapping source
     */
    public PutIndexTemplateRequest mapping(String type, String source) {
        mappings.put(type, source);
        return this;
    }

    /**
     * The cause for this index template creation.
     */
    public PutIndexTemplateRequest cause(String cause) {
        this.cause = cause;
        return this;
    }

    public String cause() {
        return this.cause;
    }

    /**
     * Adds mapping that will be added when the index gets created.
     *
     * @param type   The mapping type
     * @param source The mapping source
     */
    public PutIndexTemplateRequest mapping(String type, XContentBuilder source) {
        try {
            mappings.put(type, source.string());
        } catch (IOException e) {
            throw new ElasticSearchIllegalArgumentException("Failed to build json for mapping request", e);
        }
        return this;
    }

    /**
     * Adds mapping that will be added when the index gets created.
     *
     * @param type   The mapping type
     * @param source The mapping source
     */
    public PutIndexTemplateRequest mapping(String type, Map<String, Object> source) {
        // wrap it in a type map if its not
        if (source.size() != 1 || !source.containsKey(type)) {
            source = MapBuilder.<String, Object>newMapBuilder().put(type, source).map();
        }
        try {
            XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON);
            builder.map(source);
            return mapping(type, builder.string());
        } catch (IOException e) {
            throw new ElasticSearchGenerationException("Failed to generate [" + source + "]", e);
        }
    }

    Map<String, String> mappings() {
        return this.mappings;
    }

    /**
     * The template source definition.
     */
    public PutIndexTemplateRequest source(XContentBuilder templateBuilder) {
        try {
            return source(templateBuilder.bytes());
        } catch (Exception e) {
            throw new ElasticSearchIllegalArgumentException("Failed to build json for template request", e);
        }
    }

    /**
     * The template source definition.
     */
    public PutIndexTemplateRequest source(Map templateSource) {
        Map<String, Object> source = templateSource;
        for (Map.Entry<String, Object> entry : source.entrySet()) {
            String name = entry.getKey();
            if (name.equals("template")) {
                template(entry.getValue().toString());
            } else if (name.equals("order")) {
                order(XContentMapValues.nodeIntegerValue(entry.getValue(), order()));
            } else if (name.equals("settings")) {
                if (!(entry.getValue() instanceof Map)) {
                    throw new ElasticSearchIllegalArgumentException("Malformed settings section, should include an inner object");
                }
                settings((Map<String, Object>) entry.getValue());
            } else if (name.equals("mappings")) {
                Map<String, Object> mappings = (Map<String, Object>) entry.getValue();
                for (Map.Entry<String, Object> entry1 : mappings.entrySet()) {
                    if (!(entry1.getValue() instanceof Map)) {
                        throw new ElasticSearchIllegalArgumentException("Malformed mappings section for type [" + entry1.getKey() + "], should include an inner object describing the mapping");
                    }
                    mapping(entry1.getKey(), (Map<String, Object>) entry1.getValue());
                }
            } else {
                // maybe custom?
                IndexMetaData.Custom.Factory factory = IndexMetaData.lookupFactory(name);
                if (factory != null) {
                    try {
                        customs.put(name, factory.fromMap((Map<String, Object>) entry.getValue()));
                    } catch (IOException e) {
                        throw new ElasticSearchParseException("failed to parse custom metadata for [" + name + "]");
                    }
                }
            }
        }
        return this;
    }

    /**
     * The template source definition.
     */
    public PutIndexTemplateRequest source(String templateSource) {
        try {
            return source(XContentFactory.xContent(templateSource).createParser(templateSource).mapOrderedAndClose());
        } catch (Exception e) {
            throw new ElasticSearchIllegalArgumentException("failed to parse template source [" + templateSource + "]", e);
        }
    }

    /**
     * The template source definition.
     */
    public PutIndexTemplateRequest source(byte[] source) {
        return source(source, 0, source.length);
    }

    /**
     * The template source definition.
     */
    public PutIndexTemplateRequest source(byte[] source, int offset, int length) {
        try {
            return source(XContentFactory.xContent(source, offset, length).createParser(source, offset, length).mapOrderedAndClose());
        } catch (IOException e) {
            throw new ElasticSearchIllegalArgumentException("failed to parse template source", e);
        }
    }

    /**
     * The template source definition.
     */
    public PutIndexTemplateRequest source(BytesReference source) {
        try {
            return source(XContentFactory.xContent(source).createParser(source).mapOrderedAndClose());
        } catch (IOException e) {
            throw new ElasticSearchIllegalArgumentException("failed to parse template source", e);
        }
    }

    public PutIndexTemplateRequest custom(IndexMetaData.Custom custom) {
        customs.put(custom.type(), custom);
        return this;
    }

    Map<String, IndexMetaData.Custom> customs() {
        return this.customs;
    }

    /**
     * Timeout to wait till the put mapping gets acknowledged of all current cluster nodes. Defaults to
     * <tt>10s</tt>.
     */
    TimeValue timeout() {
        return timeout;
    }

    /**
     * Timeout to wait till the put mapping gets acknowledged of all current cluster nodes. Defaults to
     * <tt>10s</tt>.
     */
    public PutIndexTemplateRequest timeout(TimeValue timeout) {
        this.timeout = timeout;
        return this;
    }

    /**
     * Timeout to wait till the put mapping gets acknowledged of all current cluster nodes. Defaults to
     * <tt>10s</tt>.
     */
    public PutIndexTemplateRequest timeout(String timeout) {
        return timeout(TimeValue.parseTimeValue(timeout, null));
    }

    @Override
    public void readFrom(StreamInput in) throws IOException {
        super.readFrom(in);
        cause = in.readString();
        name = in.readString();
        template = in.readString();
        order = in.readInt();
        create = in.readBoolean();
        settings = readSettingsFromStream(in);
        timeout = readTimeValue(in);
        int size = in.readVInt();
        for (int i = 0; i < size; i++) {
            mappings.put(in.readString(), in.readString());
        }
        int customSize = in.readVInt();
        for (int i = 0; i < customSize; i++) {
            String type = in.readString();
            IndexMetaData.Custom customIndexMetaData = IndexMetaData.lookupFactorySafe(type).readFrom(in);
            customs.put(type, customIndexMetaData);
        }
    }

    @Override
    public void writeTo(StreamOutput out) throws IOException {
        super.writeTo(out);
        out.writeString(cause);
        out.writeString(name);
        out.writeString(template);
        out.writeInt(order);
        out.writeBoolean(create);
        writeSettingsToStream(settings, out);
        timeout.writeTo(out);
        out.writeVInt(mappings.size());
        for (Map.Entry<String, String> entry : mappings.entrySet()) {
            out.writeString(entry.getKey());
            out.writeString(entry.getValue());
        }
        out.writeVInt(customs.size());
        for (Map.Entry<String, IndexMetaData.Custom> entry : customs.entrySet()) {
            out.writeString(entry.getKey());
            IndexMetaData.lookupFactorySafe(entry.getKey()).writeTo(entry.getValue(), out);
        }
    }
}


text: Tool Scripts for Node.js


text:
import React, { Component } from 'react';

import Icon from '../Icon/icon';

import './button.css';

const DEFAULT_ICON_SIZE = 24;

class Button extends Component {
	render() {
		const { icon, iconSize, className, children, ...props } = this.props;

		return (
			<button type='button' {...props} className={`button ${className}`}>

					{children}
					{icon ? (

							<Icon glyph={icon} size={iconSize || DEFAULT_ICON_SIZE} />

					) : null}

			</button>
		);
	}
}

export default Button;


text:
package iso20022

// Choice of format for the processing status.
type ProcessingStatus37Choice struct {

	// Instruction has been acknowledged by the account servicer.
	AcknowledgedAccepted *AcknowledgedAcceptedStatus7Choice `xml:"AckdAccptd"`

	// Processing of the instruction/request is pending.
	PendingProcessing *PendingProcessingStatus3Choice `xml:"PdgPrcg"`

	// Instruction/Request has been rejected for further processing.
	Rejected *RejectionStatus13Choice `xml:"Rjctd"`

	// Instruction/Request is accepted but in repair.
	Repair *RepairStatus5Choice `xml:"Rpr"`

	// Instruction has been cancelled (only as an response to an SecuritiesTransactionStatusQuery). The status on the processing of a cancellation request must be provided using a SecuritiesTransactionCancellationRequestStatusAdvice.
	Cancelled *CancellationStatus7Choice `xml:"Canc"`

	// A cancellation request from yourself for this instruction is pending waiting for further processing (only as an response to an SecuritiesTransactionStatusQuery). The pending status on the processing of a cancellation request must be provided using a SecuritiesTransactionCancellationRequestStatusAdvice.
	PendingCancellation *PendingStatus13Choice `xml:"PdgCxl"`

	// Status that cannot be reported using one of the available standard status.
	Proprietary *ProprietaryStatusAndReason1 `xml:"Prtry"`

	// Cancellation request from your counterparty for this transaction is pending waiting for your cancellation request or consent.
	CancellationRequested *ProprietaryReason1 `xml:"CxlReqd"`

	// Modification request from your counterparty for this transaction is pending waiting for your cancellation request or your consent.
	ModificationRequested *ProprietaryReason1 `xml:"ModReqd"`
}

func (p *ProcessingStatus37Choice) AddAcknowledgedAccepted() *AcknowledgedAcceptedStatus7Choice {
	p.AcknowledgedAccepted = new(AcknowledgedAcceptedStatus7Choice)
	return p.AcknowledgedAccepted
}

func (p *ProcessingStatus37Choice) AddPendingProcessing() *PendingProcessingStatus3Choice {
	p.PendingProcessing = new(PendingProcessingStatus3Choice)
	return p.PendingProcessing
}

func (p *ProcessingStatus37Choice) AddRejected() *RejectionStatus13Choice {
	p.Rejected = new(RejectionStatus13Choice)
	return p.Rejected
}

func (p *ProcessingStatus37Choice) AddRepair() *RepairStatus5Choice {
	p.Repair = new(RepairStatus5Choice)
	return p.Repair
}

func (p *ProcessingStatus37Choice) AddCancelled() *CancellationStatus7Choice {
	p.Cancelled = new(CancellationStatus7Choice)
	return p.Cancelled
}

func (p *ProcessingStatus37Choice) AddPendingCancellation() *PendingStatus13Choice {
	p.PendingCancellation = new(PendingStatus13Choice)
	return p.PendingCancellation
}

func (p *ProcessingStatus37Choice) AddProprietary() *ProprietaryStatusAndReason1 {
	p.Proprietary = new(ProprietaryStatusAndReason1)
	return p.Proprietary
}

func (p *ProcessingStatus37Choice) AddCancellationRequested() *ProprietaryReason1 {
	p.CancellationRequested = new(ProprietaryReason1)
	return p.CancellationRequested
}

func (p *ProcessingStatus37Choice) AddModificationRequested() *ProprietaryReason1 {
	p.ModificationRequested = new(ProprietaryReason1)
	return p.ModificationRequested
}


text:
package client.app.configuration.usergroups.gui.def;

import share.core.constants.Constants;
import client.core.gui.components.ExtendedButton;
import client.core.gui.components.ExtendedTable;

public class GUIBrowseUserGroups
{
	public static final String PATH = Constants.GUI_BASE_PATH + "configuration/usergroups/gui/xml/browse_user_groups";

	public enum Literals
	{
		ROW_NOT_SELECTED, IS_ADMINISTRATOR_GROUP, LIST_PDF
	}

	public ExtendedButton detail = null;
	public ExtendedButton edit = null;
	public ExtendedTable list = null;
	public ExtendedButton add = null;
	public ExtendedButton delete = null;
}


text:
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { Application } from 'app/model/application.model';
import { Project } from 'app/model/project.model';

@Component({
    selector: 'app-usage-applications',
    templateUrl: './usage.applications.html',
    styleUrls: ['./usage.applications.scss'],
    changeDetection: ChangeDetectionStrategy.OnPush
})
export class UsageApplicationsComponent {
    @Input() project: Project;
    @Input() applications: Array<Application>;

    constructor() { }
}


text:
var searchData=
[
  ['add',['Add',['../classca_1_1axoninteractive_1_1_collections_1_1_concurrent_priority_queue.html#a213798e4b295bb797f3f81ca49d602a7',1,'ca::axoninteractive::Collections::ConcurrentPriorityQueue']]]
];


text:
package main

import (
	"fmt"
	"net/http"

	"github.com/go-on/router/route/new_idea/db"
	"github.com/go-on/router/route/new_idea/person"
	"github.com/go-on/router/route/new_idea/router"
	"github.com/metakeule/dbwrap"
)

/*

das problem / die vereinfachung:

wenn wir auf strenges REST verzichten, können wir folgende vereinfachungen vornehmen:

- url-parameter nur in GET urls, sonst (POST,PUT,PATCH,DELETE) immer ohne (d.h. wert wird im body mitgegeben)
- POST,PUT,PATCH,DELETE: body immer JSON
- jede GET route braucht immer nur einen platzhalter, dieser muss auch uniq sein für die routen,
  daher bietet sich ein automatisch generierter platzhalter an. der name der route wird durch den typ bestimmt.
- die get route kann auf einem typen definiert werden; dieser typ bestimmt automatisch die konvertierung
- fehlerhafte GET parameter können auf der router ebene behandelt werden (entsprechende fehlerstati werden zurückgeliefert),
das gleiche kann für fehlerhafte jsons gemacht werden. hat den vorteil, dass validierung (d.h. userfeedback) von malicious dingen (angriff)
sauber getrennt werden kann. die malicious sachen werden schon vom router abgefangen und bekommen nur einsprechende http status codes,
die fehlerhaften validierungen bekommen zusätzlich einen body mit hinweisen (dieser body ist anwendungspezifisch)
- generelle get suchanfragen mit entsprechenden parametern können auch zentral abgebildet werden (paging, limit, skip, sort)
- es gibt nur get routen ohne parameter und welche mit einem parameter, also such routen und ressourcen routen
- um unterressourcen zu handeln, statt /person/:person_id/address/:address_id entweder
     /address/:address_id (wenn die id universell ist) oder
     /person-address/:person_id-address_id , so dass der parameter wert beides beinhaltet und dann kann man mit split
     oder regulären ausdrücken die zwei oder mehreren elemente rausholen. auf diese weise bleiben die urls tendenziell "flach" und der router
     muss immer alles durchsuchen  (es gibt z.b. keinen konflikt zwischen einer route und einem parameter, wie bei /person/address/:person_id-address_id vs
     /person/:person_id). das heisst im klartext: in einem prefix ist kein / erlaubt und für den router bedeutet es:
     er muss nur einmal nach subroutern prüfen, wenn es kein subrouter ist, kann er im entsprechenden map der entsprechenden methode nachschauen
     und wenn es bei get nicht direkt mapt und einen slash beinhaltet, ist alles hinter dem slash der parameter: ganz einfach

*/

func printErr(r *http.Request, err error) {
	fmt.Printf("error in %s %s: %s\n", r.Method, r.URL.Path, err)
}

func main() {

	_, DB := dbwrap.NewFake()

	d := db.New(DB)

	p := person.New()
	p.Create = d.CreatePerson
	p.Read = d.ReadPerson
	p.Update = d.UpdatePerson
	p.Delete = d.DeletePerson
	p.Index = d.SearchPersons
	p.Replace = d.ReplacePerson
	p.ErrorHandler = printErr

	rt := router.New()

	personsRoute, personRoute := rt.RouteRessource(p, "person")
	m := router.New()
	rt.SubRouter("sub", m)
	/*
		getPerson := rt.RouteFuncParam(method.GET, "person", person.Get)
		indexPerson := rt.RouteFunc(method.GET, "person", person.Index)
		postPerson := rt.RouteFunc(method.POST, "person", person.Index)
	*/

	// fmt.Printf("%#v\n", m)
	// fmt.Printf("%#v\n", rt)
	fmt.Println(`MountPoint():`, rt.MountPoint())
	fmt.Println(`getPerson("24"): `, personRoute("24"))
	fmt.Println("postPerson(): ", personsRoute())
	fmt.Println("searchPerson(): ", personsRoute())

	http.ListenAndServe(":8085", m)
}


text:
layout:     property
title:      "index_composition"
schemas:    [security]
---

# index_composition

---
The index_composition is an array of reference_id/weight providing a breakdown of index constituents.

## reference_id
A specific reference to a constituent in order to be able to establish a link in netting operations.

For **equity indices** we expect the reference_id to be an **ID** linking another security record.

## weight
Decimal value representing the proportion of a reference_id in the allocated index. We expect the sum of all weights to equal 1 but we do not enforce this validation.


text:
{!follow-steps.md!} configure your settings to receive a weekly digest email
with a summary of the activity on your Zulip organization, such as popular
conversations and new users, while you were away.

{!go-to-the.md!} [Notifications](/#settings/notifications)
{!settings.md!}

2. Select the **Digest emails when I'm away** option under the
**Other notifications I want** section.

{!save-changes.md!} notification settings.