text:
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/usr/errldisplay/errldisplay.C $                           */
/*                                                                        */
/* OpenPOWER HostBoot Project                                             */
/*                                                                        */
/* Contributors Listed Below - COPYRIGHT 2013,2017                        */
/* [+] Google Inc.                                                        */
/* [+] International Business Machines Corp.                              */
/*                                                                        */
/*                                                                        */
/* Licensed under the Apache License, Version 2.0 (the "License");        */
/* you may not use this file except in compliance with the License.       */
/* You may obtain a copy of the License at                                */
/*                                                                        */
/*     http://www.apache.org/licenses/LICENSE-2.0                         */
/*                                                                        */
/* Unless required by applicable law or agreed to in writing, software    */
/* distributed under the License is distributed on an "AS IS" BASIS,      */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or        */
/* implied. See the License for the specific language governing           */
/* permissions and limitations under the License.                         */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */
/**
 *  @file /src/usr/errl/display/errldisplay.C
 *
 *  @brief Implementation of ErrlDisplay class
 *         This will display human-readable dumps of error log entries.
 *
 *  The strings displayed are automatically extracted from source code by
 *  the script ../errl/parser/genErrlParsers.pl
 *
 *  The base image is limited to 512K, and inclusion of the error strings
 *  in the base make it grow beyond that limit, so the text and display
 *  functions are put into the extended image.
 *
 *  The errl module in the base image will provide an interface for the
 *  display functions to register with it.
 *  When an errl is generated, the base image will see if a display function
 *  has been registered.  If so, then it will be called to display the error.
 *  If not, then the base image will display the raw error data and save the
 *  error information into a list.
 *  When the display function does register itself, the errl module in the
 *  base image will pretty-print all of the pending errors from the list
 *  it generated before that point.
 */

/*****************************************************************************/
// I n c l u d e s
/*****************************************************************************/
#include <trace/interface.H>
#include <errldisplay/errldisplay.H>
#include <errl/errlmanager.H>
#include <errl/errlentry.H>
#include <errl/errlud.H>
#include <errl/errludtarget.H>
#include <errl/errlsctn.H>
#include <errl/errlreasoncodes.H>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <initservice/taskargs.H>
#include <algorithm>
#include <console/consoleif.H>
#include <targeting/common/targetservice.H>
#include <targeting/common/iterators/targetiterator.H>
#include <targeting/common/target.H>

#ifdef CONFIG_CONSOLE_OUTPUT_FFDCDISPLAY
//Generated hearder files for HWP parsing
#include <hbfwErrDisplayPlatHwpErr.H>
#include <hbfwErrDisplayPlatHwpFFDC.H>
#include <prdrErrlDisplaySupt.H>

namespace PRDF
{
namespace HOSTBOOT
{
PrdrErrSigTable & GetErrorSigTable()
{
    static PrdrErrSigTable l_sigTable = PrdrErrSigTable();
    return l_sigTable;
}
}
}
#endif

namespace ERRORLOGDISPLAY
{

// Trace definition
trace_desc_t* g_trac_errldisp = NULL;
TRAC_INIT(&g_trac_errldisp, "ERRLDISP", KILOBYTE, TRACE::BUFFER_SLOW);

/**
 * @brief Default error log to display when we can't find one in the errorInfo
 *        table.
 *
 * The data tables and size variables
 *   static errLogInfo errorInfo []
 *   static compTableInfo compTable []
 *   static uint16_t errorInfoTableSize
 *   static uint16_t compTableSize
 * are automatically generated by the ../errl/parser/genErrlTable.pl script
 * and placed in the file $GENDIR/errldisplaydata.C
 */
static const ErrLogDisplay::errLogInfo unknownErrorInfo = {
    0,           // Module Id
    0,           // Reason Code
    "<none>",    // Description
    "unknown",   // Module Name
    "unknown",   // Reason
    "",          // User Data 1 string
    ""           // User Data 2 string
};

ErrLogDisplay& errLogDisplay()
{
    return Singleton<ErrLogDisplay>::instance();
}

const ErrLogDisplay::errLogInfo* ErrLogDisplay::findErrLogInfo (
                                    uint8_t i_moduleId, uint16_t i_reasonCode)
{
    // Create local errLogInfo to search for
    struct ErrLogDisplay::errLogInfo l_errLogInfo = {i_moduleId,i_reasonCode,
                                                     NULL,NULL,NULL,NULL,NULL};

    errLogInfo* l_result = std::lower_bound(errorInfo,
                                            errorInfo + errorInfoTableSize,
                                            l_errLogInfo,
                                            ErrLogDisplay::errorLogInfoCompare);

    // Check if the lower_bound found the correct result
    if ( (l_result != (errorInfo + errorInfoTableSize)) &&
         (l_result->moduleId == i_moduleId) &&
         (l_result->reasonCode == i_reasonCode) )
    {
        return l_result;
    }

    // Couldn't find it, so return the default unknown structure.
    return &unknownErrorInfo;
}

const char * ErrLogDisplay::findComponentName (compId_t i_compId)
{
    // Create local compTableInfo to search for
    struct ErrLogDisplay::compTableInfo l_compTableInfo = {i_compId, NULL};

    compTableInfo* l_result = std::lower_bound(compTable,
                                               compTable + compTableSize,
                                               l_compTableInfo,
                                               ErrLogDisplay::compTableCompare);

    // Check if the lower_bound found the correct result
    if ( (l_result != (compTable + errorInfoTableSize)) &&
         (l_result->value == i_compId) )
    {
        return l_result->name;
    }
    return "unknown";
}

void displayCalloutTarget (uint8_t * epRaw, size_t& o_size)
{
    // Data is formatted as a callout_ud_t followed by an entity path.
    // Note that in error data unused entity path elements are
    // eliminated, so use data to find the length
    const uint8_t pathTypeLength = *epRaw;

    //# of ep elements (2 bytes each) are in lower nibble of first elem
    //Master sentinel is 0xF0 so size is correct @ 1
    o_size = ((pathTypeLength & 0x0F) * 2)+1;

    const char * ep_str = "MASTER PROCESSOR SENTINEL";
    char * tmp_str = NULL;
    if( *epRaw != HWAS::TARGET_IS_SENTINEL )
    {
        TARGETING::EntityPath ep;

        if ((o_size > sizeof(TARGETING::EntityPath)))
        {
            ep_str = "MALFORMED UD Entity Path";
            o_size = 0; //stay safe
        }
        else
        {
            memcpy (reinterpret_cast<uint8_t*>(&ep), epRaw,o_size);
            tmp_str = ep.toString();
            ep_str = tmp_str;
        }
    }

    CONSOLE::displayf(NULL, "  Target                   : %s", ep_str);
    free(tmp_str);
}

void ErrLogDisplay::displayPrdf (uint64_t i_ud1, uint64_t i_ud2)
{
    //PRD stores the HUID of the callout in top word of ud1
    // and the signature in the top word of ud2
    uint32_t l_huid = i_ud1 >> 32;
    uint32_t l_sig = i_ud2 >> 32;

    CONSOLE::displayf(NULL, "  PRD Signature            : 0x%X 0x%X",
                      l_huid, l_sig);

#ifdef CONFIG_CONSOLE_OUTPUT_FFDCDISPLAY
    //Find the Target from the HUID
    TARGETING::Target* l_pTopLevel = NULL;
    TARGETING::targetService().getTopLevelTarget(l_pTopLevel);
    TARGETING::Target * l_target = l_pTopLevel->getTargetFromHuid(l_huid);

    if(l_target)
    {
        TARGETING::TYPE l_targetType =
          l_target->getAttr<TARGETING::ATTR_TYPE>();

        const char * l_nameStr =
           PRDF::HOSTBOOT::GetErrorSigTable()[l_targetType][l_sig].first;
        const char * l_descStr =
           PRDF::HOSTBOOT::GetErrorSigTable()[l_targetType][l_sig].second;

        TARGETING::ATTR_FAPI_NAME_type l_fapiStr = {0};
        l_target->tryGetAttr<TARGETING::ATTR_FAPI_NAME>(l_fapiStr);

        if(l_nameStr)
        {
            CONSOLE::displayf(NULL, "  Signature Description    : %s (%s) %s",
                              l_fapiStr, l_nameStr, l_descStr);
        }
        else
        {
            CONSOLE::displayf(NULL, "  Signature Description    : %s UNKNOWN",
                              l_fapiStr);
        }
    }
#endif
}

void ErrLogDisplay::displayCallout (void *data, size_t size)
{
    CONSOLE::displayf(NULL,
                      "------------------------------------------------");

    // Parse encoded callout data.  See ErrlUserDetailsCallout class in
    // errludcallout.C for (undocumented) encoding details.
    if (size >= sizeof(HWAS::callout_ud_t))
    {
        HWAS::callout_ud_t* callout =
            reinterpret_cast<HWAS::callout_ud_t*>(data);

        size_t  displayTarget = 0;
        bool displayGard = false;
        HWAS::GARD_ErrorType l_gard = HWAS::GARD_Fatal;
        bool displayDeconfig = false;
        HWAS::DeconfigEnum   l_deconfig = HWAS::DECONFIG;

        switch ( callout->type )
        {
            case HWAS::CLOCK_CALLOUT:
                switch (callout->clockType)
                {
#define case_CLOCK_TYPE(_type) \
case HWAS::_type: CONSOLE::displayf(NULL, "  Clock Type               : %s", #_type); break;
                    case_CLOCK_TYPE(TODCLK_TYPE)
                    case_CLOCK_TYPE(MEMCLK_TYPE)
                    case_CLOCK_TYPE(OSCREFCLK_TYPE)
                    case_CLOCK_TYPE(OSCPCICLK_TYPE)
                    default:
                        CONSOLE::displayf(NULL, "  Clock Type               : UNKNOWN 0x%X",
                                          callout->clockType);
                } // switch clockType
#undef case_CLOCK_TYPE

                displayGard = true;
                l_gard = callout->clkGardErrorType;
                displayDeconfig = true;
                l_deconfig = callout->clkDeconfigState;
                displayTarget = 1;
                break;

            case HWAS::PART_CALLOUT:
                switch (callout->partType)
                {
#define case_PART_TYPE(_type) \
case HWAS::_type: CONSOLE::displayf(NULL, "  Part Type                : %s", #_type); break;
                    case_PART_TYPE(FLASH_CONTROLLER_PART_TYPE)
                    case_PART_TYPE(PNOR_PART_TYPE)
                    case_PART_TYPE(SBE_SEEPROM_PART_TYPE)
                    case_PART_TYPE(VPD_PART_TYPE)
                    case_PART_TYPE(LPC_SLAVE_PART_TYPE)
                    case_PART_TYPE(GPIO_EXPANDER_PART_TYPE)
                    case_PART_TYPE(SPIVID_SLAVE_PART_TYPE)
                    default:
                        CONSOLE::displayf(NULL, "  Part Type                : UNKNOWN 0x%X",
                                          callout->partType);
                } // switch partType
#undef case_PART_TYPE

                displayGard = true;
                l_gard = callout->partGardErrorType;
                displayDeconfig = true;
                l_deconfig = callout->partDeconfigState;
                displayTarget = 1;
                break;

            case HWAS::BUS_CALLOUT:
                switch (callout->busType)
                {
#define case_BUS_TYPE(_type) \
case HWAS::_type: CONSOLE::displayf(NULL, "  Bus Type                 : %s", #_type); break;
                    case_BUS_TYPE(FSI_BUS_TYPE)
                    case_BUS_TYPE(DMI_BUS_TYPE)
                    case_BUS_TYPE(A_BUS_TYPE)
                    case_BUS_TYPE(X_BUS_TYPE)
                    case_BUS_TYPE(I2C_BUS_TYPE)
                    case_BUS_TYPE(PSI_BUS_TYPE)
                    case_BUS_TYPE(O_BUS_TYPE)
                    default:
                        CONSOLE::displayf(NULL, "  Bus Type                 : UNKNOWN 0x%X",
                                          callout->busType);
                } // switch partType
#undef case_BUS_TYPE

                // Data is formatted as a callout_ud_t followed by 2 entity
                // paths representing each side of the link.
                displayTarget = 2;
                break;

            case HWAS::HW_CALLOUT:
                CONSOLE::displayf(NULL, "  Callout type             : Hardware Callout");
                CONSOLE::displayf(NULL, "  CPU id                   : %d", callout->cpuid);

                displayGard = true;
                l_gard = callout->gardErrorType;
                displayDeconfig = true;
                l_deconfig = callout->deconfigState;
                displayTarget = 1;
                break;

            case HWAS::PROCEDURE_CALLOUT:
                CONSOLE::displayf(NULL, "  Callout type             : Procedure Callout");
                switch (callout->procedure)
                {
#define case_PROCEDURE(_type) \
case HWAS::_type: CONSOLE::displayf(NULL, "  Procedure                : %s", #_type); break;
                    case_PROCEDURE(EPUB_PRC_NONE)
                    case_PROCEDURE(EPUB_PRC_FIND_DECONFIGURED_PART)
                    case_PROCEDURE(EPUB_PRC_SP_CODE)
                    case_PROCEDURE(EPUB_PRC_PHYP_CODE)
                    case_PROCEDURE(EPUB_PRC_ALL_PROCS)
                    case_PROCEDURE(EPUB_PRC_ALL_MEMCRDS)
                    case_PROCEDURE(EPUB_PRC_INVALID_PART)
                    case_PROCEDURE(EPUB_PRC_LVL_SUPP)
                    case_PROCEDURE(EPUB_PRC_PROCPATH)
                    case_PROCEDURE(EPUB_PRC_NO_VPD_FOR_FRU)
                    case_PROCEDURE(EPUB_PRC_MEMORY_PLUGGING_ERROR)
                    case_PROCEDURE(EPUB_PRC_FSI_PATH)
                    case_PROCEDURE(EPUB_PRC_PROC_AB_BUS)
                    case_PROCEDURE(EPUB_PRC_PROC_XYZ_BUS)
                    case_PROCEDURE(EPUB_PRC_MEMBUS_ERROR)
                    case_PROCEDURE(EPUB_PRC_EIBUS_ERROR)
                    case_PROCEDURE(EPUB_PRC_POWER_ERROR)
                    case_PROCEDURE(EPUB_PRC_MEMORY_UE)
                    case_PROCEDURE(EPUB_PRC_PERFORMANCE_DEGRADED)
                    case_PROCEDURE(EPUB_PRC_HB_CODE)
                    case_PROCEDURE(EPUB_PRC_TOD_CLOCK_ERR)
                    case_PROCEDURE(EPUB_PRC_COOLING_SYSTEM_ERR)
                    case_PROCEDURE(EPUB_PRC_FW_VERIFICATION_ERR)
                    case_PROCEDURE(EPUB_PRC_GPU_ISOLATION_PROCEDURE)
                    default:
                        CONSOLE::displayf(NULL, "  Procedure                : UNKNOWN: 0x%X",
                                          callout->procedure);
                        break;
                } // switch procedure
#undef case_PROCEDURE
                break;

              case HWAS::SENSOR_CALLOUT:
                CONSOLE::displayf(NULL, "  Sensor ID                   : 0x%x", callout->sensorId);

                switch (callout->sensorType)
                {
#define case_SENSOR_TYPE(_type) \
case HWAS::_type: CONSOLE::displayf(NULL, "  Sensor Type                : %s", #_type); break;
                    case_SENSOR_TYPE(UNKNOWN_SENSOR)
                    case_SENSOR_TYPE(GPU_FUNC_SENSOR)
                    case_SENSOR_TYPE(GPU_TEMPERATURE_SENSOR)
                    case_SENSOR_TYPE(GPU_MEMORY_TEMP_SENSOR)
                    default:
                        CONSOLE::displayf(NULL, "  Sensor Type                : UNKNOWN 0x%X",
                                          callout->sensorType);
                } // switch sensorType
#undef case_SENSOR_TYPE
                break;

            default:
                CONSOLE::displayf(NULL, "  Callout type             : UNKNOWN: 0x%X",
                                  callout->type);
                break;
        }

        ///////////////////////////
        // Display all the common stuff
        ///////////////////////////

        //Display the number of targets indicated above
        uint8_t * epRaw = reinterpret_cast<uint8_t*>( callout+1 ); //ptr math
        size_t l_size = 0;
        for(size_t numT = 0 ; numT < displayTarget; numT++)
        {
            // Data is formatted as a callout_ud_t followed by an entity path
            // Multiple EP are packed together
            epRaw += l_size;
            displayCalloutTarget(epRaw,l_size);
        }

        if(displayDeconfig)
        {
            switch (l_deconfig)
            {
#define case_DECONFIG_STATE(_type) \
case HWAS::_type: CONSOLE::displayf(NULL, "  Deconfig State           : %s", #_type); break;
                case_DECONFIG_STATE(NO_DECONFIG)
                case_DECONFIG_STATE(DECONFIG)
                case_DECONFIG_STATE(DELAYED_DECONFIG)
                default:
                    CONSOLE::displayf(NULL, "  Deconfig State           : UNKNOWN: 0x%X",
                                      l_deconfig);
                    break;
            } // switch deconfigState
#undef case_DECONFIG_STATE
        }

        if(displayGard)
        {
            switch (l_gard)
            {
#define case_GARD_ERROR_TYPE(_type) \
case HWAS::_type: CONSOLE::displayf(NULL, "  GARD Error Type          : %s", #_type); break;
                case_GARD_ERROR_TYPE(GARD_NULL)
                case_GARD_ERROR_TYPE(GARD_User_Manual)
                case_GARD_ERROR_TYPE(GARD_Unrecoverable)
                case_GARD_ERROR_TYPE(GARD_Fatal)
                case_GARD_ERROR_TYPE(GARD_Predictive)
                case_GARD_ERROR_TYPE(GARD_Power)
                case_GARD_ERROR_TYPE(GARD_PHYP)
                case_GARD_ERROR_TYPE(GARD_Reconfig)
                case_GARD_ERROR_TYPE(GARD_Void)
                default:
                    CONSOLE::displayf(NULL, "  GARD Error Type          : UNKNOWN: 0x%X",
                                      l_gard);
                    break;
            } // switch gardState
#undef case_GARD_ERROR_TYPE
        }

        switch (callout->priority)
        {
#define case_PRIORITY(_type) \
case HWAS::_type: CONSOLE::displayf(NULL, "  Priority                 : %s", #_type); break;
            case_PRIORITY(SRCI_PRIORITY_NONE)
            case_PRIORITY(SRCI_PRIORITY_LOW)
            case_PRIORITY(SRCI_PRIORITY_MEDC)
            case_PRIORITY(SRCI_PRIORITY_MEDB)
            case_PRIORITY(SRCI_PRIORITY_MEDA)
            case_PRIORITY(SRCI_PRIORITY_MED)
            case_PRIORITY(SRCI_PRIORITY_HIGH)
            default:
                CONSOLE::displayf(NULL, "  Priority                 : UNKNOWN: 0x%X",
                                  callout->priority);
                break;
        } // switch priority
#undef case_PRIORITY
    }
}

//Display a "Target".  This is a misnomer in that HB uses a "target"
// User detail section for lots of things.  We are only going to look
// for HWPF subtypes and display those

void ErrLogDisplay::displayTarget(void *data, size_t size)
{
    char *char_buf = reinterpret_cast<char*>( data );

    // The first part of the buffer is a TargetLabel_t.
    ERRORLOG::TargetLabel_t *label =
      reinterpret_cast<ERRORLOG::TargetLabel_t*>( char_buf );

    if( label->tag == 0xffffffff )
    {
        CONSOLE::displayf(NULL, "  MASTER PROCESSOR SENTINEL" );
    }
    else
    {
        // The second part of the buffer contains the encoded target.
        // See Target::targetFFDC for encoding details.
        // We only care about the HUID and can look up the Target based on that.
        char_buf += sizeof(ERRORLOG::TargetLabel_t);
        TARGETING::AttributeTraits<TARGETING::ATTR_HUID>::Type *huid =
          reinterpret_cast<TARGETING::AttributeTraits<
          TARGETING::ATTR_HUID>::Type*>( char_buf );
        CONSOLE::displayf(NULL, "  HUID: %08x", *huid );

        // Look up the HUID across all targets.
        for ( TARGETING::TargetIterator ti = TARGETING::targetService().begin();
              ti != TARGETING::targetService().end(); ++ti )
        {
            TARGETING::AttributeTraits<TARGETING::ATTR_HUID>::Type tmp_huid;
            if( ti->tryGetAttr<TARGETING::ATTR_HUID>( tmp_huid ) &&
                tmp_huid == *huid )
            {
                TARGETING::Target *target = *ti;
                CONSOLE::displayf(NULL,
                  "  Phys path: %s",
                  target->getAttr<TARGETING::ATTR_PHYS_PATH>().toString() );
                CONSOLE::displayf(NULL,
                  "  Affinity path: %s",
                  target->getAttr<TARGETING::ATTR_AFFINITY_PATH>().toString());
                break;
            }
        }
    }
}

#ifdef CONFIG_CONSOLE_OUTPUT_FFDCDISPLAY
static void printHex(char *i_buf, const size_t i_size)
{
    char byte_str[256] = { 0, };
    size_t pos = 0;
    // Limit dump to first 32 bytes.
    for ( size_t i = 0; i < std::min( i_size, 32ul ); ++i )
        pos += sprintf( byte_str + pos, "%s%02X", (i % 4) == 0 ? " " : "",
                        i_buf[i] );
    CONSOLE::displayf( NULL, "    %s", byte_str );
}
#endif

void ErrLogDisplay::displayHwpf(void *data, size_t size, uint8_t i_type)
{
#ifdef CONFIG_CONSOLE_OUTPUT_FFDCDISPLAY

    uint32_t *word_buf = reinterpret_cast<uint32_t*>( data );

    switch ( i_type )
    {
    case ERRORLOG::ERRL_UDT_STRING:
        //this is error code str -- single word of data is HWPF RC
        CONSOLE::displayf( NULL,
                           "------------------------------------------------" );
        const char *rc;
        const char *desc;
        fapi2::hbfwErrLookupHwpRc( *word_buf, rc, desc );
        CONSOLE::displayf( NULL, "  HwpReturnCode              : %s",
                           rc ? rc : "Unknown" );
        CONSOLE::displayf( NULL, "  HWP Error description      : %s",
                           desc ? desc : "Unknown" );
        break;

    case ERRORLOG::ERRL_UDT_TARGET:
        {
        //this is HWPF FFDC.  First word is hash, rest of data is hex
        //reserve space for 16 words of data with spaces between
        CONSOLE::displayf( NULL,
                           "------------------------------------------------" );
        fapi2::hbfwFfdcType type;
        uint64_t value;
        const char *str;
        int index = 0;
        char *buf = reinterpret_cast<char*>( data ) + sizeof( *word_buf );
        size -= sizeof( *word_buf );
        while ( fapi2::hbfwErrLookupHwpRcFFDC( *word_buf, index, type, value,
                                               str ) )
        {
            if( type == fapi2::HBFW_FFDC_TYPE_HWP_RC_FFDC )
            {
                const char *rc;
                const char *desc;
                fapi2::hbfwErrLookupHwpRc( value, rc, desc );
                CONSOLE::displayf( NULL, "  HwpReturnCode              : %s",
                                   rc ? rc : "Unknown" );
                CONSOLE::displayf( NULL, "  FFDC                       : %s",
                                   str ? str : "Unknown" );
                printHex(buf, size);
                size = 0;
            }
            else if( type == fapi2::HBFW_FFDC_TYPE_SCOM_FAIL )
            {
                uint64_t val64 = be64toh( *reinterpret_cast<uint64_t*>( buf ) );
                CONSOLE::displayf( NULL, "  Failed SCOM address        : %#016lX",
                                   val64 );
            }
            else if( type == fapi2::HBFW_FFDC_TYPE_PIB_RC )
            {
                uint64_t val32 = be64toh( *reinterpret_cast<uint32_t*>( buf ) );
                CONSOLE::displayf( NULL, "  PIB RC                     : %#08lX",
                                   val32 );
            }
            else if( type == fapi2::HBFW_FFDC_TYPE_REGISTER_SET )
            {
                CONSOLE::displayf( NULL, "  Register FFDC              : %s",
                                   str ? str : "Unknown" );
            }
            else if( type == fapi2::HBFW_FFDC_TYPE_CHIP_POSITION
                && (size >= sizeof(uint32_t)) )
            {
                uint32_t val32 = be32toh( *reinterpret_cast<uint32_t*>( buf ) );
                CONSOLE::displayf( NULL, "  Chip Position              : %X",
                                   val32 );
                buf += sizeof(uint32_t);
                size -= sizeof(uint32_t);
            }
            else if( type == fapi2::HBFW_FFDC_TYPE_CFAM_REG
                && (size >= sizeof(uint32_t)) )
            {
                uint32_t val32 = be32toh( *reinterpret_cast<uint32_t*>( buf ) );
                CONSOLE::displayf( NULL, "  CFAM Register              : %s",
                                   str ? str : "Unknown" );
                CONSOLE::displayf( NULL, "    %08X", val32 );
                buf += sizeof(uint32_t);
                size -= sizeof(uint32_t);
            }
            else if( type == fapi2::HBFW_FFDC_TYPE_SCOM_REG
                && (size >= sizeof(uint64_t)) )
            {
                uint64_t val64 = be64toh( *reinterpret_cast<uint64_t*>( buf ) );
                CONSOLE::displayf( NULL, "  SCOM Register              : %s",
                                   str ? str : "Unknown" );
                CONSOLE::displayf( NULL, "    %08llX %08llX",
                                   (val64 >> 32) & 0xffffffff,
                                   (val64 & 0xffffffff) );
                buf += sizeof(uint64_t);
                size -= sizeof(uint64_t);
            }
            index++;
        }
        break;
    }
    }
#endif
}

//
// Display a human-readable form of an error.
void ErrLogDisplay::msgDisplay (const errlHndl_t &i_err,
                                compId_t i_committerComp)
{
    TRACDCOMP( g_trac_errldisp, ENTER_MRK "ErrLogDisplay::msgDisplay" );

    do
    {
        // Decide whether or not to skip the error log
        if( i_err->getSkipShowingLog() )
        {
            TRACDCOMP( g_trac_errldisp, INFO_MRK"msgDisplay: %.8X is INFORMATIONAL/RECOVERED; skipping...", i_err->eid());
            break;
        }
        const errLogInfo *info = findErrLogInfo ( i_err->moduleId(),
                                              i_err->reasonCode());

        CONSOLE::displayf(NULL,
                          "================================================");
        CONSOLE::displayf(NULL, "Error reported by %s (0x%04X) PLID 0x%08X",
                         findComponentName( i_committerComp ),
                         i_committerComp, i_err->plid() );

        //PRD doesn't follow the rest of the HB conventions
        // Handle them special
        if(i_committerComp == PRDF_COMP_ID)
        {
            displayPrdf(i_err->getUserData1(), i_err->getUserData2());
        }
        else
        {
            CONSOLE::displayf(NULL, "  %s", info->descriptString);
            CONSOLE::displayf(NULL, "  ModuleId   0x%02x %s",
                          i_err->moduleId(), info->moduleName);
            CONSOLE::displayf(NULL, "  ReasonCode 0x%04x %s",
                          i_err->reasonCode(), info->reasonString);
        }

        CONSOLE::displayf(NULL, "  UserData1  %s : 0x%016lx",
                          info->userData1String, i_err->getUserData1());
        CONSOLE::displayf(NULL, "  UserData2  %s : 0x%016lx",
                          info->userData2String, i_err->getUserData2());

        // Loop through and print interesting  user data sections.
        for ( size_t i = 0; i < i_err->iv_SectionVector.size(); ++i )
        {
            ERRORLOG::ErrlUD *user_data = i_err->iv_SectionVector[i];
            //HWPF subsections abuse the rules... handle it special
            if(user_data->iv_header.iv_compId == HWPF_COMP_ID)
            {
                displayHwpf( user_data->iv_pData, user_data->iv_Size,
                             user_data->iv_header.iv_sst);
            }
            else
            {
                switch ( user_data->iv_header.iv_sst )
                {
                case ERRORLOG::ERRL_UDT_CALLOUT:
                    displayCallout( user_data->iv_pData, user_data->iv_Size );
                    break;

                case ERRORLOG::ERRL_UDT_STRING:
                    CONSOLE::displayf(NULL,
                       "------------------------------------------------");
                    CONSOLE::displayf(NULL,
                        "  %s",
                        reinterpret_cast<char*>( user_data->iv_pData ) );
                    break;
                }
            }
        }

        CONSOLE::displayf(NULL,
                      "================================================" );
        CONSOLE::flush();
    }while( 0 );

    TRACDCOMP( g_trac_errldisp, EXIT_MRK "ErrLogDisplay::msgDisplay" );
}

/**
 * @brief This is the task entry point. It will register ErrlDisplay module with
 *        the base image Errl module.
 *
 * @param[in/out] io_taskRetErrl    Errl module to register with ErrlDisplay
 *                                  instance
 *
 * @return None
 */
static void errLogDisplayEntryPoint (errlHndl_t &io_taskRetErrl)
{
    TRACFCOMP( g_trac_errldisp, ENTER_MRK "ErrLogDisplay::errLogDisplayEntryPoint" );

    io_taskRetErrl = Singleton<ErrLogDisplay>::instance().init();

    TRACFCOMP( g_trac_errldisp, EXIT_MRK "ErrLogDisplay::errLogDisplayEntryPoint" );
}
TASK_ENTRY_MACRO( errLogDisplayEntryPoint );

errlHndl_t ErrLogDisplay::init()
{
    ERRORLOG::ErrlManager::errlResourceReady(ERRORLOG::ERRLDISP);
    return NULL;
}

} // End namespace


text:
using System;
using UnityEngine;
using Parkitect.UI;

namespace BetterCameras.BetterGuest
{
	public class BetterGuestCamera : MonoBehaviour
	{
		private GameObject _camera;
		private bool _isInGuest;
		public BetterCamerasSettings BCSettings;
		public KeyCode GuestEnter;

		private void Awake()
		{
			DontDestroyOnLoad(gameObject);
			BCSettings = Main.BCSettings;
			RefreshSettings ();
		}

		private void Update()
		{
			if (!_isInGuest && Input.GetKeyUp(GuestEnter))
			{
				var guest = GuestUnderMouse();

				if (guest != null)
				{
					EnterGuest(guest);
				}
			}
			else if (_isInGuest && (Input.GetKeyUp(GuestEnter) || Input.GetKeyUp(KeyCode.Escape)))
			{
				LeaveGuest();
			}
		}

		private void OnDestroy()
		{
			LeaveGuest();
		}

		private static Guest GuestUnderMouse()
		{
			var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
			float distance;

			var obj = Collisions.Instance.checkSelectables(ray, out distance);
			RaycastHit hit;

			if (Physics.Raycast(ray, out hit, distance, LayerMasks.MOUSECOLLIDERS))
				obj = hit.collider.gameObject;
			return obj != null ? obj.GetComponentInParent<Guest>() : null;
		}

		private void EnterGuest(Guest guest)
		{
			if (_isInGuest)
				return;

			UIWorldOverlayController.Instance.gameObject.SetActive(false);
			Camera.main.GetComponent<CameraController>().enabled = false;

			_camera = new GameObject();
			_camera.AddComponent<Camera>().nearClipPlane = 0.05f;
			_camera.AddComponent<AudioListener>();
			_camera.transform.parent = guest.head.transform;
			_camera.transform.localPosition = new Vector3(-0.09f, -0.13f, 0);
			_camera.transform.localRotation = Quaternion.Euler(90, 0, 90);

			_isInGuest = true;

			ApplySettings();
		}

		private void LeaveGuest()
		{
			if (!_isInGuest)
				return;

			UIWorldOverlayController.Instance.gameObject.SetActive(true);
			Camera.main.GetComponent<CameraController>().enabled = true;

			Destroy(_camera);

			_isInGuest = false;
		}

		public void RefreshSettings()
		{
			GuestEnter = BCSettings.KeyboardGuest;
			ApplySettings ();
			Debug.logger.Log (" Guest Enter Key = " + GuestEnter.ToString());
		}

		public void ApplySettings()
		{
			if (!_isInGuest)
				return;

			_camera.transform.localPosition = new Vector3(BCSettings.CameraGuestHeight, BCSettings.CameraGuestDistance, _camera.transform.localPosition.z);
		}
	}

}

redpajama_set_name: RedPajamaGithub


text: module.exports = require('./params.json')


text:
package org.apache.gobblin.runtime;

import java.util.List;
import java.util.Map;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;

import com.google.common.base.Optional;
import com.google.common.io.Closer;
import com.google.common.util.concurrent.Futures;

import org.apache.gobblin.configuration.ConfigurationKeys;
import org.apache.gobblin.converter.Converter;
import org.apache.gobblin.fork.ForkOperator;
import org.apache.gobblin.fork.Forker;
import org.apache.gobblin.qualitychecker.row.RowLevelPolicyChecker;
import org.apache.gobblin.records.RecordStreamProcessor;
import org.apache.gobblin.records.RecordStreamWithMetadata;
import org.apache.gobblin.runtime.fork.Fork;
import org.apache.gobblin.source.extractor.Extractor;
import org.apache.gobblin.source.extractor.StreamingExtractor;
import org.apache.gobblin.util.ExponentialBackoff;
import org.apache.gobblin.writer.AcknowledgableWatermark;
import org.apache.gobblin.writer.FineGrainedWatermarkTracker;
import org.apache.gobblin.writer.WatermarkManager;
import org.apache.gobblin.writer.WatermarkStorage;

import io.reactivex.flowables.ConnectableFlowable;
import io.reactivex.schedulers.Schedulers;
import lombok.AllArgsConstructor;

/**
 * A helper class to run {@link Task} in stream mode. Prevents {@link Task} from loading reactivex classes when not
 * needed.
 */
@AllArgsConstructor
public class StreamModelTaskRunner {

  private final Task task;

  private final TaskState taskState;
  private final Closer closer;
  private final TaskContext taskContext;
  private final Extractor extractor;
  private final Converter converter;
  private final List<RecordStreamProcessor<?,?,?,?>> recordStreamProcessors;
  private final RowLevelPolicyChecker rowChecker;
  private final TaskExecutor taskExecutor;
  private final ExecutionModel taskMode;
  private final AtomicBoolean shutdownRequested;
  private final Optional<FineGrainedWatermarkTracker> watermarkTracker;
  private final Optional<WatermarkManager> watermarkManager;
  private final Optional<WatermarkStorage> watermarkStorage;
  private final Map<Optional<Fork>, Optional<Future<?>>> forks;

  protected void run() throws Exception {
    long maxWaitInMinute = taskState.getPropAsLong(ConfigurationKeys.FORK_MAX_WAIT_MININUTES, ConfigurationKeys.DEFAULT_FORK_MAX_WAIT_MININUTES);

    // Get the fork operator. By default IdentityForkOperator is used with a single branch.
    ForkOperator forkOperator = closer.register(this.taskContext.getForkOperator());

    RecordStreamWithMetadata<?, ?> stream = this.extractor.recordStream(this.shutdownRequested);
    ConnectableFlowable connectableStream = stream.getRecordStream().publish();
    stream = stream.withRecordStream(connectableStream);

    stream = stream.mapRecords(r -> {
      this.task.onRecordExtract();
      return r;
    });
    if (this.task.isStreamingTask()) {

      // Start watermark manager and tracker
      if (this.watermarkTracker.isPresent()) {
        this.watermarkTracker.get().start();
      }
      this.watermarkManager.get().start();

      ((StreamingExtractor) this.taskContext.getRawSourceExtractor()).start(this.watermarkStorage.get());

      stream = stream.mapRecords(r -> {
        AcknowledgableWatermark ackableWatermark = new AcknowledgableWatermark(r.getWatermark());
        if (watermarkTracker.isPresent()) {
          watermarkTracker.get().track(ackableWatermark);
        }
        r.addCallBack(ackableWatermark);
        return r;
      });
    }

    // Use the recordStreamProcessor list if it is configured. This list can contain both all RecordStreamProcessor types
    if (!this.recordStreamProcessors.isEmpty()) {
      for (RecordStreamProcessor streamProcessor : this.recordStreamProcessors) {
        stream = streamProcessor.processStream(stream, this.taskState);
      }
    } else {
      if (this.converter instanceof MultiConverter) {
        // if multiconverter, unpack it
        for (Converter cverter : ((MultiConverter) this.converter).getConverters()) {
          stream = cverter.processStream(stream, this.taskState);
        }
      } else {
        stream = this.converter.processStream(stream, this.taskState);
      }
    }
    stream = this.rowChecker.processStream(stream, this.taskState);

    Forker.ForkedStream<?, ?> forkedStreams = new Forker().forkStream(stream, forkOperator, this.taskState);

    boolean isForkAsync = !this.task.areSingleBranchTasksSynchronous(this.taskContext) || forkedStreams.getForkedStreams().size() > 1;
    int bufferSize =
        this.taskState.getPropAsInt(ConfigurationKeys.FORK_RECORD_QUEUE_CAPACITY_KEY, ConfigurationKeys.DEFAULT_FORK_RECORD_QUEUE_CAPACITY);

    for (int fidx = 0; fidx < forkedStreams.getForkedStreams().size(); fidx ++) {
      RecordStreamWithMetadata<?, ?> forkedStream = forkedStreams.getForkedStreams().get(fidx);
      if (forkedStream != null) {
        if (isForkAsync) {
          forkedStream = forkedStream.mapStream(f -> f.observeOn(Schedulers.from(this.taskExecutor.getForkExecutor()), false, bufferSize));
        }
        Fork fork = new Fork(this.taskContext, forkedStream.getGlobalMetadata().getSchema(), forkedStreams.getForkedStreams().size(), fidx, this.taskMode);
        fork.consumeRecordStream(forkedStream);
        this.forks.put(Optional.of(fork), Optional.of(Futures.immediateFuture(null)));
        this.task.configureStreamingFork(fork);
      }
    }

    connectableStream.connect();

    if (!ExponentialBackoff.awaitCondition().callable(() -> this.forks.keySet().stream().map(Optional::get).allMatch(Fork::isDone)).
        initialDelay(1000L).maxDelay(1000L).maxWait(TimeUnit.MINUTES.toMillis(maxWaitInMinute)).await()) {
      throw new TimeoutException("Forks did not finish withing specified timeout.");
    }
  }

}


text:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<html>
<body>
Highlighter implementation that uses offsets from postings lists.
</body>
</html>


text:
namespace JoinerSplitter
{
    using System;
    using System.Windows;

    /// <summary>
    /// Interaction logic for InfoBox.xaml.
    /// </summary>
    public partial class InfoBox
    {
        private bool wasEnabled;

        private InfoBox()
        {
            InitializeComponent();
        }

        public static InfoBox Show(Window owner, string text)
        {
            var dlg = new InfoBox
            {
                TextBlock = { Text = text },
                Owner = owner
            };
            if (owner != null)
            {
                dlg.wasEnabled = owner.IsEnabled;
                owner.IsEnabled = false;
            }

            dlg.Show();
            return dlg;
        }

        protected override void OnClosed(EventArgs e)
        {
            if (Owner != null)
            {
                Owner.IsEnabled = wasEnabled;
            }

            base.OnClosed(e);
        }
    }
}


text:
    <form id="ichi">
      test: <input type="text" name="foo[bar]"/>

      p: <input type="password" name="foo[password]" id="password_ichi"/>

      cp: <input type="password" id="confirm_password_ichi"/>

      e: <input type="text" name="foo[email]" id="email_ichi"/>

      ce: <input type="text" id="confirm_email_ichi"/>

      <input type="submit"/>
    </form>

    <form id="ni">
      test bar: <input type="text" name="bar[baz]"/>

      test bat: <input type="text" name="bat[bam]"/>

      test excluded bar: <input type="text" name="bar[bad]"/>

      test excluded bat: <input type="text" name="bat[ban]"/>

      p: <input type="password" name="bar[password]" id="password_ni"/>

      cp: <input type="password" id="confirm_password_ni"/>

      agree: <input type="checkbox" id="agree"/>

      <input type="submit"/>
    </form>

    <form id="san">
      test: <input type="text" name="foo[bar]"/>

      p: <input type="password" name="bat[password]" id="password_san"/>

      cp: <input type="password" id="confirm_password_san"/>

      e: <input type="text" name="email" id="email_san"/>

      ce: <input type="text" id="confirm_email_san"/>

      <input type="submit"/>
    </form>

    <form id="shi">
      test:

      nothing: <input type="radio" name="foo[bar]" value=""/>

      somethin: <input type="radio" name="foo[bar]" value="somethin"/>

      0000: <input type="radio" name="foo[bar]" value="0000"/>

      <input type="submit"/>
    </form>


text:
__all__ = [
    'get_config',
    'set_config'
]

# Stores parsed config dictionary
CONFIG = {}

def get_config():
    """
    Retrieve parsed config object.

    :rtype: ``dict``
    """
    global CONFIG
    return CONFIG

def set_config(config):
    """
    Store parsing config object.

    :type config: ``dict``

    :rtype: ``dict``
    """
    global CONFIG
    CONFIG = config
    return config


text:
module Bustle.Data.User
  -- friendly fetchers
  ( get
  -- types
  , Id(..)
  , User
  , mixin
  -- haxl state initialization
  , initState
  ) where

import           Control.Concurrent.Async (async, wait)
import           Control.Lens
import           Control.Monad (unless)
import           Control.Monad.IO.Class
import           Control.Monad.Trans.Class (lift)
import           Control.Monad.Trans.AWS
import           Data.Hashable
import           Data.HashMap.Strict (HashMap, (!))
import qualified Data.HashMap.Strict as HashMap
import           Data.List           (null)
import qualified Data.List.NonEmpty  as NonEmpty
import qualified Data.Text           as T
import qualified Data.Text.Read      as TR
import           Data.Typeable
import qualified Network.AWS         as AWS
import           Network.AWS.DynamoDB.BatchGetItem
import           Network.AWS.DynamoDB.Types

import qualified Bustle.Data.Post as Post

import Bustle.Env

-- | Friendly fetchers

get :: Id -> Haxl (Maybe User)
get = dataFetch . GetUser

-- | User Data Type

data User = User
  { userId     :: Id
  , name       :: T.Text
  , userRole   :: Int
  , mediaKey   :: Maybe T.Text
  , bio        :: Maybe T.Text
  , twitter    :: Maybe T.Text
  , facebook   :: Maybe T.Text
  , googlePlus :: Maybe T.Text
  , url        :: Maybe T.Text
  } deriving (Eq, Show, Typeable)

instance GraphQLValue Haxl User
instance GraphQLType OBJECT Haxl User where

  def = defineObject "User" $ do

    describe "A user, stored in dynamodb"

    field "id"         $ resolve $-> userId
    field "name"       $ resolve $-> name
    field "role"       $ resolve $-> userRole
    field "mediaKey"   $ resolve $-> mediaKey
    field "bio"        $ resolve $-> bio
    field "twitter"    $ resolve $-> twitter
    field "facebook"   $ resolve $-> facebook
    field "googlePlus" $ resolve $-> googlePlus
    field "url"        $ resolve $-> url

    field "posts" $ do
      describe "all posts published by this author"
      limit  <- arg "limit"  |= 30
      offset <- arg "offset" |= 0
      resolve $->> \v -> do
        let uid = fromIntegral . unwrapId $ userId v :: Double
        ids <- Post.range Post.AUTHOR_ID uid uid limit offset
        traverse Post.get ids

-- | Root query mixin

mixin :: ObjectFragment Haxl a
mixin = do

  describe "Implements the User mixin"

  field "user" $ do
    describe "Retrieves a single user by id"
    userId <- arg "id"
    lift $ get userId

-- | User ID Scalar

newtype Id = Id { unwrapId :: Int } deriving (Eq, Show, Typeable)

instance GraphQLScalar Id where
  serialize (Id x) = serialize x
  deserialize = fmap Id . deserialize

instance GraphQLValue Haxl Id
instance GraphQLType SCALAR Haxl Id where
  def = defineScalar "ID" ""

-- | Haxl implementation

data UserReq a where
  GetUser :: Id -> UserReq (Maybe User)
  deriving (Typeable)

deriving instance Eq   (UserReq a)
deriving instance Show (UserReq a)

instance Show1 UserReq where show1 = show

instance Hashable (UserReq a) where
  hashWithSalt s (GetUser (Id i)) = hashWithSalt s (0::Int, i)

-- State store
instance StateKey UserReq where
  data State UserReq = UserState
    { awsEnv    :: AWS.Env
    , tableName :: T.Text
    }

initState :: AWS.Env -> T.Text -> State UserReq
initState e n = UserState
  { awsEnv    = e
  , tableName = n
  }

-- Data source

instance DataSourceName UserReq where
  dataSourceName _ = "User Source (DynamoDB)"

instance DataSource BustleEnv UserReq where
  fetch st _flags _benv bfs = AsyncFetch $ \inner -> do
      asyncReq <- async $ runResourceT $ AWS.runAWS e $ do
        let userReqs = map getUserReqs bfs
        unless (null userReqs) $ do
          let kaa = keysAndAttributes
                  $ NonEmpty.fromList
                  $ map toDynamoKey userReqs
              bgi = batchGetItem
                  & bgiRequestItems
                 .~ HashMap.singleton t kaa
          res <- AWS.send bgi
          mapM_ (resolveUserReq $ HashMap.fromList userReqs)
              $ (res^.bgirsResponses) ! t
      inner
      wait asyncReq
    where e = awsEnv    st
          t = tableName st

-- auto-gen bullshit handling

getUserReqs :: BlockedFetch UserReq -> (Int, ResultVar (Maybe User))
getUserReqs (BlockedFetch (GetUser (Id i)) rvar) = (i, rvar)

toDynamoKey :: (Int, a) -> HashMap T.Text AttributeValue
toDynamoKey (i, _) = HashMap.singleton "id"
                   $ attributeValue & avN .~ (Just $ T.pack $ show i)

resolveUserReq :: (MonadIO m)
               => HashMap Int (ResultVar (Maybe User))
               -> HashMap T.Text AttributeValue
               -> m ()
resolveUserReq rvars attrs
    | Just i <- attr "id" avN >>= parseInt =
        liftIO $ putSuccess (rvars ! i)
               $ makeU i <$> (attr "name" avS)
                         <*> (attr "role" avN >>= parseInt)
    | otherwise = return ()
  where attr k l = HashMap.lookup k attrs >>= (^. l)
        makeU i n r = User
          { userId     = Id i
          , name       = n
          , userRole   = r
          , mediaKey   = attr "media_key"  avS
          , bio        = attr "bio"        avS
          , twitter    = attr "twitter"    avS
          , facebook   = attr "facebook"   avS
          , googlePlus = attr "googlePlus" avS
          , url        = attr "url"        avS
          }

parseInt :: T.Text -> Maybe Int
parseInt t = case TR.decimal t of
                  Right (i, _) -> Just i
                  _            -> Nothing


text:
Web Crawler on Go

## Usage
Parse site:
```go run main.go run --url={site-url}```

Get help:
```go run main.go```

## State
Crawler is work in progress. The software is by no means ready.

## Contributions

Contributions are welcome.


text:
from factory import DjangoModelFactory, post_generation, SubFactory

from formlibrary.models import (
    Beneficiary as BeneficiaryM,
    CustomForm as CustomFormM
)
from .workflow_models import (Organization,)

class Beneficiary(DjangoModelFactory):
    class Meta:
        model = BeneficiaryM

    beneficiary_name = 'Julian Lennon'
    father_name = 'John Lennon'

    @post_generation
    def workflowlevel1(self, create, extracted, **kwargs):
        if not create:
            # Simple build, do nothing.
            return

        if extracted:
            # A list of workflowlevel1 were passed in, use them
            for workflowlevel1 in extracted:
                self.workflowlevel1.add(workflowlevel1)

class CustomForm(DjangoModelFactory):
    class Meta:
        model = CustomFormM

    name = 'Custom Form A'
    organization = SubFactory(Organization)
    public = {'org': False, 'url': False}


text:
layout: post
Title : "Travaux de la commission Sports et santé"
---

## 2014-2015

Le groupe « Sports et santé » a présenté plusieurs aménagements sportifs existants sur Open Street map. Découvrez leur présentation et leur projet sur Open Street map en [cliquant ici](http://www.gironde.fr/jcms/cgw_81142/cdj-2015-commission-sports-et-sante).

## 2012-2013

Le groupe Sports a été retenu, dans le cadre d'un appel à projets national (Sénat, Ministère des sports, de la jeunesse, de l'éducation populaire et de la vie associative, Ligue nationale de rugby, Fédération française de rugby, AFCAM, La Poste, Crédit mutuel), autour de la thématique « Sport et citoyenneté ». Dans ce cadre, il s'est agi de réaliser une vidéo de promotion "L'esprit du jeu" des comportements respectueux et citoyens sur le terrain et hors du terrain.

## 2011-2012

Le groupe Sports a réalisé « Ze guide », relatif aux sports de nature qui peuvent être pratiqués dans le périmètre géographique des collèges girondins. Les premières fiches sont celles des collèges d'Andernos et de Lège Cap-Ferret. Cette action s'inscrit dans la compétence départementale des sports de nature (Commission Départementale des Espaces, Sites et Itinéraires). [Consultez les premières fiches](http://www.gironde.fr/jcms/c_16032/ze-guide-exemple-college-andernos).

## 2010-2011

Le groupe Sports a réalisé un [Jeu-Quizz](http://www.gironde.fr/jcms/c_13343/quizz-cgj-sport-et-sante) pour sensibiliser les jeunes aux bienfaits de la pratique du sport.

## 2009-2010

Le groupe a réalisé un court-métrage « Le sport au second degré » sur les dotations départementales et l'accès aux équipements sportifs des collèges, pour expliquer les disparités éventuelles entre les établissements scolaires.

## 2008-2009

Le groupe Sports a participé à l'organisation du [Raid nature collégiens](http://www.gironde.fr/jcms/c_9190/cgj-commission-sport-2009) qui a eu lieu le 10 juin 2009 au Domaine départemental Gérard LAGORS, à Hostens (voir sur [osm](http://osm.org/go/b~_QazMB-?layers=T&node=736905926). Vous pouvez également découvrir une [galerie photos](http://cg33.systonic.net/galeries/raid_nature/index.html) du Raid nature collégiens. Ils ont également rencontré une sportive de haut niveau, Myriam Borg-Korfanty. Vous pouvez [consulter la vidéo](http://cg33.systonic.net/myriam_borg.htm) de cette rencontre.

## 2005-2006

Le groupe Sports a réalisé un [livret d'informations](http://www.gironde.fr/jcms/c_11966/livret-information) et un jeu pour s'informer en s'amusant sur les bonnes pratiques et l'hygiène de vie liées au sport. Se joue à partir de 13 ans, de 3 à 6 joueurs. Pour jouer, télécharger et imprimer la [règle du jeu](http://www.gironde.fr/jcms/c_13509/regle-jeu-sportif) ainsi que les [planches de plateaux et de cartes à jouer](http://www.gironde.fr/jcms/c_12958/plateau-jeu). Pour pour chacune des cartes, imprimer le nombre d'exemplaires indiqué. Astuce : pour les rigidifier, les plastifier ou les imprimer sur du bristol. Découper ensuite les cartes.


text:
package org.apache.olingo.fit.proxy;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import java.lang.reflect.Proxy;
import java.sql.Timestamp;
import java.util.Calendar;

import org.apache.commons.lang3.RandomUtils;
import org.apache.olingo.ext.proxy.api.ComplexType;
import org.apache.olingo.ext.proxy.api.EntityCollection;
import org.apache.olingo.ext.proxy.api.EntityType;
import org.apache.olingo.ext.proxy.commons.ComplexInvocationHandler;
import org.apache.olingo.ext.proxy.commons.EntityCollectionInvocationHandler;
import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler;
import org.apache.olingo.fit.proxy.staticservice.odatawcfservice.InMemoryEntities;
import org.apache.olingo.fit.proxy.staticservice.odatawcfservice.types.Account;
import org.apache.olingo.fit.proxy.staticservice.odatawcfservice.types.Address;
import org.apache.olingo.fit.proxy.staticservice.odatawcfservice.types.Customer;
import org.apache.olingo.fit.proxy.staticservice.odatawcfservice.types.Order;
import org.apache.olingo.fit.proxy.staticservice.odatawcfservice.types.OrderCollection;
import org.apache.olingo.fit.proxy.staticservice.odatawcfservice.types.PaymentInstrument;
import org.apache.olingo.fit.proxy.staticservice.odatawcfservice.types.PaymentInstrumentCollection;
// CHECKSTYLE:ON (Maven checkstyle)
import org.junit.Test;

public class ChangeDetectionTestITCase extends AbstractTestITCase {

  @Test
  public void entityUnchangedOnGetProperty() {
    final Customer customer = getContainer().getCustomers().getByKey(1).load();
    assertFalse(isChanged(customer));

    customer.getLastName();

    assertFalse(isChanged(customer));
  }

  @Test
  public void entityChangedOnSetProperty() {
    final Customer customer = getContainer().getCustomers().getByKey(1).load();
    assertFalse(isChanged(customer));

    customer.setLastName("Test");

    assertTrue(isChanged(customer));

    getContainer().flush();
    assertFalse(isChanged(customer));
  }

  @Test
  public void entityUnchangedOnGetComplexProperty() {
    final Customer customer = getContainer().getCustomers().getByKey(1).load();
    assertFalse(isChanged(customer));

    final Address homeAddress = customer.getHomeAddress();
    assertFalse(isChanged(customer));

    homeAddress.getCity();
    assertFalse(isChanged(homeAddress));
    assertFalse(isChanged(customer));
  }

  @Test
  public void entityChangedOnSetComplexProperty() {
    final Customer customer = getContainer().getCustomers().getByKey(2).load();
    assertFalse(isChanged(customer));

    final Address newAdress = getContainer().newComplexInstance(Address.class);
    customer.setHomeAddress(newAdress);

    assertTrue(isChanged(customer));

    getContainer().flush();
    assertFalse(isChanged(customer));
  }

  @Test
  public void entityChangedOnSetPropertyOfComplexProperty() {
    final Customer customer = getContainer().getCustomers().getByKey(1).load();
    assertFalse(isChanged(customer));

    final Address homeAddress = customer.getHomeAddress();
    homeAddress.setCity("Test");

    assertTrue(isChanged(customer));

    getContainer().flush();
    assertFalse(isChanged(customer));
  }

  @Test
  public void entityUnchangedOnGetNavigationProperty() {
    final Customer customer = getContainer().getCustomers().getByKey(1).load();
    assertFalse(isChanged(customer));

    customer.getOrders();

    assertFalse(isChanged(customer));
  }

  @Test
  public void entityChangedOnAddNavigationProperty() {
    final Account account = getContainer().getAccounts().getByKey(101).load();
    assertFalse(isChanged(account));

    final PaymentInstrumentCollection instruments = account.getMyPaymentInstruments().execute();
    assertFalse(isChanged(account));

    final PaymentInstrument instrument = getContainer().newEntityInstance(PaymentInstrument.class);
    final int id = RandomUtils.nextInt(101999, 105000);
    instrument.setPaymentInstrumentID(id);
    instrument.setFriendlyName("New one");
    instrument.setCreatedDate(new Timestamp(Calendar.getInstance().getTimeInMillis()));
    instruments.add(instrument);

    assertTrue(isChanged(instrument));
    assertFalse(isChanged(account));

    getContainer().flush();
    assertFalse(isChanged(instrument));
  }

  @Test
  public void entityCollectionUnchangedOnGet() {
    final Customer customer = getContainer().getCustomers().getByKey(1).load();
    assertFalse(isChanged(customer));

    final OrderCollection orders = customer.getOrders().execute();
    assertFalse(isChanged(customer));

    for (Order order : orders) {
      assertFalse(isChanged(order));
      order.getOrderDate();
      assertFalse(isChanged(order));
    }

    assertFalse(isChanged(customer));
  }

  protected InMemoryEntities getContainer() {
    return container;
  }

  protected boolean isChanged(final EntityType<?> entity) {
    EntityInvocationHandler invocationHandler = getInvocationHandler(entity);
    return invocationHandler.isChanged();
  }

  protected boolean isChanged(final ComplexType<?> complex) {
    ComplexInvocationHandler invocationHandler = getInvocationHandler(complex);
    return invocationHandler.isChanged();
  }

  protected EntityInvocationHandler getInvocationHandler(final EntityType<?> entity) {
    return (EntityInvocationHandler) Proxy.getInvocationHandler(entity);
  }

  protected ComplexInvocationHandler getInvocationHandler(final ComplexType<?> complex) {
    return (ComplexInvocationHandler) Proxy.getInvocationHandler(complex);
  }

  protected EntityCollectionInvocationHandler<?> getInvocationHandler(
      final EntityCollection<?, ?, ?> complex) {
    return (EntityCollectionInvocationHandler<?>) Proxy.getInvocationHandler(complex);
  }
}


text:
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class DpiConfig {
	public String m_strName;
	public String m_strSource;
	public String m_strSeperator;
	public List<String> m_listFields;

	public DpiConfig(String name, String source, String seperator){
		m_strName = name;
		m_strSource = source;
		m_strSeperator = seperator;
		m_listFields = new ArrayList<String>();
	}

	public void setFieldIndex(String name, String index, String encode, String type){
		m_listFields.add(name);
		m_listFields.add(index);
		m_listFields.add(encode);
		m_listFields.add(type);
	}
}


text:
mkdir /tmp/packer
wget -P /tmp/packer https://dl.bintray.com/mitchellh/packer/0.6.1_linux_amd64.zip
sudo apt-get --assume-yes install unzip
sudo unzip /tmp/packer/0.6.1_linux_amd64.zip -d /usr/local/packer
rm /tmp/packer/*
rmdir /tmp/packer
echo "export PATH=$PATH:/usr/local/packer" | sudo tee /etc/profile.d/packer.sh
sudo chmod a+x /etc/profile.d/packer.sh


text:
<?php
/**
 * @link https://github.com/pgrzelka/yii2-firephp
 * @author Piotr Grzelka
 * fixed code in collect so that no additional application message is added
 * @license MIT
 */

namespace app\components\log;

use Yii;
use yii\base\InvalidConfigException;
use yii\helpers\FileHelper;
use yii\log\Logger;
use yii\log\Target;

/**
 *
 */
class FirePHPTarget extends Target
{

    /**
     * Initializes the route.
     * This method is invoked after the route is created by the route manager.
     */
    public function init()
    {
        parent::init();
    }

    /**
     * Processes the given log messages.
     * This method will filter the given messages with [[levels]] and [[categories]].
     * And if requested, it will also export the filtering result to specific medium (e.g. email).
     * @param array $messages log messages to be processed. See [[Logger::messages]] for the structure
     * of each message.
     * @param boolean $final whether this method is called at the end of the current application
     */
    public function collect($messages, $final)
    {
        $this->messages = array_merge($this->messages, $this->filterMessages($messages, $this->getLevels(), $this->categories, $this->except));
        $count = count($this->messages);

        if ($count > 0 && ($final || $this->exportInterval > 0 && $count >= $this->exportInterval)) {
            // removed from the src of Target otherwise i always get an additional message log
            // if (($context = $this->getContextMessage()) !== '') {
            //     $this->messages[] = [$context, Logger::LEVEL_INFO, 'application', YII_BEGIN_TIME];
            // }
            // set exportInterval to 0 to avoid triggering export again while exporting
            $oldExportInterval = $this->exportInterval;
            $this->exportInterval = 0;
            $this->export();
            $this->exportInterval = $oldExportInterval;

            $this->messages = [];
        }
    }

    /**
     * Writes log messages to FirePHP.
     */
    public function export()
    {
        $firephp = \FirePHP::getInstance(true);

        try {
            foreach ($this->messages as $message) {
                if (true) {
                    switch ($message[1]) {
                        case Logger::LEVEL_ERROR:
                            $firephp->error($message[0], $message[2]);
                            break;
                        case Logger::LEVEL_WARNING:
                            $firephp->warn($message[0], $message[2]);
                            break;
                        case Logger::LEVEL_INFO:
                            $firephp->info($message[0], $message[2]);
                            break;
                        case Logger::LEVEL_TRACE:
                            $firephp->log($message[0], $message[2]);
                            break;
                        default:
                            $firephp->log($message[0], $message[2]);
                            break;
    //                    case Logger::LEVEL_PROFILE:
    //                        $firephp->log($message[0], $message[2]);
    //                        break;
    //                    case Logger::LEVEL_PROFILE_BEGIN:
    //                        $firephp->log($message[0], $message[2]);
    //                        break;
    //                    case Logger::LEVEL_PROFILE_END:
    //                        $firephp->log($message[0], $message[2]);
    //                        break;
                    }
                }
            }
        } catch (\Exception $e) {
            echo $e->getMessage();
        }
    }

}


text:
import Distribution.Simple.Setup (CopyDest(..),ConfigFlags(..),BuildFlags(..),
                                  CopyFlags(..),RegisterFlags(..),InstallFlags(..),
                                  defaultRegisterFlags,fromFlagOrDefault,Flag(..),
                                  defaultCopyFlags)
import Distribution.Simple
import Distribution.Simple.LocalBuildInfo (absoluteInstallDirs)
import Distribution.PackageDescription (PackageDescription(..))
import Distribution.Simple.InstallDirs
                            (InstallDirs(..))
import Distribution.Simple.Utils
import Distribution.Verbosity
import Data.List (isPrefixOf)
import Data.Version
import Control.Monad (unless)
import System.Posix
import System.Directory
import System.Info (os)
import System.FilePath

main = defaultMainWithHooks sindreHooks
sindreHooks = simpleUserHooks { postInst = sindrePostInst
                              , postCopy = sindrePostCopy }

sindre = "sindre"

isWindows :: Bool
isWindows = os == "mingw" -- XXX

subst :: String -> String -> String -> String
subst t r [] = []
subst t r s@(c:s')
  | t `isPrefixOf` s = r ++ subst t r (drop (length t) s)
  | otherwise = c : subst t r s'

sindrePostInst a (InstallFlags { installPackageDB = db, installVerbosity = v }) =
  sindrePostCopy a (defaultCopyFlags { copyDest = Flag NoCopyDest, copyVerbosity = v })

sindrePostCopy a (CopyFlags { copyDest = cdf, copyVerbosity = vf }) pd lbi =
  do let v         = fromFlagOrDefault normal vf
         cd        = fromFlagOrDefault NoCopyDest cdf
         dirs      = absoluteInstallDirs pd lbi cd
         bin       = combine (bindir dirs)
         substVersion = subst "VERSION" $ showVersion $ packageVersion $ package pd
     unless isWindows $ do
       copyFileVerbose v "sinmenu" (bin "sinmenu")
       fs <- getFileStatus (bin "sindre")
       setFileMode (bin "sinmenu") $ fileMode fs
       putStrLn $ "Installing manpage in " ++ mandir dirs
       createDirectoryIfMissing True $ mandir dirs `combine` "man1"
       withFileContents "sindre.1" $
         writeFileAtomic (mandir dirs `combine` "man1" `combine` "sindre.1") . substVersion
       withFileContents "sinmenu.1" $
         writeFileAtomic (mandir dirs `combine` "man1" `combine` "sinmenu.1") . substVersion


text:
<?php

namespace AppBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use AppBundle\Entity\Repositories;

class RequisiteHistoricalController extends Controller
{
    /**
     * show a public requisite historical
     *
     * @param $historical_id
     * @return \Symfony\Component\HttpFoundation\Response
     * @throws NotFoundHttpException
     */
    public function showAction($historical_id)
    {
        $user = $this->getUser();

        $requisiteHistorical = $this->getDoctrine()->getRepository('AppBundle:RequisiteHistorical')->find($historical_id);

        if (!$requisiteHistorical) {
            throw new NotFoundHttpException('Requisite historical not found');
        }

        return $this->render('AppBundle:RequisiteHistorical:show.html.twig', array(
            'historical' => $requisiteHistorical,
        ));
    }
}


text:
package com.google.appengine.datanucleus.test.jdo;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class EmbeddedParentPC {
  @PrimaryKey
  @Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY)
  private Key primaryKey;

  @Persistent(embedded="true")
  private EmbeddedChildPC child;

  public void setChild(EmbeddedChildPC child) {
    this.child = child;
  }

  public EmbeddedChildPC getChild() {
    return child;
  }
}


text:
package net.eusashead.hateoas.hal.http.converter;

import static net.eusashead.hateoas.hal.http.converter.HalHttpMessageConverter.CHARSET;
import static net.eusashead.hateoas.hal.http.converter.HalHttpMessageConverter.HAL_JSON;
import static net.eusashead.hateoas.hal.http.converter.HalHttpMessageConverter.HAL_XML;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppContextSetup;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.web.context.WebApplicationContext;

import com.theoryinpractise.halbuilder.api.ReadableRepresentation;

@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration(classes={WebConfig.class})
public class RepresentationControllerTest {

	// Root of all absolute URLs
	private static final String ABSOLUTE_URL_ROOT = "http://localhost";

	@Autowired
	private WebApplicationContext ctx;

	@Test
	public void testRepresentationJson() throws Exception {
		MvcResult result = webAppContextSetup(ctx).build().
				perform(get(ABSOLUTE_URL_ROOT + "/representation/basket").accept(HAL_JSON).
						characterEncoding(CHARSET.toString()).
						contentType(HAL_JSON)).
						andExpect(status().isOk()).andReturn();
		Assert.assertEquals(HalTestUtils.stringFromFile("src/test/resources/basket.json"), result.getResponse().getContentAsString());
	}

	@Test
	public void testRepresentationXml() throws Exception {
		MvcResult result = webAppContextSetup(ctx).build().
				perform(get(ABSOLUTE_URL_ROOT + "/representation/basket").accept(HAL_XML).
						characterEncoding(CHARSET.toString()).
						contentType(HAL_XML)).
						andExpect(status().isOk()).andReturn();
		Assert.assertEquals(HalTestUtils.stringFromFile("src/test/resources/basket.xml"), result.getResponse().getContentAsString());
	}

	@Test
	public void testRepresentationResponseEntityJson() throws Exception {
		MvcResult result = webAppContextSetup(ctx).build().
				perform(get(ABSOLUTE_URL_ROOT + "/representation/responseentity").accept(HAL_JSON).
						characterEncoding(CHARSET.toString()).
						contentType(HAL_JSON)).
						andExpect(status().isOk()).andReturn();
		Assert.assertEquals(HalTestUtils.stringFromFile("src/test/resources/basket.json"), result.getResponse().getContentAsString());
	}

	@Test
	public void testRepresentationResponseEntityXml() throws Exception {
		MvcResult result = webAppContextSetup(ctx).build().
				perform(get(ABSOLUTE_URL_ROOT + "/representation/responseentity").accept(HAL_XML).
						characterEncoding(CHARSET.toString()).
						contentType(HAL_XML)).
						andExpect(status().isOk()).andReturn();
		Assert.assertEquals(HalTestUtils.stringFromFile("src/test/resources/basket.xml"), result.getResponse().getContentAsString());
	}

	@Test
	public void bollocks() {
		ReadableRepresentation rep = HalTestUtils.halFromFile("src/test/resources/basket.xml");
		System.out.println(rep.toString("application/hal+json"));
	}

}


text:
package br.com.eduardofbs.plexcleaner.model;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;

public class Directory {

	private int allowSync;

	private String art;

	private String composite;

	private int filters;

	private int refreshing;

	private String thumb;

	private String key;

	private String type;

	private String title;

	private String agent;

	private String scanner;

	private String language;

	private String uuid;

	private long updatedAt;

	private long createdAt;

	private Location location;

	public int getAllowSync() {
		return allowSync;
	}

	@XmlAttribute(name = "allowSync")
	public void setAllowSync(int allowSync) {
		this.allowSync = allowSync;
	}

	public String getArt() {
		return art;
	}

	@XmlAttribute(name = "art")
	public void setArt(String art) {
		this.art = art;
	}

	public String getComposite() {
		return composite;
	}

	@XmlAttribute(name = "composite")
	public void setComposite(String composite) {
		this.composite = composite;
	}

	public int getFilters() {
		return filters;
	}

	@XmlAttribute(name = "filters")
	public void setFilters(int filters) {
		this.filters = filters;
	}

	public int getRefreshing() {
		return refreshing;
	}

	@XmlAttribute(name = "refreshing")
	public void setRefreshing(int refreshing) {
		this.refreshing = refreshing;
	}

	public String getThumb() {
		return thumb;
	}

	@XmlAttribute(name = "thumb")
	public void setThumb(String thumb) {
		this.thumb = thumb;
	}

	public String getKey() {
		return key;
	}

	@XmlAttribute(name = "key")
	public void setKey(String key) {
		this.key = key;
	}

	public String getType() {
		return type;
	}

	@XmlAttribute(name = "type")
	public void setType(String type) {
		this.type = type;
	}

	public String getTitle() {
		return title;
	}

	@XmlAttribute(name = "title")
	public void setTitle(String title) {
		this.title = title;
	}

	public String getAgent() {
		return agent;
	}

	@XmlAttribute(name = "agent")
	public void setAgent(String agent) {
		this.agent = agent;
	}

	public String getScanner() {
		return scanner;
	}

	@XmlAttribute(name = "scanner")
	public void setScanner(String scanner) {
		this.scanner = scanner;
	}

	public String getLanguage() {
		return language;
	}

	@XmlAttribute(name = "language")
	public void setLanguage(String language) {
		this.language = language;
	}

	public String getUuid() {
		return uuid;
	}

	@XmlAttribute(name = "uuid")
	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public long getUpdatedAt() {
		return updatedAt;
	}

	@XmlAttribute(name = "updatedAt")
	public void setUpdatedAt(long updatedAt) {
		this.updatedAt = updatedAt;
	}

	public long getCreatedAt() {
		return createdAt;
	}

	@XmlAttribute(name = "createdAt")
	public void setCreatedAt(long createdAt) {
		this.createdAt = createdAt;
	}

	public Location getLocation() {
		return location;
	}

	@XmlElement(name = "Location")
	public void setLocation(Location location) {
		this.location = location;
	}

	@Override
	public String toString() {
		return "Directory [allowSync=" + allowSync + ", art=" + art + ", composite=" + composite + ", filters="
				+ filters + ", refreshing=" + refreshing + ", thumb=" + thumb + ", key=" + key + ", type=" + type
				+ ", title=" + title + ", agent=" + agent + ", scanner=" + scanner + ", language=" + language
				+ ", uuid=" + uuid + ", updatedAt=" + updatedAt + ", createdAt=" + createdAt + ", location=" + location
				+ "]";
	}

}


text:
#include <string>
#include <sframe_query_engine/operators/operator_properties.hpp>
#include <sframe_query_engine/operators/operator_properties.hpp>
#include <sframe_query_engine/operators/all_operators.hpp>
#include <sframe_query_engine/planning/planner_node.hpp>
#include <sframe_query_engine/query_engine_lock.hpp>
#include <dot_graph_printer/dot_graph.hpp>
#include <logger/assertions.hpp>

namespace graphlab {
namespace query_eval {

template <template <planner_node_type PType> class FieldExtractionVisitor,
          class RetType, class... CallArgs>
RetType extract_field(planner_node_type ptype, CallArgs... call_args) {

  switch(ptype) {
    case planner_node_type::CONSTANT_NODE:
      return FieldExtractionVisitor<planner_node_type::CONSTANT_NODE>::get(call_args...);
    case planner_node_type::APPEND_NODE:
      return FieldExtractionVisitor<planner_node_type::APPEND_NODE>::get(call_args...);
    case planner_node_type::BINARY_TRANSFORM_NODE:
      return FieldExtractionVisitor<planner_node_type::BINARY_TRANSFORM_NODE>::get(call_args...);
    case planner_node_type::LOGICAL_FILTER_NODE:
      return FieldExtractionVisitor<planner_node_type::LOGICAL_FILTER_NODE>::get(call_args...);
    case planner_node_type::PROJECT_NODE:
      return FieldExtractionVisitor<planner_node_type::PROJECT_NODE>::get(call_args...);
    case planner_node_type::RANGE_NODE:
      return FieldExtractionVisitor<planner_node_type::RANGE_NODE>::get(call_args...);
    case planner_node_type::SARRAY_SOURCE_NODE:
      return FieldExtractionVisitor<planner_node_type::SARRAY_SOURCE_NODE>::get(call_args...);
    case planner_node_type::SFRAME_SOURCE_NODE:
      return FieldExtractionVisitor<planner_node_type::SFRAME_SOURCE_NODE>::get(call_args...);
    case planner_node_type::TRANSFORM_NODE:
      return FieldExtractionVisitor<planner_node_type::TRANSFORM_NODE>::get(call_args...);
    case planner_node_type::GENERALIZED_TRANSFORM_NODE:
      return FieldExtractionVisitor<planner_node_type::GENERALIZED_TRANSFORM_NODE>::get(call_args...);
    case planner_node_type::LAMBDA_TRANSFORM_NODE:
      return FieldExtractionVisitor<planner_node_type::LAMBDA_TRANSFORM_NODE>::get(call_args...);
    case planner_node_type::UNION_NODE:
      return FieldExtractionVisitor<planner_node_type::UNION_NODE>::get(call_args...);
    case planner_node_type::REDUCE_NODE:
      return FieldExtractionVisitor<planner_node_type::REDUCE_NODE>::get(call_args...);
    case planner_node_type::GENERALIZED_UNION_PROJECT_NODE:
      return FieldExtractionVisitor<planner_node_type::GENERALIZED_UNION_PROJECT_NODE>::get(call_args...);
    case planner_node_type::TERNARY_OPERATOR:
      return FieldExtractionVisitor<planner_node_type::TERNARY_OPERATOR>::get(call_args...);
    case planner_node_type::IDENTITY_NODE:
      return FieldExtractionVisitor<planner_node_type::IDENTITY_NODE>::get(call_args...);
    case planner_node_type::INVALID:
      ASSERT_MSG(false, "Infering type of an invalid node");
      return RetType();
  }

  return RetType();
}

////////////////////////////////////////////////////////////////////////////////

template <planner_node_type PType> struct visitor_infer_type {
  static std::vector<flex_type_enum> get(pnode_ptr p) {
    return operator_impl<PType>::infer_type(p);
  }
};

std::vector<flex_type_enum> infer_planner_node_type(pnode_ptr pnode) {
  std::lock_guard<recursive_mutex> GLOBAL_LOCK(global_query_lock);

  if (pnode->any_operator_parameters.count("__type_memo__")) {
    return pnode->any_operator_parameters["__type_memo__"].as<std::vector<flex_type_enum>>();
  }

  std::vector<flex_type_enum> retval
      = extract_field<visitor_infer_type, std::vector<flex_type_enum> >(pnode->operator_type, pnode);

  if(!retval.empty())
    pnode->any_operator_parameters["__type_memo__"] = retval;

  return retval;
};

////////////////////////////////////////////////////////////////////////////////

template <planner_node_type PType> struct visitor_infer_length {
  static int64_t get(pnode_ptr p) {
    return operator_impl<PType>::infer_length(p);
  }
};

int64_t infer_planner_node_length(pnode_ptr pnode) {
  std::lock_guard<recursive_mutex> GLOBAL_LOCK(global_query_lock);

  if (pnode->any_operator_parameters.count("__length_memo__")) {
    return pnode->any_operator_parameters["__length_memo__"].as<int64_t>();
  }

  int64_t retval = extract_field<visitor_infer_length, int64_t>(pnode->operator_type, pnode);

  if (retval != -1)
    pnode->any_operator_parameters["__length_memo__"] = retval;

  return retval;
}

////////////////////////////////////////////////////////////////////////////////

size_t infer_planner_node_num_output_columns(pnode_ptr pnode) {
  return infer_planner_node_type(pnode).size();
}

////////////////////////////////////////////////////////////////////////////////

static void _fill_dependency_set(pnode_ptr tip, std::set<pnode_ptr>& seen_nodes) {

  if(!seen_nodes.count(tip)) {
    seen_nodes.insert(tip);

    for(pnode_ptr input : tip->inputs) {
      _fill_dependency_set(input, seen_nodes);
    }
  }
}

/** Returns the number of nodes in this planning graph, including pnode.
 */
size_t infer_planner_node_num_dependency_nodes(std::shared_ptr<planner_node> pnode) {
  std::lock_guard<recursive_mutex> GLOBAL_LOCK(global_query_lock);

  std::set<pnode_ptr> seen_node_memo;
  _fill_dependency_set(pnode, seen_node_memo);
  return seen_node_memo.size();
}

////////////////////////////////////////////////////////////////////////////////

template <planner_node_type PType> struct visitor_planner_to_operator {
  static std::shared_ptr<query_operator> get(pnode_ptr p) {
    return operator_impl<PType>::from_planner_node(p);
  }
};

std::shared_ptr<query_operator> planner_node_to_operator(pnode_ptr pnode) {

  return extract_field<visitor_planner_to_operator,
      std::shared_ptr<query_operator> >(pnode->operator_type, pnode);
}

////////////////////////////////////////////////////////////////////////////////

template <planner_node_type PType> struct visitor_get_name {
  static std::string get() {
    return operator_impl<PType>::name();
  }
};

/**  Get the name of the node from the type.
 */
std::string planner_node_type_to_name(planner_node_type ptype) {
  return  extract_field<visitor_get_name, std::string>(ptype);
}

////////////////////////////////////////////////////////////////////////////////

/**  Get the type of the node from the name.
 */
planner_node_type planner_node_name_to_type(const std::string& name) {

  static std::map<std::string, planner_node_type> name_to_type_map;

  if(name_to_type_map.empty()) {
    for(int i = 0; i < int(planner_node_type::INVALID); ++i) {
      planner_node_type t = static_cast<planner_node_type>(i);
      name_to_type_map[planner_node_type_to_name(t)] = t;
    }
  }

  auto it = name_to_type_map.find(name);

  if(it == name_to_type_map.end()) {
    ASSERT_MSG(false, (std::string("Operator name ") + name + " not found.").c_str());
  }

  return it->second;
}

////////////////////////////////////////////////////////////////////////////////

template <planner_node_type PType> struct visitor_get_attributes {
  static query_operator_attributes get() {
    return operator_impl<PType>::attributes();
  }
};

/**  Get the name of the node from the type.
 */
query_operator_attributes planner_node_type_to_attributes(planner_node_type ptype) {
  return  extract_field<visitor_get_attributes, query_operator_attributes>(ptype);
}

////////////////////////////////////////////////////////////////////////////////

/**  This operator consumes all inputs at the same rate, and there
 *  is exactly one row for every input row.
 */
bool consumes_inputs_at_same_rates(const query_operator_attributes& attributes) {
  return (attributes.num_inputs == 1
          || (attributes.attribute_bitfield & query_operator_attributes::LINEAR)
          || (attributes.attribute_bitfield & query_operator_attributes::SUB_LINEAR));
}

bool consumes_inputs_at_same_rates(const pnode_ptr& n) {
  return consumes_inputs_at_same_rates(planner_node_type_to_attributes(n->operator_type));
}

////////////////////////////////////////////////////////////////////////////////

/**  A collection of flags used in actually doing the query
 *   optimization.
 */
bool is_linear_transform(const query_operator_attributes& attributes) {
  return (consumes_inputs_at_same_rates(attributes)
          && !is_source_node(attributes)
          && (attributes.attribute_bitfield & query_operator_attributes::LINEAR));
}

bool is_linear_transform(const pnode_ptr& n) {
  return is_linear_transform(planner_node_type_to_attributes(n->operator_type));
}

////////////////////////////////////////////////////////////////////////////////

/**  This operator consumes all inputs at the same rate, but reduces
 *   the rows in the output.
 */
bool is_sublinear_transform(const query_operator_attributes& attributes) {
  return (consumes_inputs_at_same_rates(attributes)
          && !is_source_node(attributes)
          && (attributes.attribute_bitfield & query_operator_attributes::SUB_LINEAR));
}

bool is_sublinear_transform(const pnode_ptr& n) {
  return is_sublinear_transform(planner_node_type_to_attributes(n->operator_type));
}

////////////////////////////////////////////////////////////////////////////////

/**  This operator is a source node.
 */
bool is_source_node(const query_operator_attributes& attributes) {
  return attributes.attribute_bitfield & query_operator_attributes::SOURCE;
}

/**  This operator is a source node.
 */
bool is_source_node(const pnode_ptr& n) {
  return is_source_node(planner_node_type_to_attributes(n->operator_type));
}

////////////////////////////////////////////////////////////////////////////////

static size_t _propagate_parallel_slicing(
    const pnode_ptr& n, std::map<pnode_ptr, size_t>& visited, size_t& counter) {

  auto it = visited.find(n);
  if(it != visited.end())
    return it->second;

  if(is_source_node(n)) {
    return 1;
  }

  bool linear = is_linear_transform(n);
  bool sublinear = is_sublinear_transform(n);
  if(linear || sublinear) {
    ASSERT_FALSE(n->inputs.empty());

    size_t input_consumption = _propagate_parallel_slicing(n->inputs.front(), visited, counter);
    if(input_consumption == size_t(-1))
      return size_t(-1);

    for(size_t i = 1; i < n->inputs.size(); ++i) {
      size_t i_c = _propagate_parallel_slicing(n->inputs[i], visited, counter);
      if(i_c == size_t(-1) || i_c != input_consumption) {
        return size_t(-1);
      }
    }

    if(sublinear) {
      // A new value, as this does not preserve the ability to do parallel slicing.
      ++counter;
      visited[n] = counter;
      return counter;
    } else {
      return input_consumption;
    }
  }

  // This node isn't something we know about.
  return size_t(-1);
}

/** Returns true if the output of this node can be parallel sliceable
 *  by the sources on this block, and false otherwise.
 */
bool is_parallel_slicable(const pnode_ptr& n) {
  std::map<pnode_ptr, size_t> memoizer;
  size_t counter = 1;

  return _propagate_parallel_slicing(n, memoizer, counter) != size_t(-1);
}

/** Returns a set of integers giving the different parallel slicable
 *  units for the inputs of a particular node. If
 */
std::vector<size_t> get_parallel_slicable_codes(const pnode_ptr& n) {
  std::map<pnode_ptr, size_t> memoizer;
  size_t counter = 1;

  std::vector<size_t> codes(n->inputs.size());
  for(size_t i = 0; i < codes.size(); ++i) {
    codes[i] = _propagate_parallel_slicing(n, memoizer, counter);
  }

  return codes;
}

bool _is_linear_graph(const pnode_ptr& n, std::map<pnode_ptr, bool>& memo) {
  if (memo.count(n)) {
    return memo[n];
  }
  bool ret = true;
  if (!is_linear_transform(n) && !is_source_node(n)) {
    ret = false;
  } else {
    for (const auto& input: n->inputs) {
      if (!is_linear_graph(input)) {
        ret = false;
        break;
      }
    }
  }
  memo[n] = ret;
  return ret;
}

bool is_linear_graph(const pnode_ptr& n) {
  std::map<pnode_ptr, bool> memo;
  bool ret = _is_linear_graph(n, memo);
  return ret;
}

/**************************************************************************/
/*                                                                        */
/*                           prove_equal_length                           */
/*                                                                        */
/**************************************************************************/

struct length_info {
  int64_t source_length; // -1 if unkown
  void* source_node; // if length is unknown this contains a unique descriptor
                     // of the length
};
/*
 * This function returns for a given node, a "length_info" attribute.
 *  - length_info.source_length: The length of the node if known. -1 if not known
 *  - source_node: If the length is unkonwn, this contains a unique descriptor
 *                 of the length. i.e. if two differet nodes have the same
 *                 descriptor, they have the same length. But if they have
 *                 different descriptors, there is nothing we can say about
 *                 their lengths.
 */
static length_info propagate_length(
    const pnode_ptr& n, std::map<pnode_ptr, length_info>& visited) {
  auto it = visited.find(n);
  if(it != visited.end()) return it->second;

  auto inferred_length = infer_planner_node_length(n);
  if (inferred_length >= 0) {
    length_info li{inferred_length, nullptr};
    visited[n] = li;
    return li;
  }

  if(is_linear_transform(n)) {
    ASSERT_FALSE(n->inputs.empty());
    auto li = propagate_length(n->inputs.front(), visited);
    visited[n] = li;
    return li;
  } else {
    return length_info{-1, n.get()};
  }
}

std::pair<bool, bool> prove_equal_length(const std::shared_ptr<planner_node>& a,
                                         const std::shared_ptr<planner_node>& b) {
  std::map<pnode_ptr, length_info> visited;
  auto la = propagate_length(a, visited);
  auto lb = propagate_length(b, visited);
  if (la.source_length != -1 &&  lb.source_length != -1) {
    return {true, la.source_length == lb.source_length};
  } else if (la.source_length == -1 && lb.source_length == -1) {
    // if the source id is the same, we have proved they have
    // the same length. Otherwise, we can't really say if they are the same
    // length. (could be two different sources of the same size)
    return {la.source_node == lb.source_node, la.source_node == lb.source_node};
  } else {
    return {false, false};
  }
}

////////////////////////////////////////////////////////////////////////////////
// Stuff to deal with naming things.

template <planner_node_type PType> struct visitor_repr {
  static std::string get(pnode_ptr p, pnode_tagger& ft) {
    return operator_impl<PType>::repr(p, ft);
  }
};

// Choose a short name for the pnode to track things.
static std::string to_name(uint64_t i) {

  // 13 is enough to hold a 64 bit int.
  char c[16];

  size_t idx = 0;

  while(idx < 16) {
    c[idx] = 'A' + char(i % 26);
    ++idx;
    if(i < 26) break;
    i /= 26;
  }

  return std::string(c, idx);
}

// A basic function to print a node.
std::string planner_node_repr(const std::shared_ptr<planner_node>& node) {

  std::map<pnode_ptr, std::string> names;
  pnode_tagger get_tag = [&](pnode_ptr p) -> std::string {
    auto it = names.find(p);
    if(it == names.end()) {
      auto s = to_name(names.size());
      names[p] = s;
      return s;
    } else {
      return it->second;
    }
  };

  return get_tag(node) + ": " + extract_field<visitor_repr, std::string>(node->operator_type, node, get_tag);
}

// Recursively print all nodes below a current one.
static dot_graph& recursive_print_impl(const std::shared_ptr<planner_node>& node,
                                       std::map<pnode_ptr, std::string>& node_name_map,
                                       dot_graph& graph) {

  pnode_tagger get_tag = [&](pnode_ptr p) -> std::string {
    auto it = node_name_map.find(p);
    if(it == node_name_map.end()) {
      auto s = to_name(node_name_map.size());
      node_name_map[p] = s;
      return s;
    } else {
      return it->second;
    }
  };

  std::string vid = std::to_string((ptrdiff_t)(node.get()));

  std::string name = (get_tag(node) + ": "
                      + extract_field<visitor_repr, std::string>(node->operator_type, node, get_tag));

  bool added = graph.add_vertex(vid, name);
  // return if the vertex has already been added
  if (!added) return graph;

  for (auto input : node->inputs) {
    std::string srcvid = std::to_string((ptrdiff_t)(input.get()));
    graph.add_edge(srcvid, vid);
    recursive_print_impl(input, node_name_map, graph);
  }
  return graph;
}

std::ostream& operator<<(std::ostream& out,
                         const std::shared_ptr<planner_node>& node) {

  dot_graph graph;
  std::map<pnode_ptr, std::string> name_lookup;
  recursive_print_impl(node, name_lookup, graph);
  graph.print(out);
  return out;
}

} // namespace query_eval

} // namespace graphlab


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
javax.mail.util (JavaMail API documentation)
</TITLE>

<META NAME="date" CONTENT="2012-03-20">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

      Overview
    Package
      Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes

Package javax.mail.util

JavaMail API utility classes.

See:

          Description

Class Summary

ByteArrayDataSource
A DataSource backed by a byte array.

SharedByteArrayInputStream
A ByteArrayInputStream that implements the SharedInputStream interface,
 allowing the underlying byte array to be shared between multiple readers.

SharedFileInputStream
A SharedFileInputStream is a
 BufferedInputStream that buffers
 data from the file and supports the mark
 and reset methods.

Package javax.mail.util Description

JavaMail API utility classes.
This package specifies utility classes that are useful with
other JavaMail APIs.

      Overview
    Package
      Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV PACKAGE
 NEXT PACKAGE

  FRAMES
 NO FRAMES

  All Classes

Copyright © 2012 Oracle. All Rights Reserved.


text:
<?php

require_once('functions.php');

dump_dig_file();

?>


text:
<configuration>

   <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
      <encoder>
         <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
      </encoder>
   </appender>

   <logger name="no.trank.openpipe.jdbc">
      <level value="info"/>
   </logger>
   <logger name="org.apache.ws.jaxme">
      <level value="info"/>
   </logger>
   <logger name="org.springframework.transaction">
      <level value="info"/>
   </logger>
   <root>
      <level value="warn"/>
      <appender-ref ref="STDOUT"/>
   </root>
</configuration>


text:
//>>built
define("dojo/dnd/Source",["../_base/array","../_base/declare","../_base/kernel","../_base/lang","../dom-class","../dom-geometry","../mouse","../ready","../topic","./common","./Selector","./Manager"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c){
if(!_3.isAsync){
_8(0,function(){
var _d=["dojo/dnd/AutoSource","dojo/dnd/Target"];
require(_d);
});
}
var _e=_2("dojo.dnd.Source",_b,{isSource:true,horizontal:false,copyOnly:false,selfCopy:false,selfAccept:true,skipForm:false,withHandles:false,autoSync:false,delay:0,accept:["text"],generateText:true,constructor:function(_f,_10){
_4.mixin(this,_4.mixin({},_10));
var _11=this.accept;
if(_11.length){
this.accept={};
for(var i=0;i<_11.length;++i){
this.accept[_11[i]]=1;
}
}
this.isDragging=false;
this.mouseDown=false;
this.targetAnchor=null;
this.targetBox=null;
this.before=true;
this._lastX=0;
this._lastY=0;
this.sourceState="";
if(this.isSource){
_5.add(this.node,"dojoDndSource");
}
this.targetState="";
if(this.accept){
_5.add(this.node,"dojoDndTarget");
}
if(this.horizontal){
_5.add(this.node,"dojoDndHorizontal");
}
this.topics=[_9.subscribe("/dnd/source/over",_4.hitch(this,"onDndSourceOver")),_9.subscribe("/dnd/start",_4.hitch(this,"onDndStart")),_9.subscribe("/dnd/drop",_4.hitch(this,"onDndDrop")),_9.subscribe("/dnd/cancel",_4.hitch(this,"onDndCancel"))];
},checkAcceptance:function(_12,_13){
if(this==_12){
return !this.copyOnly||this.selfAccept;
}
for(var i=0;i<_13.length;++i){
var _14=_12.getItem(_13[i].id).type;
var _15=false;
for(var j=0;j<_14.length;++j){
if(_14[j] in this.accept){
_15=true;
break;
}
}
if(!_15){
return false;
}
}
return true;
},copyState:function(_16,_17){
if(_16){
return true;
}
if(arguments.length<2){
_17=this==_c.manager().target;
}
if(_17){
if(this.copyOnly){
return this.selfCopy;
}
}else{
return this.copyOnly;
}
return false;
},destroy:function(){
_e.superclass.destroy.call(this);
_1.forEach(this.topics,function(t){
t.remove();
});
this.targetAnchor=null;
},onMouseMove:function(e){
if(this.isDragging&&this.targetState=="Disabled"){
return;
}
_e.superclass.onMouseMove.call(this,e);
var m=_c.manager();
if(!this.isDragging){
if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay)){
var _18=this.getSelectedNodes();
if(_18.length){
m.startDrag(this,_18,this.copyState(_a.getCopyKeyState(e),true));
}
}
}
if(this.isDragging){
var _19=false;
if(this.current){
if(!this.targetBox||this.targetAnchor!=this.current){
this.targetBox=_6.position(this.current,true);
}
if(this.horizontal){
_19=(e.pageX-this.targetBox.x<this.targetBox.w/2)==_6.isBodyLtr(this.current.ownerDocument);
}else{
_19=(e.pageY-this.targetBox.y)<(this.targetBox.h/2);
}
}
if(this.current!=this.targetAnchor||_19!=this.before){
this._markTargetAnchor(_19);
m.canDrop(!this.current||m.source!=this||!(this.current.id in this.selection));
}
}
},onMouseDown:function(e){
if(!this.mouseDown&&this._legalMouseDown(e)&&(!this.skipForm||!_a.isFormElement(e))){
this.mouseDown=true;
this._lastX=e.pageX;
this._lastY=e.pageY;
_e.superclass.onMouseDown.call(this,e);
}
},onMouseUp:function(e){
if(this.mouseDown){
this.mouseDown=false;
_e.superclass.onMouseUp.call(this,e);
}
},onDndSourceOver:function(_1a){
if(this!==_1a){
this.mouseDown=false;
if(this.targetAnchor){
this._unmarkTargetAnchor();
}
}else{
if(this.isDragging){
var m=_c.manager();
m.canDrop(this.targetState!="Disabled"&&(!this.current||m.source!=this||!(this.current.id in this.selection)));
}
}
},onDndStart:function(_1b,_1c,_1d){
if(this.autoSync){
this.sync();
}
if(this.isSource){
this._changeState("Source",this==_1b?(_1d?"Copied":"Moved"):"");
}
var _1e=this.accept&&this.checkAcceptance(_1b,_1c);
this._changeState("Target",_1e?"":"Disabled");
if(this==_1b){
_c.manager().overSource(this);
}
this.isDragging=true;
},onDndDrop:function(_1f,_20,_21,_22){
if(this==_22){
this.onDrop(_1f,_20,_21);
}
this.onDndCancel();
},onDndCancel:function(){
if(this.targetAnchor){
this._unmarkTargetAnchor();
this.targetAnchor=null;
}
this.before=true;
this.isDragging=false;
this.mouseDown=false;
this._changeState("Source","");
this._changeState("Target","");
},onDrop:function(_23,_24,_25){
if(this!=_23){
this.onDropExternal(_23,_24,_25);
}else{
this.onDropInternal(_24,_25);
}
},onDropExternal:function(_26,_27,_28){
var _29=this._normalizedCreator;
if(this.creator){
this._normalizedCreator=function(_2a,_2b){
return _29.call(this,_26.getItem(_2a.id).data,_2b);
};
}else{
if(_28){
this._normalizedCreator=function(_2c){
var t=_26.getItem(_2c.id);
var n=_2c.cloneNode(true);
n.id=_a.getUniqueId();
return {node:n,data:t.data,type:t.type};
};
}else{
this._normalizedCreator=function(_2d){
var t=_26.getItem(_2d.id);
_26.delItem(_2d.id);
return {node:_2d,data:t.data,type:t.type};
};
}
}
this.selectNone();
if(!_28&&!this.creator){
_26.selectNone();
}
this.insertNodes(true,_27,this.before,this.current);
if(!_28&&this.creator){
_26.deleteSelectedNodes();
}
this._normalizedCreator=_29;
},onDropInternal:function(_2e,_2f){
var _30=this._normalizedCreator;
if(this.current&&this.current.id in this.selection){
return;
}
if(_2f){
if(this.creator){
this._normalizedCreator=function(_31,_32){
return _30.call(this,this.getItem(_31.id).data,_32);
};
}else{
this._normalizedCreator=function(_33){
var t=this.getItem(_33.id);
var n=_33.cloneNode(true);
n.id=_a.getUniqueId();
return {node:n,data:t.data,type:t.type};
};
}
}else{
if(!this.current){
return;
}
this._normalizedCreator=function(_34){
var t=this.getItem(_34.id);
return {node:_34,data:t.data,type:t.type};
};
}
this._removeSelection();
this.insertNodes(true,_2e,this.before,this.current);
this._normalizedCreator=_30;
},onDraggingOver:function(){
},onDraggingOut:function(){
},onOverEvent:function(){
_e.superclass.onOverEvent.call(this);
_c.manager().overSource(this);
if(this.isDragging&&this.targetState!="Disabled"){
this.onDraggingOver();
}
},onOutEvent:function(){
_e.superclass.onOutEvent.call(this);
_c.manager().outSource(this);
if(this.isDragging&&this.targetState!="Disabled"){
this.onDraggingOut();
}
},_markTargetAnchor:function(_35){
if(this.current==this.targetAnchor&&this.before==_35){
return;
}
if(this.targetAnchor){
this._removeItemClass(this.targetAnchor,this.before?"Before":"After");
}
this.targetAnchor=this.current;
this.targetBox=null;
this.before=_35;
if(this.targetAnchor){
this._addItemClass(this.targetAnchor,this.before?"Before":"After");
}
},_unmarkTargetAnchor:function(){
if(!this.targetAnchor){
return;
}
this._removeItemClass(this.targetAnchor,this.before?"Before":"After");
this.targetAnchor=null;
this.targetBox=null;
this.before=true;
},_markDndStatus:function(_36){
this._changeState("Source",_36?"Copied":"Moved");
},_legalMouseDown:function(e){
if(e.type!="touchstart"&&!_7.isLeft(e)){
return false;
}
if(!this.withHandles){
return true;
}
for(var _37=e.target;_37&&_37!==this.node;_37=_37.parentNode){
if(_5.contains(_37,"dojoDndHandle")){
return true;
}
if(_5.contains(_37,"dojoDndItem")||_5.contains(_37,"dojoDndIgnore")){
break;
}
}
return false;
}});
return _e;
});


text:
package akka.testkit

import org.scalatest.Tag

object TimingTest extends Tag("timing")
object LongRunningTest extends Tag("long-running")
object PerformanceTest extends Tag("performance")