package net.anotheria.moskito.aop.aspect;

import net.anotheria.moskito.aop.annotation.Accumulate;
import net.anotheria.moskito.aop.annotation.Accumulates;
import net.anotheria.moskito.aop.annotation.StatName;
import net.anotheria.moskito.aop.annotation.withsubclasses.AccumulateWithSubClasses;
import net.anotheria.moskito.aop.annotation.withsubclasses.AccumulatesWithSubClasses;
import net.anotheria.moskito.aop.aspect.support.AccumulatorUtil;
import net.anotheria.moskito.aop.util.MoskitoUtils;
import net.anotheria.moskito.core.dynamic.IOnDemandStatsFactory;
import net.anotheria.moskito.core.dynamic.OnDemandStatsProducer;
import net.anotheria.moskito.core.logging.DefaultStatsLogger;
import net.anotheria.moskito.core.logging.IntervalStatsLogger;
import net.anotheria.moskito.core.logging.SLF4JLogOutput;
import net.anotheria.moskito.core.predefined.AbstractStatsFactory;
import net.anotheria.moskito.core.producers.IStats;
import net.anotheria.moskito.core.registry.ProducerRegistryFactory;
import net.anotheria.moskito.core.stats.Interval;
import net.anotheria.moskito.core.threshold.CustomThresholdProvider;
import net.anotheria.moskito.core.threshold.ThresholdRepository;
import net.anotheria.moskito.core.util.annotation.AnnotationUtils;
import net.anotheria.util.StringUtils;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.reflect.MethodSignature;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.lang.reflect.Method;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

/**
 * The basic aspect class.
 *
 * @author lrosenberg
 * @since 19.11.12 00:00
 */
public class AbstractMoskitoAspect<S extends IStats> {
	/**
	 * Possible producer id className/method separator.
	 */
	public static final char DOT = '.';

	/**
	 * Map with created producers.
	 */
	private final ConcurrentMap<String, OnDemandStatsProducer<S>> producers = new ConcurrentHashMap<>();
	/**
	 * Common {@link MoskitoAspectConfiguration}.
	 */
	private final MoskitoAspectConfiguration config = MoskitoAspectConfiguration.getInstance();

	/**
	 * Logging UTIL.
	 */
	private final Logger logger = LoggerFactory.getLogger(this.getClass().getName());

	/**
	 * See {@link #getProducer(ProceedingJoinPoint, String, String, String, boolean, IOnDemandStatsFactory, boolean, boolean)} - with attachLoggers -
	 * providen by {@link MoskitoAspectConfiguration#isAttachDefaultStatLoggers()}.
	 *
	 * @param pjp
	 * 		the pjp is used to obtain the producer id automatically if it's not submitted.
	 * @param aProducerId
	 * 		submitted producer id, used if configured in aop.
	 * @param aCategory
	 * 		submitted category.
	 * @param aSubsystem
	 * 		submitted subsystem.
	 * @param withMethod
	 * 		if true the name of the method will be part of the automatically generated producer id.
	 * @param factory
	 * 		OnDemandStatsProducer factory
	 * @param tracingSupported
	 * 		is tracing supported
	 * @return {@link OnDemandStatsProducer}
	 */
	protected OnDemandStatsProducer<S> getProducer(final ProceedingJoinPoint pjp, final String aProducerId, final String aCategory, final String aSubsystem, final boolean withMethod,
												   final IOnDemandStatsFactory<S> factory, final boolean tracingSupported) {
		return getProducer(pjp, aProducerId, aCategory, aSubsystem, withMethod, factory, tracingSupported, config.isAttachDefaultStatLoggers());
	}

	/**
	 * Returns the producer for the given pjp and producerId. Registers the producer in the registry if it's not already registered.
	 *
	 * @param pjp
	 * 		the pjp is used to obtain the producer id automatically if it's not submitted.
	 * @param aProducerId
	 * 		submitted producer id, used if configured in aop.
	 * @param aCategory
	 * 		submitted category.
	 * @param aSubsystem
	 * 		submitted subsystem.
	 * @param withMethod
	 * 		if true the name of the method will be part of the automatically generated producer id.
	 * @param factory
	 * 		OnDemandStatsProducer factory
	 * @param tracingSupported
	 * 		is tracing supported
	 * @param attachDefaultStatsLoggers
	 * 		allow to attach default loggers
	 * @return {@link OnDemandStatsProducer}
	 */
	protected OnDemandStatsProducer<S> getProducer(final ProceedingJoinPoint pjp, final String aProducerId, final String aCategory, final String aSubsystem, final boolean withMethod,
												   final IOnDemandStatsFactory<S> factory, final boolean tracingSupported, final boolean attachDefaultStatsLoggers) {
		final String producerId = getProducerId(pjp, aProducerId, withMethod);

		OnDemandStatsProducer<S> producer = producers.get(producerId);
		if (producer != null)
			return producer;

		producer = new OnDemandStatsProducer<>(producerId, getCategory(aCategory), getSubsystem(aSubsystem), factory);
		producer.setTracingSupported(tracingSupported);
		//all on aop demand producers support logging
		producer.setLoggingSupported(true);
		final OnDemandStatsProducer<S> p = producers.putIfAbsent(producerId, producer);
		if (p != null)
			return p;

		ProducerRegistryFactory.getProducerRegistryInstance().registerProducer(producer);
		//now check for annotations.
		final Class producerClass = pjp.getSignature().getDeclaringType();

		createClassLevelAccumulators(producer, producerClass);
		for (Method method : producerClass.getMethods())
			createMethodLevelAccumulators(producer, method);
		if (attachDefaultStatsLoggers)
			attachLoggers(producer, factory);

		Class<?>[] intrfaces = producerClass.getInterfaces();
		for (Class<?> intrface : intrfaces){
			if (intrface.getName().equals(CustomThresholdProvider.class.getName())){
				setupCustomThresholds((CustomThresholdProvider)pjp.getTarget(), producer);
			}
		}

		return producer;

	}

	/**
	 * Returns method name or method stats name by aop signature considering {@link StatName} annotation.
	 *
	 * @param signature
	 *         aop signature
	 * @return method name or null if signature also null
	 */
	protected String getMethodStatName(Signature signature) {
		if (signature == null) {
			return null;
		}

		if (signature instanceof MethodSignature) {
			Method method = ((MethodSignature) signature).getMethod();
			StatName statName = method.getAnnotation(StatName.class);
			return statName == null ? method.getName() : statName.value();
		}

		return signature.getName();
	}

	/**
	 * Attach moskito loggers.
	 *
	 * @param producer
	 * 		{@link OnDemandStatsProducer}
	 * @param factory
	 * 		{@link IOnDemandStatsFactory}
	 */
	private void attachLoggers(final OnDemandStatsProducer<S> producer, final IOnDemandStatsFactory<S> factory) {
		//default moskito loggers initialization!
		new DefaultStatsLogger(producer, new SLF4JLogOutput(LoggerFactory.getLogger(config.getDefaultMoskitoLoggerName())));
		//for further improvement... mb.
		if (!(factory instanceof AbstractStatsFactory))
			return;
		AbstractStatsFactory<?> common = AbstractStatsFactory.class.cast(factory);

		for (final Interval interval : common.getIntervals()) {
			//only in case if found! (configured)
			final String loggerName = config.getMoskitoLoggerName(interval.getName());
			if (!StringUtils.isEmpty(loggerName))
				new IntervalStatsLogger(producer, interval, new SLF4JLogOutput(LoggerFactory.getLogger(loggerName)));
		}
	}

	/**
	 * Fetch producer id - for further usage.
	 *
	 * @param pjp
	 * 		{@link ProceedingJoinPoint}
	 * @param aPId
	 * 		provided producer id
	 * @param withMethod
	 * 		{@code true} in case if methodName should be used in produce id, {@code false} otheriwse
	 * @return producer identifier
	 */
	private String getProducerId(final ProceedingJoinPoint pjp, final String aPId, final boolean withMethod) {
		if (!StringUtils.isEmpty(aPId))
			return aPId;

		String res = pjp.getSignature().getDeclaringTypeName();
		try {
			res = MoskitoUtils.producerName(res);
		} catch (final RuntimeException e) {
			if (logger.isTraceEnabled())
				logger.trace(e.getMessage(), e);
		}
		if (withMethod) {
			res += DOT + getMethodStatName(pjp.getSignature());
		}
		return res;
	}

	/**
	 * Create method level accumulators.
	 *
	 * @param producer
	 * 		{@link OnDemandStatsProducer}
	 * @param method
	 * 		annotated method
	 */
	private void createMethodLevelAccumulators(final OnDemandStatsProducer<S> producer, final Method method) {
		//several @Accumulators in accumulators holder
		final Accumulates accAnnotationHolderMethods = AnnotationUtils.findAnnotation(method, Accumulates.class);
		if (accAnnotationHolderMethods != null)
			createAccumulators(producer, method, accAnnotationHolderMethods.value());

		//If there is no @Accumulates annotation but @Accumulate is present
		final Accumulate annotation = AnnotationUtils.findAnnotation(method, Accumulate.class);
		createAccumulators(producer, method, annotation);
	}

	/**
	 * Create accumulators for class.
	 *
	 * @param producer
	 * 		{@link OnDemandStatsProducer}
	 * @param producerClass
	 * 		producer class
	 */
	private void createClassLevelAccumulators(final OnDemandStatsProducer<S> producer, final Class producerClass) {

		//several @AccumulateWithSubClasses in accumulators holder
		final AccumulatesWithSubClasses accWSCAnnotationHolder = AnnotationUtils.findAnnotation(producerClass, AccumulatesWithSubClasses.class);
		if (accWSCAnnotationHolder != null) {
			createAccumulators(producer, producerClass, accWSCAnnotationHolder.value());
		}

		//If there is no @AccumulatesWithSubClasses annotation but @Accumulate is present
		final AccumulateWithSubClasses accumulateWSC = AnnotationUtils.findAnnotation(producerClass, AccumulateWithSubClasses.class);
		createAccumulators(producer, producerClass, accumulateWSC);

		//several @Accumulate in accumulators holder
		final Accumulates accAnnotationHolder = AnnotationUtils.findAnnotation(producerClass, Accumulates.class);
		if (accAnnotationHolder != null) {
			createAccumulators(producer, null, accAnnotationHolder.value());
		}

		//If there is no @Accumulates annotation but @Accumulate is present
		final Accumulate annotation = AnnotationUtils.findAnnotation(producerClass, Accumulate.class);
		createAccumulators(producer, null, annotation);
	}

	/**
	 * Create method/class level accumulators from {@link Accumulate} annotations.
	 *
	 * @param producer
	 * 		{@link OnDemandStatsProducer}
	 * @param method
	 * 		annotated method for method level accumulators or null for class level
	 * @param annotations
	 * 		{@link Accumulate} annotations to process
	 */
	private void createAccumulators(final OnDemandStatsProducer<S> producer, final Method method, Accumulate... annotations) {
		for (final Accumulate annotation : annotations)
			if (annotation != null)
				AccumulatorUtil.getInstance().createAccumulator(producer, annotation, method);
	}

	/**
	 * Create class level accumulators from {@link AccumulateWithSubClasses} annotations.
	 *
	 * @param producer
	 * 		{@link OnDemandStatsProducer}
	 * @param producerClass
	 * 		producer class
	 * @param annotations
	 * 		{@link AccumulateWithSubClasses} annotations to process
	 */
	private void createAccumulators(final OnDemandStatsProducer<S> producer, final Class producerClass, AccumulateWithSubClasses... annotations) {
		for (final AccumulateWithSubClasses annotation : annotations)
			if (annotation != null)
				AccumulatorUtil.getInstance(producerClass).createAccumulator(producer, annotation);
	}

	/**
	 * Returns the category to use for the producer registration.
	 *
	 * @param proposal
	 * 		proposal
	 * @return category
	 */
	public String getCategory(final String proposal) {
		return StringUtils.isEmpty(proposal) ? "annotated" : proposal;
	}

	/**
	 * Returns the subsystem for registration.
	 *
	 * @param proposal
	 * 		proposal
	 * @return subsystem
	 */
	public String getSubsystem(final String proposal) {
		return StringUtils.isEmpty(proposal) ? "default" : proposal;
	}

	/**
	 * Perform inner storage cleanUp.
	 */
	public void reset() {
		producers.clear();
	}

	private void setupCustomThresholds(CustomThresholdProvider customThresholdProvider, OnDemandStatsProducer<S> producer){
		List<String> thresholdNames = customThresholdProvider.getCustomThresholdNames();
		ThresholdRepository repository = ThresholdRepository.getInstance();
		for (String name :thresholdNames){
			repository.createCustomThreshold(name, customThresholdProvider, producer);

		}

	}

}

{'repo_name': 'anotheria/moskito', 'stars': '199', 'repo_language': 'HTML', 'file_name': 'FibonacciAction.java', 'mime_type': 'text/x-java', 'hash': 3435872751759932291, 'source_dataset': 'data'}


package eval

import (
	"errors"
	"os"
	"os/signal"
	"syscall"
)

// Interrupts returns a channel that is closed when an interrupt signal comes.
func (fm *Frame) Interrupts() <-chan struct{} {
	return fm.intCh
}

// ErrInterrupted is thrown when the execution is interrupted by a signal.
var ErrInterrupted = errors.New("interrupted")

// IsInterrupted reports whether there has been an interrupt.
func (fm *Frame) IsInterrupted() bool {
	select {
	case <-fm.Interrupts():
		return true
	default:
		return false
	}
}

// ListenInterrupts returns a channel that is closed when SIGINT or SIGQUIT
// has been received by the process. It also returns a function that should be
// called when the channel is no longer needed.
func ListenInterrupts() (<-chan struct{}, func()) {
	sigCh := make(chan os.Signal)
	signal.Notify(sigCh, syscall.SIGINT, syscall.SIGQUIT)
	// Channel to return, closed after receiving the first SIGINT or SIGQUIT.
	intCh := make(chan struct{})

	// Closed in the cleanup function to request the relaying goroutine to stop.
	stop := make(chan struct{})
	// Closed in the relaying goroutine to signal that it has stopped.
	stopped := make(chan struct{})

	go func() {
		closed := false
	loop:
		for {
			select {
			case <-sigCh:
				if !closed {
					close(intCh)
					closed = true
				}
			case <-stop:
				break loop
			}
		}
		signal.Stop(sigCh)
		close(stopped)
	}()

	return intCh, func() {
		close(stop)
		<-stopped
	}
}

{'repo_name': 'elves/elvish', 'stars': '3822', 'repo_language': 'Go', 'file_name': 'main.go', 'mime_type': 'text/x-c', 'hash': -803533115086691021, 'source_dataset': 'data'}


<?php
/*
* Copyright 2007-2017 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pydio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Pydio.  If not, see <http://www.gnu.org/licenses/>.
*
* The latest code can be found at <https://pydio.com>.
*/
$mess=array(
"HTML Uploader" => "Standard",
"Auto-switching HTML5 or IFrame uploader." => "Auto-switching HTML5 or IFrame uploader.",
"Default Behaviour" => "Default Behaviour",
"Existing Files" => "Existing Files",
"Inform the user or not if the file already exists (default behaviour, the user will be able to change this preference)" => "Inform the user or not if the file already exists (default behaviour, the user will be able to change this preference)",
"Auto Start" => "Auto Start",
"Default value for automatically starting upload or not" => "Default value for automatically starting upload or not",
"Auto Close" => "Auto Close",
"Default value for automatically closing the dialog after upload or not" => "Default value for automatically closing the dialog after upload or not",
"Always Override" => "Always Override",
"Auto Rename File" => "Auto Rename File",
"Prompt user" => "Prompt user",
);

{'repo_name': 'pydio/pydio-core', 'stars': '894', 'repo_language': 'PHP', 'file_name': 'install-git.sh', 'mime_type': 'text/x-shellscript', 'hash': 7465612321228045671, 'source_dataset': 'data'}


//------------------------------------------------------------------------------
// GB_AxB_dot4: compute C+=A'*B in place
//------------------------------------------------------------------------------

// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://suitesparse.com   See GraphBLAS/Doc/License.txt for license.

//------------------------------------------------------------------------------

// GB_AxB_dot4 does its computation in a single phase, computing its result in
// the input matrix C, which is already dense.  The mask M is not handled by
// this function.

#include "GB_mxm.h"
#include "GB_unused.h"
#include "GB_mkl.h"
#ifndef GBCOMPACT
#include "GB_AxB__include.h"
#endif

#define GB_FREE_WORK        \
{                           \
    GB_FREE (A_slice) ;     \
    GB_FREE (B_slice) ;     \
}

GrB_Info GB_AxB_dot4                // C+=A'*B, dot product method
(
    GrB_Matrix C,                   // input/output matrix, must be dense
    const GrB_Matrix A,             // input matrix
    const GrB_Matrix B,             // input matrix
    const GrB_Semiring semiring,    // semiring that defines C+=A*B
    const bool flipxy,              // if true, do z=fmult(b,a) vs fmult(a,b)
    GB_Context Context
)
{

    //--------------------------------------------------------------------------
    // check inputs
    //--------------------------------------------------------------------------

    GrB_Info info ;
    ASSERT_MATRIX_OK (C, "C for dot in place += A'*B", GB0) ;
    ASSERT_MATRIX_OK (A, "A for dot in place += A'*B", GB0) ;
    ASSERT_MATRIX_OK (B, "B for dot in place += A'*B", GB0) ;
    ASSERT (!GB_PENDING (C)) ; ASSERT (!GB_ZOMBIES (C)) ;
    ASSERT (!GB_PENDING (A)) ; ASSERT (!GB_ZOMBIES (A)) ;
    ASSERT (!GB_PENDING (B)) ; ASSERT (!GB_ZOMBIES (B)) ;
    ASSERT (GB_is_dense (C)) ;
    ASSERT_SEMIRING_OK (semiring, "semiring for in place += A'*B", GB0) ;
    ASSERT (A->vlen == B->vlen) ;

    int64_t *GB_RESTRICT A_slice = NULL ;
    int64_t *GB_RESTRICT B_slice = NULL ;

    //--------------------------------------------------------------------------
    // determine the number of threads to use, and the use_mkl flag
    //--------------------------------------------------------------------------

    int64_t anz = GB_NNZ (A) ;
    int64_t bnz = GB_NNZ (B) ;
    GB_GET_NTHREADS_MAX (nthreads_max, chunk, Context) ;
    int nthreads = GB_nthreads (anz + bnz, chunk, nthreads_max) ;
    bool use_mkl = (Context == NULL) ? false : Context->use_mkl ;

    //--------------------------------------------------------------------------
    // use MKL_graph if it available and has this semiring
    //--------------------------------------------------------------------------

    // Note that GB_AxB_dot4 computes C+=A'*B where A and B treated as if CSC,
    // but MKL views the matrices as CSR.  MKL only handles the case when B
    // is a dense vector in mkl_graph_mxv, and A' in CSC format is the same
    // as A in CSR.

    #if GB_HAS_MKL_GRAPH

    if (use_mkl &&
        (semiring == GrB_PLUS_TIMES_SEMIRING_FP32 ||
         semiring == GxB_PLUS_SECOND_FP32) && GB_VECTOR_OK (C)
        && GB_is_dense (C) && GB_is_dense (B) && GB_VECTOR_OK (B) && !flipxy
        && !GB_IS_HYPER (A))
    {

        info = // GrB_NO_VALUE ;
        #if 1
        GB_AxB_dot4_mkl (
            (GrB_Vector) C,     // input/output (now a vector)
            A,                  // first input matrix
            (GrB_Vector) B,     // second input (now a vector)
            semiring,           // semiring that defines C=A*B
            Context) ;
        #endif

        if (info != GrB_NO_VALUE)
        {
            // MKL_graph supports this semiring, and has ether computed C=A*B,
            // C<M>=A*B, or C<!M>=A*B, or has failed.
            return (info) ;
        }

        // If MKL_graph doesn't support this semiring, it returns GrB_NO_VALUE,
        // so fall through to use GraphBLAS, below.
    }
    #endif

    //--------------------------------------------------------------------------
    // get the semiring operators
    //--------------------------------------------------------------------------

    GrB_BinaryOp mult = semiring->multiply ;
    GrB_Monoid add = semiring->add ;
    ASSERT (mult->ztype == add->op->ztype) ;
    ASSERT (C->type     == add->op->ztype) ;

    bool op_is_first  = mult->opcode == GB_FIRST_opcode ;
    bool op_is_second = mult->opcode == GB_SECOND_opcode ;
    bool op_is_pair   = mult->opcode == GB_PAIR_opcode ;
    bool A_is_pattern = false ;
    bool B_is_pattern = false ;

    if (flipxy)
    {
        // z = fmult (b,a) will be computed
        A_is_pattern = op_is_first  || op_is_pair ;
        B_is_pattern = op_is_second || op_is_pair ;
        ASSERT (GB_IMPLIES (!A_is_pattern,
            GB_Type_compatible (A->type, mult->ytype))) ;
        ASSERT (GB_IMPLIES (!B_is_pattern,
            GB_Type_compatible (B->type, mult->xtype))) ;
    }
    else
    {
        // z = fmult (a,b) will be computed
        A_is_pattern = op_is_second || op_is_pair ;
        B_is_pattern = op_is_first  || op_is_pair ;
        ASSERT (GB_IMPLIES (!A_is_pattern,
            GB_Type_compatible (A->type, mult->xtype))) ;
        ASSERT (GB_IMPLIES (!B_is_pattern,
            GB_Type_compatible (B->type, mult->ytype))) ;
    }

    //--------------------------------------------------------------------------
    // slice A and B
    //--------------------------------------------------------------------------

    int64_t anvec = A->nvec ;
    int64_t bnvec = B->nvec ;

    int naslice = (nthreads == 1) ? 1 : (16 * nthreads) ;
    int nbslice = (nthreads == 1) ? 1 : (16 * nthreads) ;

    naslice = GB_IMIN (naslice, anvec) ;
    nbslice = GB_IMIN (nbslice, bnvec) ;

    if (!GB_pslice (&A_slice, A->p, anvec, naslice)  ||
        !GB_pslice (&B_slice, B->p, bnvec, nbslice))
    {
        // out of memory
        GB_FREE_WORK ;
        return (GB_OUT_OF_MEMORY) ;
    }

    //--------------------------------------------------------------------------
    // C += A'*B, computing each entry with a dot product, via builtin semiring
    //--------------------------------------------------------------------------

    bool done = false ;

    #ifndef GBCOMPACT

        //----------------------------------------------------------------------
        // define the worker for the switch factory
        //----------------------------------------------------------------------

        #define GB_Adot4B(add,mult,xname) GB_Adot4B_ ## add ## mult ## xname

        #define GB_AxB_WORKER(add,mult,xname)           \
        {                                               \
            info = GB_Adot4B (add,mult,xname) (C,       \
                A, A_is_pattern, A_slice, naslice,      \
                B, B_is_pattern, B_slice, nbslice,      \
                nthreads) ;                             \
            done = (info != GrB_NO_VALUE) ;             \
        }                                               \
        break ;

        //----------------------------------------------------------------------
        // launch the switch factory
        //----------------------------------------------------------------------

        GB_Opcode mult_opcode, add_opcode ;
        GB_Type_code xcode, ycode, zcode ;

        if (GB_AxB_semiring_builtin (A, A_is_pattern, B, B_is_pattern, semiring,
            flipxy, &mult_opcode, &add_opcode, &xcode, &ycode, &zcode))
        {
            #include "GB_AxB_factory.c"
        }

    #endif

    //--------------------------------------------------------------------------
    // C += A'*B, computing each entry with a dot product, with typecasting
    //--------------------------------------------------------------------------

    if (!done)
    {
        GB_BURBLE_MATRIX (C, "generic ") ;

        //----------------------------------------------------------------------
        // get operators, functions, workspace, contents of A, B, C, and M
        //----------------------------------------------------------------------

        GxB_binary_function fmult = mult->function ;
        GxB_binary_function fadd  = add->op->function ;

        size_t csize = C->type->size ;
        size_t asize = A_is_pattern ? 0 : A->type->size ;
        size_t bsize = B_is_pattern ? 0 : B->type->size ;

        size_t xsize = mult->xtype->size ;
        size_t ysize = mult->ytype->size ;

        // scalar workspace: because of typecasting, the x/y types need not
        // be the same as the size of the A and B types.
        // flipxy false: aki = (xtype) A(k,i) and bkj = (ytype) B(k,j)
        // flipxy true:  aki = (ytype) A(k,i) and bkj = (xtype) B(k,j)
        size_t aki_size = flipxy ? ysize : xsize ;
        size_t bkj_size = flipxy ? xsize : ysize ;

        GB_void *GB_RESTRICT terminal = (GB_void *) add->terminal ;

        GB_cast_function cast_A, cast_B ;
        if (flipxy)
        {
            // A is typecasted to y, and B is typecasted to x
            cast_A = A_is_pattern ? NULL :
                     GB_cast_factory (mult->ytype->code, A->type->code) ;
            cast_B = B_is_pattern ? NULL :
                     GB_cast_factory (mult->xtype->code, B->type->code) ;
        }
        else
        {
            // A is typecasted to x, and B is typecasted to y
            cast_A = A_is_pattern ? NULL :
                     GB_cast_factory (mult->xtype->code, A->type->code) ;
            cast_B = B_is_pattern ? NULL :
                     GB_cast_factory (mult->ytype->code, B->type->code) ;
        }

        //----------------------------------------------------------------------
        // C = A'*B via dot products, function pointers, and typecasting
        //----------------------------------------------------------------------

        // aki = A(k,i), located in Ax [pA]
        #define GB_GETA(aki,Ax,pA)                                          \
            GB_void aki [GB_VLA(aki_size)] ;                                \
            if (!A_is_pattern) cast_A (aki, Ax +((pA)*asize), asize)

        // bkj = B(k,j), located in Bx [pB]
        #define GB_GETB(bkj,Bx,pB)                                          \
            GB_void bkj [GB_VLA(bkj_size)] ;                                \
            if (!B_is_pattern) cast_B (bkj, Bx +((pB)*bsize), bsize)

        // break if cij reaches the terminal value
        #define GB_DOT_TERMINAL(cij)                                        \
            if (terminal != NULL && memcmp (cij, terminal, csize) == 0)     \
            {                                                               \
                break ;                                                     \
            }

        // C(i,j) += A(i,k) * B(k,j)
        #define GB_MULTADD(cij, aki, bkj)                                   \
            GB_void zwork [GB_VLA(csize)] ;                                 \
            GB_FMULT (zwork, aki, bkj) ;                                    \
            fadd (cij, cij, zwork)

        // define cij for each task
        #define GB_CIJ_DECLARE(cij)                                         \
            GB_void cij [GB_VLA(csize)]

        // address of Cx [p]
        #define GB_CX(p) Cx +((p)*csize)

        // cij = Cx [p]
        #define GB_GETC(cij,pC)                                             \
            memcpy (cij, GB_CX (pC), csize)

        // Cx [p] = cij
        #define GB_PUTC(cij,pC)                                             \
            memcpy (GB_CX (pC), cij, csize)

        #define GB_ATYPE GB_void
        #define GB_BTYPE GB_void
        #define GB_CTYPE GB_void

        // no vectorization
        #define GB_PRAGMA_SIMD_VECTORIZE ;
        #define GB_PRAGMA_SIMD_DOT(cij) ;

        if (flipxy)
        {
            #define GB_FMULT(z,x,y) fmult (z,y,x)
            #include "GB_AxB_dot4_template.c"
            #undef GB_FMULT
        }
        else
        {
            #define GB_FMULT(z,x,y) fmult (z,x,y)
            #include "GB_AxB_dot4_template.c"
            #undef GB_FMULT
        }
    }

    //--------------------------------------------------------------------------
    // free workspace and return result
    //--------------------------------------------------------------------------

    GB_FREE_WORK ;
    ASSERT_MATRIX_OK (C, "dot: C += A'*B output", GB0) ;
    return (GrB_SUCCESS) ;
}

{'repo_name': 'DrTimothyAldenDavis/SuiteSparse', 'stars': '217', 'repo_language': 'C', 'file_name': 'test2.m', 'mime_type': 'text/plain', 'hash': 7194953332705129178, 'source_dataset': 'data'}


const gulp = require('gulp');

function checkForUnusedTask(options) {
  gulp.task('check-for-missing', async done => {
    // TODO
    done();
  });
}

module.exports = checkForUnusedTask;

{'repo_name': 'danmindru/responsive-html-email-signature', 'stars': '479', 'repo_language': 'JavaScript', 'file_name': 'template-generation.js', 'mime_type': 'text/plain', 'hash': 8087783522337774761, 'source_dataset': 'data'}


<?php

namespace Illuminate\Pagination;

use Closure;
use Illuminate\Support\Str;
use Illuminate\Support\Collection;
use Illuminate\Contracts\Support\Htmlable;

/**
 * @mixin \Illuminate\Support\Collection
 */
abstract class AbstractPaginator implements Htmlable
{
    /**
     * All of the items being paginated.
     *
     * @var \Illuminate\Support\Collection
     */
    protected $items;

    /**
     * The number of items to be shown per page.
     *
     * @var int
     */
    protected $perPage;

    /**
     * The current page being "viewed".
     *
     * @var int
     */
    protected $currentPage;

    /**
     * The base path to assign to all URLs.
     *
     * @var string
     */
    protected $path = '/';

    /**
     * The query parameters to add to all URLs.
     *
     * @var array
     */
    protected $query = [];

    /**
     * The URL fragment to add to all URLs.
     *
     * @var string|null
     */
    protected $fragment;

    /**
     * The query string variable used to store the page.
     *
     * @var string
     */
    protected $pageName = 'page';

    /**
     * The current path resolver callback.
     *
     * @var \Closure
     */
    protected static $currentPathResolver;

    /**
     * The current page resolver callback.
     *
     * @var \Closure
     */
    protected static $currentPageResolver;

    /**
     * The view factory resolver callback.
     *
     * @var \Closure
     */
    protected static $viewFactoryResolver;

    /**
     * The default pagination view.
     *
     * @var string
     */
    public static $defaultView = 'pagination::bootstrap-4';

    /**
     * The default "simple" pagination view.
     *
     * @var string
     */
    public static $defaultSimpleView = 'pagination::simple-bootstrap-4';

    /**
     * Determine if the given value is a valid page number.
     *
     * @param  int  $page
     * @return bool
     */
    protected function isValidPageNumber($page)
    {
        return $page >= 1 && filter_var($page, FILTER_VALIDATE_INT) !== false;
    }

    /**
     * Get the URL for the previous page.
     *
     * @return string|null
     */
    public function previousPageUrl()
    {
        if ($this->currentPage() > 1) {
            return $this->url($this->currentPage() - 1);
        }
    }

    /**
     * Create a range of pagination URLs.
     *
     * @param  int  $start
     * @param  int  $end
     * @return array
     */
    public function getUrlRange($start, $end)
    {
        return collect(range($start, $end))->mapWithKeys(function ($page) {
            return [$page => $this->url($page)];
        })->all();
    }

    /**
     * Get the URL for a given page number.
     *
     * @param  int  $page
     * @return string
     */
    public function url($page)
    {
        if ($page <= 0) {
            $page = 1;
        }

        // If we have any extra query string key / value pairs that need to be added
        // onto the URL, we will put them in query string form and then attach it
        // to the URL. This allows for extra information like sortings storage.
        $parameters = [$this->pageName => $page];

        if (count($this->query) > 0) {
            $parameters = array_merge($this->query, $parameters);
        }

        return $this->path
                        .(Str::contains($this->path, '?') ? '&' : '?')
                        .http_build_query($parameters, '', '&')
                        .$this->buildFragment();
    }

    /**
     * Get / set the URL fragment to be appended to URLs.
     *
     * @param  string|null  $fragment
     * @return $this|string|null
     */
    public function fragment($fragment = null)
    {
        if (is_null($fragment)) {
            return $this->fragment;
        }

        $this->fragment = $fragment;

        return $this;
    }

    /**
     * Add a set of query string values to the paginator.
     *
     * @param  array|string  $key
     * @param  string|null  $value
     * @return $this
     */
    public function appends($key, $value = null)
    {
        if (is_array($key)) {
            return $this->appendArray($key);
        }

        return $this->addQuery($key, $value);
    }

    /**
     * Add an array of query string values.
     *
     * @param  array  $keys
     * @return $this
     */
    protected function appendArray(array $keys)
    {
        foreach ($keys as $key => $value) {
            $this->addQuery($key, $value);
        }

        return $this;
    }

    /**
     * Add a query string value to the paginator.
     *
     * @param  string  $key
     * @param  string  $value
     * @return $this
     */
    protected function addQuery($key, $value)
    {
        if ($key !== $this->pageName) {
            $this->query[$key] = $value;
        }

        return $this;
    }

    /**
     * Build the full fragment portion of a URL.
     *
     * @return string
     */
    protected function buildFragment()
    {
        return $this->fragment ? '#'.$this->fragment : '';
    }

    /**
     * Load a set of relationships onto the mixed relationship collection.
     *
     * @param  string $relation
     * @param  array  $relations
     * @return $this
     */
    public function loadMorph($relation, $relations)
    {
        $this->getCollection()->loadMorph($relation, $relations);

        return $this;
    }

    /**
     * Get the slice of items being paginated.
     *
     * @return array
     */
    public function items()
    {
        return $this->items->all();
    }

    /**
     * Get the number of the first item in the slice.
     *
     * @return int
     */
    public function firstItem()
    {
        return count($this->items) > 0 ? ($this->currentPage - 1) * $this->perPage + 1 : null;
    }

    /**
     * Get the number of the last item in the slice.
     *
     * @return int
     */
    public function lastItem()
    {
        return count($this->items) > 0 ? $this->firstItem() + $this->count() - 1 : null;
    }

    /**
     * Get the number of items shown per page.
     *
     * @return int
     */
    public function perPage()
    {
        return $this->perPage;
    }

    /**
     * Determine if there are enough items to split into multiple pages.
     *
     * @return bool
     */
    public function hasPages()
    {
        return $this->currentPage() != 1 || $this->hasMorePages();
    }

    /**
     * Determine if the paginator is on the first page.
     *
     * @return bool
     */
    public function onFirstPage()
    {
        return $this->currentPage() <= 1;
    }

    /**
     * Get the current page.
     *
     * @return int
     */
    public function currentPage()
    {
        return $this->currentPage;
    }

    /**
     * Get the query string variable used to store the page.
     *
     * @return string
     */
    public function getPageName()
    {
        return $this->pageName;
    }

    /**
     * Set the query string variable used to store the page.
     *
     * @param  string  $name
     * @return $this
     */
    public function setPageName($name)
    {
        $this->pageName = $name;

        return $this;
    }

    /**
     * Set the base path to assign to all URLs.
     *
     * @param  string  $path
     * @return $this
     */
    public function withPath($path)
    {
        return $this->setPath($path);
    }

    /**
     * Set the base path to assign to all URLs.
     *
     * @param  string  $path
     * @return $this
     */
    public function setPath($path)
    {
        $this->path = $path;

        return $this;
    }

    /**
     * Resolve the current request path or return the default value.
     *
     * @param  string  $default
     * @return string
     */
    public static function resolveCurrentPath($default = '/')
    {
        if (isset(static::$currentPathResolver)) {
            return call_user_func(static::$currentPathResolver);
        }

        return $default;
    }

    /**
     * Set the current request path resolver callback.
     *
     * @param  \Closure  $resolver
     * @return void
     */
    public static function currentPathResolver(Closure $resolver)
    {
        static::$currentPathResolver = $resolver;
    }

    /**
     * Resolve the current page or return the default value.
     *
     * @param  string  $pageName
     * @param  int  $default
     * @return int
     */
    public static function resolveCurrentPage($pageName = 'page', $default = 1)
    {
        if (isset(static::$currentPageResolver)) {
            return call_user_func(static::$currentPageResolver, $pageName);
        }

        return $default;
    }

    /**
     * Set the current page resolver callback.
     *
     * @param  \Closure  $resolver
     * @return void
     */
    public static function currentPageResolver(Closure $resolver)
    {
        static::$currentPageResolver = $resolver;
    }

    /**
     * Get an instance of the view factory from the resolver.
     *
     * @return \Illuminate\Contracts\View\Factory
     */
    public static function viewFactory()
    {
        return call_user_func(static::$viewFactoryResolver);
    }

    /**
     * Set the view factory resolver callback.
     *
     * @param  \Closure  $resolver
     * @return void
     */
    public static function viewFactoryResolver(Closure $resolver)
    {
        static::$viewFactoryResolver = $resolver;
    }

    /**
     * Set the default pagination view.
     *
     * @param  string  $view
     * @return void
     */
    public static function defaultView($view)
    {
        static::$defaultView = $view;
    }

    /**
     * Set the default "simple" pagination view.
     *
     * @param  string  $view
     * @return void
     */
    public static function defaultSimpleView($view)
    {
        static::$defaultSimpleView = $view;
    }

    /**
     * Indicate that Bootstrap 3 styling should be used for generated links.
     *
     * @return void
     */
    public static function useBootstrapThree()
    {
        static::defaultView('pagination::default');
        static::defaultSimpleView('pagination::simple-default');
    }

    /**
     * Get an iterator for the items.
     *
     * @return \ArrayIterator
     */
    public function getIterator()
    {
        return $this->items->getIterator();
    }

    /**
     * Determine if the list of items is empty.
     *
     * @return bool
     */
    public function isEmpty()
    {
        return $this->items->isEmpty();
    }

    /**
     * Determine if the list of items is not empty.
     *
     * @return bool
     */
    public function isNotEmpty()
    {
        return $this->items->isNotEmpty();
    }

    /**
     * Get the number of items for the current page.
     *
     * @return int
     */
    public function count()
    {
        return $this->items->count();
    }

    /**
     * Get the paginator's underlying collection.
     *
     * @return \Illuminate\Support\Collection
     */
    public function getCollection()
    {
        return $this->items;
    }

    /**
     * Set the paginator's underlying collection.
     *
     * @param  \Illuminate\Support\Collection  $collection
     * @return $this
     */
    public function setCollection(Collection $collection)
    {
        $this->items = $collection;

        return $this;
    }

    /**
     * Determine if the given item exists.
     *
     * @param  mixed  $key
     * @return bool
     */
    public function offsetExists($key)
    {
        return $this->items->has($key);
    }

    /**
     * Get the item at the given offset.
     *
     * @param  mixed  $key
     * @return mixed
     */
    public function offsetGet($key)
    {
        return $this->items->get($key);
    }

    /**
     * Set the item at the given offset.
     *
     * @param  mixed  $key
     * @param  mixed  $value
     * @return void
     */
    public function offsetSet($key, $value)
    {
        $this->items->put($key, $value);
    }

    /**
     * Unset the item at the given key.
     *
     * @param  mixed  $key
     * @return void
     */
    public function offsetUnset($key)
    {
        $this->items->forget($key);
    }

    /**
     * Render the contents of the paginator to HTML.
     *
     * @return string
     */
    public function toHtml()
    {
        return (string) $this->render();
    }

    /**
     * Make dynamic calls into the collection.
     *
     * @param  string  $method
     * @param  array  $parameters
     * @return mixed
     */
    public function __call($method, $parameters)
    {
        return $this->getCollection()->$method(...$parameters);
    }

    /**
     * Render the contents of the paginator when casting to string.
     *
     * @return string
     */
    public function __toString()
    {
        return (string) $this->render();
    }
}

{'repo_name': 'ladybirdweb/faveo-helpdesk', 'stars': '780', 'repo_language': 'PHP', 'file_name': 'moment.js', 'mime_type': 'text/x-pascal', 'hash': -9071105548790997005, 'source_dataset': 'data'}


#!/bin/bash
#
# Test case for loading a saved VM state from a qcow2 image
#
# Copyright (C) 2013 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

# creator
owner=mreitz@redhat.com

seq="$(basename $0)"
echo "QA output created by $seq"

here="$PWD"
tmp=/tmp/$$
status=1	# failure is the default!

_cleanup()
{
	_cleanup_test_img
}
trap "_cleanup; exit \$status" 0 1 2 3 15

# get standard environment, filters and checks
. ./common.rc
. ./common.filter

# This tests qocw2-specific low-level functionality
_supported_fmt qcow2
_supported_proto generic
_supported_os Linux

IMGOPTS="compat=1.1"
IMG_SIZE=128K

echo
echo "=== Saving and reloading a VM state to/from a qcow2 image ==="
echo
_make_test_img $IMG_SIZE
# Give qemu some time to boot before saving the VM state
bash -c 'sleep 1; echo -e "savevm 0\nquit"' |\
    $QEMU -nographic -monitor stdio -serial none -hda "$TEST_IMG" |\
    _filter_qemu
# Now try to continue from that VM state (this should just work)
echo quit |\
    $QEMU -nographic -monitor stdio -serial none -hda "$TEST_IMG" -loadvm 0 |\
    _filter_qemu

# success, all done
echo "*** done"
rm -f $seq.full
status=0

{'repo_name': 'GlacierW/MBA', 'stars': '123', 'repo_language': 'C', 'file_name': 'test_compare.c', 'mime_type': 'text/x-c', 'hash': -3070273730326249092, 'source_dataset': 'data'}


/*============================================================================

The Medical Imaging Interaction Toolkit (MITK)

Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.

Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.

============================================================================*/

#include "QmitkCrossWidget.h"

#include <QCursor>
#include <QMouseEvent>

QmitkCrossWidget::QmitkCrossWidget(QWidget *parent, Qt::WindowFlags f) : QLabel(parent, f)
{
  setEnabled(true);
  setVisible(true);
  setFocusPolicy(Qt::ClickFocus);
}

void QmitkCrossWidget::mousePressEvent(QMouseEvent *)
{
  QPoint p = QCursor::pos();

  lastX = p.x();
  lastY = p.y();

  emit SignalDeltaMove(0, 0);
}

void QmitkCrossWidget::mouseMoveEvent(QMouseEvent *)
{
  QPoint p = QCursor::pos();

  int newX = p.x();
  int newY = p.y();

  int deltaX = newX - lastX;
  int deltaY = newY - lastY;

  this->ResetMousePosition(lastX, lastY);

  emit SignalDeltaMove(deltaX, deltaY);
}

void QmitkCrossWidget::mouseReleaseEvent(QMouseEvent *)
{
}

{'repo_name': 'MITK/MITK', 'stars': '322', 'repo_language': 'C++', 'file_name': 'Overview.dox', 'mime_type': 'text/html', 'hash': -5039688059402310815, 'source_dataset': 'data'}


/* libSoX device driver: ALSA   (c) 2006-2012 SoX contributors
 *
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or (at
 * your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
 * General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include "sox_i.h"
#include <alsa/asoundlib.h>

typedef struct {
  snd_pcm_uframes_t  buf_len, period;
  snd_pcm_t          * pcm;
  char               * buf;
  unsigned int       format;
} priv_t;

static const
  struct {
    unsigned int bits;
    enum _snd_pcm_format alsa_fmt;
    unsigned int bytes; /* occupied in the buffer per sample */
    sox_encoding_t enc;
  } formats[] = {
    /* order by # of bits; within that, preferred first */
    {  8, SND_PCM_FORMAT_S8, 1, SOX_ENCODING_SIGN2 },
    {  8, SND_PCM_FORMAT_U8, 1, SOX_ENCODING_UNSIGNED },
    { 16, SND_PCM_FORMAT_S16, 2, SOX_ENCODING_SIGN2 },
    { 16, SND_PCM_FORMAT_U16, 2, SOX_ENCODING_UNSIGNED },
    { 24, SND_PCM_FORMAT_S24, 4, SOX_ENCODING_SIGN2 },
    { 24, SND_PCM_FORMAT_U24, 4, SOX_ENCODING_UNSIGNED },
    { 24, SND_PCM_FORMAT_S24_3LE, 3, SOX_ENCODING_SIGN2 },
    { 32, SND_PCM_FORMAT_S32, 4, SOX_ENCODING_SIGN2 },
    { 32, SND_PCM_FORMAT_U32, 4, SOX_ENCODING_UNSIGNED },
    {  0, 0, 0, SOX_ENCODING_UNKNOWN } /* end of list */
  };

static int select_format(
    sox_encoding_t              * encoding_,
    unsigned                    * nbits_,
    snd_pcm_format_mask_t const * mask,
    unsigned int                * format)
{
  unsigned int from = 0, to; /* NB: "to" actually points one after the last */
  int cand = -1;

  while (formats[from].bits < *nbits_ && formats[from].bits != 0)
    from++;  /* find the first entry with at least *nbits_ bits */
  for (to = from; formats[to].bits != 0; to++) ;  /* find end of list */

  while (to > 0) {
    unsigned int i, bits_next = 0;
    for (i = from; i < to; i++) {
      lsx_debug_most("select_format: trying #%u", i);
      if (snd_pcm_format_mask_test(mask, formats[i].alsa_fmt)) {
        if (formats[i].enc == *encoding_) {
          cand = i;
          break; /* found a match */
        } else if (cand == -1) /* don't overwrite a candidate that
                                       was earlier in the list */
          cand = i; /* will work, but encoding differs */
      }
    }
    if (cand != -1)
      break;
    /* no candidate found yet; now try formats with less bits: */
    to = from;
    if (from > 0)
      bits_next = formats[from-1].bits;
    while (from && formats[from-1].bits == bits_next)
      from--; /* go back to the first entry with bits_next bits */
  }

  if (cand == -1) {
    lsx_debug("select_format: no suitable ALSA format found");
    return -1;
  }

  if (*nbits_ != formats[cand].bits || *encoding_ != formats[cand].enc) {
    lsx_warn("can't encode %u-bit %s", *nbits_,
        sox_encodings_info[*encoding_].desc);
    *nbits_ = formats[cand].bits;
    *encoding_ = formats[cand].enc;
  }
  lsx_debug("selecting format %d: %s (%s)", cand,
      snd_pcm_format_name(formats[cand].alsa_fmt),
      snd_pcm_format_description(formats[cand].alsa_fmt));
  *format = cand;
  return 0;
}

#define _(x,y) do {if ((err = x y) < 0) {lsx_fail_errno(ft, SOX_EPERM, #x " error: %s", snd_strerror(err)); goto error;} } while (0)
static int setup(sox_format_t * ft)
{
  priv_t                 * p = (priv_t *)ft->priv;
  snd_pcm_hw_params_t    * params = NULL;
  snd_pcm_format_mask_t  * mask = NULL;
  snd_pcm_uframes_t      min, max;
  unsigned               n;
  int                    err;

  _(snd_pcm_open, (&p->pcm, ft->filename, ft->mode == 'r'? SND_PCM_STREAM_CAPTURE : SND_PCM_STREAM_PLAYBACK, 0));
  _(snd_pcm_hw_params_malloc, (&params));
  _(snd_pcm_hw_params_any, (p->pcm, params));
#if SND_LIB_VERSION >= 0x010009               /* Disable alsa-lib resampling: */
  _(snd_pcm_hw_params_set_rate_resample, (p->pcm, params, 0));
#endif
  _(snd_pcm_hw_params_set_access, (p->pcm, params, SND_PCM_ACCESS_RW_INTERLEAVED));

  _(snd_pcm_format_mask_malloc, (&mask));           /* Set format: */
  snd_pcm_hw_params_get_format_mask(params, mask);
  _(select_format, (&ft->encoding.encoding, &ft->encoding.bits_per_sample, mask, &p->format));
  _(snd_pcm_hw_params_set_format, (p->pcm, params, formats[p->format].alsa_fmt));
  snd_pcm_format_mask_free(mask), mask = NULL;

  n = ft->signal.rate;                              /* Set rate: */
  _(snd_pcm_hw_params_set_rate_near, (p->pcm, params, &n, 0));
  ft->signal.rate = n;

  n = ft->signal.channels;                          /* Set channels: */
  _(snd_pcm_hw_params_set_channels_near, (p->pcm, params, &n));
  ft->signal.channels = n;

  /* Get number of significant bits: */
  if ((err = snd_pcm_hw_params_get_sbits(params)) > 0)
    ft->signal.precision = min(err, SOX_SAMPLE_PRECISION);
  else lsx_debug("snd_pcm_hw_params_get_sbits can't tell precision: %s",
           snd_strerror(err));

  /* Set buf_len > > sox_globals.bufsiz for no underrun: */
  p->buf_len = sox_globals.bufsiz * 8 / formats[p->format].bytes /
      ft->signal.channels;
  _(snd_pcm_hw_params_get_buffer_size_min, (params, &min));
  _(snd_pcm_hw_params_get_buffer_size_max, (params, &max));
  p->period = range_limit(p->buf_len, min, max) / 8;
  p->buf_len = p->period * 8;
  _(snd_pcm_hw_params_set_period_size_near, (p->pcm, params, &p->period, 0));
  _(snd_pcm_hw_params_set_buffer_size_near, (p->pcm, params, &p->buf_len));
  if (p->period * 2 > p->buf_len) {
    lsx_fail_errno(ft, SOX_EPERM, "buffer too small");
    goto error;
  }

  _(snd_pcm_hw_params, (p->pcm, params));           /* Configure ALSA */
  snd_pcm_hw_params_free(params), params = NULL;
  _(snd_pcm_prepare, (p->pcm));
  p->buf_len *= ft->signal.channels;                /* No longer in `frames' */
  p->buf = lsx_malloc(p->buf_len * formats[p->format].bytes);
  return SOX_SUCCESS;

error:
  if (mask) snd_pcm_format_mask_free(mask);
  if (params) snd_pcm_hw_params_free(params);
  return SOX_EOF;
}

static int recover(sox_format_t * ft, snd_pcm_t * pcm, int err)
{
  if (err == -EPIPE)
    lsx_warn("%s-run", ft->mode == 'r'? "over" : "under");
  else if (err != -ESTRPIPE)
    lsx_warn("%s", snd_strerror(err));
  else while ((err = snd_pcm_resume(pcm)) == -EAGAIN) {
    lsx_report("suspended");
    sleep(1);                  /* Wait until the suspend flag is released */
  }
  if (err < 0 && (err = snd_pcm_prepare(pcm)) < 0)
    lsx_fail_errno(ft, SOX_EPERM, "%s", snd_strerror(err));
  return err;
}

static size_t read_(sox_format_t * ft, sox_sample_t * buf, size_t len)
{
  priv_t             * p = (priv_t *)ft->priv;
  snd_pcm_sframes_t  i, n;
  size_t             done;

  len = min(len, p->buf_len);
  for (done = 0; done < len; done += n) {
    do {
      n = snd_pcm_readi(p->pcm, p->buf, (len - done) / ft->signal.channels);
      if (n < 0 && recover(ft, p->pcm, (int)n) < 0)
        return 0;
    } while (n <= 0);

    i = n *= ft->signal.channels;
    switch (formats[p->format].alsa_fmt) {
      case SND_PCM_FORMAT_S8: {
        int8_t * buf1 = (int8_t *)p->buf;
        while (i--) *buf++ = SOX_SIGNED_8BIT_TO_SAMPLE(*buf1++,);
        break;
      }
      case SND_PCM_FORMAT_U8: {
        uint8_t * buf1 = (uint8_t *)p->buf;
        while (i--) *buf++ = SOX_UNSIGNED_8BIT_TO_SAMPLE(*buf1++,);
        break;
      }
      case SND_PCM_FORMAT_S16: {
        int16_t * buf1 = (int16_t *)p->buf;
        if (ft->encoding.reverse_bytes) while (i--)
          *buf++ = SOX_SIGNED_16BIT_TO_SAMPLE(lsx_swapw(*buf1++),);
        else
          while (i--) *buf++ = SOX_SIGNED_16BIT_TO_SAMPLE(*buf1++,);
        break;
      }
      case SND_PCM_FORMAT_U16: {
        uint16_t * buf1 = (uint16_t *)p->buf;
        if (ft->encoding.reverse_bytes) while (i--)
          *buf++ = SOX_UNSIGNED_16BIT_TO_SAMPLE(lsx_swapw(*buf1++),);
        else
          while (i--) *buf++ = SOX_UNSIGNED_16BIT_TO_SAMPLE(*buf1++,);
        break;
      }
      case SND_PCM_FORMAT_S24: {
        sox_int24_t * buf1 = (sox_int24_t *)p->buf;
        while (i--) *buf++ = SOX_SIGNED_24BIT_TO_SAMPLE(*buf1++,);
        break;
      }
      case SND_PCM_FORMAT_S24_3LE: {
        unsigned char *buf1 = (unsigned char *)p->buf;
        while (i--) {
          uint32_t temp;
          temp  = *buf1++;
          temp |= *buf1++ << 8;
          temp |= *buf1++ << 16;
          *buf++ = SOX_SIGNED_24BIT_TO_SAMPLE((sox_int24_t)temp,);
        }
        break;
      }
      case SND_PCM_FORMAT_U24: {
        sox_uint24_t * buf1 = (sox_uint24_t *)p->buf;
        while (i--) *buf++ = SOX_UNSIGNED_24BIT_TO_SAMPLE(*buf1++,);
        break;
      }
      case SND_PCM_FORMAT_S32: {
        int32_t * buf1 = (int32_t *)p->buf;
        while (i--) *buf++ = SOX_SIGNED_32BIT_TO_SAMPLE(*buf1++,);
        break;
      }
      case SND_PCM_FORMAT_U32: {
        uint32_t * buf1 = (uint32_t *)p->buf;
        while (i--) *buf++ = SOX_UNSIGNED_32BIT_TO_SAMPLE(*buf1++,);
        break;
      }
      default: lsx_fail_errno(ft, SOX_EFMT, "invalid format");
        return 0;
    }
  }
  return len;
}

static size_t write_(sox_format_t * ft, sox_sample_t const * buf, size_t len)
{
  priv_t             * p = (priv_t *)ft->priv;
  size_t             done, i, n;
  snd_pcm_sframes_t  actual;
  SOX_SAMPLE_LOCALS;

  for (done = 0; done < len; done += n) {
    i = n = min(len - done, p->buf_len);
    switch (formats[p->format].alsa_fmt) {
      case SND_PCM_FORMAT_S8: {
        int8_t * buf1 = (int8_t *)p->buf;
        while (i--) *buf1++ = SOX_SAMPLE_TO_SIGNED_8BIT(*buf++, ft->clips);
        break;
      }
      case SND_PCM_FORMAT_U8: {
        uint8_t * buf1 = (uint8_t *)p->buf;
        while (i--) *buf1++ = SOX_SAMPLE_TO_UNSIGNED_8BIT(*buf++, ft->clips);
        break;
      }
      case SND_PCM_FORMAT_S16: {
        int16_t * buf1 = (int16_t *)p->buf;
        if (ft->encoding.reverse_bytes) while (i--)
          *buf1++ = lsx_swapw(SOX_SAMPLE_TO_SIGNED_16BIT(*buf++, ft->clips));
        else
          while (i--) *buf1++ = SOX_SAMPLE_TO_SIGNED_16BIT(*buf++, ft->clips);
        break;
      }
      case SND_PCM_FORMAT_U16: {
        uint16_t * buf1 = (uint16_t *)p->buf;
        if (ft->encoding.reverse_bytes) while (i--)
          *buf1++ = lsx_swapw(SOX_SAMPLE_TO_UNSIGNED_16BIT(*buf++, ft->clips));
        else
          while (i--) *buf1++ = SOX_SAMPLE_TO_UNSIGNED_16BIT(*buf++, ft->clips);
        break;
      }
      case SND_PCM_FORMAT_S24: {
        sox_int24_t * buf1 = (sox_int24_t *)p->buf;
        while (i--) *buf1++ = SOX_SAMPLE_TO_SIGNED_24BIT(*buf++, ft->clips);
        break;
      }
      case SND_PCM_FORMAT_S24_3LE: {
        unsigned char *buf1 = (unsigned char *)p->buf;
        while (i--) {
          uint32_t temp = (uint32_t)SOX_SAMPLE_TO_SIGNED_24BIT(*buf++, ft->clips);
          *buf1++ = (temp & 0x000000FF);
          *buf1++ = (temp & 0x0000FF00) >> 8;
          *buf1++ = (temp & 0x00FF0000) >> 16;
        }
        break;
      }
      case SND_PCM_FORMAT_U24: {
        sox_uint24_t * buf1 = (sox_uint24_t *)p->buf;
        while (i--) *buf1++ = SOX_SAMPLE_TO_UNSIGNED_24BIT(*buf++, ft->clips);
        break;
      }
      case SND_PCM_FORMAT_S32: {
        int32_t * buf1 = (int32_t *)p->buf;
        while (i--) *buf1++ = SOX_SAMPLE_TO_SIGNED_32BIT(*buf++, ft->clips);
        break;
      }
      case SND_PCM_FORMAT_U32: {
        uint32_t * buf1 = (uint32_t *)p->buf;
        while (i--) *buf1++ = SOX_SAMPLE_TO_UNSIGNED_32BIT(*buf++, ft->clips);
        break;
      }
      default: lsx_fail_errno(ft, SOX_EFMT, "invalid format");
        return 0;
    }
    for (i = 0; i < n; i += actual * ft->signal.channels) do {
      actual = snd_pcm_writei(p->pcm,
          p->buf + i * formats[p->format].bytes,
          (n - i) / ft->signal.channels);
      if (errno == EAGAIN)     /* Happens naturally; don't report it: */
        errno = 0;
      if (actual < 0 && recover(ft, p->pcm, (int)actual) < 0)
        return 0;
    } while (actual < 0);
  }
  return len;
}

static int stop(sox_format_t * ft)
{
  priv_t * p = (priv_t *)ft->priv;
  snd_pcm_close(p->pcm);
  free(p->buf);
  return SOX_SUCCESS;
}

static int stop_write(sox_format_t * ft)
{
  priv_t * p = (priv_t *)ft->priv;
  size_t n = ft->signal.channels * p->period, npad = n - (ft->olength % n);
  sox_sample_t * buf = lsx_calloc(npad, sizeof(*buf)); /* silent samples */

  if (npad != n)                      /* pad to hardware period: */
    write_(ft, buf, npad);
  free(buf);
  snd_pcm_drain(p->pcm);
  return stop(ft);
}

LSX_FORMAT_HANDLER(alsa)
{
  static char const * const names[] = {"alsa", NULL};
  static unsigned const write_encodings[] = {
    SOX_ENCODING_SIGN2   , 32, 24, 16, 8, 0,
    SOX_ENCODING_UNSIGNED, 32, 24, 16, 8, 0,
    0};
  static sox_format_handler_t const handler = {SOX_LIB_VERSION_CODE,
    "Advanced Linux Sound Architecture device driver",
    names, SOX_FILE_DEVICE | SOX_FILE_NOSTDIO,
    setup, read_, stop, setup, write_, stop_write,
    NULL, write_encodings, NULL, sizeof(priv_t)
  };
  return &handler;
}

{'repo_name': 'chirlu/sox', 'stars': '255', 'repo_language': 'C', 'file_name': 'format', 'mime_type': 'text/plain', 'hash': -7260468654432801693, 'source_dataset': 'data'}


fileFormatVersion: 2
guid: ced698934296748419bf72ad4ac8a66b
timeCreated: 1502400449
licenseType: Free
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:

{'repo_name': 'ChristophGeske/ARCoreInsideOutTrackingGearVr', 'stars': '129', 'repo_language': 'C#', 'file_name': 'AudioManager.asset', 'mime_type': 'text/plain', 'hash': 3425356152462775997, 'source_dataset': 'data'}


<?php

/**
 * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures
 * all the essential functionalities required for any enterprise.
 * Copyright (C) 2006 OrangeHRM Inc., http://www.orangehrm.com
 *
 * OrangeHRM is free software; you can redistribute it and/or modify it under the terms of
 * the GNU General Public License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * OrangeHRM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with this program;
 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301, USA
 */

/**
 * Description of EvaluateSearchReviewListConfigurationFactory
 *
 */
class EvaluateSearchReviewListConfigurationFactory extends ohrmListConfigurationFactory {

    private $isReviewer;

    public function __construct($isReviewer) {
        $this->isReviewer = $isReviewer;
    }

    protected function init() {

        $header2 = new DueDateHeader();
        $header3 = new ReviewPeriodHeader();
        $header4 = new ListHeader();
        $header5 = new ListHeader();
        $header6 = new ListHeader();

        if ($this->isReviewer) {
            $header1 = new ListHeader();
            $header7 = new ManagePerformanceActionHeader();

            $header1->populateFromArray(array(
                'name' => 'Employee',
                'width' => '25%',
                'isSortable' => false,
                'sortField' => null,
                'elementType' => 'label',
                'elementProperty' => array('getter' => array('getEmployee', 'getFullName')),
            ));

            $reviewStatus = array();
        $reviewStatus [ReviewStatusActivated::getInstance()->getStatusId()] = ReviewStatusActivated::getInstance()->getName();
        $reviewStatus [ReviewStatusApproved::getInstance()->getStatusId()] = ReviewStatusApproved::getInstance()->getName();
        $reviewStatus [ReviewStatusInProgress::getInstance()->getStatusId()] = ReviewStatusInProgress::getInstance()->getName();
        $reviewStatus [ReviewStatusInactive::getInstance()->getStatusId()] = ReviewStatusInactive::getInstance()->getName();

        $header6->populateFromArray(array(
            'name' => 'Status',
            'width' => '10%',
            'isSortable' => false,
            'sortField' => null,
            'filters' => array('EnumCellFilter' => array(
                    'enum' => $reviewStatus,
                    'default' => ''),
                'I18nCellFilter' => array()
            ),
            'elementType' => 'label',
            'textAlignmentStyle' => 'left',
            'elementProperty' => array('getter' => 'getStatusId'),
        ));

            $header7->populateFromArray(array(
                'name' => 'Action',
                'isSortable' => false,
                'sortField' => null,
                'elementType' => 'ManagePerformanceAction',
                'elementProperty' => array(
                    'placeholderGetters' => array('id' => 'getId'),
                    'urlPattern' => 'index.php/performance/performanceReviewProgress?id={id}'),
            ));
        } else {
            $header1 = new PerformanceEvaluationLinkHeader();
            $header7 = new ListHeader();

            $header1->populateFromArray(array(
                'name' => 'Employee',
                'width' => '20%',
                'isSortable' => false,
                'sortField' => null,
                'elementType' => 'performanceEvaluationLink',
                'elementProperty' => array(
                    'labelGetter' => array('getEmployee', 'getFullName'),
                    'placeholderGetters' => array('id' => 'getId'),
                    'urlPattern' => 'index.php/performance/reviewEvaluate/id/{id}'),
            ));

            $reviewStatus = array();
            $reviewStatus [ReviewStatusActivated::getInstance()->getStatusId()] = ReviewStatusActivated::getInstance()->getName();
            $reviewStatus [ReviewStatusApproved::getInstance()->getStatusId()] = ReviewStatusApproved::getInstance()->getName();
            $reviewStatus [ReviewStatusInProgress::getInstance()->getStatusId()] = ReviewStatusInProgress::getInstance()->getName();
            $reviewStatus [ReviewStatusInactive::getInstance()->getStatusId()] = ReviewStatusInactive::getInstance()->getName();

            $header6->populateFromArray(array(
                'name' => 'Status',
                'width' => '15%',
                'isSortable' => false,
                'sortField' => null,
                'filters' => array('EnumCellFilter' => array(
                        'enum' => $reviewStatus,
                        'default' => ''),
                    'I18nCellFilter' => array()
                ),
                'elementType' => 'label',
                'textAlignmentStyle' => 'left',
                'elementProperty' => array('getter' => 'getStatusId'),
            ));

            $reviewStatus = array();
            $reviewStatus [ReviewerReviewStatusActivated::getInstance()->getStatusId()] = ReviewerReviewStatusActivated::getInstance()->getName();
            $reviewStatus [ReviewerReviewStatusCompleted::getInstance()->getStatusId()] = ReviewerReviewStatusCompleted::getInstance()->getName();
            $reviewStatus [ReviewerReviewStatusInProgress::getInstance()->getStatusId()] = ReviewerReviewStatusInProgress::getInstance()->getName();

            $header7->populateFromArray(array(
                'name' => 'Evaluation Status',
                'width' => '15%',
                'isSortable' => false,
                'sortField' => null,
                'filters' => array('EnumCellFilter' => array(
                        'enum' => $reviewStatus,
                        'default' => ''),
                    'I18nCellFilter' => array()
                ),
                'elementType' => 'label',
                'textAlignmentStyle' => 'left',
                'elementProperty' => array('getter' => array('getReviewers', 'getFirst', 'getStatus')),
            ));
        }

        $header2->populateFromArray(array(
            'name' => 'Due Date',
            'width' => '10%',
            'isSortable' => false,
            'sortField' => null,
            'elementType' => 'DueDate',
        ));

        $header3->populateFromArray(array(
            'name' => 'Review Period',
            'width' => '20%',
            'isSortable' => false,
            'sortField' => null,
            'elementType' => 'ReviewPeriod',
        ));

        $header4->populateFromArray(array(
            'name' => 'Job Title',
            'width' => '10%',
            'isSortable' => false,
            'sortField' => null,
            'elementType' => 'label',
            'elementProperty' => array('getter' => array('getJobTitle', 'getJobTitle')),
        ));

        $header5->populateFromArray(array(
            'name' => 'Department',
            'width' => '10%',
            'isSortable' => false,
            'sortField' => null,
            'elementType' => 'label',
            'elementProperty' => array('getter' => array('getDepartment', 'getName')),
        ));

        $this->headers = array($header1, $header2, $header3, $header4, $header5, $header6, $header7);
    }

    /**
     *
     * @return string
     */
    public function getClassName() {
        return 'EvaluationReviewList';
    }

}

{'repo_name': 'orangehrm/orangehrm', 'stars': '216', 'repo_language': 'PHP', 'file_name': 'AttendanceDao.yml', 'mime_type': 'text/plain', 'hash': 7678638983882979133, 'source_dataset': 'data'}


object ConfirmPackageListDialog: TConfirmPackageListDialog
  Left = 342
  Height = 273
  Top = 152
  Width = 462
  BorderIcons = [biSystemMenu]
  Caption = 'ConfirmPackageListDialog'
  ClientHeight = 273
  ClientWidth = 462
  OnCreate = FormCreate
  Position = poScreenCenter
  LCLVersion = '1.5'
  object PackagesGrid: TStringGrid
    Left = 6
    Height = 229
    Top = 6
    Width = 450
    Align = alClient
    AutoEdit = False
    BorderSpacing.Around = 6
    ColCount = 3
    FixedCols = 0
    Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goRowSelect, goThumbTracking, goColSpanning, goSmoothScroll]
    TabOrder = 0
  end
  object ButtonPanel1: TButtonPanel
    Left = 6
    Height = 26
    Top = 241
    Width = 450
    OKButton.Name = 'OKButton'
    OKButton.DefaultCaption = True
    HelpButton.Name = 'HelpButton'
    HelpButton.DefaultCaption = True
    CloseButton.Name = 'CloseButton'
    CloseButton.DefaultCaption = True
    CancelButton.Name = 'CancelButton'
    CancelButton.DefaultCaption = True
    TabOrder = 1
    ShowButtons = [pbOK, pbCancel]
    ShowBevel = False
  end
end

{'repo_name': 'alrieckert/lazarus', 'stars': '110', 'repo_language': 'Pascal', 'file_name': 'fr.po', 'mime_type': 'text/x-po', 'hash': 5531346534815867356, 'source_dataset': 'data'}


require_relative '../../spec_helper'
require_relative 'fixtures/classes'

context "Creating UnboundMethods" do
  specify "there is no difference between Method#unbind and Module#instance_method" do
    UnboundMethodSpecs::Methods.instance_method(:foo).should be_kind_of(UnboundMethod)
    UnboundMethodSpecs::Methods.new.method(:foo).unbind.should be_kind_of(UnboundMethod)
  end
end

describe "UnboundMethod#==" do
  before :all do
    @from_module = UnboundMethodSpecs::Methods.instance_method(:foo)
    @from_unbind = UnboundMethodSpecs::Methods.new.method(:foo).unbind

    @with_block = UnboundMethodSpecs::Methods.instance_method(:with_block)

    @includee = UnboundMethodSpecs::Mod.instance_method(:from_mod)
    @includer = UnboundMethodSpecs::Methods.instance_method(:from_mod)

    @alias_1 = UnboundMethodSpecs::Methods.instance_method(:alias_1)
    @alias_2 = UnboundMethodSpecs::Methods.instance_method(:alias_2)

    @original_body = UnboundMethodSpecs::Methods.instance_method(:original_body)
    @identical_body = UnboundMethodSpecs::Methods.instance_method(:identical_body)

    @parent = UnboundMethodSpecs::Parent.instance_method(:foo)
    @child1 = UnboundMethodSpecs::Child1.instance_method(:foo)
    @child2 = UnboundMethodSpecs::Child2.instance_method(:foo)

    @child1_alt = UnboundMethodSpecs::Child1.instance_method(:foo)

    @discard_1 = UnboundMethodSpecs::Methods.instance_method(:discard_1)
    @discard_2 = UnboundMethodSpecs::Methods.instance_method(:discard_2)

    @method_one = UnboundMethodSpecs::Methods.instance_method(:one)
    @method_two = UnboundMethodSpecs::Methods.instance_method(:two)
  end

  it "returns true if objects refer to the same method" do
    (@from_module == @from_module).should == true
    (@from_unbind == @from_unbind).should == true
    (@from_module == @from_unbind).should == true
    (@from_unbind == @from_module).should == true
    (@with_block  == @with_block).should == true
  end

  it "returns true if either is an alias for the other" do
    (@from_module == @alias_1).should == true
    (@alias_1 == @from_module).should == true
  end

  it "returns true if both are aliases for a third method" do
    (@from_module == @alias_1).should == true
    (@alias_1 == @from_module).should == true

    (@from_module == @alias_2).should == true
    (@alias_2 == @from_module).should == true

    (@alias_1 == @alias_2).should == true
    (@alias_2 == @alias_1).should == true
  end

  it "returns true if same method is extracted from the same subclass" do
    (@child1 == @child1_alt).should == true
    (@child1_alt == @child1).should == true
  end

  it "returns false if UnboundMethods are different methods" do
    (@method_one == @method_two).should == false
    (@method_two == @method_one).should == false
  end

  it "returns false if both have identical body but are not the same" do
    (@original_body == @identical_body).should == false
    (@identical_body == @original_body).should == false
  end

  it "returns false if same method but one extracted from a subclass" do
    (@parent == @child1).should == false
    (@child1 == @parent).should == false
  end

  it "returns false if same method but extracted from two different subclasses" do
    (@child2 == @child1).should == false
    (@child1 == @child2).should == false
  end

  it "returns false if methods are the same but added from an included Module" do
    (@includee == @includer).should == false
    (@includer == @includee).should == false
  end

  it "returns false if both have same Module, same name, identical body but not the same" do
    class UnboundMethodSpecs::Methods
      def discard_1; :discard; end
    end

    (@discard_1 == UnboundMethodSpecs::Methods.instance_method(:discard_1)).should == false
  end
end

{'repo_name': 'artichoke/artichoke', 'stars': '1583', 'repo_language': 'Rust', 'file_name': 'mod.rs', 'mime_type': 'text/plain', 'hash': 5441648714239089862, 'source_dataset': 'data'}


/*
 * Copyright (c) 2013 - 2014, Freescale Semiconductor, Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 * o Redistributions of source code must retain the above copyright notice, this list
 *   of conditions and the following disclaimer.
 *
 * o Redistributions in binary form must reproduce the above copyright notice, this
 *   list of conditions and the following disclaimer in the documentation and/or
 *   other materials provided with the distribution.
 *
 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
 *   contributors may be used to endorse or promote products derived from this
 *   software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "fsl_edma_driver.h"
#if FSL_FEATURE_SOC_DMA_COUNT

/*******************************************************************************
 * Variables
 ******************************************************************************/

/*******************************************************************************
 * Code
 ******************************************************************************/
/*! @brief Edma Handler*/
#if  (FSL_FEATURE_EDMA_MODULE_CHANNEL == 4)

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA0_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(0);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA1_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(1);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA2_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(2);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA3_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(3);
}

#elif (FSL_FEATURE_EDMA_MODULE_CHANNEL <= 16)
/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA0_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(0);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA1_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(1);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA2_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(2);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA3_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(3);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA4_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(4);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA5_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(5);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA6_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(6);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA7_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(7);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA8_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(8);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA9_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(9);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA10_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(10);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA11_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(11);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA12_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(12);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA13_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(13);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA14_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(14);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA15_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(15);
}

#else
void DMA0_DMA16_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(0);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA1_DMA17_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(1);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA2_DMA18_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(2);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA3_DMA19_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(3);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA4_DMA20_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(4);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA5_DMA21_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(5);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA6_DMA22_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(6);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA7_DMA23_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(7);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA8_DMA24_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(8);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA9_DMA25_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(9);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA10_DMA26_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(10);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA11_DMA27_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(11);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA12_DMA28_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(12);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA13_DMA29_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(13);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA14_DMA30_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(14);
}

/*! @brief EDMA IRQ handler with the same name in the startup code*/
void DMA15_DMA31_IRQHandler(void)
{
    EDMA_DRV_IRQHandler(15);
}
#endif

#if FSL_FEATURE_EDMA_HAS_ERROR_IRQ
/*! @brief EDMA ERROR IRQ handler with the same name in the startup code*/
void DMA_Error_IRQHandler(void)
{
    EDMA_DRV_ErrorIRQHandler(0);
}
#endif
#endif

/*******************************************************************************
 * EOF
 ******************************************************************************/

{'repo_name': 'MikroElektronika/HEXIWEAR', 'stars': '105', 'repo_language': 'C', 'file_name': 'OtapBootloader.BootloaderOTAP_KW40Z4.general.xcl', 'mime_type': 'text/plain', 'hash': -8769542071026786420, 'source_dataset': 'data'}


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:app="http://schemas.android.com/apk/res-auto"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:background="@android:color/transparent"
              android:gravity="center">

    <com.airbnb.lottie.LottieAnimationView
        android:id="@+id/lottieAnimationView"
        android:layout_width="72dp"
        android:layout_height="72dp"
        android:background="@color/colorBackgroundSystemTag"
        app:lottie_rawRes="@raw/plane"/>

</LinearLayout>

{'repo_name': 'Leeeyou/RsKotlin', 'stars': '157', 'repo_language': 'Kotlin', 'file_name': 'TintableImageView.java', 'mime_type': 'text/x-java', 'hash': 9186641569915865047, 'source_dataset': 'data'}


<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Filter
 * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id$
 */

/**
 * Encryption interface
 *
 * @category   Zend
 * @package    Zend_Filter
 * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
interface Zend_Filter_Encrypt_Interface
{
    /**
     * Encrypts $value with the defined settings
     *
     * @param  string $value Data to encrypt
     * @return string The encrypted data
     */
    public function encrypt($value);

    /**
     * Decrypts $value with the defined settings
     *
     * @param  string $value Data to decrypt
     * @return string The decrypted data
     */
    public function decrypt($value);
}

{'repo_name': 'OpenMage/magento-lts', 'stars': '496', 'repo_language': 'PHP', 'file_name': 'iestyles.css', 'mime_type': 'text/plain', 'hash': 806394362164856293, 'source_dataset': 'data'}


package com.jetbrains.rider.plugins.unity.ideaInterop.fileTypes.uss

import com.intellij.openapi.fileTypes.LanguageFileType
import icons.UnityIcons

object UssFileType: LanguageFileType(UssLanguage) {
    override fun getIcon() = UnityIcons.FileTypes.Uss
    override fun getName() = "USS"
    override fun getDefaultExtension() = "uss"
    override fun getDescription() = "UIElement Style Sheet File (Unity)"
}

{'repo_name': 'JetBrains/resharper-unity', 'stars': '868', 'repo_language': 'C#', 'file_name': 'projectSettingsUpdater.xml', 'mime_type': 'text/xml', 'hash': 5393073367635763493, 'source_dataset': 'data'}


package jwt

import (
	"crypto/rsa"
	"crypto/x509"
	"encoding/pem"
	"errors"
)

var (
	ErrKeyMustBePEMEncoded = errors.New("Invalid Key: Key must be PEM encoded PKCS1 or PKCS8 private key")
	ErrNotRSAPrivateKey    = errors.New("Key is not a valid RSA private key")
	ErrNotRSAPublicKey     = errors.New("Key is not a valid RSA public key")
)

// Parse PEM encoded PKCS1 or PKCS8 private key
func ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error) {
	var err error

	// Parse PEM block
	var block *pem.Block
	if block, _ = pem.Decode(key); block == nil {
		return nil, ErrKeyMustBePEMEncoded
	}

	var parsedKey interface{}
	if parsedKey, err = x509.ParsePKCS1PrivateKey(block.Bytes); err != nil {
		if parsedKey, err = x509.ParsePKCS8PrivateKey(block.Bytes); err != nil {
			return nil, err
		}
	}

	var pkey *rsa.PrivateKey
	var ok bool
	if pkey, ok = parsedKey.(*rsa.PrivateKey); !ok {
		return nil, ErrNotRSAPrivateKey
	}

	return pkey, nil
}

// Parse PEM encoded PKCS1 or PKCS8 private key protected with password
func ParseRSAPrivateKeyFromPEMWithPassword(key []byte, password string) (*rsa.PrivateKey, error) {
	var err error

	// Parse PEM block
	var block *pem.Block
	if block, _ = pem.Decode(key); block == nil {
		return nil, ErrKeyMustBePEMEncoded
	}

	var parsedKey interface{}

	var blockDecrypted []byte
	if blockDecrypted, err = x509.DecryptPEMBlock(block, []byte(password)); err != nil {
		return nil, err
	}

	if parsedKey, err = x509.ParsePKCS1PrivateKey(blockDecrypted); err != nil {
		if parsedKey, err = x509.ParsePKCS8PrivateKey(blockDecrypted); err != nil {
			return nil, err
		}
	}

	var pkey *rsa.PrivateKey
	var ok bool
	if pkey, ok = parsedKey.(*rsa.PrivateKey); !ok {
		return nil, ErrNotRSAPrivateKey
	}

	return pkey, nil
}

// Parse PEM encoded PKCS1 or PKCS8 public key
func ParseRSAPublicKeyFromPEM(key []byte) (*rsa.PublicKey, error) {
	var err error

	// Parse PEM block
	var block *pem.Block
	if block, _ = pem.Decode(key); block == nil {
		return nil, ErrKeyMustBePEMEncoded
	}

	// Parse the key
	var parsedKey interface{}
	if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil {
		if cert, err := x509.ParseCertificate(block.Bytes); err == nil {
			parsedKey = cert.PublicKey
		} else {
			return nil, err
		}
	}

	var pkey *rsa.PublicKey
	var ok bool
	if pkey, ok = parsedKey.(*rsa.PublicKey); !ok {
		return nil, ErrNotRSAPublicKey
	}

	return pkey, nil
}

{'repo_name': '42wim/matterbridge', 'stars': '2758', 'repo_language': 'Go', 'file_name': 'matterhook.go', 'mime_type': 'text/plain', 'hash': -1697897697247465104, 'source_dataset': 'data'}


{'repo_name': 'jefflomacy/villagerdb', 'stars': '170', 'repo_language': 'JavaScript', 'file_name': 'tammi.json', 'mime_type': 'text/plain', 'hash': 8307639876040898275, 'source_dataset': 'data'}


/*
 * Licensed to Crate under one or more contributor license agreements.
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.  Crate 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.
 *
 * However, if you have executed another commercial license agreement
 * with Crate these terms will supersede the license and you may use the
 * software solely pursuant to the terms of the relevant commercial
 * agreement.
 */

package io.crate.execution.engine;

import io.crate.data.RowConsumer;
import io.crate.execution.dsl.phases.ExecutionPhase;
import io.crate.execution.jobs.transport.JobResponse;
import org.elasticsearch.action.ActionListener;
import io.crate.common.collections.Tuple;

import java.util.List;

class FailureOnlyResponseListener implements ActionListener<JobResponse> {

    private final List<Tuple<ExecutionPhase, RowConsumer>> consumers;
    private final InitializationTracker initializationTracker;

    FailureOnlyResponseListener(List<Tuple<ExecutionPhase, RowConsumer>> consumers, InitializationTracker initializationTracker) {
        this.consumers = consumers;
        this.initializationTracker = initializationTracker;
    }

    @Override
    public void onResponse(JobResponse jobResponse) {
        initializationTracker.jobInitialized();
        if (jobResponse.hasDirectResponses()) {
            for (Tuple<ExecutionPhase, RowConsumer> consumer : consumers) {
                consumer.v2().accept(null, new IllegalStateException("Got a directResponse but didn't expect one"));
            }
        }
    }

    @Override
    public void onFailure(Exception e) {
        initializationTracker.jobInitializationFailed(e);
        // could be a preparation failure - in that case the regular error propagation doesn't work as it hasn't been set up yet
        // so fail rowReceivers directly
        for (Tuple<ExecutionPhase, RowConsumer> consumer : consumers) {
            consumer.v2().accept(null, e);
        }
    }
}

{'repo_name': 'crate/crate', 'stars': '2777', 'repo_language': 'Java', 'file_name': 'AssertingLeafReader.java', 'mime_type': 'text/x-java', 'hash': 6303730988591340778, 'source_dataset': 'data'}


/**
 * This header is generated by class-dump-z 0.2a.
 * class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3.
 *
 * Source: /System/Library/PrivateFrameworks/BackRow.framework/BackRow
 */

#import "BRSingleton.h"

@class NSConditionLock, NSMutableArray;

__attribute__((visibility("hidden")))
@interface BRTaskManager : BRSingleton {
@private
	NSMutableArray *_taskQueue;	// 4 = 0x4
	NSConditionLock *_queueLock;	// 8 = 0x8
	int _numberOfTaskThreadsRunning;	// 12 = 0xc
	int _numberOfFinishingThreads;	// 16 = 0x10
}
+ (void)setSingleton:(id)singleton;	// 0x315b1465
+ (id)singleton;	// 0x315b13b5
- (id)init;	// 0x315b13c1
- (void)_processTasks;	// 0x315b15e5
- (void)cancelTask:(id)task;	// 0x3163c551
- (void)dealloc;	// 0x3163bf31
- (void)scheduleTask:(id)task;	// 0x315b1471
@end

{'repo_name': 'firecore/Seas0nPass', 'stars': '157', 'repo_language': 'C', 'file_name': 'libusbkit.mm', 'mime_type': 'text/x-c', 'hash': -4581539591825871560, 'source_dataset': 'data'}


---
name: "GDG DevFest"
website: https://2019.devfest.gdgpisa.it/
location: Pisa, Italy

date_start: 2019-04-13
date_end:   2019-04-13

cfp:
  start: 2018-12-27
  end:   2019-02-05
  site:  https://docs.google.com/forms/d/e/1FAIpQLSdgEKpaxBBCCez1B79X4U4m0iCZDAygigEPbqu_guDCxQpnHA/viewform
---

{'repo_name': 'AndroidStudyGroup/conferences', 'stars': '1322', 'repo_language': 'Ruby', 'file_name': 'default.html', 'mime_type': 'text/html', 'hash': -1525082729503664544, 'source_dataset': 'data'}


# coding=utf-8
# Copyright 2020 The Mesh TensorFlow Authors.
#
# 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.

r"""Wrapper around vocabulary from the Tensor2Tensor library.
"""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import os
import gin

from mesh_tensorflow.transformer import vocabulary

class T2tVocabulary(vocabulary.Vocabulary):
  """Wrapper around tensor2tensor SubwordTextEncoder.

  1 is already reserved for EOS - no need to shift.
  """

  def __init__(self, filepath):
    """Create a T2tVocabulary.

    Args:
      filepath: a string
    """
    # Only import tensor2tensor if necessary.
    from tensor2tensor.data_generators import text_encoder   # pylint: disable=g-import-not-at-top
    from tensor2tensor.data_generators.ops import subword_text_encoder_ops   # pylint: disable=g-import-not-at-top

    self._filepath = filepath
    self._subword_text_encoder = text_encoder.SubwordTextEncoder(filepath)
    self._subword_text_encoder_encode = (
        subword_text_encoder_ops.subword_text_encoder_encode)

  @property
  def vocab_size(self):
    """Number of ids (including 0=PAD and 1=EOS).

    Returns:
      an integer
    """
    return self._subword_text_encoder.vocab_size

  def encode(self, s):
    """Encode a python string as a list of integers.

    Args:
      s: a string
    Returns:
      a list of integers (not terminated by EOS)
    """
    return self._subword_text_encoder.encode(s)

  def decode(self, ids):
    """Decode a list of integers to a python string.

    Args:
      ids: a list of integers (not terminated by EOS)
    Returns:
      a string
    """
    return self._subword_text_encoder.decode(ids)

  def encode_tf(self, s):
    """Encode a tf.Scalar string to a tf.Tensor.

    This will be necessary for on-the-fly tokenization.

    Args:
      s: a tf.Scalar with dtype tf.string
    Returns:
      a 1d tf.Tensor with dtype tf.int32
    """
    ids = self._subword_text_encoder_encode(s, self._filepath)
    # the c++ op apppends 1=EOS - drop it.
    return ids[:-1]

@gin.configurable
def get_t2t_vocabulary(data_dir=gin.REQUIRED,
                       vocabulary_filename=gin.REQUIRED):
  return T2tVocabulary(os.path.join(data_dir, vocabulary_filename))

{'repo_name': 'tensorflow/mesh', 'stars': '520', 'repo_language': 'Python', 'file_name': 'large.json', 'mime_type': 'text/plain', 'hash': 3656386312574937893, 'source_dataset': 'data'}


/**
 *
 * HairColor enumeration
 *
 */
public enum HairColor {

	WHITE, BLOND, RED, BROWN, BLACK;

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

{'repo_name': 'Chaklader/Object-Oriented-Design', 'stars': '150', 'repo_language': 'Java', 'file_name': 'CharacterTest.java', 'mime_type': 'text/x-java', 'hash': -9093133038243445453, 'source_dataset': 'data'}


/*
 * Copyright (c) 1997-1999
 * Silicon Graphics Computer Systems, Inc.
 *
 * Copyright (c) 1999
 * Boris Fomitchev
 *
 * This material is provided "as is", with absolutely no warranty expressed
 * or implied. Any use is at your own risk.
 *
 * Permission to use or copy this software for any purpose is hereby granted
 * without fee, provided the above notices are retained on all copies.
 * Permission to modify the code and to distribute modified code is granted,
 * provided the above notices are retained, and a notice that the code was
 * modified is included with the above copyright notice.
 *
 */

#ifndef _STLP_STRING_HASH_H
# define _STLP_STRING_HASH_H

#ifndef _STLP_HASH_FUN_H
# include <stl/_hash_fun.h>
#endif

#ifndef _STLP_STRING_H
# include <stl/_string.h>
#endif

_STLP_BEGIN_NAMESPACE

template <class _CharT, class _Traits, class _Alloc>
_STLP_INLINE_LOOP size_t
__stl_string_hash(const basic_string<_CharT,_Traits,_Alloc>& __s) {
  unsigned long __h = 0;
  typedef typename basic_string<_CharT,_Traits,_Alloc>::const_pointer const_ptr;
  size_t __len = __s.size();
  const _CharT* __data = __s.data();
  for ( size_t __i = 0; __i < __len; ++__i)
    __h = 5*__h + __data[__i];
  return size_t(__h);
}

#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION

template <class _CharT, class _Traits, class _Alloc>
struct hash<basic_string<_CharT,_Traits,_Alloc> > {
  size_t operator()(const basic_string<_CharT,_Traits,_Alloc>& __s) const
    { return __stl_string_hash(__s); }
};

#else

_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC hash<string> {
  size_t operator()(const string& __s) const
    { return __stl_string_hash(__s); }
};

# if defined (_STLP_HAS_WCHAR_T)
_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC hash<wstring> {
  size_t operator()(const wstring& __s) const
    { return __stl_string_hash(__s); }
};
# endif

#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */

_STLP_END_NAMESPACE

#endif

{'repo_name': 'unknownworlds/NS', 'stars': '220', 'repo_language': 'C++', 'file_name': 'steam installer.iss', 'mime_type': 'text/plain', 'hash': 7196975600965651257, 'source_dataset': 'data'}


<!DOCTYPE html>

        <meta charset="UTF-8" />
        <meta name="robots" content="index, follow, all" />
        <title>FFMpeg\Format\Video | PHP-FFMpeg API</title>
                    <link rel="stylesheet" type="text/css" href="../../stylesheet.css">

Classes

Namespaces

Interfaces

Traits

Index

PHP-FFMpeg API

Namespace

FFMpeg\Format\Video

                    DefaultVideo
                    The abstract default Video format

                    Ogg
                    The Ogg video format

                    WMV
                    The WMV video format

                    WMV3
                    The WMV video format

                    WebM
                    The WebM video format

                    X264
                    The X264 video format

        Generated by Sami, the API Documentation Generator.

{'repo_name': 'PHP-FFMpeg/PHP-FFMpeg', 'stars': '3424', 'repo_language': 'PHP', 'file_name': 'FrameTest.php', 'mime_type': 'text/x-php', 'hash': -224426654585817443, 'source_dataset': 'data'}


<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <config>
    <add key="repositoryPath" value="%ESRI_SAMPLES_TEMP_BUILD_ROOT%\packages" />
  </config>
  <packageRestore>
    <add key="enabled" value="True" />
  </packageRestore>
  <packageSources>
    <add key="local" value="%ESRI_SAMPLES_TEMP_BUILD_ROOT%\QUARTZ_LATEST_GOOD" />
  </packageSources>
</configuration>

{'repo_name': 'Esri/arcgis-runtime-samples-dotnet', 'stars': '250', 'repo_language': 'C#', 'file_name': 'AssemblyInfo.cs', 'mime_type': 'text/plain', 'hash': -2212849456376995045, 'source_dataset': 'data'}